neuroencoder-sleep-2026-11, agrees with human sleep scorers. Every number comes from nights the model did not train on.
Summary
- Held-out sets (served model). Pooled kappa with EEG and EOG:
- Sleep-EDF telemetry, 44 nights: 0.755 for us, 0.732 for the reference.
- BOAS, 128 nights: 0.687 for us, 0.659 for the reference.
- We are better on 36 of 44 and 88 of 128 nights.
- Leave-one-site-out (eight sites). Pooled kappa ranges from 0.672 (CinC 2018) to 0.807 (EESM home PSG).
- By pooled kappa we are above the reference on five sites (on Sleep-EDF SC only by 0.001). It is behind the reference on CAP and ANPHY, and slightly below on DOD (0.731 vs 0.742, within the confidence intervals).
- EEG only. We are above the reference’s EEG-only classifier on 9 of 10 test sets by pooled kappa.
- The exception is CAP: 0.669 for us, 0.681 for the reference.
- For context. Two experienced human scorers following AASM rules agree at about kappa 0.76 (Danker-Hopfe et al., J Sleep Res 2009).
- Weakest stages. N1 is the least reliable stage. N3 depends on how the lab scores deep sleep.
What was measured
The model is only tested on data it did not see in training. Leave-one-site-out. The model was trained on eight public sources (see How it was trained). For each source, we trained the same recipe on the other seven and tested on the eighth.- The teacher labels used in each fold (mixed with the human labels) came from models that had also never seen the test source.
- Each fold’s prediction is the average of three training seeds, the same way the served model works.
- These fold models are not the served model. They estimate how the recipe does at a lab it has never seen.
- Sleep-EDF telemetry: 44 nights from 22 subjects in a placebo/temazepam study.
- The nights were staged as whole recordings from the first sample, as uploaded.
- These subjects and nights are new to the model. The lab and montage are not: they match the Sleep-EDF sleep cassette nights in training, so this is not a new site.
- BOAS (Bitbrain Open Access Sleep, CC0): 128 nights from 100 adults, staged over their scored span.
- This is a different lab.
- During development we tried adding it to training and left it out on purpose: it scores N3 much more sparingly than the other labs (see Where it is weaker).
Reference
The reference is YASA’s pretrained sleep-staging classifier (version 0.7.0).- It ran on exactly the same nights, epochs and channels as our model.
- It is shown in two variants: EEG plus EOG, and EEG only.
Metrics
All comparisons are against the human scores of each dataset. Stages 3 and 4 under the older R&K rules are merged into N3. Unscored, movement and artefact epochs are left out.- Cohen’s kappa, pooled: computed over all epochs of a test set together.
- Cohen’s kappa, mean per night: kappa computed for each night, then averaged.
- 95% confidence intervals: bootstrap over nights, 2,000 resamples, percentiles.
- Nights are resampled, not epochs, because epochs within a night are not independent.
- Macro-F1 and per-stage F1: for W, N1, N2, N3 and REM.
- Paired comparison with the reference: for each night, our kappa minus the reference’s kappa. We report:
- the mean difference with its bootstrap 95% CI;
- the number of nights where we are better, worse and tied;
- a two-sided sign test on those counts.
- The CI is about the size of the average difference.
- The sign test is about how often one model wins a night.
Results with EEG and EOG
This is the default variant. The API uses it whenever the recording has an EOG channel.
Pooled Cohen's kappa with 95% CIs over nights, ours (blue) and YASA's pretrained classifier (orange), for the eight leave-one-site-out folds and the two fully held-out sets. Left: EEG and EOG. Right: EEG only. The asterisk on HMC is the same caveat as † in the tables.
- Clearly better than the reference: both held-out sets, HMC, SVUH-UCD, CinC 2018 and EESM. Here the CI excludes zero and the sign test agrees.
- Sleep-EDF SC is level. The mean difference is +0.004 and its CI spans zero, although we win more nights (91 of 153, p = 0.023).
- CAP and ANPHY are below the reference.
- The mean difference is negative and its CI excludes zero.
- The sign test does not reach 0.05 (p = 0.092 and 0.061).
- DOD is slightly below. The pooled kappa is 0.731 vs 0.742. The difference is within the confidence intervals: the per-night difference is -0.011, and its CI spans zero.

Kappa per night, ours (vertical) against YASA (horizontal), with EEG and EOG, on the two fully held-out sets. Points above the diagonal are nights where ours agrees better with the human scorer.
Per-stage F1 with EEG and EOG
Each cell shows ours / YASA.- W, N1 and REM: ours is usually higher.
- N2: the two are close.
- N3: ours is lower on most sites. The exceptions are SVUH-UCD, EESM and ANPHY, where it is level or higher.

