A Controlled Evaluation of Class Imbalance Handling Techniques in Automated EEG-Based Sleep Stage Classification

Authors

Blessing C. Uzo

Department of Computer Science, Faculty of Physical Sciences, University of Nigeria, Nsukka, Enugu (Nigeria)

Ponsak S. Bande

Department of Computer Science, Faculty of Physical Sciences, University of Nigeria, Nsukka, Enugu (Nigeria)

Micah Okpara

Department of Computer Science, Faculty of Physical Sciences, University of Nigeria, Nsukka, Enugu (Nigeria)

John O. Onyima

Department of Computer Science, Faculty of Physical Sciences, University of Nigeria, Nsukka, Enugu (Nigeria)

Nnaemeka V. Ugwu

Department of Computer Science, Godfrey Okoye University, Enugu (Nigeria)

Article Information

DOI: 10.51244/IJRSI.2026.1307000240

Subject Category: Artificial Intelligence

Volume/Issue: 13/7 | Page No: 3338-3353

Publication Timeline

Submitted: 2026-07-27

Accepted: 2026-08-01

Published: 2026-08-09

Abstract

Automated sleep stage classification from electroencephalogram (EEG) signals is a central task in sleep medicine, yet polysomnographic datasets are inherently imbalanced, with the transitional stage N1 typically comprising only a small fraction of epochs. Although class imbalance handling is widely applied, its independent contribution to sleep staging performance remains unclear because balancing techniques are usually embedded within larger deep learning systems and evaluated jointly with them. This study presents a controlled evaluation of four imbalance handling techniques, namely random oversampling, random undersampling, the Synthetic Minority Over-sampling Technique (SMOTE) and Adaptive Synthetic Sampling (ADASYN), against an imbalanced baseline, within an otherwise fixed pipeline comprising single-channel frontal EEG preprocessing, eighteen handcrafted time, frequency and nonlinear features, a Random Forest classifier and five-fold subject-wise cross-validation on the Sleep-EDF Expanded database (20 subjects, 39 recordings, 106,107 epochs, of which N1 comprised 2.64%). Resampling was applied exclusively to training folds. The baseline achieved an accuracy of 0.899 and a Cohen’s kappa of 0.795 while correctly identifying only 13.8% of N1 epochs, suggesting that aggregate measures can conceal minority-stage failures. Although several resampling strategies improved N1 recall, random undersampling produced the highest N1 recall of 0.558 while also producing the lowest precision, suggesting a shift in the decision boundary rather than improved class separability. SMOTE achieved the highest observed macro F1-score of 0.693 with the smallest reduction in majority-stage performance, while random oversampling was largely ineffective and ADASYN showed no advantage over SMOTE. Friedman and Wilcoxon tests did not reach statistical significance under the five-fold design, highlighting the limited statistical power of the evaluation. The findings provide evidence-supported, goal-specific recommendations for selecting imbalance handling strategies and reinforce the need for per-class evaluation in automated sleep staging.

Keywords

Sleep stage classification; Class imbalance; Electroencephalography (EEG); SMOTE

Downloads

References

1. Silber, M. H., Ancoli-Israel, S., Bonnet, M. L., Chokroverty, S., Grigg-Damberger, M., Hirshkowitz, M., Kapen, S., Keenan, T., Kryger, S. H., Penzel, T., Pressman, M., & Iber, C. (2007). The visual scoring of sleep in adults. Journal of Clinical Sleep Medicine, 3(2), 121–131. [Google Scholar] [Crossref]

2. Kemp, B., Zwinderman, A. H., Tuk, B., Kamphuisen, H. A. C., & Oberye, J. J. L. (2000). Analysis of a sleep-dependent neuronal feedback loop: The slow-wave microcontinuity of the EEG. IEEE Transactions on Biomedical Engineering, 47(9), 1185–1194. https://doi.org/10.1109/10.867928 [Google Scholar] [Crossref]

3. Goldberger, A. L., Amaral, L. A. N., Glass, L., Hausdorff, J. M., Ivanov, P. C., Mark, R. G., Mietus, J. E., Moody, G. B., Peng, C.-K., & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation, 101(23), e215–e220. https://doi.org/10.1161/01.CIR.101.23.e215 [Google Scholar] [Crossref]

4. Yang, K., & Wang, H. (2026). Deep learning for EEG-based sleep stage classification: A review. Medical & Biological Engineering & Computing, 64(6), 2017–2043. https://doi.org/10.1007/s11517-026-03583-3 [Google Scholar] [Crossref]

