A group of Stanford Medication researchers has launched SleepFM Scientific, a multimodal sleep basis mannequin that learns from medical polysleep assessments and predicts long-term illness threat from a single evening’s sleep. The findings have been printed in Nature Medication, and the group launched the medical code as open supply. sleepfm-clinical Repository on GitHub below the MIT license.
From nocturnal polysomnography to normal expressions
Polysomnography data mind exercise, eye actions, coronary heart indicators, muscle tone, respiratory effort, and oxygen saturation all through the evening in a sleep laboratory. Though it’s the gold commonplace take a look at in sleep drugs, it’s only used for sleep staging and sleep apnea prognosis in most medical workflows. The analysis group treats these multichannel indicators as dense physiological time sequence and trains the underlying mannequin to be taught representations which can be shared throughout all modalities.
SleepFM is skilled on roughly 585,000 hours of sleep recordings from roughly 65,000 individuals drawn from a number of cohorts. The most important cohort is from the Stanford Sleep Medication Middle, the place roughly 35,000 adults and kids have been studied over one evening from 1999 to 2024. Its medical cohorts are linked to digital well being data, which later allow survival evaluation for a whole bunch of illness classes.

Mannequin structure and pre-training function
On the modeling stage, SleepFM makes use of a convolutional spine to extract native options from every channel, adopted by attention-based aggregation between channels and a temporal transformer that operates over quick segments of the evening. The identical core structure has already appeared in earlier work on SleepFM for sleep staging and sleep-disordered respiration detection, the place studying joint embeddings throughout mind exercise, electrocardiogram, and respiratory indicators was proven to enhance downstream efficiency.
The aim of pre-training is to get rid of one contrastive studying. For every quick time section, the mannequin builds separate embeddings for every modality group, akin to mind indicators, cardiac indicators, and respiratory indicators, and learns to regulate these modality embeddings in order that the subset can predict the mixed illustration of the remaining modalities. This strategy makes the mannequin strong to lacking channels and heterogeneous recording montages which can be widespread in real-world sleep research.
After pre-training with unlabeled polysomnography, the spine is frozen and the mind is skilled to focus on small duties. For normal sleep duties, a light-weight recurrent or linear head maps embeddings to sleep levels or apnea labels. For medical threat prediction, the mannequin aggregates in a single day right into a single patient-level embedding, concatenates fundamental demographics akin to age and gender, and feeds this illustration right into a Cox proportional hazards layer for time-to-event modeling.
Benchmarks for sleep staging and apnea
Earlier than transferring to illness prediction, the analysis group validated that SleepFM competes with skilled fashions on commonplace sleep evaluation duties. Previous work has shown that a simple classifier Along with the SleepFM embedding, we outperformed end-to-end convolutional networks in sleep stage classification and sleep-disordered respiration detection, and improved macro AUROC and AUPRC on a number of public datasets.
On this medical examine, the identical pre-trained spine is reused for sleep staging and apnea severity classification throughout a multicenter cohort. The outcomes reported within the analysis paper present that SleepFM matches or outperforms present instruments akin to conventional convolutional fashions and different automated sleep staging techniques, validating that this illustration captures core sleep physiology and never simply statistical artifacts from a single dataset.
Predicting 130 illnesses and mortality from a single evening’s sleep
The central contribution of this Stanford analysis paper is illness prediction. The analysis group has mapped prognosis codes from the Stanford Digital Medical File to phecodes, defining greater than 1,000 candidate illness teams. For every phacode, we calculate the time to first prognosis after the sleep examine and match a Cox mannequin on high of the SleepFM embedding.
SleepFM identifies 130 illness outcomes with predictable threat from in a single day polysomnography with robust discriminatory energy. These embrace dying from any trigger, dementia, myocardial infarction, coronary heart failure, continual kidney illness, stroke, atrial fibrillation, some cancers, and a number of psychiatric and metabolic problems. For a lot of of those situations, efficiency metrics akin to concordance index and space below the receiver working curve are inside comparable ranges to established threat scores, regardless that the mannequin makes use of solely sleep data and fundamental demographics.
The report additionally notes that for some cancers, being pregnant issues, cardiovascular illnesses, and psychological well being problems, SleepFM-based predictions attain accuracy ranges of roughly 80% over multi-year threat home windows. This implies that refined patterns within the coordination between mind, coronary heart, and respiratory indicators convey details about underlying illness processes that aren’t but clinically seen.
Comparability with a less complicated baseline
To evaluate the added worth, the analysis group in contrast the SleepFM-based threat mannequin to 2 baselines. The primary makes use of solely demographic traits akin to age, gender, and BMI. Second, we prepare an end-to-end mannequin straight on polysomnography assessments and outcomes with none unsupervised pre-training. Throughout most illness classes, pre-trained SleepFM representations mixed with easy Survival Head yield greater settlement and better long-term AUROC than each baselines.
This examine clearly exhibits that the acquire doesn’t come from a posh prediction head, however from an underlying mannequin that has discovered a normal illustration of sleep physiology. In apply, because of this medical facilities can reuse a single pre-trained spine and be taught small site-specific heads with comparatively modest labeled cohorts whereas nonetheless approaching state-of-the-art efficiency.
Please examine paper and Full code here. Please be at liberty to comply with us too Twitter Remember to hitch us 100,000+ ML subreddits and subscribe our newsletter. dangle on! Are you on telegram? You can now also participate by telegram.
Take a look at the most recent releases ai2025.deva 2025-focused analytics platform that transforms mannequin launches, benchmarks, and ecosystem exercise into structured datasets that may be filtered, in contrast, and exported.
Asif Razzaq is the CEO of Marktechpost Media Inc. Asif is a visionary entrepreneur and engineer dedicated to harnessing the potential of synthetic intelligence for social good. His newest endeavor is the launch of Marktechpost, a synthetic intelligence media platform. It stands out for its thorough protection of machine studying and deep studying information, which is technically sound and simply understood by a large viewers. The platform boasts over 2 million views per thirty days, demonstrating its reputation amongst viewers.

