
Heart data in sleep study predicts atrial fibrillation, heart failure years in advance
AI analyzes single-lead ECGs from sleep studies to predict atrial fibrillation, heart failure, and mortality risk, enabling scalable cardiovascular disease screening.
An artificial intelligence (AI) model that reads heart signals recorded during routine overnight sleep studies flagged patients at higher long-term risk of atrial fibrillation (AF), heart failure and death, according to a
Sleep disorders such as sleep apnea and insomnia have been linked to heart disease. People with obstructive sleep apnea have higher rates of AF, a heart rhythm disorder that raises stroke risk fivefold and heart failure risk threefold, according to the study. Overnight sleep studies, known clinically as polysomnography, record a single-lead electrocardiogram (ECG), but that tracing is rarely analyzed. Most AI heart risk tools rely on standard 12-lead ECGs instead.
Zuzana Koscova, research engineer at the Department of Biomedical Informatics at Emory University School of Medicine in Atlanta, led the study with researchers from institutions including Beth Israel Deaconess Medical Center (BIDMC) and Stanford University. The team wanted to know whether overnight ECG data, paired with sleep stage information, adds value beyond standard clinical risk factors. The National Heart, Lung, and Blood Institute funded the work.
How researchers built and tested the sleep study model
The researchers adapted an existing AI model, originally trained on 86,000 ECGs to classify 26 heart rhythm problems, using sleep studies from 15,809 Massachusetts General Hospital patients. Each overnight ECG was paired with expert-scored sleep stages. The team then tested the model on two separate groups: 9,810 patients from Emory University Hospital and 12,576 from BIDMC. Follow-up ran up to 10 years at Emory and seven years at BIDMC.
Diagnoses of AF, stroke, heart attack and heart failure came from billing codes in electronic health records. Patients already diagnosed with a condition were left out of that condition’s analysis. To avoid counting AF that was already present, the team also excluded patients diagnosed within a month of their sleep study and had a cardiologist review recordings flagged by AF-detection software. Results were adjusted for age, sex, body mass index, smoking, high blood pressure, diabetes and sleep measures such as sleep apnea severity and sleep efficiency.
What the model found for heart failure and atrial fibrillation
After adjustment, each one-standard-deviation increase in the model’s score was linked to 2.03 times the risk of AF at Emory and 2.72 times the risk at BIDMC. The score was also tied to higher risk of heart failure (1.69 and 2.33 times, respectively) and death from any cause (1.82 and 1.65 times). The links were weaker for stroke, at 1.19 and 1.40 times. For heart attack, the score was tied to 1.38 times the risk at Emory, but the BIDMC finding was not statistically significant.
Adding the score to standard risk factors significantly improved prediction of AF, heart failure and death at both centers, with the largest gain for heart failure. It didn’t improve prediction of stroke or heart attack. In addition, the model leaned mostly on ECG data from N1, the lightest stage of sleep.
Using AI on sleep study data “presents a noninvasive, scalable approach to assess long-term cardiac risk during routine sleep studies,” the authors wrote. They said they see it as a screening tool rather than a standalone diagnostic test, with flagged patients getting follow-up ECGs, Holter monitoring or a cardiologist review. They added that false positives could lead to unnecessary testing, higher healthcare costs and patient anxiety.
Strengths and limits of the sleep study research
The study drew strength from its size and from testing at two hospital systems not used to build the model. When researchers required at least two billing codes to confirm a diagnosis, the links for AF and heart failure grew stronger. The score also stayed tied to AF, heart failure and death among patients with no history of any of the four heart conditions.
However, outcomes relied on billing codes without clinical confirmation or lab markers. Cause of death was not available, as well. Only a handful of ECG segments per flagged recording were reviewed for hidden AF, so some undiagnosed cases may remain.
Additionally, patients came from hospital-based sleep labs and often carry higher heart risk, so the findings may not apply to the general population. Heart attacks were also rare in the BIDMC group, at 1.39% of patients, which may have weakened that result.
The authors stated that the approach shows promise for AF, heart failure and death, while predictions for heart attack and stroke “require further optimization.” They have made the model’s code public so other researchers can test it in more patient groups but recommend that it be done before clinical implementation.
Related to this article







