Research Paper:
mSleep: Multistage Human Sleep Behavior Prediction Using Enhanced MaxViT Convolution-Transformer
Nourah Saad Misfer Alqahtani and Qaisar Abbas
College of Computer and Information Sciences, Imam Mohammad Ibn Saud Islamic University (IMSIU)
P.O. 5701, Riyadh 11432, Saudi Arabia
The intersection of deep learning (DL) techniques and electroencephalogram (EEG) signals to predict multiple human sleep behaviors is integrated in this study. In fact, the detection of multiple sleep behaviors is a critical task for mental health professionals. To address this issue, an advanced analytical framework based on DL is developed in this study. After pre-processing the signals, this study developed a novel approach on 1D-EEG signals, which are converted to the series of (3x times) stack images using ensemble of short-time Fourier transform (STFT), continuous wavelet transform (CWT), and mel-frequency cepstral coefficients (MFCCs) techniques. Later one, the improved MaxViT model is improved to extract features from 3D-cum-stacked signal images. To capture the temporal dynamics of sleep architecture, we then implemented a gated recurrent unit (GRU) model. The AdaBoost classifier was finally applied for the classification of multiclass sleep behaviors. The performance of the proposed system (mSleep) is validated by using PhysioNet dataset. Our study introduces a novel multi-modal feature extraction approach by combining STFT, CWT, and MFCCs to create 3D-stacked EEG representations, enabling comprehensive temporal-spectral analysis. We develop a hybrid DL pipeline integrating Enhanced MaxViT for feature extraction, GRU for temporal modeling, and AdaBoost for multi-class classification, achieving superior accuracy and generalization. Additionally, we address class imbalance using SMOTE and enhance model interpretability through AdaBoost, ensuring clinical applicability and robust performance on the PhysioNet Sleep-EDF dataset. The mSleep system has broad implications for sleep research and neural signal processing, as it provides information that can be useful in the design of individualized therapy plans or technological improvement plans. The code and dataset can be downloaded from https://www.github.com/qaisar256/sleepdisorder1.0/.
- [1] X. Zhang, G. He, T. Shang, and F. Fan, “Comparative analysis of single-channel and multi-channel classification of sleep stages across four different data sets,” Brain Sciences, Vol.14, No.12, Article No.1201, 2024. https://doi.org/10.3390/brainsci14121201
- [2] S. Motamedi-Fakhr, M. Moshrefi-Torbati, M. Hill, C. M. Hill, and Paul R. White, “Signal processing techniques applied to human sleep EEG signals—A review,” Biomedical Signal Processing and Control, Vol.10, pp. 21-33, 2014. https://doi.org/10.1016/j.bspc.2013.12.003
- [3] M. H. Schmidt, “The energy allocation function of sleep: A unifying theory of sleep, torpor, and continuous wakefulness,” Neuroscience & Biobehavioral Reviews, Vol.47, pp. 122-153, 2014. https://doi.org/10.1016/j.neubiorev.2014.08.001
- [4] Q. R. See et al., “Dreaming characteristics in non-rapid eye movement parasomnia and idiopathic rapid eye movement sleep behaviour disorder: Similarities and differences,” Nature and Science of Sleep, Vol.16, pp. 263-277, 2024. https://doi.org/10.2147/NSS.S435201
- [5] N. Furutani et al., “Utility of complexity analysis in electroencephalography and electromyography for automated classification of sleep-wake states in mice,” Scientific Reports, Vol.15, Article No.3080, 2025. https://doi.org/10.1038/s41598-024-74008-0
- [6] C. T. Do et al., “IoT-powered mental healthcare: Sleep state analyzing and monitoring based on EEG signals,” IEEE Access, 2025. https://doi.org/10.1109/ACCESS.2025.3559932
- [7] B. M. Mathunjwa, R. Y. J. Kor, W. Ngarnkuekool, and Y.-L. Hsu, “A comprehensive review of home sleep monitoring technologies: Smartphone apps, smartwatches, and smart mattresses,” Sensors, Vol.25, No.6, Article No.1771, 2025. https://doi.org/10.3390/s25061771
- [8] A. N. Bhatt et al., “Awakening sleep medicine: The transformative role of artificial intelligence in sleep health,” Current Sleep Medicine Reports, Vol.11, Article No.13, 2025. https://doi.org/10.1007/s40675-025-00328-w
- [9] S. Nair, B. P. James, and M.-F. Leung, “An optimized hybrid approach to denoising of EEG signals using CNN and LMS filtering,” Electronics, Vol.14, No.6, Article No.1193, 2025. https://doi.org/10.3390/electronics14061193
- [10] Q. Abbas, A. Hussain, and A. R. Baig, “Automatic detection and classification of cardiovascular disorders using phonocardiogram and convolutional vision transformers,” Diagnostics, Vol.12, No.12, Article No.3109, 2022. https://doi.org/10.3390/diagnostics12123109
- [11] L. Zhu, Q. Guan, Y. Liu, J. Xu, and S. Ma, “Research on sleep stage classification of electroencephalogram signals based on CNN and LSTM,” IEEE Access, Vol.13, pp. 75351-75362, 2025. https://doi.org/10.1109/ACCESS.2025.3559350
- [12] X. Ji, Y. Li, and P. Wen, “3DSleepNet: A multi-channel bio-signal based sleep stages classification method using deep learning,” IEEE Trans. on Neural Systems and Rehabilitation Engineering, Vol.31, pp. 3513-3523, 2023. https://doi.org/10.1109/TNSRE.2023.3309542
- [13] Y. Xu et al., “AMDET: Attention based multiple dimensions EEG transformer for emotion recognition,” IEEE Trans. on Affective Computing, Vol.15, No.3, pp. 1067-1077, 2024. https://doi.org/10.1109/TAFFC.2023.3318321
- [14] A. R. Aguiñaga, L. M. Delgado, V. R. López-López, and A. C. Téllez, “EEG-based emotion recognition using deep learning and M3GP,” Applied Science, Vol.12, No.5, Article No.2527, 2022. https://doi.org/10.3390/app12052527
- [15] P. An, Z. Yuan, J. Zhao, X. Jiang, and B. Du, “An effective multi-model fusion method for EEG-based sleep stage classification,” Knowledge-Based Systems, Vol.219, Article No.106890, 2021. https://doi.org/10.1016/j.knosys.2021.106890
- [16] H. Huang et al., “EEG-based sleep staging analysis with functional connectivity,” Sensors, Vol.21, No.6, Article No.1988, 2021. https://doi.org/10.3390/s21061988
- [17] D. Geng et al., “Sleep EEG-based approach to detect mild cognitive impairment,” Frontiers in Aging Neuroscience, Vol.14, Article No.865558, 2022. https://doi.org/10.3389/fnagi.2022.865558
- [18] B. Abibullaev, A. Keutayeva, and A. Zollanvari, “Deep learning in EEG-based BCIs: a comprehensive review of transformer models, advantages, challenges, and applications,” IEEE Access, Vol.11, pp. 127271-127301, 2023. https://doi.org/10.1109/ACCESS.2023.3329678
- [19] M. Zhu et al., “EEG-based system using deep learning and attention mechanism for driver drowsiness detection,” 2021 IEEE Intelligent Vehicles Symp. Workshops, pp. 280-286, 2021. https://doi.org/10.1109/IVWorkshops54471.2021.9669234
- [20] G. Kong, C. Li, H. Peng, Z. Han, and H. Qiao, “EEG-based sleep stage classification via neural architecture search,” IEEE Trans. on Neural Systems and Rehabilitation Engineering, Vol.31, pp. 1075-1085, 2023. https://doi.org/10.1109/TNSRE.2023.3238764
- [21] X. Jiang, J. Zhao, B. Du, and Z. Yuan, “Self-supervised contrastive learning for EEG-based sleep staging,” 2021 Int. Joint Conf. on Neural Networks, 2021. https://doi.org/10.1109/IJCNN52387.2021.9533305
- [22] B. Yang, X. Zhu, Y. Liu, and H. Liu, “A single-channel EEG based automatic sleep stage classification method leveraging deep one-dimensional convolutional neural network and hidden Markov model,” Biomedical Signal Processing and Control, Vol.68, Article No.102581, 2021. https://doi.org/10.1016/j.bspc.2021.102581
- [23] R. Ghasemigarjan, M. Mikaeili, and S. K. Setarehdan, “Optimizing EEG-based sleep staging: Adversarial deep learning joint domain adaptation,” IEEE Access, Vol.12, pp. 186639-186657, 2024. https://doi.org/10.1109/ACCESS.2024.3428435
- [24] I. S. Masad, A. Alqudah, and S. Qazan, “Automatic classification of sleep stages using EEG signals and convolutional neural networks,” PLOS ONE, Vol.19, No.1, Article No.e0297582, 2024. https://doi.org/10.1371/journal.pone.0297582
- [25] L. A. Moctezuma, Y. Suzuki, J. Furuki, M. Molinas, and T. Abe, “GRU-powered sleep stage classification with permutation-based EEG channel selection,” Scientific Reports, Vol.14, Article No.17952. 2024. https://doi.org/10.1038/s41598-024-68978-4
- [26] R. Zhang et al., “Automatic sleep staging method using EEG based on STFT and residual network,” IEEE Access, Vol.13, pp. 1778-1789, 2025. https://doi.org/10.1109/ACCESS.2024.3524267
- [27] W. Pei, Y. Li, P. Wen, F. Yang, and X. Ji, “An automatic method using MFCC features for sleep stage classification,” Brain Informatics, Vol.11, Article No.6, 2024. https://doi.org/10.1186/s40708-024-00219-w
- [28] M. M. Monowar et al., “Advanced sleep disorder detection using multi-layered ensemble learning and advanced data balancing techniques,” Frontiers in Artificial Intelligence, Vol.7, Article No.1506770, 2025. https://doi.org/10.3389/frai.2024.1506770
- [29] T. S. Apon, M. Fahim-Ul-Islam, N. I. Rafin, J. Akter, and M. G. R. Alam, “Transforming precision: A comparative analysis of vision transformers, CNNs, and traditional ML for knee osteoarthritis severity diagnosis,” 6th Int. Conf. on Electrical Engineering and Information & Communication Technology, pp. 31-36, 2024. https://doi.org/10.1109/ICEEICT62016.2024.10534528
- [30] R. Dey and F. M. Salem, “Gate-variants of gated recurrent unit (GRU) neural networks,” IEEE 60th Int. Midwest Symp. on Circuits and Systems, pp. 1597-1600, 2017. https://doi.org/10.1109/MWSCAS.2017.8053243
- [31] M. Kumar et al., “Predictive sleep disorder modelling: Using machine learning with lifestyle and sleep health data,” 2024 Int. Conf. on Advances in Computing, Communication and Applied Informatics, 2024. https://doi.org/10.1109/ACCAI61061.2024.10602153
- [32] M. A. Rahman et al., “Improving sleep disorder diagnosis through optimized machine learning approaches,” IEEE Access, pp. 20989-21004, 2025. https://doi.org/10.1109/ACCESS.2025.3535535
This article is published under a Creative Commons Attribution-NoDerivatives 4.0 Internationa License.