journal article·2025-06-18Open access

Hybrid Deep Learning Approach for Automated Sleep Cycle Analysis

Sebastián Urbina Fredes, Ali Dehghan Firoozabadi, Pablo Adasme, David Zabala-Blanco, Pablo Palacios Játiva, Cesar A. Azurdia-Meza

Applied Sciences· Volume 15· Issue 12

Abstract

Health and well-being, both mental and physical, depend largely on adequate sleep. Many conditions arise from a disrupted sleep cycle, significantly deteriorating the quality of life of those affected. The analysis of the sleep cycle provide valuable information about sleep stages, which are employed in sleep medicine for the diagnosis of numerous diseases. The clinical standard for sleep data recording is polysomnography (PSG), which records electroencephalogram (EEG), electrooculogram (EOG), electromyogram (EMG), and other signals during sleep activity. Recently, machine learning approaches have exhibited high accuracy in applications such as the classification and prediction of biomedical signals. This study presents a hybrid neural network architecture composed of convolutional neural network (CNN) layers, bidirectional long short-term memory (BiLSTM) layers, and attention mechanism layers in order to process large volumes of EEG data in PSG files. The objective is to design a framework for automated feature extraction. To address class imbalance, an epoch-level random undersampling (E-LRUS) method is proposed, discarding full epochs from majority classes while preserving the temporal structure, unlike traditional methods that remove individual samples. This method has been tested on EEG recordings acquired from the public Sleep EDF Expanded database, achieving an overall accuracy rate of 78.67% along with an F1-score of 72.10%. The findings show that this method proves to be effective for sleep stage classification in patients.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: EEG and Brain-Computer Interfaces · Sleep and Work-Related Fatigue · Obstructive Sleep Apnea Research

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Electricity, Universidad Tecnológica Metropolitana, Santiago 7800002, Chile

Department of Electrical Engineering, Universidad de Santiago de Chile, Santiago 9170124, Chile

Department of Computing and Industries, Universidad Católica del Maule, Talca 3466706, Chile

Escuela de Informática y Telecomunicaciones, Universidad Diego Portales, Santiago 8370190, Chile

Department of Electrical Engineering, Universidad de Chile, Santiago 8370451, Chile

Funding

ANID/FONDECYT Iniciación · DICYT Regular

References (72)