Share of each human-scored stage (rows) given each predicted stage (columns) by our model with EEG and EOG. Left: the eight leave-one-site-out folds pooled, of which 58% of epochs are CinC 2018. Middle: Sleep-EDF telemetry. Right: BOAS.
Results with EEG only
The API uses this variant when the recording has no EOG channel. The reference is YASA’s EEG-only classifier on the same EEG channel.- CAP: below by pooled kappa, and level per night (the CI spans zero).
- ANPHY: level. The pooled kappa is slightly higher (0.755 vs 0.752), the mean per night slightly lower, and we win only 9 of 29 nights.
Where it is weaker
- Behind the reference with EEG and EOG on CAP and ANPHY, and slightly below on DOD.
- CAP: the mean per-night difference is -0.022 (CI excludes zero), and the pooled kappa is 0.678 vs 0.701.
- ANPHY: the mean per-night difference is -0.018 (CI excludes zero), and the pooled kappa is 0.774 vs 0.790.
- DOD: the pooled kappa is 0.731 vs 0.742, within the confidence intervals.
- N1 is the least reliable stage.
- With EEG and EOG, its F1 runs from 0.329 to 0.514 across the ten sets.
- N1 epochs are mostly confused with W and N2. In the pooled leave-one-site-out folds, 31% of human-N1 epochs are called N1, 36% N2 and 24% W.
- Human scorers also disagree most on N1.
- N3 depends on how the lab scores deep sleep.
- Where the model puts the N2/N3 boundary does not match every lab’s convention, and the error goes both ways (from the confusion matrices, EEG and EOG):
- Too much N3 on Sleep-EDF SC, DOD, CinC 2018 and BOAS. The model calls 18%, 15%, 15% and 19% of human-N2 epochs N3, against YASA’s 11%, 12%, 7% and 14%. It finds 90% to 98% of human N3 there.
- Too little N3 on CAP and HMC. The model calls 51% and 39% of human-N3 epochs N2, against YASA’s 33% and 30%.
- As a result, N3 F1 is below the reference on most sites: 0.627 vs 0.711 on Sleep-EDF SC, 0.644 vs 0.758 on CAP, and 0.422 vs 0.480 on BOAS.
- BOAS scores N3 sparingly, so both models over-call N3 there.
- Including BOAS in training moved the N2/N3 boundary at the other labs and made N3 worse there. That is why BOAS is a test set and not training data.
- Where the model puts the N2/N3 boundary does not match every lab’s convention, and the error goes both ways (from the confusion matrices, EEG and EOG):
- Small sets have wide intervals. SVUH-UCD has 25 nights and ANPHY 29.
- Single nights vary. On every set, some nights are much worse than the average (see the scatter plots above).
- Not covered by these tests:
- children;
- wearable, forehead or ear EEG;
- native sampling rates above 512 Hz;
- montages with only occipital channels.
- Probabilities are not calibrated. This benchmark scores only the predicted stage.
Human agreement for context
Two experienced scorers who stage the same night under AASM rules agree at about Cohen’s kappa 0.76 (Danker-Hopfe et al., J Sleep Res 2009). Agreement between scorers varies between labs and between rule sets. Our kappas compare the model with one scoring per night (for DOD, a consensus of five scorers). A kappa of 1 is not a realistic target: two human scorers do not reach it either.Reproduce it
Everything here uses public data. The held-out sets can be re-run through the API.- Get the data.
- The training sources are listed in How it was trained.
- The two held-out sets are Sleep-EDF Expanded (telemetry study, the
ST*recordings; ODC-By 1.0) and BOAS (CC0).
- Stage the nights with the API.
- Submit each night as a sleep staging job.
- Sleep-EDF telemetry nights go in whole, as downloaded. Crop each BOAS night to its scored span (first to last scored epoch) first, as the benchmark did.
- 44 or 128 nights are more than the trial quota of 3 nights a week. Ask at contact@neuroencoder.com for a collaboration key.
- Run the reference.
- Install
yasa==0.7.0and run itsSleepStagingclassifier on the same EEG channel, and on the EOG channel for the EEG plus EOG variant. - Use the channel the API reports in
channels_used.yasa_eegandyasa_eog.
- Install
- Score both against the human hypnogram.
- Merge R&K stages 3 and 4 into N3.
- Drop unscored, movement and artefact epochs.
- Compute Cohen’s kappa per night and pooled.
- Bootstrap over nights (2,000 resamples, percentile intervals).
- Run a two-sided sign test on the per-night differences.