Sleep foundation model whose frozen encoder scores polysomnography events, predicts incident disease, and transfers to wearable EEG and actigraphy.
No providers recorded yet. Browse all providers
A cortical arousal lasts a few seconds and a periodic limb movement often less than one, so a model that reads an overnight recording in five-second tokens has already smeared together the events a sleep technologist is paid to count. SleepFM-2 rebuilds its predecessor around one-second tokens and keeps a distinct embedding for every channel–second pair rather than pooling channels immediately. That change is what lets one pretrained encoder score stages, arousals, limb movements and respiratory events at the resolution each occurs, instead of staging alone.
Developed at Stanford University with Danish and French sleep centers and companies, and posted as a preprint in September 2026, it is the successor to SleepFM. It retains that model's leave-one-out contrastive objective — each modality pulled toward the aggregate representation of the others recorded the same night — and adds masked autoencoding of individual signal patches. The two pull in different directions by design: reconstruction favors local tasks such as staging, contrastive learning favors subject-level tasks such as disease prediction, and training on both keeps the model strong at each.
The encoder is frozen for every result the paper reports — task heads are fit on top and no encoder weights are updated downstream — so transfer to sensors absent from pretraining is a property of the representation, not of a network re-fitted per dataset.
Recordings are organized into four streams — brain activity (EEG and EOG), cardiac, EMG and respiratory — resampled to 128 Hz and cut into one-second patches over a 300-second context window. A strided 1D CNN tokenizer shared across all channels maps each patch to a 128-dimensional token, and a 28-entry channel-region vocabulary supplies anatomical identity, so montage differences across cohorts are absorbed by the embedding rather than fixed channel ordering. With 55% of tokens masked, a two-layer Stage 1 encoder of LLaMA-style blocks — RMSNorm, SwiGLU, rotary position embeddings over the patch index — attends jointly across channels and time. A contrastive branch then pools across channels, refines the sequence through a four-layer Stage 2 encoder and pools temporally into one summary per modality, while a parallel decoder, discarded at inference, reconstructs the masked patches. The encoder is 2.57M parameters, smaller than SleepFM-1's 4.83M.
Pretraining used 235,865 recordings from 24 of 26 polysomnography cohorts, part of 282,511 recordings and over two million hours in total; the Harvard subsample of the Human Sleep Project and the Sleep Heart Health Study were held out entirely. Sleep-staging macro F1 reaches 0.716 on the Stanford Sleep Cohort, 0.811 on MESA, 0.782 on MrOS and 0.803 on SHHS, beating SleepFM-1 with non-overlapping confidence intervals on every cohort; across the phenotype pool the embedding reaches a mean C-index of 0.723, ahead of a 480-feature interpretable baseline from the same recordings.
SleepFM-2 is built for sleep laboratories and for the epidemiologists who work with their archives. The same frozen embeddings support automated scoring of stages and events, risk stratification from studies already on file, and research into how nocturnal physiology relates to conditions diagnosed years later. Transfer to headbands, in-ear electrodes, wrist PPG and actigraphy extends that reach past the laboratory: on UK Biobank accelerometry it predicts disease comparably to models pretrained on accelerometry directly, despite never having seen an accelerometer.
By evaluating one frozen encoder across scoring, disease prediction, wearable sensing and subjective sleep, SleepFM-2 argues that sleep physiology is a general substrate for health representation rather than a source of task-specific classifiers. Its access position is more restrictive than its predecessor's: the preprint has not been peer reviewed, the code repository named in its availability statement has not yet been published, and no weights have been released. Most of the pretraining corpus is proprietary BioSerenity clinical data that cannot be shared, and the remaining cohorts require a data use agreement or a request to the contributing sleep center, so replicating the pretraining run stays out of reach even once code appears.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.