arXiv:2609.06849cs.AISep 2026

Manuscript Offprint

arXiv:2609.06849

Learning transferable human physiology from two million hours of sleep with SleepFM-2

Rahul Thapa, Christopher Sun, William Theodor Lehn-Schioler, Sophia Claire Kivelson, Umaer Hanif, Hyatt Moore, Harrison G. Zhang, Hafsa Ahmed, Marcus Dige, Niels R. Lorenzen, Elisabeth Roxane M. Heremans, Adrien Specht, Ulysse Gimenez, Robin Guillard, Andreas Brink-Kjaer, James Zou, Emmanuel Mignot

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Rahul Thapa1,2,∗^{1,2,*}, Christopher Sun2,∗^{2,*}, William Theodor Lehn-Schiøler4,5^{4,5}, Sophia Claire Kivelson1^{1}, Umaer Hanif5,6^{5,6}, Hyatt Moore IV3^{3}, Harrison G. Zhang1^{1}, Hafsa Ahmed9^{9}, Marcus Dige3,5^{3,5}, Niels R. Lorenzen7^{7}, Elisabeth Roxane M. Heremans3^{3}, Adrien Specht3,8^{3,8}, Ulysse Gimenez10^{10}, Robin Guillard3,∗^{3,*}, Andreas Brink-Kjaer5^{5}, James Zou1,2,+^{1,2,+}, and Emmanuel Mignot3,+^{3,+}

1^{1}Department of Biomedical Data Science, Stanford University, Stanford, CA, USA

2^{2}Department of Computer Science, Stanford University, Stanford, CA, USA

3^{3}Department of Psychiatry and Behavioral Sciences, Stanford University, Stanford, CA, USA

4^{4}BrainCapture, Kongens Lyngby, Denmark

5^{5}Department of Health Technology, Technical University of Denmark, Kongens Lyngby, Denmark

6^{6}Danish Center for Sleep Medicine, Department of Clinical Neurophysiology, Glostrup, Denmark

7^{7}Pioneer Center for SMARTbiomed, National Research Center for the Working Environment, Copenhagen, Denmark

8^{8}Institute for Computational and Mathematical Engineering, Stanford University, Stanford, CA, USA

9^{9}Hvidovre Hospital, Capital Region of Denmark, Hvidovre, Denmark

10^{10}Data Science, BioSerenity, Paris, France

*Core contributors. +Joint supervisors.

Correspondence: rthapa84@stanford.edu, mignot@stanford.edu, jamesz@stanford.edu

Sleep provides a nightly window into health, capturing coordinated activity across the brain, heart, muscles and respiratory system. Here we introduce SleepFM-2, a next-generation sleep foundation model developed and evaluated on 282,511 nights of polysomnography (PSG) from 26 cohorts, including 235,865 recordings used for pretraining. Together these span over two million hours of simultaneous recordings of brain activity, heart rhythm, muscle movement, and breathing patterns. Compared with our original SleepFM, SleepFM-2 improves disease prediction and sleep-scoring accuracy, expands scoring to fine-grained arousal, limb-movement and respiratory events, and extends learned representations to wearable sensing and subjective sleep phenotypes. From a single night of sleep recording combined with age, sex and BMI, SleepFM-2 predicts 215 incident phenotypes across the phenome with a Harrell's C-index of at least 0.75 and Bonferroni-corrected P < 0.01 in two held-out test cohorts, including one health system unseen during pretraining. It also outperforms both a demographics-only baseline (age, sex and BMI) and a strong baseline of 480 interpretable features derived from the same recordings, including sleep microstructure, spectral, autonomic, respiratory and cross-modal measures. Interpretation of SleepFM-2's predictions reveals a reproducible principal component of its disease-prediction scores associated with reduced spatial coupling of sigma-band brain activity and increased hypnodensity entropy. SleepFM-2 also performs within the range of expert scorers for detecting cortical arousals, limb movements and respiratory events. Beyond PSG, the SleepFM-2 frozen encoder transfers to wakeful EEG, headband and in-ear EEG, wrist PPG and even wrist accelerometry, demonstrating promising capabilities on widely available wearable sensors. On accelerometry, it outperforms end-to-end supervised training for sleep staging across six cohorts and performs comparably to foundation models pretrained directly on accelerometry for disease prediction in UK Biobank. Finally, SleepFM-2 captures aspects of subjective sleep that conventional PSG summaries miss, outperforming combined clinical and engineered-feature baselines across all six measures of the recorded night and on symptom and subjective-objective sleep discrepancy endpoints. Together, these results show that the rich multimodal physiology recorded during sleep can provide a transferable representation of human health across diseases, clinical tasks, sensing modalities and subjective experience.

Introduction

Sleep is essential to health, and its disruption accompanies and often precedes disease across many organ systems, from psychiatric and neurodegenerative illness to cardiovascular and metabolic conditions [1, 2, 3]. Polysomnography (PSG), the gold standard for measuring sleep, simultaneously records brain activity, eye movements, cardiac rhythm, muscle tone, respiration and oxygenation throughout the night, and obstructive sleep apnea alone affects close to a billion adults worldwide [4]. In routine clinical practice, these rich physiological signals are largely distilled by a technologist into sleep stages, annotated events and summary indices such as the apnea–hypopnea and arousal indices [5, 6]. Deep learning has automated many of these measurements [7, 8] and enabled prediction of individual diseases and physiological age from a single night [9, 10]. More recently, self-supervised foundation models have begun to learn representations directly from large collections of unlabeled sleep recordings [11, 12, 13, 14, 15, 16].