Show source-provided references
1. A review of automated sleep stage scoring based on physiological signals for the new millennia10.1016/j.cmpb.2019.04.032 ↗
2. Computational Sleep Behavior Analysis: A Survey10.1109/ACCESS.2019.2944801 ↗
3. Multimodal Ambulatory Sleep Detection Using LSTM Recurrent Neural Networks10.1109/JBHI.2018.2867619 ↗
4. Deep convolutional neural network for classification of sleep stages from single-channel EEG signals10.1016/j.jneumeth.2019.108312 ↗
5. Tsinalis, O., Matthews, P.M., Guo, Y., and Zafeiriou, S. (2016). Automatic sleep stage scoring with single-channel EEG using convolutional neural networks. arXiv.
6. Analysis of EEG Signal to Classify Sleep Stages Using Machine Learning10.1007/s41782-020-00101-9 ↗
7. A convolutional neural network for sleep stage scoring from raw single-channel EEG10.1016/j.bspc.2017.12.001 ↗
8. Yulita, I.N., Purwani, S., Rosadi, R., and Awangga, R.M. (2017, January 16–18). A quantization of deep belief networks for long short-term memory in sleep stage detection. Proceedings of the International Conference on Advanced Informatics, Concepts, Theory, and Applications (ICAICTA), Denpasar, Indonesia.10.1109/ICAICTA.2017.8090999 ↗
9. Expert-level sleep scoring with deep neural networks10.1093/jamia/ocy131 ↗
10. Stretchable polymer optical fiber embedded in the mattress for respiratory and heart rate monitoring10.1016/j.optlastec.2023.110356 ↗
11. A deep learning–enabled smart garment for accurate and versatile monitoring of sleep conditions in daily life10.1073/pnas.2420498122 ↗
12. Nonlinear Dynamics Measures for Automated EEG-Based Sleep Stage Detection10.1159/000441975 ↗
13. Deep Learning Model Coupling Wearable Bioelectric and Mechanical Sensors for Refined Muscle Strength Assessment10.34133/research.0366 ↗
14. Artificial intelligence in breast imaging: Current situation and clinical challenges10.1002/EXP.20230007 ↗
15. Bachiller, A. (Master’s Thesis, 2012). Análisis de la Señal de Electroencefalograma Mediante Distancias Espectrales para la Ayuda en el Diagnóstico de la Enfermedad de Alzheimer, Master’s Thesis, Unpublished.
16. Sanchez, A. (Bachelor’s Thesis, 2012). Sonorización de Señales EEG Basada en Estructuras Musicales, Bachelor’s Thesis, Unpublished.
17. Rechtschaffen, A., and Kales, A. (1968). A Manual of Standardized Terminology, Techniques and Scoring System for Sleep Stages of Human Subjects, National Institutes of Health Publication.
18. Iber, C., Ancoli-Israel, S., Chesson, A.L., and Quan, S.F. (2007). The AASM Manual for the Scoring of the Sleep and Associated Events, American Academy of Sleep Medicine. [1st ed.].
19. Detection of characteristic waves of sleep EEG by neural network analysis10.1109/10.827301 ↗
20. Classification on human sleep stages based on EEG processing using hidden Markov models10.1007/s10527-007-0006-5 ↗
21. Determination of sleep stage separation ability of features extracted from EEG signals using principal component analysis10.1007/s10916-008-9218-9 ↗
22. Huang, C.S., Lin, C.L., Ko, L.W., Liu, S.Y., and Lin, C.T. (2013, January 7–10). Applying the fuzzy c-means based dimension reduction to improve the sleep classification system. Proceedings of the IEEE International Conference on Fuzzy Systems (FUZZ), Hyderabad, India.10.1109/FUZZ-IEEE.2013.6622495 ↗
23. Sanders, T.H., McCurry, M., and Clements, M.A. (2014, January 26–30). Sleep stage classification with cross frequency coupling. Proceedings of the 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Chicago, IL, USA.10.1109/EMBC.2014.6944643 ↗
24. Nateghi, M., Alam, M.R., Amiri, H., Nasri, S., and Sameni, R. (2024). Model-Based Electroencephalogram Instantaneous Frequency Tracking: Application in Automated Sleep–Wake Stage Classification. Sensors, 24.10.3390/s24247881 ↗
25. Xiao, S., Wang, B., Zhang, J., Zhang, Q., Zou, J., and Nakamura, M. (2015, January 28–30). Notice of Removal: An improved K-means clustering algorithm for sleep stages classification. Proceedings of the IEEE 54th Annual Conference of the Society of Instrument and Control Engineers of Japan (SICE), Hangzhou, China.
26. Herrera, L.J. (2011, January 22–24). Symbolic Representation of the EEG for sleep stage classification. Proceedings of the IEEE 11th International Conference on Intelligent Systems Design and Applications (ISDA), Cordoba, Spain.10.1109/ISDA.2011.6121664 ↗
27. Malafeev, A., Laptev, D., Bauer, S., Omlin, X., Wierzbicka, A., Wichniak, A., Jernajczyk, W., Riener, R., Buhmann, J., and Achermann, P. (2018). Automatic Human Sleep Stage Scoring Using Deep Neural Networks. Front. Neurosci., 12.10.3389/fnins.2018.00781 ↗
28. Yang, Y., Zheng, X., and Yuan, F. (2018, January 28–31). A Study on Automatic Sleep Stage Classification Based on CNN-LSTM. Proceedings of the 3rd International Conference on Crowd Science and Engineering (ICCSE), Singapore.10.1145/3265689.3265693 ↗
29. Mousavi, S., Afghah, F., and Acharya, U.R. (2019). SleepEEGNet: Automated sleep stage scoring with sequence to sequence deep learning approach. PLoS ONE, 14.10.1371/journal.pone.0216456 ↗
30. Toma, T.I., and Choi, S. (2023). An End-to-End Multi-Channel Convolutional Bi-LSTM Network for Automatic Sleep Stage Detection. Sensors, 23.10.3390/s23104950 ↗
31. A simple format for exange of digitized polygraphic recordings10.1016/0013-4694(92)90009-7 ↗
32. Academia Lab (2025). Formato de datos europeo. Enciclopedia, Available online: https://academia-lab.com/enciclopedia/formato-de-datos-europeo.
33. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals10.1161/01.CIR.101.23.e215 ↗
34. Raschka, S., and Mirjalili, V. (2017). Python Machine Learning: Machine Learning and Deep Learning with Python, Scikit-Learn, and TensorFlow, Packt Publishing. [2nd ed.].
35. Han, J., Kamber, M., and Pei, J. (2012). Data Mining: Concepts and Techniques, Morgan Kaufmann. [3rd ed.].
36. A systematic study of the class imbalance problem in convolutional neural networks10.1016/j.neunet.2018.07.011 ↗
37. Simplifying Neural Network Training Under Class Imbalance
38. Exploratory Undersampling for Class-Imbalance Learning10.1109/TSMCB.2008.2007853 ↗
39. Russell, S., and Norvig, P. (2021). Artificial Intelligence: A Modern Approach, Pearson. [4th ed.].
40. Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep Learning, MIT Press.
41. Deep learning10.1038/nature14539 ↗
42. Haykin, S. (2009). Neural Networks and Learning Machines, Pearson. [3rd ed.].
43. Agarap, A.F. (2018). Deep Learning using Rectified Linear Units (ReLU). arXiv.
44. Learning representations by back-propagating errors10.1038/323533a0 ↗
45. Bishop, C.M. (2006). Pattern Recognition and Machine Learning, Springer.
46. LeCun, Y.A., Bottou, L., Orr, G.B., and Muller, K.R. (2012). Efficient BackProp. Neural Networks: Tricks of the Trade, Springer. [2nd ed.].10.1007/978-3-642-35289-8_3 ↗
47. Tian, Y., Zhang, Y., and Zhang, H. (2023). Recent Advances in Stochastic Gradient Descent in Deep Learning. Mathematics, 11.10.3390/math11030682 ↗
48. Kingma, D.P., and Ba, J. (2014). Adam: A method for stochastic optimization. arXiv.
49. Michelucci, U. (2022). Regularization. Applied Deep Learning with TensorFlow 2, Apress.10.1007/978-1-4842-8020-1 ↗
50. Dropout: A simple way to prevent neural networks from overfitting
51. A simple weight decay can improve generalization
52. Bengio, Y. (2012). Practical recommendations for gradient-based training of deep architectures. Neural Networks: Tricks of the Trade, Springer.10.1007/978-3-642-35289-8_26 ↗
53. Ioffe, S., and Szegedy, C. (2015, January 6–11). Batch normalization: Accelerating deep network training by reducing internal covariate shift. Proceedings of the 32nd International Conference on Machine Learning, Lille, France.
54. Hagan, M.T., Demuth, H.B., and Beale, M.H. (2014). Neural Network Design, PWS Publishing. Chapter 11.
55. Backpropagation Applied to Handwritten Zip Code Recognition10.1162/neco.1989.1.4.541 ↗
56. Gradient-based learning applied to document recognition10.1109/5.726791 ↗
57. Oppenheim, A.V., and Schafer, R.W. (2010). Discrete-Time Signal Processing, Pearson. [3rd ed.].
58. Dumoulin, V., and Visin, F. (2016). A guide to convolution arithmetic for deep learning. arXiv.
59. Lin, M., Chen, Q., and Yan, S. (2013). Network in network. arXiv.
60. Cacciari, I., and Ranfagni, A. (2024). Hands-On Fundamentals of 1D Convolutional Neural Networks—A Tutorial for Beginner Users. Appl. Sci., 14.10.3390/app14188500 ↗
61. Invariant scattering convolution networks10.1109/TPAMI.2012.230 ↗
62. Long Short-Term Memory10.1162/neco.1997.9.8.1735 ↗
63. Cascaded LSTM recurrent neural network for automated sleep stage classification using single-channel EEG signals10.1016/j.compbiomed.2019.01.013 ↗
64. Lipton, Z.C., Berkowitz, J., and Elkan, C. (2015). A critical review of recurrent neural networks for sequence learning. arXiv.
65. Sak, H., Senior, A., and Beaufays, F. (2014, January 14–18). Long short-term memory recurrent neural network architectures for large scale acoustic modeling. Proceedings of the Annual Conference of the International Speech Communication Association, INTERSPEECH, Singapore.10.21437/Interspeech.2014-80 ↗
66. Bidirectional recurrent neural networks10.1109/78.650093 ↗
67. Bahdanau, D., Cho, K., and Bengio, Y. (2016). Neural machine translation by jointly learning to align and translate. arXiv.
68. Xu, K., Ba, J., Kiros, R., Cho, K., Courville, A., Salakhutdinov, R., Zemel, R., and Bengio, Y. (2015, January 6–11). Show, attend and tell: Neural image caption generation with visual attention. Proceedings of the the 32nd International Conference on Machine Learning, Lille, France.
69. Attention is all you need
70. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., and Le, Q.V. (2019). XLNet: Generalized autoregressive pretraining for language understanding. Adv. Neural Inf. Process. Syst., 1–11.
71. Manning, C.D., Raghavan, P., and Schütze, H. (2008). Introduction to Information Retrieval, Cambridge University Press.10.1017/CBO9780511809071 ↗
72. Kemp, B. (2025, March 15). The Sleep-EDF Database [Expanded]. PhysioNet, 2013. Available online: https://physionet.org/content/sleep-edfx/1.0.0/.