WorksAgricultural and Biological Sciences
Duration-Aware World Models for Sleep Staging with Dwell-Time Constraints
Abstract
Closed-loop neuromodulation requires sleep staging that respects stage-specific minimum dwells: stimulation policies switch by sleep stage, and a policy change is permitted only after the current stage has persisted for its minimum duration. Discriminative classifiers fragment stage trajectories—for example, a 30 s Wake segment inside a 10 min N2 run—and even hidden semi-Markov smoothing leaves 11.3% of segments below the minimum dwell threshold. This paper presents a world model in which a recurrent state-space model (RSSM) learns dwell structure endogenously from EEG, via duration-aware latent sampling, a survival-curve dwell prior, and transition-matrix calibration, and a trajectory-level hard-constraint layer guarantees the minimum dwell at decoding. On SHHS-1 (200 subjects, 160/20/20, three repeated splits), the model reaches a test accuracy of 0.690 +/- 0.053 (95% CI over 3 folds) versus 0.641 +/- 0.042 for an identically split discriminative baseline, with macro-F1 +17.5 pp and better accuracy on all three folds. On Sleep-EDF the constraint layer cuts below-threshold segments from 71.8% to 0.1% with no accuracy loss (0.734 to 0.737), and an online locked scheduler reduces RL policy switches by 87% per night while keeping every policy run at least 90 s. To the best of the author's knowledge, this is the first system to couple learned dwell statistics with a decoding-time hard guarantee. Code and pretrained weights will be released.
Introduction
Real-time closed-loop neuromodulation systems modulate stimulation in response to the instantaneous sleep stage: different stages call for different stimulation policies, and an RL policy selected for a given stage is trained for that stage’s dynamics. The stage sequence produced by the sensing subsystem therefore acts as a switching signal. A key requirement in this setting is dwell-time stability: each stage must persist for a minimum duration before the system is allowed to switch policies; otherwise the controller chatters between policies on noisy boundaries. In practice, stage-specific minima differ: N2 is expected to last minutes, whereas N1 and REM transitions are shorter, and the operator needs a guarantee that no stage run falls below its minimum.
Current sleep staging systems are discriminative: they map each 30 s EEG epoch to a stage. State-of-the-art networks such as U-Time [1], DeepSleepNet [2] and SleepTransformer [3] achieve high epoch-wise accuracy, yet their output trajectories are fragmented, containing many 1–2 epoch runs that violate physiological and application-level dwell constraints. Post-processing with hidden Markov / semi-Markov models [4, 5] smooths the sequence without hard guarantees: it reduces violations but cannot eliminate them. The discriminative paradigm models each epoch in isolation (or with local context) and has no mechanism to represent or enforce how long a stage should persist.
Sleep is organized on two time scales. On the epoch scale (30 s), each window carries the physiological features that identify a stage, and discriminative networks excel there. On the structural scale (minutes to hours), stages persist for characteristic durations and recur in cycles; it is on this scale that the application-level requirement—a minimum dwell per stage—is defined. Discriminative staging models only the first scale and delegates the second to post-processing. The mismatch matters in closed-loop neuromodulation: switching a stimulation policy is an action taken on the structural scale, so the quantity that matters to the controller is the run-level structure of the stage sequence, not the epoch-level accuracy of its labels.
This paper instead builds on world models [6, 7, 8, 9]. A world model learns a latent dynamical system over the data; given a sleep night, it maintains a latent state that evolves over time and from which the stage and the EEG features can be reconstructed. Because the latent state is generative and temporal, it is well suited to representing dwell structure. A recurrent state-space model (RSSM) is extended with a duration-aware latent sampler: an explicit dwell counter and a continue/switch Bernoulli variable that decides whether the current stage persists or transitions. On top of this, two empirically fitted priors are added—the survival-curve dwell prior and the transition-matrix calibration—and a trajectory-level hard-constraint layer guarantees that every generated run is at least epochs for stage .
This paper makes three contributions.
A generative world model with endogenous dwell structure. The paper shows that a recurrent state-space model (RSSM) trained on EEG can stage sleep while learning dwell structure endogenously, and that under identical data splits it outperforms a discriminative baseline (test accuracy vs ; macro-F1 +17.5 pp; better on all 3 repeated splits).
Three progressive mechanisms and a hard constraint layer. Duration-aware latent sampling, a survival-curve dwell prior, and transition calibration bring the dreamed dwell distribution close to physiological statistics without loss of accuracy (val ); a trajectory-level hard constraint (latent forcing plus run merging) drives below-minimum-dwell segments from 71.8% to 0.1% on Sleep-EDF while accuracy improves from 0.734 to 0.737.
Causal online scheduling. An online locked scheduler reduces reinforcement-learning policy switches by 87% per night with every run at least 90 s, showing that the guarantee carries over from batch staging to a causal online controller.
Related Work
Discriminative sleep staging. Automatic sleep staging from single-channel EEG has been approached with convolutional networks [2, 10, 11], sequence models [3], and fully convolutional segmentation networks [1, 12]. These models are trained with per-epoch cross-entropy; temporal consistency is either ignored or handled by post-hoc smoothing (HMM/HSMM) [4, 5]. None of them learns a generative prior over stage runs, and none provides a guarantee on minimum dwell.
World models. World models learn predictive latent representations of environments [6]. The recurrent state-space model (RSSM) of PlaNet/Dreamer [7, 8] and its discrete successors [9, 13] learn a stochastic latent dynamics and train with KL balancing and latent imagination. Transformer world models [14] replace the recurrent core with a transformer. The use of an RSSM for EEG sleep staging has not, to the best of the author’s knowledge, been reported; the closest analogies are recent works using latent dynamics for physiological time series, which remain rare. Score-based generative staging [15] instead samples labels directly from data and, unlike the RSSM, offers no forward rollout in latent space.
Dwell constraints and sequence post-processing. HMM/HSMM approaches impose explicit state-duration models and can encode minimum-dwell as part of the duration distribution [4, 16]. However, the guarantee is probabilistic, and the duration model is a post-hoc prior decoupled from the feature extractor. Here the dwell structure is learned inside the latent dynamics, and the minimum is enforced as a hard constraint at decoding time; the constraint layer itself is model-agnostic: it applies to the output of any staging system, as demonstrated on discriminative outputs in § 4.6.
Method
Problem setting
A night is a sequence of 30 s EEG epochs. The input window is denoted (single channel, 100 Hz) and the stage label (Wake, N1, N2, N3, REM) following the Rechtschaffen–Kales and AASM conventions [17, 18]. A run (dwell) is a maximal contiguous block of identical stages; its length is the dwell (in epochs). The application constraint is a vector : every run of stage must satisfy . In this paper for Wake, N1, N2, N3, REM (30 s per epoch).
RSSM backbone
Figure 1 shows the architecture. At a high level, the pipeline reads each 30 s EEG window through an epoch encoder, evolves a latent state along a recurrent GRU core, and reads out both the stage and the band-energy reconstruction from that state; the emitted stage and its dwell counter are fed back into the next step, so a whole night can be rolled out in latent space without observations. Three components are new to sleep staging and are highlighted in Figure 1: the duration-aware sampler that decides continue/switch, the empirical dwell priors (the survival-curve bias and the transition calibration), and the trajectory-level hard-constraint layer; the remaining components follow the standard RSSM design. The RSSM architecture of Hafner et al. [8] is adopted. An epoch encoder (a 1-D convolutional stack) maps to an embedding . A GRU core maintains the recurrent state ; the stochastic state is sampled from a Gaussian posterior during training and from the prior when predicting. The stage logits are produced by a classifier over the concatenation where is the one-hot stage. The model also reconstructs the EEG frequency-band energies (delta, theta, alpha, beta) from ; the reconstruction loss anchors the latent state to observable EEG content and prevents posterior collapse. Training uses KL balancing with free bits (0.5/0.2/0.3 for , continue, and switch), a linear KL warm-up over 15 epochs, and imagination (when the last steps of a sequence are predicted from the prior) ramped from 0 to 20 steps.

