Stanford Researchers Construct SleepFM Medical: A Multimodal Sleep Basis AI Mannequin for 130+ Illness Prediction
A workforce of Stanford Medication researchers have launched SleepFM Medical, a multimodal sleep basis mannequin that learns from scientific polysomnography and predicts long run illness danger from a single evening of sleep. The analysis work is revealed in Nature Medication and the workforce has launched the scientific code because the open supply sleepfm-clinical repository on GitHub underneath the MIT license.
From in a single day polysomnography to a basic illustration
Polysomnography information mind exercise, eye actions, coronary heart indicators, muscle tone, respiratory effort and oxygen saturation throughout a full evening in a sleep lab. It’s the gold normal take a look at in sleep drugs, however most scientific workflows use it just for sleep staging and sleep apnea prognosis. The analysis workforce deal with these multichannel indicators as a dense physiological time sequence and practice a basis mannequin to study a shared illustration throughout all modalities.
SleepFM is skilled on about 585,000 hours of sleep recordings from about 65,000 folks, drawn from a number of cohorts. The biggest cohort comes from the Stanford Sleep Medication Middle, the place about 35,000 adults and kids had in a single day research between 1999 and 2024. That scientific cohort is linked to digital well being information, which later permits survival evaluation for tons of of illness classes.

Mannequin structure and pretraining goal
On the modeling stage, SleepFM makes use of a convolutional spine to extract native options from every channel, adopted by consideration based mostly aggregation throughout channels and a temporal transformer that operates over quick segments of the evening. The identical core structure already appeared in earlier work on SleepFM for sleep staging and sleep disordered respiratory detection, the place it confirmed that studying joint embeddings throughout mind exercise, electrocardiography and respiratory indicators improves downstream efficiency.
The pretraining goal is depart one out contrastive studying. For every quick time section, the mannequin builds separate embeddings for every modality group, reminiscent of mind indicators, coronary heart indicators and respiratory indicators, after which learns to align these modality embeddings in order that any subset predicts the joint illustration of the remaining modalities. This method makes the mannequin strong to lacking channels and heterogeneous recording montages, that are frequent in actual world sleep labs.
After pretraining on unlabeled polysomnography, the spine is frozen and small activity particular heads are skilled. For traditional sleep duties, a light-weight recurrent or linear head maps embeddings to sleep phases or apnea labels. For scientific danger prediction, the mannequin aggregates the total evening right into a single affected person stage embedding, concatenates fundamental demographics reminiscent of age and intercourse, after which feeds this illustration right into a Cox proportional hazards layer for time to occasion modeling.
Benchmarks on sleep staging and apnea
Earlier than shifting to illness prediction, the analysis workforce verified that SleepFM competes with specialist fashions on normal sleep evaluation duties. Prior work already showed that a simple classifier on high of SleepFM embeddings outperforms finish to finish convolutional networks for sleep stage classification and for detection of sleep disordered respiratory, with good points in macro AUROC and AUPRC on a number of public datasets.
Within the scientific examine, the identical pretrained spine is reused for sleep staging and apnea severity classification throughout multi heart cohorts. Outcomes reported within the analysis paper present that SleepFM matches or exceeds current instruments reminiscent of conventional convolutional fashions and different automated sleep staging methods, which validates that the illustration captures core sleep physiology and never solely statistical artifacts from a single dataset.
Predicting 130 illnesses and mortality from one evening of sleep
The core contribution of this Stanford’s analysis paper is illness prediction. The analysis workforce maps prognosis codes within the Stanford digital well being information to phecodes and defines greater than 1,000 candidate illness groupings. For every phecode, they compute time to first prognosis after the sleep examine and match a Cox mannequin on high of SleepFM embeddings.
SleepFM identifies 130 illness outcomes whose dangers are predictable from a single evening of polysomnography with sturdy discrimination. These embrace all trigger mortality, dementia, myocardial infarction, coronary heart failure, power kidney illness, stroke, atrial fibrillation, a number of cancers and a number of psychiatric and metabolic issues. For a lot of of those circumstances, efficiency metrics reminiscent of concordance index and space underneath the receiver working curve are in ranges akin to established danger scores, regardless that the mannequin makes use of solely sleep recordings plus fundamental demographics.
The reporting additionally notes that for some cancers, being pregnant issues, circulatory circumstances and psychological well being issues, predictions based mostly on SleepFM attain accuracy ranges round 80 % for multi yr danger home windows. This implies that refined patterns within the coordination between mind, coronary heart and respiratory indicators carry details about latent illness processes that aren’t but clinically seen.
Comparability with less complicated baselines
To evaluate added worth, the analysis workforce in contrast SleepFM based mostly danger fashions with two baselines. The primary makes use of solely demographic options reminiscent of age, intercourse and physique mass index. The second trains an finish to finish mannequin straight on polysomnography and outcomes, with out unsupervised pretraining. Throughout most illness classes, the pretrained SleepFM illustration mixed with a easy survival head yields larger concordance and better lengthy horizon AUROC than each baselines.
This analysis clearly reveals that the acquire comes much less from a fancy prediction head and extra from the inspiration mannequin that has discovered a basic illustration of sleep physiology. In observe, which means scientific facilities can reuse a single pretrained spine, study small web site particular heads with comparatively modest labeled cohorts and nonetheless method cutting-edge efficiency.
Take a look at the Paper and FULL CODES here. Additionally, be at liberty to comply with us on Twitter and don’t overlook to hitch our 100k+ ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Take a look at our newest launch of ai2025.dev, a 2025-focused analytics platform that turns mannequin launches, benchmarks, and ecosystem exercise right into a structured dataset you’ll be able to filter, evaluate, and export
The put up Stanford Researchers Build SleepFM Clinical: A Multimodal Sleep Foundation AI Model for 130+ Disease Prediction appeared first on MarkTechPost.