Researchers at Universidade of Stanford developed the artificial intelligence modelSleepFM, capable of predicting the risk of developing more than 130 health conditions based on data from a single night’s sleep recorded by polysomnography. Esse exam, considered the gold standard for sleep analysis, captures detailed physiological signals, such as brain, heart, respiratory activity and body movements. The model was trained with around 585,000 hours of records from more than 65,000 participants, allowing it to identify patterns that indicate future risks for serious diseases.
Polysomnography involves attaching sensors to the patient during sleep in specialized clinics. Esses data, rich in information about the functioning of the organism, now serves to predict conditions that may arise years later. SleepFM uses self-supervised learning, without the need for extensive manual labeling, which represents an improvement over previous models limited to specific tasks.
The results show that the model outperforms or equals current tools in traditional sleep analysis, such as sleep stage classification and apnea detection.
Development of the SleepFM model
The Stanford team opted for a grounded model approach, similar to those used in languages like ChatGPT, but applied to physiological data. Training took place with vast volumes of unlabeled data, allowing SleepFM to learn deep relationships between different body signals. A key innovation is leave-one-out contrastive learning, in which the model reconstructs a missing signal from the others, strengthening its understanding of the interconnections between brain, heart and breathing.
This architecture combines convolutional networks to process temporal signals and transformers to capture long dependencies. Além Additionally, a channel-agnostic attention mechanism automatically adjusts weights when a signal is missing or noisy, making the model robust for use in different clinical settings. The dataset included records from several clinics, covering patients of varying ages.
SleepFM has demonstrated stability in sleep analysis tasks, outperforming traditional supervised models in accuracy.
Accuracy in disease prediction
The model identified 130 conditions predictable with reasonable accuracy from a night’s sleep, including all-cause mortality, dementia, myocardial infarction, heart failure, chronic kidney disease, stroke and atrial fibrillation. Para many of them, the agreement index (C-index) exceeds 0.80, indicating a strong ability to classify individual risks. Previsões strongest occurred in cancers, pregnancy complications, circulatory diseases and mental disorders.
- Parkinson disease: high precision in early detection.
- Dementia: risk identified with a high success rate.
- Heart attack: nocturnal patterns reveal cardiac vulnerabilities.
- Specific cancers: such as prostate and breast, with good performance.
These results are based on matching with long-term medical records, considering only diagnoses subsequent to the sleep exam. The model does not diagnose directly, but stratifies risks statistically.

Data used in training
SleepFM training involved polysomnograms from four main cohorts, including the sleep clinic of Stanford, with records going back to 1999. The total volume surpasses sets used in previous sleep machine learning studies by several times.
Participants range from children to the elderly, reflecting age and clinical diversity. Dados from sources such as Multi-Ethnic Study of Atherosclerosis and Outcomes of Sleep Disorders in Older Men complemented the set. Essa scale allowed capturing natural variations in physiological signals.
The absence of extensive manual labeling resolved limitations of previous models, which relied on expensive and limited annotations.
Practical clinical applications
SleepFM opens the way for the use of polysomnography beyond the diagnosis of sleep disorders, transforming it into a general health screening tool. In clinics, it can help in the early identification of risks for chronic diseases, allowing preventive interventions. Sua robustness to variations in sensors facilitates application in different medical centers.
Researchers highlight that nighttime signals reveal an integrated view of the organism, captured during uninterrupted hours. Futuras versions can integrate data from wearable devices such as smart watches, expanding access outside of laboratories.
Future potential of technology
Advances in SleepFM include interpretation techniques to understand which patterns the model prioritizes in specific predictions. Integração with daily data from wearables can further refine risk estimates. The model represents a step towards continuous and scalable sleep monitoring as an indicator of global health.
Additional studies test generalization in external cohorts, confirming maintenance of performance. Essa multimodal approach highlights sleep as a window into general physiology.