Efficient ECG-Based Sleep Apnea Detection Using CNN-GRU and Sparse Autoencoder

Authors

  • Ramadhian Eka Putra Department of Computer Science, Bina Nusantara University, Indonesia
  • Sani Muhamad Isa Department of Computer Science, Bina Nusantara University, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.1.5182

Keywords:

Classification, CNN, ECG, GRU, Sleep Apnea, Sparse Autoencoder

Abstract

Sleep apnea is a serious and common breathing disorder that occurs during sleep, characterized by repeated pauses in breathing that can increase the risk of hypertension, heart disease, and stroke. Early detection of sleep apnea is crucial, but conventional methods, such as polysomnography, are expensive, complex, and inefficient for mass screening. Therefore, an automated system based on physiological signals such as an electrocardiogram (ECG) is needed for a more practical and efficient approach. This study proposes a sleep apnea classification model utilizing a combination of 1D Convolutional Sparse Autoencoder (1DCSAE), Convolutional Neural Network (CNN), and Gated Recurrent Unit (GRU) architectures, referred to as the SAE-DEEP model. This method is designed to automatically extract features while minimizing the need for preprocessing. Four testing scenarios were conducted to evaluate the impact of signal reconstruction and preprocessing on classification performance. Experimental results show that the CNN-GRU model with signal reconstruction using 1DCSAE achieves an accuracy of 89.8%, a sensitivity of 90.1%, and a specificity of 89.2%, demonstrating balanced and stable classification performance. Additionally, this model was proven to work effectively without complex preprocessing steps, making it a potential solution for efficient sleep apnea detection systems. These findings could contribute to the development of more straightforward, reliable, and clinically viable ECG-based classification systems, as well as wearable devices. In doing so, the proposed model addresses a critical gap in sleep apnea screening, underscoring the urgent need for accessible and cost-effective diagnostic tools. 

Downloads

Download data is not yet available.

References

M. Bahrami and M. Forouzanfar, “Sleep Apnea Detection From Single-Lead ECG: A Comprehensive Analysis of Machine Learning and Deep Learning Algorithms,” IEEE Trans. Instrum. Meas., vol. 71, pp. 1–11, 2022, doi: 10.1109/TIM.2022.3151947.

Y. Lin et al., “Objective Sleep Duration and All-Cause Mortality Among People With Obstructive Sleep Apnea,” JAMA Netw. Open, vol. 6, no. 12, p. e2346085, Dec. 2023, doi: 10.1001/jamanetworkopen.2023.46085.

F. F. Karuga et al., “REM-OSA as a Tool to Understand Both the Architecture of Sleep and Pathogenesis of Sleep Apnea—Literature Review,” J. Clin. Med., vol. 12, no. 18, p. 5907, Sep. 2023, doi: 10.3390/jcm12185907.

J. Li, Y. Huang, S. Xu, and Y. Wang, “Sleep disturbances and female infertility: a systematic review,” BMC Womens. Health, vol. 24, no. 1, p. 643, 2024, doi: 10.1186/s12905-024-03508-y.

A. M. Das, J. L. Chang, M. Berneking, N. P. Hartenbaum, M. Rosekind, and I. Gurubhagavatula, “Obstructive sleep apnea screening, diagnosis, and treatment in the transportation industry,” J. Clin. Sleep Med., vol. 18, no. 10, pp. 2471–2479, Oct. 2022, doi: 10.5664/jcsm.9672.

B. Xie and H. Minn, “Real-Time Sleep Apnea Detection by Classifier Combination,” IEEE Trans. Inf. Technol. Biomed., vol. 16, no. 3, pp. 469–477, 2012, doi: 10.1109/TITB.2012.2188299.

S. F. QUAN, J. C. GILLIN, M. R. LITTNER, and J. W. SHEPARD, “Sleep-related breathing disorders in adults: Recommendations for syndrome definition and measurement techniques in clinical research. Editorials,” Sleep (New York, NY), vol. 22, no. 5, pp. 662–689, 1999.

N. M. Punjabi, “The Epidemiology of Adult Obstructive Sleep Apnea,” Proc. Am. Thorac. Soc., vol. 5, no. 2, pp. 136–143, Feb. 2008, doi: 10.1513/pats.200709-155MG.

A. H. Yüzer, H. Sümbül, M. Nour, and K. Polat, “A different sleep apnea classification system with neural network based on the acceleration signals,” Appl. Acoust., vol. 163, p. 107225, Jun. 2020, doi: 10.1016/j.apacoust.2020.107225.

A. Benjafield et al., “Global prevalence of obstructive sleep apnea in adults: estimation using currently available data,” in B67. Risk and prevalence of sleep disordered breathing, American Thoracic Society, 2018, pp. A3962–A3962.

A. V Benjafield et al., “Estimation of the global prevalence and burden of obstructive sleep apnoea: a literature-based analysis,” Lancet Respir. Med., vol. 7, no. 8, pp. 687–698, 2019, doi: https://doi.org/10.1016/S2213-2600(19)30198-5.

