Sleep apnea is a common sleep-related breathing disorder with significant cardiovascular and neurological consequences. While single-lead ECG offers a cost-effective, scalable approach for automated detection, its non-stationary and multiscale characteristics present major challenges for reliable computational modeling.
This study introduces a multi-path deep learning framework for automated sleep apnea detection from single-lead ECG. The model integrates CNN-based feature extraction, a bidirectional Transformer with hierarchical attention, GRU-based temporal modeling, and adaptive feature fusion on RR intervals and R-peak morphology. Its performance was rigorously validated via hold-out and stratified five-fold cross-validation, enhanced with ensemble learning and temporal post-processing using adaptive smoothing and median filtering.
Under five-fold cross-validation, the ensemble with post-processing achieved substantial performance gains: segment-level accuracy increased from 91.78% to 92.67%, sensitivity from 88.26% to 89.43%, specificity from 93.96% to 94.68%, F1-score from 89.16% to 90.33%, Cohen's kappa from 0.8254 to 0.8443, and area under the ROC curve (AUC) from 0.9702 to 0.9774. In the hold-out evaluation, post-processing improved accuracy from 90.27% to 91.30%, sensitivity from 89.14% to 90.31%, specificity from 90.98% to 91.92%, F1-score from 87.53% to 88.83%, and Cohen's kappa from 0.7956 to 0.8171, while maintaining an AUC of 0.9648. At the per-recording level, the framework achieved perfect classification performance (100% accuracy, sensitivity, specificity, and AUC) with strong correlation to reference annotations (Pearson's r = 0.97).
These results show that combining multi-path deep learning, ensemble strategies, and domain-informed temporal post-processing enables accurate, robust, and efficient sleep apnea detection from single-lead ECG, with strong potential for clinical translation and large-scale screening.