Efficient Deep Learning Based Hybrid Model to Detect Obstructive Sleep Apnea
Abstract
:1. Introduction
- Two OSA detection models are proposed, first using MobileNet V1, which offers improved accuracy over the state-of-the-art on the same data set.
- The second OSA detection model is proposed by integrating MobileNet V1 with two different RNNs (LSTM and GRU) used separately to provide two distinct deep-learning models. This model offers the highest accuracy, specificity, and sensitivity over the state-of-the-art on the same data set.
- A secured wearable device to detect and classify ECG signals of the patient being apneic or not. A security mechanism assures the data received from the sensors is left open to any mishandling.
2. Related Works
Year | Authors | Technique Used | Application | Features | Accuracy |
---|---|---|---|---|---|
2017 [21] | Gutta, S., Cheng, Q., Nguyen, H.D. and Benjamin, B.A. | Hidden Markov Model | OSA Detection | Temporal dependence on signals using Hidden Markov Model (HMM) | 82.33% |
2018 [9] | Wang, L., Lin, Y. and Wang, J. | DNN and HMM using single lead ECG signal | OSA Detection | Hidden Markov Model (HMM) and Deep Neural Network (DNN) | 85% |
2018 [18] | Surrel, G., Aminifar, A., Rincon, F. and Murali, S. | SVM | OSA Detection | RR Interval and RS amplitude time series | 88.2% |
2019 [19] | Singh, S.A. and Majumder, S. | AlexNet model, CNN | OSA Detection | Time-Frequency Scalogram | 86.22% |
2019 [22] | Lu, C. and Shen, G. | Time window artificial neural network (TW-MLP) | SA Detection | RR Interval and RPeak Amplitude | 87.3% |
2020 [17] | Feng, K., Qin, H., Wu, S., Pan, W. and Liu, G. | Unsupervised feature learning, single lead ECG | SA Detection | Frequential stacked sparse autoencoder (FSSAE) | 85.1% |
2021 [8] | Shen, Q., Qin, H., Wei, K. and Liu, G. | Multiscale deep neural network | OSA Detection | Multiscale Dilation Attention Convolution | 89.4% |
Year | Authors | Technique Used | Application | Features | Accuracy |
---|---|---|---|---|---|
2020 [23] | Bozkurt, F., Uçar, M.K., Bozkurt, M.R. and Bilgin, C. | Single channel ECG and hybrid ML Model | Detection of abnormal respiratory events with obstructive sleep apnea | Fisher Feature Selection Algorithm, Principal Component Analysis | 85.12% |
2020 [5] | Mc-Clure, K., Erdreich, B., Bates, J.H.T., McGinnis, R.S., Masquelin, A. and Wshah, S. | Multiscale Deep Neural Network and 1DCNN with wireless sensors | OSA Detection | 1-D Convolutional Neural Network | 86% |
2019 [20] | Stretch, R. et al. | Machine Learning (KNN, SLR, ANN, SVM, Gradient boosted decision tree, etc.) | OSA Detection | Least Absolute Shrinkage and Selection Operator (LASSO) and Ridge Regression | 80.5% |
2019 [19] | Singh, S.A. and Majumder, S. | AlexNet | Sleep Apnea Detection | Deep Neural Network | 86.22% |
2019 [24] | Liang, X., Qiao, X. and Li, Y. | CNN and LSTM | OSA Detection | RR Interval | 99.8% |
2017 [21] | Gutta, S., Cheng, Q., Nguyen, H.D. and Benjamin, B.A. | Vector valued Gaussian processes (GPs) | OSA Detection | RR Interval | 82.33% |
2015 [7] | Song, C., Liu, K., Zhang, X., Chen, L. and Xian, X. | Hidden Markov Model | OSA Detection | RR Interval | 97.1% |
3. Methods and Material
3.1. Dataset Description
3.2. Pre-Processing of Data
3.3. Training Parameters
3.3.1. Optimizer
3.3.2. Activation Function
3.3.3. Weight Initializer
3.3.4. Loss Function
3.4. Training Procedure
3.4.1. Architecture of MobileNet V1
3.4.2. Recurrent Neural Network
3.4.3. Long Short-Term Memory
3.4.4. Gated Recurring Unit
3.4.5. Proposed Algorithm
MobileNet V1
Algorithm 1: Training Procedure of the MobileNet V1 |
begin (1) Select “n” data as training samples in order. (2) Apply the Depthwise Separable Convolution operation with the form of DK × DK. (3) After Step 2, apply Pointwise Convolution to reduce the dimension. (4) Apply Batch Normalization and ReLU after each convolution. (5) Introduce Width Multiplier α. To control the total number of channels or channel depth, M converts to α M. The value of α is ranging from 0 to 1, with standard settings of 1, 0.75, 0.5, and 0.25. (6) for α = 1, it is the baseline MobileNet V1. The number of parameters and the computing cost can both be lowered quadratically by roughly α2, with Accuracy dropping off smoothly from α = 1 to 0.5, until α = 0.25 which is too small. To control the network’s input values Resolution Multiplier “ρ” was applied, which ranges from 0 to 1. (7) for ρ = 1, it is the baseline MobileNet V1. end |
MobileNet V1 + LSTM
Algorithm 2: Training Procedure of the MobileNet V1 + LSTM |
begin (1) Select 35 data as training samples in order. (2) Df2 × M × Dk2 (3) M × N × Df2 (4) Apply Batch Normalization and ReLU after each convolution (5) Introduce Width Multiplier (6) for α = 1, it is the baseline MobileNet V1 (7) for ρ = 1, it is the baseline MobileNet V1. LSTM (8) Input ht1, Ct1, and xt. (9) Input to first sigmodal layer ht1, xt. (10) Multiply output of forget gate [0, 1] × Ct1. (11) Input to second sigmodal layer ht1, xt. (12) The tanh layer creates a vector Ct. (13) Pointwise multiplication it × Ct. (14) Forget gate output multiplied with previous cell state ft × Ct1. (15) The output is determined by the sigmoid layer, while the tanh layer modifies it in the range of [1]. (16) To obtain the cell’s output ht, the resultant of both layers is multiplied with point-wise multiplication. end |
MobileNet V1 + GRU
Algorithm 3: Training Procedure of the MobileNet V1 + GRU |
begin (1) Select 35 data as training samples in order. (2) Df2 × M × Dk2 (3) M × N × Df2 (4) Apply Batch Normalization and ReLU after each convolution (5) Introduce Width Multiplier. (6) for α = 1, it is the baseline MobileNet V1. (7) for ρ = 1, it is the baseline MobileNet V1. GRU (8) Input ht1, Ct1, and xt. (9) Input to first sigmodal layer ht1, xt. (10) Calculate update gate zt. (11) Calculate reset gate rt, for model to decide on past information to forget, using which new memory content will store relevant information from past. (12) Network will then calculate ht vector holding information for current unit and pass it down to network. An update gate is needed to determine what to collect from current memory content h’t and what from previous step ht−1. (13) Pointwise multiplication it × Ct. (14) To obtain the cell’s output ht, the resultant of both layers is multiplied with point-wise multiplication. end |
4. Experimental Results
4.1. Experimental Setup
4.2. Evaluation Index
- TP = True Positive
- TN = True Negative
- FP = False Positive
- FN = False Negative
4.3. Results
4.4. Discussion
- A one-dimensional convolution operation is used instead of a two-dimensional convolution operation to feature extraction.
- A dropout layer between the convolution layer and the fully connected layer is added to avoid over-fitting.
- Only one fully connected layer is retained so as to reduce network complexity.
- The size of the convolution layer strides and the number of fully connected layer nodes are modified.
5. Wearable Device Implementation (Sleepify)
6. Conclusions and Future Scope
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Bahrami, M.; Forouzanfar, M. Sleep apnea detection from single-lead ECG: A comprehensive analysis of machine learning and deep learning algorithms. IEEE Trans. Instrum. Meas. 2022, 71, 1–11. [Google Scholar] [CrossRef]
- Pavlova, M.K.; Latreille, V. Sleep Disorders. Am. J. Med. 2019, 132, 292–299. [Google Scholar] [CrossRef]
- Bahrami, M.; Forouzanfar, M. Deep learning forecasts the occurrence of sleep apnea from single-lead ECG. Cardiovasc. Eng. Technol. 2022, 13, 809–815. [Google Scholar] [CrossRef] [PubMed]
- Prinz, P.N.; Vitiello, M.V.; Raskind, M.A.; Thorpy, M.J. Sleep disorders and aging. N. Engl. J. Med. 1990, 323, 520–526. [Google Scholar]
- Mcclure, K.; Erdreich, B.; Bates, J.H.T.; Mcginnis, R.S.; Masquelin, A.; Wshah, S. Classification and detection of breathing patterns with wearable sensors and deep learning. Sensors 2020, 20, 6481. [Google Scholar] [CrossRef] [PubMed]
- Kim, T.; Kim, J.W.; Lee, K. Detection of sleep disordered breathing severity using acoustic biomarker and machine learning techniques. BioMed Eng. Online 2018, 17, 16. [Google Scholar] [CrossRef]
- Song, C.; Liu, K.; Zhang, X.; Chen, L.; Xian, X. An obstructive sleep apnea detection approach using a discriminative hidden markov model from ECG signals. IEEE Trans. Biomed. Eng. 2015, 63, 1532–1542. [Google Scholar] [CrossRef]
- Shen, Q.; Qin, H.; Wei, K.; Liu, G. Multiscale deep neural network for obstructive sleep apnea detection using rr interval from single-lead ECG signal. IEEE Trans. Instrum. Meas. 2021, 70, 2506913. [Google Scholar] [CrossRef]
- Wang, L.; Lin, Y.; Wang, J. A RR interval based automated apnea detection approach using residual network. Comput. Methods Programs Biomed. 2019, 176, 93–104. [Google Scholar] [CrossRef] [PubMed]
- ResMed Blog Page. Available online: https://www.resmed.co.in/blogs/prevalence-sleep-apnea-india (accessed on 12 January 2023).
- Li, K.; Pan, W.; Li, Y.; Jiang, Q.; Liu, G. A method to detect sleep apnea based on deep neural network and hidden markov model using single-lead ECG signal. Neurocomputing 2018, 294, 94–101. [Google Scholar] [CrossRef]
- Singh, H.; Tripathy, R.K.; Pachori, R.B. Detection of sleep apnea from heart beat interval and ECG derived respiration signals using sliding mode singular spectrum analysis. Digit. Signal Process. 2020, 104, 102796. [Google Scholar] [CrossRef]
- Goldbergeret, A.; Amaral, L.; Glass, L.; Hausdorff, J.; Ivanov, P.; Mark, R.; Mietus, J.; Moody, G.; Peng, C.; Stanley, H. Physionet: Components of a new research resource for complex physiological signals. Circulation 2000, 101, 215–220. [Google Scholar]
- Alshaer, H.; Hummel, R.; Mendelson, M.; Marshal, T.; Bradley, T.D. Objective Relationship between Sleep Apnea and Frequency of Snoring Assessed by Machine Learning. J. Clin. Sleep Med. 2019, 15, 463–470. [Google Scholar] [CrossRef]
- Varon, A.; Caicedo, D.; Testelmans, B.; Buyse, S.; Huffel, V. A novel algorithm for the automatic detection of sleep apnea from single-lead ECG. IEEE Trans. Biomed. Eng. 2015, 62, 2269–2278. [Google Scholar] [CrossRef] [PubMed]
- Zarei, A.; Beheshti, H.; Asl, B.M. Detection of sleep apnea using deep neural networks and single-lead ECG signals. Biomed. Signal Process. Control 2022, 71, 103125. [Google Scholar] [CrossRef]
- Feng, K.; Qin, H.; Wu, S.; Pan, W.; Liu, G. A sleep apnea detection method based on unsupervised feature learning and single-lead electrocardiogram. IEEE Trans. Instrum. Meas. 2020, 70, 4000912. [Google Scholar] [CrossRef]
- Surrel, G.; Aminifar, A.; Rincón, F.; Murali, S.; Atienza, D. Online obstructive sleep apnea detection on medical wearable sensors. IEEE Trans. Biomed. Circuits Syst. 2018, 12, 762–773. [Google Scholar] [CrossRef]
- Singh, S.A.; Majumder, S. A novel approach osa detection using single-lead ECG scalogram based on deep neural network. J. Mech. Med. Biol. 2019, 19, 1950026. [Google Scholar] [CrossRef]
- Stretch, R.; Ryden, A.; Fung, C.H.; Martires, J.; Liu, S.; Balasubramanian, V.; Saedi, B.; Hwang, D. Predicting nondiagnostic home sleep apnea tests using machine learning. J. Clin. Sleep Med. 2019, 15, 1599–1608. [Google Scholar] [CrossRef]
- Gutta, S.; Cheng, Q.; Nguyen, H.D.; Benjamin, B.A. Cardiorespiratory model-based data-driven approach for sleep apnea detection. IEEE J. Biomed. Health Inform. 2017, 22, 1036–1045. [Google Scholar] [CrossRef]
- Wang, T.; Lu, C.; Shen, G. Detection of sleep apnea from single-lead ECG signal using a time window artificial neural network. BioMed Res. Int. 2019, 2019, 9768072. [Google Scholar] [CrossRef] [PubMed]
- Bozkurt, F.; Uçar, M.K.; Bozkurt, M.R.; Bilgin, C. Detection of abnormal respiratory events with single channel ECG and hybrid machine learning model in patients with obstructive sleep apnea. IRBM 2020, 41, 241–251. [Google Scholar] [CrossRef]
- Liang, X.; Qiao, X.; Li, Y. Obstructive sleep apnea detection using combination of cnn and lstm techniques. In Proceedings of the 2019 IEEE 8th Joint International Information Technology and Artificial Intelligence Conference (ITAIC), Chongqing, China, 24–26 May 2019; pp. 1733–1736. [Google Scholar]
- Nguyen, H.D.; Wilkins, B.A.; Cheng, Q.; Benjamin, B.A. An online sleep apnea detection method based on recurrence quantification analysis. IEEE J. Biomed. Health Inform. 2013, 18, 1285–1293. [Google Scholar] [CrossRef] [PubMed]
- Kingma, P.; Ba, J.L. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations, ICLR 2015-Conference Track Proceedings, San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Ruder, S. An overview of gradient descent optimization algorithms. arXiv 2016, arXiv:1609.04747. [Google Scholar]
- Hwang, S.H.; Lee, Y.J.; Jeong, D.U.; Park, K.S. Apnea-hypopnea index prediction using electrocardiogram acquired during the sleep-onset period. IEEE Trans. Biomed. Eng. 2016, 64, 295–301. [Google Scholar]
- Bsoul, M.; Minn, H.; Tamil, L. Apnea medassist: Real-time sleep apnea monitor using single-lead ECG. IEEE Trans. Inf. Technol. Biomed. 2010, 15, 416–427. [Google Scholar] [CrossRef]
- Agarap, A.M.F. Deep Learning using Rectified Linear Units (ReLU). arXiv 2018, arXiv:1803.08375. [Google Scholar]
- Mostafa, S.S.; Mendonça, F.; Ravelo-García, A.G.; Morgado-Dias, F. A systematic review of detecting sleep apnea using deep learning. Sensors 2019, 19, 4934. [Google Scholar] [CrossRef]
- Urtnasan, E.; Park, J.U.; Lee, K.J. Automatic detection of sleep-disordered breathing events using recurrent neural networks from an electrocardiogram signal. Neural Comput. Appl. 2018, 32, 4733–4742. [Google Scholar] [CrossRef]
- Narkhede, M.V.; Bartakke, P.P.; Sutaone, M.S. A review on weight initialization strategies for neural networks. Artif. Intell. Rev. 2022, 55, 291–322. [Google Scholar] [CrossRef]
- Rusiecki, A. Trimmed categorical cross-entropy for deep learning with label noise. Electron. Lett. 2019, 55, 319–320. [Google Scholar] [CrossRef]
- Barba-Guaman, L.; Eugenio Naranjo, J.; Ortiz, A. Deep Learning Framework for Vehicle and Pedestrian Detection in Rural Roads on an Embedded GPU. Electronics 2020, 9, 589. [Google Scholar] [CrossRef]
- Ademola, O.A.; Leier, M.; Petlenkov, E. Evaluation of Deep Neural Network Compression Methods for Edge Devices Using Weighted Score-Based Ranking Scheme. Sensors 2021, 21, 7529. [Google Scholar] [CrossRef] [PubMed]
- Nganga, K. Building A Multiclass Image Classifier Using MobilenetV2 and TensorFlow. Eng. Educ. (Eng. Ed.) Program. 2022. Available online: https://www.section.io/engineering-education/building-a-multiclass-image-classifier-using-mobilenet-v2-and-tensorflow (accessed on 14 February 2023).
- Srinivasu, P.N.; Sivasai, J.G.; Ijaz, M.F.; Bhoi, A.K.; Kim, W.; Kang, J.J. Classification of skin disease using deep learning neural networks with mobilenet v2 and LSTM. Sensors 2021, 21, 2852. [Google Scholar] [CrossRef]
- Widjaja, C.; Varon, A.; Dorado, J.A.; Suykens, S.; Huffel, V. Application of kernel principal component analysis for single-lead-ECG-derived respiration. IEEE Trans. Biomed. Eng. 2012, 59, 1169–1176. [Google Scholar] [CrossRef]
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; Goodfellow, I., Bengio, Y., Courville, A., Eds.; MIT Press: Cambridge, CA, USA, 2016; p. 516. [Google Scholar]
- Funahashi, K.I.; Nakamura, Y. Approximation of dynamical systems by continuous time recurrent neural networks. Neural Netw. 1993, 6, 801–806. [Google Scholar] [CrossRef]
- Schmidhuber, J. Deep learning in neural networks: An overview. Neural Netw. 2015, 61, 85–117. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Al-Angari, H.M.; Sahakian, A.V. Automated recognition of obstructive sleep apnea syndrome using support vector machine classifier. IEEE Trans. Inf. Technol. Biomed. 2012, 16, 463–468. [Google Scholar] [CrossRef]
- Zaremba, W.; Sutskever, I. Learning to execute. arXiv 2014, arXiv:1410.4615. [Google Scholar]
- Yang, W.; Fan, J.; Wang, X.; Liao, Q. Sleep apnea and hypopnea events detection based on airflow signals using LSTM network. In Proceedings of the 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Berlin, Germany, 23–27 July 2019. [Google Scholar]
- Erdenebayar, U.; Kim, Y.J.; Park, J.-U.; Joo, E.Y.; Lee, K.-J. Deep learning approaches for automatic detection of sleep apnea events from an electrocardiogram. Comput. Methods Programs Biomed. 2019, 180, 105001. [Google Scholar] [CrossRef] [PubMed]
- Ferri, C.; Hernández-Orallo, J.; Modroiu, R. An experimental comparison of performance measures for classification. Pattern Recognit. Lett. 2009, 30, 27–38. [Google Scholar] [CrossRef]
S. No | Hyperparameter | Value |
---|---|---|
1 | Batch Size | 32 |
2 | Learning Rate | 0.001 |
3 | Epochs | 100 |
4 | Loss Function | Categorical Cross Entropy |
5 | Activation Function | ReLu |
6 | Optimizer | Adam |
Spec. | Sens./Rec. | Prec. | F1 | Acc. |
---|---|---|---|---|
89 | 90 | 89 | 91 | 89.5 |
Spec. | Sens./Rec. | Prec. | F1 | Acc. |
---|---|---|---|---|
90.3 | 89.82 | 94.5 | 92.1 | 90 |
Spec. | Sens./Rec. | Prec. | F1 | Acc. |
---|---|---|---|---|
90.72 | 90.01 | 94.71 | 92.3 | 90.29 |
Diagnosis | Model 1 | Model 2 | Model 3 | ||||||
---|---|---|---|---|---|---|---|---|---|
Prec. | Rec. | F1-Meas. | Prec. | Rec. | F1-Meas. | Prec. | Rec. | F1-Meas. | |
Apnea | 89 | 94 | 91 | 85 | 95 | 92 | 90.06 | 94.71 | 92.33 |
Normal | 90 | 81 | 85 | 90 | 81 | 86 | 90.72 | 83.18 | 86.79 |
Approach | Sensitivity | Specificity | Accuracy |
---|---|---|---|
Model 2 | 89.82 | 90.34 | 90.00 |
Model 3 | 90.01 | 90.72 | 90.29 |
Year | Method | Accuracy | Specificity | Recall/ Sensitivity |
---|---|---|---|---|
2017 [21] | HMM | 82.33 | 84.7 | 85.8 |
2018 [9] | DNN and HMM using single lead | 85 | 82.1 | 88.9 |
ECG Signal | ||||
2018 [18] | SVM | 88.2 | 85.7 | 87.2 |
2019 [19] | AlexNet model, CNN | 86.22 | 88.4 | 89 |
2019 [22] | Time Window artificial neural | 87.3 | 88.7 | 85.1 |
network (TW-MLP) | ||||
2020 [17] | Unsupervised feature learning, single | 85.1 | 86.2 | 81.4 |
lead ECG, HMM | ||||
2021 [8] | Multiscale DNN | 89.4 | 89.1 | 89.8 |
Proposed | MobileNet V1 | 89.5 | 89 | 90 |
Model | ||||
Proposed | MobileNet V1 + LSTM | 90.00 | 90.34 | 89.82 |
Model | ||||
Proposed | MobileNet V1 + GRU | 90.29 | 90.72 | 90.01 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hemrajani, P.; Dhaka, V.S.; Rani, G.; Shukla, P.; Bavirisetti, D.P. Efficient Deep Learning Based Hybrid Model to Detect Obstructive Sleep Apnea. Sensors 2023, 23, 4692. https://doi.org/10.3390/s23104692
Hemrajani P, Dhaka VS, Rani G, Shukla P, Bavirisetti DP. Efficient Deep Learning Based Hybrid Model to Detect Obstructive Sleep Apnea. Sensors. 2023; 23(10):4692. https://doi.org/10.3390/s23104692
Chicago/Turabian StyleHemrajani, Prashant, Vijaypal Singh Dhaka, Geeta Rani, Praveen Shukla, and Durga Prasad Bavirisetti. 2023. "Efficient Deep Learning Based Hybrid Model to Detect Obstructive Sleep Apnea" Sensors 23, no. 10: 4692. https://doi.org/10.3390/s23104692
APA StyleHemrajani, P., Dhaka, V. S., Rani, G., Shukla, P., & Bavirisetti, D. P. (2023). Efficient Deep Learning Based Hybrid Model to Detect Obstructive Sleep Apnea. Sensors, 23(10), 4692. https://doi.org/10.3390/s23104692