S. C. Veasey and I. M. Rosen, “Obstructive Sleep Apnea in Adults,” N. Engl. J. Med., vol. 380, no. 15, pp. 1442–1449, Apr. 2019, doi: 10.1056/NEJMcp1816152.

B. Fatimah, P. Singh, A. Singhal, and R. B. Pachori, “Detection of apnea events from ECG segments using Fourier decomposition method,” Biomed. Signal Process. Control, vol. 61, p. 102005, Aug. 2020, doi: 10.1016/j.bspc.2020.102005.

K. K. Valavan et al., “Detection of Obstructive Sleep Apnea from ECG Signal Using SVM Based Grid Search,” Int. J. Electron. Telecommun., vol. 67, no. No 1, pp. 5–12, 2021, doi: 10.24425/ijet.2020.134021.

N. Pombo, B. M. C. Silva, A. M. Pinho, and N. Garcia, “Classifier Precision Analysis for Sleep Apnea Detection Using ECG Signals,” IEEE Access, vol. 8, pp. 200477–200485, 2020, doi: 10.1109/ACCESS.2020.3036024.

O. Faust, R. Barika, A. Shenfield, E. J. Ciaccio, and U. R. Acharya, “Accurate detection of sleep apnea with long short-term memory network based on RR interval signals,” Knowledge-Based Syst., vol. 212, p. 106591, Jan. 2021, doi: 10.1016/j.knosys.2020.106591.

K. Feng, H. Qin, S. Wu, W. Pan, and G. Liu, “A Sleep Apnea Detection Method Based on Unsupervised Feature Learning and Single-Lead Electrocardiogram,” IEEE Trans. Instrum. Meas., vol. 70, pp. 1–12, 2021, doi: 10.1109/TIM.2020.3017246.

Q. Shen, H. Qin, K. Wei, and G. Liu, “Multiscale Deep Neural Network for Obstructive Sleep Apnea Detection Using RR Interval From Single-Lead ECG Signal,” IEEE Trans. Instrum. Meas., vol. 70, pp. 1–13, 2021, doi: 10.1109/TIM.2021.3062414.

A. Sheta et al., “Diagnosis of Obstructive Sleep Apnea from ECG Signals Using Machine Learning and Deep Learning Classifiers,” Appl. Sci., vol. 11, no. 14, p. 6622, Jul. 2021, doi: 10.3390/app11146622.

A. Zarei, H. Beheshti, and B. M. Asl, “Detection of sleep apnea using deep neural networks and single-lead ECG signals,” Biomed. Signal Process. Control, vol. 71, p. 103125, Jan. 2022, doi: 10.1016/j.bspc.2021.103125.

B. Moradhasel, A. Sheikhani, O. Aloosh, and N. Jafarnia Dabanloo, “Spectrogram classification of patient chin electromyography based on deep learning: A novel method for accurate diagnosis obstructive sleep apnea,” Biomed. Signal Process. Control, vol. 79, p. 104215, Jan. 2023, doi: 10.1016/j.bspc.2022.104215.

D. Peng, L. Sun, Q. Zhou, and Y. Zhang, “AI-driven approaches for automatic detection of sleep apnea/hypopnea based on human physiological signals: a review,” Heal. Inf. Sci. Syst., vol. 13, no. 1, p. 7, 2024, doi: 10.1007/s13755-024-00320-8.

A. Ramachandran and A. Karuppiah, “A Survey on Recent Advances in Machine Learning Based Sleep Apnea Detection Systems,” Healthcare, vol. 9, no. 7, p. 914, Jul. 2021, doi: 10.3390/healthcare9070914.

H. Nasifoglu and O. Erogul, “Obstructive sleep apnea prediction from electrocardiogram scalograms and spectrograms using convolutional neural networks,” Physiol. Meas., vol. 42, no. 6, p. 065010, Jun. 2021, doi: 10.1088/1361-6579/ac0a9c.

H. Almutairi, G. M. Hassan, and A. Datta, “Detection of Obstructive Sleep Apnoea by ECG signals using Deep Learning Architectures,” in 2020 28th European Signal Processing Conference (EUSIPCO), IEEE, Jan. 2021, pp. 1382–1386. doi: 10.23919/Eusipco47968.2020.9287360.

T. Wang, C. Lu, G. Shen, and F. Hong, “Sleep apnea detection from a single-lead ECG signal with automatic feature-extraction through a modified LeNet-5 convolutional neural network,” PeerJ, vol. 7, p. e7731, Sep. 2019, doi: 10.7717/peerj.7731.

M. Bahrami and M. Forouzanfar, “Detection of Sleep Apnea from Single-Lead ECG: Comparison of Deep Learning Algorithms,” in 2021 IEEE International Symposium on Medical Measurements and Applications (MeMeA), 2021, pp. 1–5. doi: 10.1109/MeMeA52024.2021.9478745.