Figure 1. Duration-aware RSSM world model. An epoch encoder maps each 30 s EEG window to an embedding; a GRU core evolves the latent state; the dwell-aware sampler decides continue/switch with a dwell counter , guided by empirically fitted priors; the stage head and band-energy decoder read out the stage and the EEG spectrum. A hard dwell constraint guarantees every run is at least epochs. Final calibrated model: val/test accuracy 0.723/0.645 on SHHS-1.
Duration-aware latent sampling
Discriminative classifiers treat stages as independent categorical decisions. To represent dwell structure in the latent dynamics, the latent state is augmented with a dwell counter that counts how long the current stage has persisted, and a Bernoulli continue variable that decides whether the current stage persists () or a switch is sampled from the stage-prior logits. At every latent step:
During training the continue/switch variables are trained with a soft mixture (the straight-through stage update keeps gradients flowing); during dreaming they are sampled hard. The classifier and decoder then operate on as before. This adds the KL terms and for the continue and switch distributions, which are annealed with the same schedule as .
Empirical dwell prior
The model learns the dynamics from data, but the dwell distribution is heavy-tailed and the continue logit is weakly supervised (only through the switching boundaries). An empirical prior fitted from the training labels is therefore injected: for each stage , the survival function of real dwells (Figure 2) is computed and the continue logit bias is set to

