Hybrid CNN for Sleep Stage Classification Based on EEG

Authors

  • Maria Angelina Cahyani Candrakasih Universitas Amikom Purwokerto
  • Bagus Adhi Kusuma Universitas Amikom Purwokerto
  • Pungkas Subarkah Universitas Amikom Purwokerto

DOI:

https://doi.org/10.30871/jaic.v10i3.12999

Keywords:

CNN, EEG, Hybrid Features, Sleep Stage Classification, Stacking Ensemble

Abstract

Sleep stage classification is essential for diagnosing sleep disorders such as insomnia and sleep apnea. However, manual scoring of polysomnography (PSG) is time consuming and subjective. Automatic systems based on single channel EEG are promising for home based monitoring, but they face challenges due to class imbalance and inter subject variability. This study proposes a hybrid model that combines 15 handcrafted features (statistical and spectral) with 128 dimensional features extracted by a one dimensional Convolutional Neural Network (1D CNN), followed by a stacking ensemble (Random Forest and Support Vector Machine as base learners, Logistic Regression as meta learner). Using 40 subjects from the Sleep EDF Expanded dataset, a strict subject independent split (80% train / 20% test) was applied to avoid data leakage. The dataset contained 107,258 epochs with extreme imbalance (Wake 67.6%, N1 2.95%). After SMOTE oversampling on the training set, the model achieved an accuracy of 67.5%, macro F1 score of 31.4%, and Cohen’s Kappa of 0.34. An ablation study showed that CNN features alone (72.2% accuracy) outperformed handcrafted features (70.4%) and hybrid features (67.5%). The confusion matrix revealed that minority stages (especially N1, N3, REM) were poorly recognized. These results highlight that cross subject generalization remains a major challenge in EEG based sleep staging, and proper subject independent validation is critical to avoid overoptimistic claims.

Downloads

Download data is not yet available.

References

[1] K. Aboalayon, M. Faezipour, W. Almuhammadi, and S. Moslehpour, “Sleep Stage Classification Using EEG Signal Analysis: A Comprehensive Survey and New Investigation,” Entropy, vol. 18, no. 9, p. 272, Aug. 2016, doi: 10.3390/e18090272.

[2] S. K. Satapathy, B. Brahma, B. Panda, P. Barsocchi, and A. K. Bhoi, “Machine learning-empowered sleep staging classification using multi-modality signals,” BMC Med. Inform. Decis. Mak., vol. 24, no. 1, p. 119, May 2024, doi: 10.1186/s12911-024-02522-2.

[3] Y. Zhang et al., “Sleep Stage Classification Using Bidirectional LSTM in Wearable Multi-sensor Systems,” Sep. 24, 2019, arXiv: arXiv:1909.11141. doi: 10.48550/arXiv.1909.11141.

[4] H. Almutairi, G. M. Hassan, and A. Datta, “Machine-Learning-Based-Approaches for Sleep Stage Classification Utilising a Combination of Physiological Signals: A Systematic Review,” Appl. Sci., vol. 13, no. 24, p. 13280, Dec. 2023, doi: 10.3390/app132413280.

[5] X. Cheng, K. Huang, Y. Zou, and S. Ma, “SleepEGAN: A GAN-enhanced Ensemble Deep Learning Model for Imbalanced Classification of Sleep Stages,” Jul. 04, 2023, arXiv: arXiv:2307.05362. doi: 10.48550/arXiv.2307.05362.

[6] X. Huang, K. Shirahama, M. T. Irshad, M. A. Nisar, A. Piet, and M. Grzegorzek, “Sleep Stage Classification in Children Using Self-Attention and Gaussian Noise Data Augmentation,” Sensors, vol. 23, no. 7, p. 3446, Mar. 2023, doi: 10.3390/s23073446.

[7] L. A. Moctezuma, Y. Suzuki, J. Furuki, M. Molinas, and T. Abe, “GRU-powered sleep stage classification with permutation-based EEG channel selection,” Sci. Rep., vol. 14, no. 1, p. 17952, Aug. 2024, doi: 10.1038/s41598-024-68978-4.

[8] Z. N. Nemer, S. A. W. Saddam, R. J. AL-Sukeinee, and E. J. Harfash, “A Comparative Performance Analysis of CNN, LSTM, and CNNLSTM Models for Classifying Sleep Stages Using Electroencephalography Signals,” Informatica, vol. 49, no. 28, Jul. 2025, doi: 10.31449/inf.v49i28.8082.

[9] Q. Wan et al., “Automated sleep staging from single-channel electroencephalogram using hybrid neural network with manual features and attention,” iScience, vol. 28, no. 8, p. 113169, Aug. 2025, doi: 10.1016/j.isci.2025.113169.

[10] T. I. Toma and S. Choi, “An End-to-End Multi-Channel Convolutional Bi-LSTM Network for Automatic Sleep Stage Detection,” Sensors, vol. 23, no. 10, p. 4950, May 2023, doi: 10.3390/s23104950.

[11] M. K. Delimayanti et al., “Classification of Brainwaves for Sleep Stages by High-Dimensional FFT Features from EEG Signals,” Appl. Sci., vol. 10, no. 5, p. 1797, Mar. 2020, doi: 10.3390/app10051797.

[12] B. Kemp, A. H. Zwinderman, B. Tuk, H. A. C. Kamphuisen, and J. J. L. Oberye, “Analysis of a sleep-dependent neuronal feedback loop: the slow-wave microcontinuity of the EEG,” IEEE Trans. Biomed. Eng., vol. 47, no. 9, pp. 1185–1194, 2000, doi: 10.1109/10.867928.

[13] H. W. Loh et al., “Automated Detection of Sleep Stages Using Deep Learning Techniques: A Systematic Review of the Last Decade (2010–2020),” Appl. Sci., vol. 10, no. 24, p. 8963, Dec. 2020, doi: 10.3390/app10248963.

[14] A. K. Singh and S. Krishnan, “Trends in EEG signal feature extraction applications,” Front. Artif. Intell., vol. 5, p. 1072801, Jan. 2023, doi: 10.3389/frai.2022.1072801.

[15] M. Kolhar et al., “Automated Sleep Stage Classification Using PSO-Optimized LSTM on CAP EEG Sequences,” Brain Sci., vol. 15, no. 8, p. 854, Aug. 2025, doi: 10.3390/brainsci15080854.

[16] H. Jalali, M. Pouladian, A. M. Nasrabadi, and A. Movahed, “Sleep stages classification based on feature extraction from music of brain,” Heliyon, vol. 11, no. 1, p. e41147, Jan. 2025, doi: 10.1016/j.heliyon.2024.e41147.

Downloads

Published

2026-06-17

How to Cite

[1]
M. A. Cahyani Candrakasih, B. A. Kusuma, and P. Subarkah, “Hybrid CNN for Sleep Stage Classification Based on EEG”, JAIC, vol. 10, no. 3, pp. 2723–2729, Jun. 2026.

Similar Articles

<< < 1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.