From signals from a single night in a sleep lab, a new AI can estimate later risk for about 130 diseases – including Parkinson’s disease, dementia, heart attack, as well as prostate and breast cancer. “Years before the first symptoms appear,” says James Zo, a data scientist at Stanford University and one of the authors of the study published in the journal Nature Medicine.
The new AI model is called SleepFM and was trained on hundreds of thousands of hours of sleep data. It was developed by a team led by Rahul Tapa, a biomedical data scientist at Stanford University.
How AI learns to "read" dreams
The process of testing and measuring sleep in a sleep lab is called polysomnography. It simultaneously records brain waves, heart rate, breathing, muscle tension, and eye and leg movements. For SleepFM, the team used about 585,000 hours of such recordings from approximately 65.000 people from multiple groups, mostly from the Stanford Center for Sleep Medicine.
During the preparatory training, the AI learned how brain, heart, and breathing signals are coordinated during normal sleep. In this way, the model statistically adopts a kind of “dream language.”
From sleep signals to disease prognosis
After this basic training, SleepFM is further adapted to tasks such as sleep stage recognition and sleep apnea diagnosis, achieving results that are competitive with established methods such as U-Sleep or YASA.
These two programs use data obtained from brain wave recordings (EEG) and help researchers identify and analyze sleep stages.
The researchers then linked the sleep data to electronic health records spanning up to 25 years and tested what later diagnoses could be predicted based on just one night of measurements.
From more than 1.000 categories, the model identified 130 diseases whose risk could be predicted with at least moderate to high accuracy. First author Rahul Tapa adds that the approach shows "that routine sleep measurements open a hitherto underestimated window into a person's long-term health."
The prediction was particularly successful for dementia, Parkinson's disease, heart attack, heart failure, certain types of cancer, and overall mortality. "In principle, an AI model can be trained for a very large number of possible predictions, provided that there is a suitable database for it," says Sebastian Buschjaeger, a sleep expert at the Lamar Institute at the Technical University of Dortmund, who was not involved in the study.
What AI looks for in the body during sleep
The analysis shows that cardiac signals are particularly important in predicting cardiovascular disease, while brain signals are more important for neurological and psychiatric disorders. However, the most informative is the combination of different signals – for example, when the EEG shows a stable sleep state, while the heart appears more “awake”.
Such contradictions between the brain and the heart could indicate hidden burdens or early disease processes, long before symptoms become noticeable. “If colleagues in sleep medicine suspect a certain connection, we in the AI field can translate this into a prognostic system – and at the same time point out where connections might exist,” says Buschjaeger.
"The connections we provide are mainly statistical in nature. Causal relationships must be confirmed by experts," the Dortmund-based sleep expert stressed in a written response to DW.
How reliable is laboratory data?
The model is based primarily on data from sleep laboratories, i.e. from people who are most often referred for treatment for sleep problems and who live in wealthier regions with access to high-tech medicine. Although the researchers integrate several American and European groups, so-called cohorts, the model is further tested in an independent study. However, people without sleep problems or from less well-off regions of the world remain underrepresented.
Opportunities and limitations for diagnostics and therapy
The researchers explicitly emphasize that SleepFM does not reveal causes of disease, but correlations: it recognizes statistical patterns in sleep that could be linked to later diagnoses.
“Most AI methods do not learn causal relationships,” explains computer scientist Matthias Jakobs of the Technical University of Dortmund, who researches AI and machine learning (ML) methods for analyzing sleep data and was not involved in the study.
ML methods are computational procedures that teach computers to recognize patterns in the data provided and make predictions, without the need for each rule to be explicitly programmed.
Despite this, Jacobs sees "potential for diagnostics and therapy, even if purely statistical relationships are used."
AI helps humans, but does not replace them
Models like SleepFM compress vast amounts of polysomnography data into so-called "embeddings," or compact numerical representations that enable faster and often more precise analysis.
"Sleep stages or apneas can be recorded efficiently in this way - which is a very time-consuming and error-prone task manually. This leaves doctors with more time for their patients," says Jakobs.
Sleep expert Buschjaeger also emphasizes that interdisciplinary cooperation is key: "AI can be trained well to plan therapy, but humans interpret the results and choose therapy, often without full knowledge of all the causes."
Thus, AI remains a tool and an early warning system – the responsibility for diagnosis and treatment still lies with medical staff.
Whether and to what extent the patterns found indicate underlying biological mechanisms is still an open question, but this is where researchers see great potential.
If certain signaling profiles in sleep are re-associated with individual diseases, they could provide clues about which processes in the nervous, cardiovascular or immune systems lose balance early on – and thus enable conclusions about human health beyond the current sleep laboratory cohorts.
Bonus video: