Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Apr 30;13(5):1090.
doi: 10.3390/biomedicines13051090.

AI-Driven Detection of Obstructive Sleep Apnea Using Dual-Branch CNN and Machine Learning Models

Affiliations

AI-Driven Detection of Obstructive Sleep Apnea Using Dual-Branch CNN and Machine Learning Models

Manjur Kolhar et al. Biomedicines. .

Abstract

Background/Objectives: The purpose of this research is to compare and contrast the application of machine learning and deep learning methodologies such as a dual-branch convolutional neural network (CNN) model for detecting obstructive sleep apnea (OSA) from electrocardiogram (ECG) data. Methods: This approach solves the limitations of conventional polysomnography (PSG) and presents a non-invasive method for detecting OSA in its early stages with the help of AI. Results: The research shows that both CNN and dual-branch CNN models can identify OSA from ECG signals. The CNN model achieves validation and test accuracy of about 93% and 94%, respectively, whereas the dual-branch CNN model achieves 93% validation and 94% test accuracy. Furthermore, the dual-branch CNN obtains a ROC AUC score of 0.99, meaning that it is better at distinguishing between apnea and non-apnea cases. Conclusions: The results show that CNN models, especially the dual-branch CNN, are effective in apnea classification and better than traditional methods. In addition, our proposed model has the potential to be used as a reliable, non-invasive method for accurate OSA detection that is even better than the current state-of-the-art advanced methods.

Keywords: ECG; deep learning; dual-branch CNN; machine learning; obstructive sleep apnea (OSA).

PubMed Disclaimer

Conflict of interest statement

All authors confirm that they have no affiliations with or involvement in any organization or entity with any financial interest (such as honoraria; educational grants; participation in speakers’ bureaus; membership, employment, consultancies, stock ownership, or other equity interest; and expert testimony or patent-licensing arrangements) or non-financial interest (such as personal or professional relationships, affiliations, knowledge or beliefs) in the subject matter or materials discussed in this manuscript.

Figures

Figure 1
Figure 1
ECG-based apnea detection using dual-branch convolutional deep learning methods and machine learning techniques.
Figure 2
Figure 2
Comparison of original and smoothed ECG signals in the apnea dataset.
Figure 3
Figure 3
Smoothed ECG signal with detected outliers.
Figure 4
Figure 4
Convolutional neural network (CNN) model architecture.
Figure 5
Figure 5
Summary of the dual-branch model architecture.
Figure 6
Figure 6
Accuracy and loss and ROC AUC graph of the test and validation of CNN model.
Figure 7
Figure 7
Confusion matrix of the CNN model for test and validation.
Figure 8
Figure 8
Accuracy and loss and ROC AUC graph of the testing and validation of the dual-branch model.
Figure 9
Figure 9
Confusion matrices of the dual-branch model for the training, testing, and validation sets.
Figure 10
Figure 10
Grad-CAM and integrated gradient.
Figure 11
Figure 11
Grad-CAM and gradient.
Figure 12
Figure 12
ROC AUC graph of the test set analyzed using the RF model.
Figure 13
Figure 13
Confusion matrix of the test set analyzed using the RF model.
Figure 14
Figure 14
ROC AUC graphs of the testing, validation, and training of the RF model.
Figure 15
Figure 15
Confusion matrix of the DT model for the training, validation, and test sets.
Figure 16
Figure 16
Comparison of our model with current studies [1,2,4,5,6,7,8,9,10,11].

Similar articles

References

    1. Bonekat H.W., Kimberly A.H. Severe upper airway obstruction during sleep. Clin. Rev. Allergy Immunol. 2003;25:191–210. doi: 10.1385/CRIAI:25:2:191. - DOI - PubMed
    1. Gerstenblith G. Coronary Heart Disease 2007: Johns Hopkins White Papers. Johns Hopkins Health; Baltimore, MD, USA: 2007.
    1. Culebras A., Stephen D., John S.F., Carl E.H., Lyle J.O., Thomas G.P., Richard R., Mary W., Terry Y. Sleep apnea and cardiovascular disease. J. Am. Coll. Cardiol. 2008;52:686–717. - PubMed
    1. Pires G.N., Arnardóttir E.S., Islind A.S., Leppänen T., McNicholas W.T. Consumer sleep technology for the screening of obstructive sleep apnea and snoring: Current status and a protocol for a systematic review and meta-analysis of diagnostic test accuracy. J. Sleep Res. 2023;32:e13819. doi: 10.1111/jsr.13819. - DOI - PubMed
    1. Sharma M., Bapodara S., Tiwari J., Acharya U.R. Automated sleep apnea detection in pregnant women using wavelet-based features. Inform. Med. Unlocked. 2022;32:101026. doi: 10.1016/j.imu.2022.101026. - DOI

LinkOut - more resources