Scientific Reports

ECG-based automated detection of sleep apnea using deep neural networks and hidden markov models

Computational studyBiomarkers
Follow

Abstract

Obstructive sleep apnea (OSA) is a common yet underdiagnosed disorder, and current diagnostic methods such as polysomnography are resource-intensive and inaccessible for many patients. Electrocardiogram (ECG)-based screening offers a more practical alternative, but the nonstationary nature of ECG signals and substantial inter-record and physiological variability limit diagnostic accuracy. Here we propose a deep learning framework that integrates multiple surface ECG-derived features—R-R intervals (RRI), ECG-derived respiration (EDR), and R-wave amplitude (RAMP)—from the PhysioNet Apnea-ECG database. Using a combined Convolutional Neural Network (CNN)–Transformer–Long Short-Term Memory (LSTM) architecture with a Hidden Markov Model (HMM) as a post-processing module, our method achieves an accuracy of 90.33% and specificity of 94.91% under record-wise five-fold cross-validation, while the record-wise A-Test robustness evaluation across K = 2 to K = 36 yielded an accuracy of 90.68% and a specificity of 94.26%. HMM post-processing increased accuracy by approximately 3.7–4.0% points, with larger improvements observed in sensitivity. These results demonstrate the feasibility of a computationally efficient ECG-based framework for OSA screening, while further validation on independent external datasets, prospective clinical cohorts, and real-world home or wearable recordings is required before clinical or home-based deployment.

The paper

Persian Gulf University

Scientific Reports, 11 Oct 2026, CC BY-NC-ND

doi.org/10.1038/s41598-026-75553-6