We know that quality sleep is as essential to survival as food and water. Yet, despite the fact that we spend a third of our lives sleeping, it remains largely a scientific mystery.
It’s not that experts haven’t tried.
Sleep analysis, also known as polysomnography, is used to diagnose sleep disorders by recording multiple types of data, including from the brain (electroencephalogram, or EEG) and heart (electrocardiogram, or ECG). Typically, patients are hooked up to dozens of sensors and wires in a clinic, which track brain, eye, muscle, breathing, and heart activity while they sleep. Not exactly a sleep-inducing technique.
But what if we could perform the same test at home, with the same precision and in real time?
For the first time, computer science researchers at the University of Southern California have developed a method that matches the performance of peer-reviewed polysomnography using only a single-lead echocardiogram. The software, which is open source, allows anyone with basic coding experience to create their own low-cost, homemade sleep tracking device.
“Researchers have been trying for decades to find simpler, cheaper ways to monitor sleep, especially without the cumbersome cap,” said lead author Adam Jones, who recently earned his PhD from USC. “But so far, poor performance even under ideal conditions has led to the conclusion that it won’t be possible and that brain activity needs to be measured. Our research shows that this assumption is no longer true.”
The model, which assesses sleep stages at the highest level, also significantly outperformed other non-EEG models, the researchers said, including commercial sleep-tracking devices. “We wanted to develop a system that addressed the limitations of current methods and the need for greater accessibility and affordability in sleep analysis,” Jones said.
The study, published in June 2024 in the journal Computers in biology and medicineIt was co-authored by Laurent Itti, a computer science professor and Jones’ advisor, and Jones’ longtime collaborator Bhavin R. Sheth, a USC alumnus and electrical engineer at the University of Houston.
Could the heart be guiding the band?
Sleep, a key predictor of cognitive decline, becomes shorter and more fragmented with age, a finding validated by both previous studies and the researchers’ neural network. But this decline occurs earlier than expected. A recent study in Neurology They found that people who have more interrupted sleep in their 30s and 40s are more than twice as likely to have memory problems a decade later.
Chronic lack of sleep can also contribute to the buildup of beta-amyloid plaques, a hallmark of Alzheimer’s disease.
“It’s a little scary,” said Jones, who admits that before embarking on this research as a hobby project in 2010, he was in the “I sleep when I’m dead” camp. “That’s why I want these interventions to come soon and be accessible to as many people as possible. This software could help unravel what happens when we sleep every night.”
The researchers trained their model on a large and diverse dataset of 4,000 recordings from subjects aged 5 to 90, using only cardiac data and a deep learning neural network. Through trial and error spanning hundreds of iterations, they found that the automated ECG-only network could score sleep as well as “gold standard” polysomnography. It successfully classified sleep into all five stages, including rapid eye movement (REM) sleep, which is essential for memory consolidation and emotional stability, and non-REM sleep, including deep sleep, which is crucial for physical and mental recovery.
In addition to simplifying a process that is often costly and cumbersome, this discovery highlights a deeper connection between the heart and the brain than previously believed. It also highlights the role of the autonomic nervous system, which connects the brain and the heart.
“The heart and brain are connected in ways that are not well understood, and this research aims to bridge that gap,” Jones said. “There is a lot of evidence in my paper that, in fact, the heart may be leading the band, so to speak.”
The work could also help improve sleep studies in remote populations, helping to shed light on the origins and functions of sleep.
In a follow-up paper currently in preparation, Jones plans to further explore what the network focuses on in ECG data. “I think there’s a lot of hidden information in the heart that we don’t yet know about,” he said.