5. He, H., & Garcia, E. A. (2009). Learning from imbalanced data. IEEE Transactions on Knowledge and Data Engineering, 21(9), 1263–1284. https://doi.org/10.1109/TKDE.2008.239 [Google Scholar] [Crossref]

6. Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324 [Google Scholar] [Crossref]

7. Jain, R., & Ganesan, R. A. (2021). An efficient sleep scoring method using visibility graph and temporal features of single-channel EEG. In Proceedings of the 43rd Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC) (pp. 6306–6309). https://doi.org/10.1109/EMBC46164.2021.9630863 [Google Scholar] [Crossref]

8. Dogaheh, S. B., & Moradi, M. H. (2020). Automatic sleep stage classification based on Dreem headband's signals. In Proceedings of the 27th National and 5th International Iranian Conference on Biomedical Engineering (ICBME) (pp. 259–263). https://doi.org/10.1109/ICBME51989.2020.9319415 [Google Scholar] [Crossref]

9. Stenwig, H., Soler, A., Furuki, J., Suzuki, Y., Abe, T., & Molinas, M. (2022). Automatic sleep stage classification with optimized selection of EEG channels. In Proceedings of the 21st IEEE International Conference on Machine Learning and Applications (ICMLA) (pp. 1708–1715). https://doi.org/10.1109/ICMLA55696.2022.00262 [Google Scholar] [Crossref]

10. Rathod, T., Satapathy, S. K., Das, N., Mohapatra, R. K., Sahu, S. K., & Shah, V. R. (2024). Automated sleep staging system using EEG signal feature-based classification by machine learning techniques. In Proceedings of the IEEE 8th International Conference on Information and Communication Technology (CICT) (pp. 1–6). https://doi.org/10.1109/CICT64037.2024.10899578 [Google Scholar] [Crossref]

11. Sadık, E. Ş. (2026). A hybrid CNN-BiGRU model with multi-head self-attention for EEG-based sleep stage classification. In Proceedings of the 8th International Congress on Human-Computer Interaction, Optimization and Robotic Applications (ICHORA) (pp. 1–6). https://doi.org/10.1109/ICHORA69329.2026.11537080 [Google Scholar] [Crossref]

12. Intarawichian, S., Thiennviboon, P., Laothamatas, J., & Sungkarat, W. (2026). EnsembleNet: Single-channel EEG sleep stage classification based on ensemble architecture of deep convolutional neural networks. IEEE Access, 14, 14449–14469. https://doi.org/10.1109/ACCESS.2026.3655811 [Google Scholar] [Crossref]

13. Saowapark, W., & Jirakittayakorn, N. (2026). SleepTNet: Automatic sleep stage classification with transition model using multi-channel EEG. IEEE Access, 14, 63894–63915. https://doi.org/10.1109/ACCESS.2026.3686667 [Google Scholar] [Crossref]

14. Zhang, Z., Lin, B.-S., Peng, C.-W., & Lin, B.-S. (2024). Multi-modal sleep stage classification with two-stream encoder-decoder. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 32, 2096–2105. https://doi.org/10.1109/TNSRE.2024.3394738 [Google Scholar] [Crossref]

15. Dip, M. S. S., Motin, M. A., Karmakar, C., Penzel, T., & Palaniswami, M. (2026). NeuroSleepNet: An explainable multi-head attention-based framework with spatial and multi-scale independent temporal context learning for automatic sleep stage scoring. IEEE Access, 14, 4341–4355. https://doi.org/10.1109/ACCESS.2025.3640231 [Google Scholar] [Crossref]

16. Salfi, F., Corigliano, D., Amicucci, G., Mombelli, S., D'Atri, A., Axelsson, J., & Ferrara, M. (2026). The potential of ensemble-based automated sleep staging on single-channel EEG signal from a wearable device. Journal of Sleep Research, 35(4), e70282. https://doi.org/10.1111/jsr.70282 [Google Scholar] [Crossref]

17. Zhou, D., Xu, Q., Wang, J., Xu, H., Kettunen, L., Chang, Z., & Cong, F. (2022). Alleviating class imbalance problem in automatic sleep stage classification. IEEE Transactions on Instrumentation and Measurement, 71, 1–12. https://doi.org/10.1109/TIM.2022.3191710 [Google Scholar] [Crossref]

18. Xu, Q., Zhou, D., Wang, J., Shen, J., Kettunen, L., & Cong, F. (2022). Convolutional neural network based sleep stage classification with class imbalance. In Proceedings of the International Joint Conference on Neural Networks (IJCNN) (pp. 1–6). https://doi.org/10.1109/IJCNN55064.2022.9892741 [Google Scholar] [Crossref]