Figure 2. Empirical dwell survival curves estimated from the 160 SHHS-1 training subjects; dashed vertical lines mark the application minima . REM dwells are the most persistent (), N1 decays fastest (), and N2 carries a heavy tail (). The continue-logit bias in Eq. (2) is computed from these curves, which is why the prior is non-symmetric across stages.
which is the empirical log-odds of continuing given the current dwell. The bias is added to the continue logit at every latent step (). This is a zero-parameter injection: the network only learns the residual between the physiology and its own dynamics. A fixed penalty is also applied to the switch logits for N1 () because N1 is rare ( of epochs) and the model otherwise over-generates it.
Transition-matrix calibration
The switch distribution is also weakly supervised; the empirical transition-target distribution is estimated from the training labels and used to calibrate the switch logits by
i.e., the log ratio to a uniform target. This corrects systematic flow errors that a single scalar penalty cannot address, such as the over-transfer from N2 to REM, and restores the N3 frequency (N3 segments were being absorbed by REM in the dwell-prior variant).
Trajectory-level hard constraint
Two complementary layers enforce the minimum dwell at decoding time, without retraining:
Latent forcing: during dreaming, if the current stage has dwell , the continue variable is forced to (no switch is sampled). This guarantees, inside the latent trajectory, that every run is at least .
Run merging (observation layer): for any produced sequence (argmax or dreamed), every run shorter than is merged into its adjacent run (in AASM style, the shorter run is relabeled to the stage of the longer neighboring run, or to the right neighbor on a tie). This is model-agnostic and can also be applied to discriminative outputs.
The latent forcing is exact for generated trajectories; the merging rule is exact for any trajectory of finite length and never creates new violations. Algorithm 1 summarizes the dreaming procedure with latent forcing.
Algorithm 1 Dream with hard dwell constraint
Require: initial latent state ; minimum dwells
Ensure: stages with every run at least epochs
for do
update via Eq. (1)
if then
force ▷ no switch is sampled
else
end if
if then
;
else
;
end if
end for
return
Training objective
Building on the variational auto-encoding objective [19], the full objective is
where the first term is the stage-classification cross-entropy, the second term is the band-energy reconstruction weighted by , is the annealed KL weight, and the KL terms use free bits. Class imbalance is handled with inverse-frequency class weights. Training uses Adam (lr = , weight decay , batch size 32, sequence length 100 epochs (50 min, stride 50), for 60 epochs with early stopping on validation accuracy.
Experiments
Data and preprocessing
SHHS-1 [20] is the first cohort of the Sleep Heart Health Study; the full cohort contains 5,793 recordings, of which the first 1,000 were converted locally (953 pass quality checks), and the first 200 subjects by ID are taken for this study. EEG (C3-A2, 125 Hz) is downsampled to 100 Hz by FFT resampling and z-scored per 30 s epoch. Labels follow five classes (Wake, N1, N2, N3, REM); stage distribution is highly imbalanced (N1 3.1%). Subject-level splits: 160 train / 20 val / 20 test. For statistical rigor, the split is repeated 3 times with different random permutations (seeds 0–2), and means 95% CI are reported (paired across models on the same folds). For cross-dataset evaluation of the constraint layer, Sleep-EDF is used (Expanded FPz-Cz, 32 held-out test nights) [21, 22].
Implementation
All world-model variants share the training protocol of § 3.7: sequence length 100, stride 50, batch 32, 60 epochs, warm-up 15, , free bits 0.5/0.2/0.3, and imagination ramped to 20. The discriminative baseline is a 1-D convolutional classifier (the same encoder as the world model plus a linear head) trained from scratch under the identical split and 60-epoch budget with sqrt-inverse-frequency class weights. Both models run on a single NVIDIA RTX 4060 Laptop GPU.
Training health and accuracy ablation
Table 1 reports the four-variant ablation. All three KL terms stay in a healthy regime (, , , reconstruction ), in contrast to the collapsed training observed when the same architecture was trained on only 47 subjects of Sleep-EDF (not shown). The dwell mechanisms do not degrade accuracy; the final calibrated model reaches val 0.723 and test 0.645.
| Version | Params | Mechanism | Val acc | Test acc |
| Base | 196,557 | band-energy RSSM baseline | 0.714 | 0.635 |
| +Dwell sampling | 227,103 | + duration-aware sampling | 0.713 | 0.633 |
| +Dwell prior | 227,103 | + dwell survival prior & N1 penalty | 0.721 | 0.633 |
| +Trans. calibration | 227,103 | + transition-matrix calibration | 0.723 | 0.645 |
Table 1. Ablation of the world-model mechanisms (val/test accuracy, SHHS 160/20/20, 60 epochs, identical budget).
Discriminative baseline under identical conditions
Table 2 compares the world model to the discriminative baseline under the identical subject split and training budget.
| Model | Val acc | Test acc | F1 | |
| Calibrated RSSM (world model) | 0.723 | 0.645 | 0.600 | 0.533 |
| Discriminative baseline | 0.624 | 0.520 | 0.401 | 0.322 |
Table 2. Single main split (seed-consistent with Table 1): world model vs discriminative baseline, same 160/20/20 split, same 60-epoch budget, both from scratch.
On this single split the world model outperforms the baseline by 12.5 pp in test accuracy and by 19.9 pp in macro-F1 (0.600 vs 0.401; the baseline’s N1 recall is only 0.043). Averaged over the 3 repeated splits (Table 3) the gap is +4.9 pp in accuracy and +17.5 pp in macro-F1: the world model is better on every fold (differences +1.1, +7.1, +6.4 pp). A paired -test gives (, ); with three folds the test has limited power, but the direction is consistent and the F1 gap is large.
| Model | Test acc | F1 | |
| Calibrated RSSM (world model) | 0.690 ± 0.053 | 0.637 ± 0.056 | 0.593 ± 0.070 |
| Discriminative baseline | 0.641 ± 0.042 | 0.462 ± 0.085 | 0.468 ± 0.074 |
| Paired diff (RSSM − base) | +0.049, () | — | — |
Table 3. Repeated-split analysis (3 folds, mean ± 95% CI, paired on identical folds). The calibrated RSSM is early-stopped at 40 epochs (best validation at ≈ ep. 31) owing to its higher per-epoch cost, while the baseline trains for 60 epochs; both models are early-stopped on validation, and the main single-split comparison (Table 2) trains both for the full 60 epochs.
Dream quality: dwell distribution vs physiology
Because the model is generative, synthetic nights can be dreamed by unrolling the latent dynamics without observations. Table 4 reports the mean dwell (in epochs) of dreamed trajectories over 20 test subjects × 80 steps, pooled over 3 dream seeds for reproducibility, versus the real statistics of SHHS-1 (Figure 3). The last column reports the earth-mover distance (EMD) between the calibrated dreamed and real run-length distributions; REM is not evaluable because the 80-step real windows contain no REM runs in this subset. Run-length statistics and survival curves are truncated at epochs (30 min), a horizon well beyond the longest physiological stage run.

Figure 3. Mean dreamed dwell per stage (Dwell/Prior/Calib) vs real SHHS-1 statistics (20 test subjects 80 steps, 3 dream seeds pooled). The dwell-prior variant lengthens the N2 right tail (P90 27 vs 14 real); the calibrated model restores the N3 frequency (N3 segments 51 105; REM share 33% 17%) at the cost of fragmented Wake runs (mean 7.8 vs 15.1 real). Real REM dwell is not available in this subset.
Calibration corrects the N3/REM trade-off that the dwell prior introduces (N3 segments 51→105, REM share 33% → 17%) but fragments Wake runs (mean 7.8 vs 15.1 real). N1 remains over-generated (121 dreamed runs vs 15 real): N1 is rare and its EEG is close to Wake, so the model cannot separate it reliably; this is revisited in the Discussion.
Hard constraint vs soft post-processing
The constraint layer is evaluated on Sleep-EDF (32 test nights) where the argmax of the discriminative baseline (§ 4.4) is used as the base sequence (the constraint is model-agnostic). With , Table 5 shows that the raw argmax violates the minimum dwell on 71.8% of runs, HSMM Viterbi smoothing [5] still leaves 11.3%, while the run-merging constraint reduces violations to 0.1% and improves accuracy (0.734 0.737). On dreamed SHHS-1 trajectories the latent forcing achieves 0 violations on all 5 stages. Figure 4 illustrates the effect on one test night: the raw argmax fragments the hypnogram with frequent 1–2 epoch runs, and the hard constraint restores a smooth, expert-like trajectory (below-: 30 0 runs on this segment; the expert labels themselves contain 2).

Figure 4. Sleep-stage trajectory on one Sleep-EDF test night (SC4001, 240 epochs): expert labels vs raw RSSM argmax (fragmented) vs the same output after the hard dwell constraint. The constraint removes all below- runs (30 → 0 on this segment) while preserving the macro structure.
| Method | Acc | Below- runs | Note |
| Raw argmax (no constraint) | 0.734 | 71.8% | fragmented |
| HSMM Viterbi (soft) | 0.771 | 11.3% | still violates |
| Hard constraint | 0.737 | 0.1% | accuracy up |
Table 5. Below-minimum-dwell () segments on Sleep-EDF 32 test nights. Soft = HSMM Viterbi; hard = run-merging constraint.
Figure 5 complements Table 4 with the full dwell survival curves of the dreamed trajectories (3 dream seeds pooled): the model reproduces the fast N1 decay and the N2 heavy tail, while Wake runs remain over-generated and over-fragmented (Table 4). The transition-matrix calibration of § 3.5 is visualized in Figure 6: the calibrated transition frequencies move toward the empirical target at the main over-transfer bottlenecks ( from 0.73 to 0.43, versus 0.49 empirically; from 0.42 to 0.22, versus 0.11), whereas the dwell-prior trajectories over-transfer into N1 and REM; a residual N3-row bias remains ( 0.56 vs 0.90). The training health of the 60-epoch run discussed in § 4.3 is reported in Figure 7: the three KL terms anneal from a high start without collapsing, reconstruction error drops to , and validation accuracy converges smoothly.
| Stage | Dwell | Prior | Calib | Real | EMD |
| W | 4.2 | 5.9 | 7.8 | 15.1 | 7.3 |
| N2 | 5.3 | 9.0 | 4.5 | 5.6 | 1.2 |
| N3 | 7.7 | 5.3 | 9.2 | 6.3 | 3.0 |
| REM | 6.4 | 10.4 | 8.4 | — | n/a |
Table 4. Mean dreamed dwell (epochs) vs real SHHS-1 statistics (20 test subjects 80 steps, 3 dream seeds pooled), plus the earth-mover distance (EMD, epochs) between the calibrated dreamed and real run-length distributions.

Figure 5. Dwell survival curves per stage for the real SHHS-1 test labels (solid) versus unconstrained calibrated-model dreamed trajectories (dashed), over 20 test subjects 80 steps, 3 dream seeds pooled. The model matches the fast N1 decay and the N2 heavy tail; Wake runs remain over-generated and over-fragmented, the known failure mode quantified in Table 4.

Figure 6. Transition-matrix calibration. From left to right: the empirical transition-target distribution estimated from the 160 SHHS-1 training labels (self-loops excluded, rows normalized); the switch frequencies observed in the dwell-prior dreamed trajectories (no calibration); and those in the calibrated trajectories (calibrated by Eq. (3)), all pooled over 3 dream seeds. Calibration corrects the main over-transfers of the dwell-prior variant (WN1 0.730.43 vs 0.49 empirical; N2REM 0.420.22 vs 0.11) at the cost of residual N3-row bias (N3N2 0.56 vs 0.90).

Figure 7. Training health of the calibrated world model on SHHS-1 (60 epochs, identical hyper-parameters as Table 1). (a) Latent-space KL terms anneal and stabilize in the healthy regime; (b) band-energy reconstruction and stage cross-entropy converge; (c) training and validation accuracy rise steadily, matching the reported val 0.723.
Closed-loop simulation
The online closed-loop controller is simulated on Sleep-EDF 32 nights: epochs arrive one at a time, and a causal locked scheduler commits to a stage only after its candidate has accumulated epochs; once committed, the stage is locked for epochs before a switch is considered. Table 6 compares the resulting policy-switch statistics, and Algorithm 2 formalizes the scheduler. The locked scheduler reduces switches from 306 to 41.3 per night () with zero below- runs and every RL run at least 90 s (3 epochs), at a modest accuracy cost (0.734 0.687) that reflects the online, causally locked setting.
| Method | Switches/night | Below- | Acc | Min RL run |
| Raw argmax | 306 | 71.8% | 0.734 | < 30 s freq. |
| HSMM Viterbi | 65.6 | 11.3% | 0.771 | — |
| Locked scheduler | 41.3 | 0.0% | 0.687 | s |
Table 6. Online locked scheduling on Sleep-EDF 32 nights: the locked scheduler cuts policy switches by 87% with zero below- runs and every RL run s.
Algorithm 2 Causal locked scheduling
Require: minimum dwells ; candidate logits at each epoch
Ensure: a causal stage sequence whose every committed run is at least epochs
▷ committed stage, candidate count, locked count
for do
▷ stage-wise posterior at epoch
if then
if then
else
end if
if then
commit:
end if
else
if and then
switch:
end if
end if
emit ▷ RL policy follows the locked stage
end for
return
Discussion
Relation to published results. Published systems trained on the full SHHS-1 cohort reach higher epoch-wise accuracy: SleepTransformer [3] reports 87.7% accuracy and on 70%/30% subject splits over 5,791 subjects, and other sequence models report similar levels. The numbers reported here are not directly comparable, for three reasons: (i) data scale—those systems train on the full cohort (5,791 subjects, versus the 200 used here); (ii) training budget—SleepTransformer is trained with an extensive validation-driven early-stopping protocol, whereas the protocol used here trains for 60 epochs with early stopping (a substantially smaller budget); and (iii) model size—the RSSM used here is a lightweight GRU-based model with 227K parameters. This paper does not aim to compete on epoch-wise accuracy; the focus is on whether a generative world model can learn dwell structure and guarantee stage-specific minimum dwells at decoding time without retraining. Under identical splits and budgets the world model still outperforms its discriminative counterpart (Table 3), and the constraint layer is model-agnostic: it can be applied on top of any staging system, including those with higher epoch-wise accuracy.
Advantage over the baseline. Under identical data splits the largest gap is in macro-F1: the discriminative baseline collapses on the rare N1 class (recall 0.043), whereas the RSSM carries temporal and generative context that helps the rare and ambiguous classes, and the dwell mechanisms provide structural inductive bias. This is consistent with the failure mode reported in § 4.3: on 47 subjects of Sleep-EDF the same RSSM training collapsed, while 200 subjects of SHHS-1 train healthily; the base RSSM in Table 1 trains healthily as well, so the difference in training outcomes is driven by data scale.
Guarantees vs statistics. The hard constraint is exact at the trajectory level; the statistical distribution of dreamed dwells is right-shifted relative to physiology (a necessary consequence of imposing a minimum). For a closed-loop operator a guaranteed minimum is more useful than an exactly matched distribution; on the evaluated nights run merging even improves accuracy slightly (0.734 to 0.737, Table 5).
Limitations and generalization. Out-of-domain generalization remains the central limitation: the model is trained and evaluated on in-domain SHHS recordings only, and deployment on a new hospital, device, or unseen subject would require domain adaptation or subject-specific personalization, which this paper does not address. N1 remains over-generated in every reported setting (Table 4). The repeated-split CI is limited to 3 folds by RSSM training cost (≈5 h/fold); a larger number of folds would tighten the CI. Dream quality is evaluated by dwell statistics and run-length EMD (Table 4); spectral FID of dreamed EEG is left to future work.
Conclusion
The experiments show that a generative world model can stage sleep while learning dwell structure from data, without relying on post-hoc smoothing. Dreamed trajectories match physiological dwell statistics, a trajectory-level hard constraint reduces below- segments from 71.8% to 0.1%, and an online locked scheduler cuts policy switches by 87% per night (every run at least 90 s). Under identical data splits the world model also beats a discriminative baseline by a consistent margin (test accuracy 0.690 0.053 vs 0.641 0.042, macro-F1 +17.5 pp, better on all 3 repeated splits).
References
- [1]M. Perslev, M. H. Jensen, S. Darkner, P. J. Jennum, and C. Igel. U-time: A fully convolutional network for time series segmentation applied to sleep staging. In Advances in Neural Information Processing Systems (NeurIPS), 2019.arxiv.org/abs/1910.11162
- [2]A. Supratak, H. Dong, C. Wu, and Y. Guo. Deepsleepnet: A model for automatic sleep stage scoring based on raw single-channel EEG. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 25(11):1998–2008, 2017.DOI
- [3]H. Phan, K. Mikkelsen, O. Y. Chen, P. Koch, A. Mertins, and M. De Vos. Sleeptransformer: Automatic sleep staging with interpretability and uncertainty quantification. IEEE Transactions on Biomedical Engineering, 69(8):2456–2467, 2022.DOI
- [4]L. R. Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989.
- [5]A. Flexer, G. Gruber, and G. Dorffner. A reliable probabilistic sleep stager based on a single EEG signal. Artificial Intelligence in Medicine, 33(3):199–207, 2005.pubmed.ncbi.nlm.nih.gov/15811785
- [6]D. Ha and J. Schmidhuber. World models. arXiv preprint arXiv:1803.10122, 2018.DOI
- [7]D. Hafner, T. Lillicrap, I. Fischer, R. Villegas, D. Ha, H. Lee, and J. Davidson. Learning latent dynamics for planning from pixels. In Proceedings of the 36th International Conference on Machine Learning (ICML), 2019.arxiv.org/abs/1811.04551
- [8]D. Hafner, T. Lillicrap, J. Ba, and M. Norouzi. Dream to control: Learning behaviors by latent imagination. In International Conference on Learning Representations (ICLR), 2020.arxiv.org/abs/1912.01603
- [9]D. Hafner, T. Lillicrap, M. Norouzi, and J. Ba. Mastering atari with discrete world models. In International Conference on Learning Representations (ICLR), 2021.arxiv.org/abs/2010.02193
- [10]A. Sors, S. Bonnet, S. Mirek, L. Vercueil, and J.-F. Payen. A convolutional neural network for sleep stage scoring from raw single-channel EEG. Biomedical Signal Processing and Control, 42:107–114, 2018.DOI
- [11]S. Chambon, M. N. Galtier, P. J. Arnal, G. Wainrib, and A. Gramfort. A deep learning architecture for temporal sleep stage classification using multivariate and multimodal time series. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 26(4):758–769, 2018.DOI
- [12]M. Perslev, S. Darkner, L. Kempfner, M. Nikolic, P. J. Jennum, and C. Igel. U-Sleep: resilient high-frequency sleep staging. npj Digital Medicine, 4(1):72, 2021.DOI
- [13]D. Hafner, J. Pasukonis, J. Ba, and T. Lillicrap. Mastering diverse domains through world models. arXiv preprint arXiv:2301.04104, 2023.arxiv.org/abs/2301.04104
- [14]J. Robine, M. Hoffmann, T. Uelwer, and S. Harmeling. Transformer-based world models are happy with 100k interactions. arXiv preprint arXiv:2303.07109, 2023.arxiv.org/abs/2303.07109
- [15]H. van Gorp, M. M. van Gilst, P. Fonseca, F. B. van Meulen, J. P. van Dijk, S. Overeem, and R. J. G. van Sloun. A deep generative model for five-class sleep staging with arbitrary sensor input. arXiv preprint arXiv:2408.15253, 2024.DOI
- [16]S.-Z. Yu. Hidden semi-Markov models. Artificial Intelligence, 174(2):215–243, 2010.DOI
- [17]A. Rechtschaffen and A. Kales. A Manual of Standardized Terminology, Techniques and Scoring System for Sleep Stages of Human Subjects. Public Health Service, U.S. Government Printing Office, 1968.
- [18]R. B. Berry, R. Brooks, C. E. Gamaldo, S. M. Harding, R. M. Lloyd, C. L. Marcus, and B. V. Vaughn. The AASM Manual for the Scoring of Sleep and Associated Events. American Academy of Sleep Medicine, 2.4 edition, 2017.
- [19]D. P. Kingma and M. Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014.arxiv.org/abs/1312.6114
- [20]S. F. Quan, B. V. Howard, C. Iber, J. P. Kiley, F. J. Nieto, G. T. O’Connor, D. M. Rapoport, S. Redline, J. Robbins, J. M. Samet, et al. The sleep heart health study: Design, rationale, and methods. Sleep, 20(12):1077–1085, 1997.pubmed.ncbi.nlm.nih.gov/9493915
- [21]B. Kemp, A. H. Zwinderman, B. Tuk, H. A. C. Kamphuisen, and J. J. L. Oberyé. Analysis of a sleep-dependent neuronal feedback loop: The slow-wave microcontinuity of the EEG. IEEE Transactions on Biomedical Engineering, 47(9):1185–1194, 2000.pubmed.ncbi.nlm.nih.gov/11008419
- [22]A. L. Goldberger, L. A. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley. Physiobank, phys iotoolkit, and physionet: Components of a new research resource for complex physiologic signals. Circulation, 101(23):e215–e220, 2000.