These models raise a broader question: how much of the physiological information contained in a night of sleep goes beyond conventional sleep measurements capture? SleepFM [11], among the first foundation models trained on PSG, showed that representations learned from a single night predict the subsequent onset of a wide range of diseases across the phenome. Several questions remain. It is unclear whether these models can capture participants' subjective self-assessment after sleep, whether disease-specific predictions reflect distinct signals or a common underlying dimension of health, and how well such representations generalize to health systems that were not part of pretraining, since medical models can learn site-specific structure that does not transfer [17]. Foundation models also offer the possibility of jointly interpreting multiple physiological modalities rather than analyzing brain, cardiac and respiratory signals independently, and the tools for interrogating what such models learn are only beginning to emerge [18].

A useful representation of sleep physiology should also support the tasks that matter in clinical sleep assessment. PSG interpretation extends beyond staging to cortical arousals, limb movements and respiratory events, which occur at finer temporal scales than staging and determine the arousal index, the periodic limb movement index and the apnea–hypopnea index; SleepFM [11] tokenized signals at a five-second resolution too coarse for these events, leaving them out of what the model could score. Clinical assessment also does not depend on the recording alone. Sleep foundation models have largely been evaluated against what the recording shows rather than against what the patient reports [11, 12, 19, 13, 20, 14, 15, 16], even though insomnia and restless legs syndrome are defined by subjective reports. Objective and subjective accounts of the same night often diverge, a discrepancy attributed to hyperarousal and altered sensory gating during sleep rather than to reporting error alone [21, 22, 23]. The macrostructural summaries that accompany a standard PSG report do not fully capture this subjective experience [22], and whether a model reading the raw signal can recover it or the symptoms a patient reports is only beginning to be explored [13].

The utility of representations learned from clinical PSG also depends on whether they generalize beyond the sleep laboratory. Laboratory PSG provides a particularly rich view of physiology but is expensive and accessible only to selected populations [24]. If sleep-based risk prediction is to reach beyond this population, it will most likely be through sensors worn at home, such as headbands carrying a reduced electroencephalography (EEG) montage, in-ear electrodes, wrist photoplethysmography (PPG) or accelerometers [25, 26, 27, 28]. Models are increasingly trained directly on the sensor on which they will be deployed [29, 30, 31]. Whether a representation learned from comprehensive multimodal PSG can transfer to these lower-burden sensors, or even to signals it never encountered during pretraining, remains an open question [20].

Here we present SleepFM-2, a foundation model pretrained on over two million hours of multimodal PSG that addresses the questions outlined above. Compared with SleepFM [11], SleepFM-2 is more accurate, operates at finer temporal resolution, supports all four major PSG scoring tasks, and preserves a separate representation for each channel so the contribution of individual channels and anatomical regions to a prediction can be measured directly. After pretraining, the encoder is frozen and every result reported in this paper comes from a light task head trained on fixed embeddings. We evaluate SleepFM-2 on sleep staging and event detection (cortical arousals, limb movements and respiratory events), on incident disease prediction across the phenome in two health systems, one of which was not included in pretraining, and on questionnaire-derived subjective sleep endpoints, benchmarking throughout against interpretable measurements computed from the same input signals. We further test transfer to EEG recorded outside sleep, to headband and in-ear EEG, to wrist PPG and, most stringently, to wrist accelerometry, which shares no channel with PSG. Accelerometry is reached through an engineered bridge that presents respiratory and cardiac surrogates derived from the acceleration on the corresponding PSG channel identities, alongside the raw axes themselves in the UK Biobank analysis. On that bridge, SleepFM-2 performs comparably to foundation models pretrained on accelerometry directly [31] for disease prediction in the UK Biobank [32, 28]. Together, these analyses demonstrate that SleepFM-2 learns a multimodal representation of physiology during sleep that transfers across clinical outcomes, tasks and sensing modalities.

a SleepFM-2 learns transferable physiology from clinical sleep

Figure

b SleepFM-2 pretraining architecture

Figure

Figure 1: SleepFM-2 learns transferable physiology from clinical sleep through multimodal pretraining. a, Overview of SleepFM-2 and its applications. SleepFM-2 is pretrained on 235,865 clinical polysomnography recordings, comprising more than 2 million hours of data from 24 PSG cohorts. The resulting foundation model supports incident disease and mortality prediction, PSG sleep scoring, subjective sleep and symptom endpoints, and transfer beyond the sleep laboratory to headband and in-ear EEG, wrist PPG and actigraphy. b, SleepFM-2 pretraining architecture. Each recording is organized into four physiological modality streams representing brain and eye activity, cardiac activity, muscle activity and respiration. Every channel is partitioned temporally into non-overlapping one-second patches. A shared 1D CNN maps each patch to a token, and a channel-region embedding identifies its anatomical origin. During pretraining, a fraction r=0.55r = 0.55 of tokens is masked using a mixture of temporal-block, channel-block and random masking. A transformer encoder with weights shared across streams attends jointly across the visible channel-by-time token grid of each modality. Two complementary objectives operate on its outputs. In the leave-one-out contrastive pathway, tokens are pooled across channels, processed by a temporal encoder and pooled across time to obtain one summary per modality; each modality is contrasted against the mean representation of the other available modalities from the same recording. In the masked-autoencoding pathway, the full token grid is restored with learned mask tokens, transformer blocks reconstruct the missing context and the corresponding signal patches are recovered using an L1 loss applied only at masked positions. The two pretraining losses are weighted equally. The reconstruction pathway is used only during pretraining; at inference, masking is disabled and the frozen encoder supplies embedding representations to task-specific downstream heads.

References (100)

Couldn't load all references. Reload the page to try again.