19. Lee, C.-H., Kim, H.-J., Heo, J.-W., Kim, H., & Kim, D.-J. (2021). Improving sleep stage classification performance by single-channel EEG data augmentation via spectral band blending. In Proceedings of the 9th International Winter Conference on Brain-Computer Interface (BCI) (pp. 1–5). https://doi.org/10.1109/BCI51272.2021.9385297 [Google Scholar] [Crossref]

20. Yu, L., Tang, P., Jiang, Z., & Zhang, X. (2023). Denoise enhanced neural network with efficient data generation for automatic sleep stage classification of class imbalance. In Proceedings of the International Joint Conference on Neural Networks (IJCNN) (pp. 1–8). https://doi.org/10.1109/IJCNN54540.2023.10191282 [Google Scholar] [Crossref]

21. Huang, X., Schmelter, F., Irshad, M. T., Piet, A., Nisar, M. A., Sina, C., & Grzegorzek, M. (2023). Optimizing sleep staging on multimodal time series: Leveraging borderline synthetic minority oversampling technique and supervised convolutional contrastive learning. Computers in Biology and Medicine, 166, 107501. https://doi.org/10.1016/j.compbiomed.2023.107501 [Google Scholar] [Crossref]

22. Li, Y., Peng, C., Zhang, Y., Zhang, Y., & Lo, B. (2022). Adversarial learning for semi-supervised pediatric sleep staging with single-EEG channel. Methods, 204, 84–91. https://doi.org/10.1016/j.ymeth.2022.03.013 [Google Scholar] [Crossref]

23. Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic minority over-sampling technique. Journal of Artificial Intelligence Research, 16, 321–357. https://doi.org/10.1613/jair.953 [Google Scholar] [Crossref]

24. He, H., Bai, Y., Garcia, E. A., & Li, S. (2008). ADASYN: Adaptive synthetic sampling approach for imbalanced learning. In Proceedings of the International Joint Conference on Neural Networks (IJCNN) (pp. 1322–1328). https://doi.org/10.1109/IJCNN.2008.4633969 [Google Scholar] [Crossref]

25. Lemaître, G., Nogueira, F., & Aridas, C. K. (2017). Imbalanced-learn: A Python toolbox to tackle the curse of imbalanced datasets in machine learning. Journal of Machine Learning Research, 18(17), 1–5. [Google Scholar] [Crossref]

26. Liu, Z., Luo, S., Lu, Y., Zhang, Y., Jiang, L., & Xiao, H. (2023). Extracting multi-scale and salient features by MSE based U-structure and CBAM for sleep staging. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 31, 31–38. https://doi.org/10.1109/TNSRE.2022.3216111 [Google Scholar] [Crossref]

27. Liu, Z., Wu, Y., Tan, K., & Gao, Y. (2026). MCTSleepNet: A multiscale waveform and composite attention network with temporal dependency learning for robust EEG-based sleep staging. Cognitive Neurodynamics, 20(1), 50. https://doi.org/10.1007/s11571-026-10423-5 [Google Scholar] [Crossref]

28. Rahman, M. M., Bhuiyan, M. I. H., & Hassan, A. R. (2018). Sleep stage classification using single-channel EOG. Computers in Biology and Medicine, 102, 211–220. https://doi.org/10.1016/j.compbiomed.2018.08.022 [Google Scholar] [Crossref]

29. Sharma, M., Tiwari, J., & Acharya, U. R. (2021). Automatic sleep-stage scoring in healthy and sleep disorder patients using optimal wavelet filter bank technique with EEG signals. International Journal of Environmental Research and Public Health, 18(6), 3087. https://doi.org/10.3390/ijerph18063087 [Google Scholar] [Crossref]

30. Park, C., Byun, J. I., Choi, S. H., & Shin, W. C. (2025). Machine learning classifier solving the problem of sleep stage imbalance between overnight sleep. Biomedical Engineering Letters, 15(3), 513–523. https://doi.org/10.1007/s13534-025-00466-8 [Google Scholar] [Crossref]

31. Gramfort, A., Luessi, M., Larson, E., Engemann, D. A., Strohmeier, D., Brodbeck, C., Goj, R., Jas, M., Brooks, T., Parkkonen, L., & Hämäläinen, M. (2013). MEG and EEG data analysis with MNE-Python. Frontiers in Neuroscience, 7, 267. https://doi.org/10.3389/fnins.2013.00267 [Google Scholar] [Crossref]

Metrics

Views & Downloads

Similar Articles