
Scientists at Stanford Medicine have developed an artificial intelligence system that can estimate a person’s future risk of serious diseases by analyzing data from just a single night of sleep. This includes heart disease, mental disorders, cancer, and even conditions like Parkinson’s disease and dementia.
It sounds like something out of a science fiction film, but the thinking behind it is deep and profoundly human. All of us have experienced a bad night’s sleep at some point. A heavy head the next morning, a tired body, irritability. Usually, we dismiss it as just one bad night and move on. But scientists wondered, what if that bad night is not just a story of today’s fatigue, but a warning about the years to come?
That question led to the creation of an AI model called SleepFM. This system was trained on nearly six hundred thousand hours of sleep data, drawn from about sixty five thousand people whose sleep was recorded in hospitals during a specialized test called polysomnography. During this test, multiple signals are recorded simultaneously while a person sleeps, including brain waves, heart rate, breathing patterns, eye movements, leg motion, and various other bodily indicators.
Now imagine a person sleeping for eight hours while every small and large activity of the body is being recorded. It is like an autobiography of the body, written without words. The problem was that for many years, doctors examined only a very small portion of this data, mainly to check whether a person had sleep apnea or whether their sleep stages were normal. The rest of the information often remained buried in files. But this is where AI shows its strength. It can detect patterns even where the human eye sees only noise.
SleepFM was designed to understand sleep as if it were a language. Just as we form sentences from words, this AI pieces together the story of an entire night from small five second fragments of sleep. Brain waves, heart rhythms, muscle movements, breathing sounds, all combine to create a hidden meaning. The system was trained so that even if one signal is removed, it can infer what should have been there based on the remaining signals. It is like listening to music and still understanding the melody even if one instrument stops playing.
When tested, this AI outperformed existing systems even in routine sleep assessments. But the real surprise came when it was used to predict future diseases. Stanford’s Sleep Medicine Center has decades of medical data, including sleep studies of some patients followed by health records spanning up to twenty five years. This made it possible to see how a person’s sleep today related to the diseases they developed ten or twenty years later.
After matching this data, SleepFM identified around one hundred thirty conditions, out of more than a thousand diseases, whose risk could be estimated using sleep alone. These included cancer, pregnancy related complications, heart disease, and mental disorders. The strength of these predictions was measured using a metric called the C index. In simple terms, it evaluates how often the AI correctly identifies the person at higher risk. For many diseases, the accuracy exceeded eighty percent. In cases like Parkinson’s disease and certain cancers, it was even higher.
The most fascinating aspect is not that the AI can predict the future, but how it does so. Scientists found that the key signals emerge when different parts of the body lose synchronization. For example, the brain may appear fully asleep, while the heart rate resembles that of wakefulness, or breathing follows a different rhythm altogether. This imbalance, this subtle mismatch, could be the whisper of an illness yet to come. This discovery points to a deeper truth. Our body is like an orchestra. When all the instruments play in harmony, we remain healthy. When one instrument starts following its own tune, the music begins to fall apart.
SleepFM is not a doctor. It does not provide treatment. It simply listens to the language our body speaks every night, when we ourselves are unaware. In the future, if it is integrated with wearable devices, it may be possible that your watch or band does more than count steps. It might also indicate the direction your body is heading internally. Sleep would then no longer be just rest. It would become a window into the future.