S. F. Ahmed et al., “Deep learning modelling techniques: current progress, applications, advantages, and challenges,” Artif. Intell. Rev., vol. 56, no. 11, pp. 13521–13617, 2023, doi: 10.1007/s10462-023-10466-8.

S. Dargan, M. Kumar, M. R. Ayyagari, and G. Kumar, “A Survey of Deep Learning and Its Applications: A New Paradigm to Machine Learning,” Arch. Comput. Methods Eng., vol. 27, no. 4, pp. 1071–1092, 2020, doi: 10.1007/s11831-019-09344-w.

A. Prabakaran and E. Rufus, “Review on the wearable health-care monitoring system with robust motion artifacts reduction techniques,” Sens. Rev., vol. 42, no. 1, pp. 19–38, Jan. 2022, doi: 10.1108/SR-05-2021-0150.

M. Khalili, H. GholamHosseini, A. Lowe, and M. M. Y. Kuo, “Motion artifacts in capacitive ECG monitoring systems: a review of existing models and reduction techniques,” Med. Biol. Eng. Comput., vol. 62, no. 12, pp. 3599–3622, 2024, doi: 10.1007/s11517-024-03165-1.

J. Yang et al., “Multi-Label Attribute Selection of Arrhythmia for Electrocardiogram Signals with Fusion Learning,” Bioengineering, vol. 9, no. 7, p. 268, Jun. 2022, doi: 10.3390/bioengineering9070268.

R. Dey and F. M. Salem, “Gate-variants of Gated Recurrent Unit (GRU) neural networks,” in 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), IEEE, Aug. 2017, pp. 1597–1600. doi: 10.1109/MWSCAS.2017.8053243.

Z. Huang and K. He, “GRU-TSMixers: Sleep Apnea and Hypopnea Detection Based on Multi Scale MLP-Mixers,” in 2024 International Joint Conference on Neural Networks (IJCNN), IEEE, Jun. 2024, pp. 1–8. doi: 10.1109/IJCNN60899.2024.10650636.

P. Hemrajani, V. S. Dhaka, G. Rani, P. Shukla, and D. P. Bavirisetti, “Efficient Deep Learning Based Hybrid Model to Detect Obstructive Sleep Apnea,” Sensors, vol. 23, no. 10, p. 4692, May 2023, doi: 10.3390/s23104692.

H. Almutairi, G. M. Hassan, and A. Datta, “Classification of Obstructive Sleep Apnoea from single-lead ECG signals using convolutional neural and Long Short Term Memory networks,” Biomed. Signal Process. Control, vol. 69, p. 102906, Aug. 2021, doi: 10.1016/j.bspc.2021.102906.

S. E. Mathe, N. K. Penjarla, S. Vappangi, and H. K. Kondaveeti, “Advancements in Noise Reduction Techniques in ECG Signals: A Review,” in 2024 IEEE 3rd World Conference on Applied Intelligence and Computing (AIC), IEEE, Jul. 2024, pp. 27–33. doi: 10.1109/AIC61668.2024.10730852.

V. Gupta, A. K. Sharma, P. K. Pandey, R. K. Jaiswal, and A. Gupta, “Pre-Processing Based ECG Signal Analysis Using Emerging Tools,” IETE J. Res., vol. 70, no. 4, pp. 4219–4230, Apr. 2024, doi: 10.1080/03772063.2023.2202162.

M. E. Jijón-Palma, C. Amisse, and J. A. S. Centeno, “Hyperspectral dimensionality reduction based on SAE-1DCNN feature selection approach,” Appl. Geomatics, vol. 15, no. 4, pp. 991–1004, 2023, doi: 10.1007/s12518-023-00535-6.

A. Shaheen, L. Ye, C. Karunaratne, and T. Seppänen, “Fully-Gated Denoising Auto-Encoder for Artifact Reduction in ECG Signals,” Sensors, vol. 25, no. 3, p. 801, Jan. 2025, doi: 10.3390/s25030801.

M. Łępicki et al., “Comparative Evaluation of Sequential Neural Network (GRU, LSTM, Transformer) Within Siamese Networks for Enhanced Job–Candidate Matching in Applied Recruitment Systems,” Appl. Sci., vol. 15, no. 11, p. 5988, May 2025, doi: 10.3390/app15115988.

F. Setiawan and C.-W. Lin, “A Deep Learning Framework for Automatic Sleep Apnea Classification Based on Empirical Mode Decomposition Derived from Single-Lead Electrocardiogram,” Life, vol. 12, no. 10, p. 1509, Sep. 2022, doi: 10.3390/life12101509.

Additional Files

Published

2026-02-15

How to Cite

[1]
R. E. . Putra and S. M. . Isa, “Efficient ECG-Based Sleep Apnea Detection Using CNN-GRU and Sparse Autoencoder”, J. Tek. Inform. (JUTIF), vol. 7, no. 1, pp. 475–489, Feb. 2026.