ResFormer-CAP-Net: A Hybrid Deep Learning Model for Automated CAP A-Phase and Subtype Classification


Abstract views: 11 / PDF downloads: 8

Authors

  • Suleyman Yaman Firat University
  • Hasan Güler University of Southern Queensland

DOI:

https://doi.org/10.5281/zenodo.15038531

Keywords:

Cyclic Alternating Pattern, Deep Learning, Sleep, Electroencephalogram, Vision Transformers

Abstract

Cyclic Alternating Pattern (CAP) is a crucial biomarker for assessing sleep quality and
stability, as well as diagnosing sleep disorders. In clinical practice, manually detecting CAP A-phases and
their subtypes by analyzing full-night electroencephalography (EEG) recordings is a time-consuming,
labor-intensive, and error-prone process. In this study, a novel hybrid deep learning model, ResFormer
CAP-Net, is proposed for the automated classification of CAP A-phase and its subtypes. This model
integrates ResNet-18 for feature extraction and Transformer layers for temporal modeling. The proposed
model was evaluated using EEG recordings from healthy and sleep-disordered individuals in the publicly
available CAP Sleep Database (CAPSD). Evaluations on balanced datasets demonstrated that ResFormer
CAP-Net achieved state-of-the-art performance, with 79.97% accuracy for A-phase classification and
81.88% accuracy for subtype classification. Additionally, the effectiveness of four different EEG
channels was analyzed, revealing that the F4-C4 channel provided the highest accuracy for A-phase
classification, while the C4-P4 channel performed best for subtype classification. The number of
Transformer layers was also optimized, with experiments showing that using two Transformer layers
resulted in the highest classification performance.

Downloads

Download data is not yet available.

Author Biographies

Suleyman Yaman, Firat University

Biomedical Department, Vocational School of Technical Sciences, Elazig 23119, Turkiye

Hasan Güler, University of Southern Queensland

School of Mathematics, Physics and Computing, Springfield, QLD 4300, Australia

References

R.F. Gottesman, P.L. Lutsey, H. Benveniste, D.L. Brown, K.M. Full, J.M. Lee, R.S. Osorio, M.P. Pase, N.S. Redeker, S. Redline, A.P. Spira, Impact of Sleep Disorders and Disturbed Sleep on Brain Health: A Scientific Statement from the American Heart Association, Stroke. 55 (2024) E61–E76. https://doi.org/10.1161/STR.0000000000000453.

M.A. Grandner, Sleep, Health, and Society, Sleep Med. Clin. 17 (2022). https://doi.org/10.1016/j.jsmc.2022.03.001.

Y. Fatima, S.A.R. Doi, A.A. Mamun, Sleep quality and obesity in young subjects: a meta-analysis, Obes. Rev. 17 (2016). https://doi.org/10.1111/obr.12444.

M. Sejbuk, I. Mirończuk-Chodakowska, A.M. Witkowska, Sleep Quality: A Narrative Review on Nutrition, Stimulants, and Physical Activity as Important Factors, Nutrients. 14 (2022). https://doi.org/10.3390/nu14091912.

M. Hirshkowitz, K. Whiton, S.M. Albert, C. Alessi, O. Bruni, L. DonCarlos, N. Hazen, J. Herman, E.S. Katz, L. Kheirandish-Gozal, D.N. Neubauer, A.E. O’Donnell, M. Ohayon, J. Peever, R. Rawding, R.C. Sachdeva, B. Setters, M. V. Vitiello, J.C. Ware, P.J. Adams Hillard, National sleep foundation’s sleep time duration recommendations: Methodology and results summary, Sleep Heal. 1 (2015) 40–43. https://doi.org/10.1016/j.sleh.2014.12.010.

J.V. Rundo, R. Downey, Polysomnography, in: Handb. Clin. Neurol., 2019. https://doi.org/10.1016/B978-0-444-64032-1.00025-4.

M.G. Terzano, L. Parrino, A. Sherieri, R. Chervin, S. Chokroverty, C. Guilleminault, M. Hirshkowitz, M. Mahowald, H. Moldofsky, A. Rosa, R. Thomas, A. Walters, Atlas, rules, and recording techniques for the scoring of cyclic alternating pattern (CAP) in human sleep, Sleep Med. 2 (2001) 537–553. https://doi.org/10.1016/S1389-9457(01)00149-6.

Y. Zhou, H. Li, Y. Jia, J. Wu, J. Yang, C. Liu, Cyclic alternating pattern in non-rapid eye movement sleep in patients with vestibular migraine, Sleep Med. 101 (2023) 485–489. https://doi.org/10.1016/j.sleep.2022.11.034.

A.L. Goldberger, L.A. Amaral, L. Glass, J.M. Hausdorff, P.C. Ivanov, R.G. Mark, J.E. Mietus, G.B. Moody, C.K. Peng, H.E. Stanley, PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals., Circulation. 101 (2000). https://doi.org/10.1161/01.CIR.101.23.E215.

I. Chouvarda, M.O. Mendez, V. Rosso, A.M. Bianchi, L. Parrino, A. Grassi, M.G. Terzano, S. Cerutti, N. Maglaveras, Cyclic alternating patterns in normal sleep and insomnia: Structure and content differences, IEEE Trans. Neural Syst. Rehabil. Eng. 20 (2012) 642–652. https://doi.org/10.1109/TNSRE.2012.2208984.

L.M. DelRosso, S. Hartmann, M. Baumert, O. Bruni, C. Ruth, R. Ferri, Non-REM sleep instability in children with restless sleep disorder, SLEEP Med. 75 (2020) 276–281. https://doi.org/10.1016/j.sleep.2020.07.033.

L. Parrino, R. Ferri, O. Bruni, M.G. Terzano, Cyclic alternating pattern (CAP): The marker of sleep instability, Sleep Med. Rev. 16 (2012) 27–45. https://doi.org/10.1016/j.smrv.2011.02.003.

A. Melpignano, L. Parrino, J. Santamaria, C. Gaig, I. Trippi, M. Serradell, C. Mutti, M. Ricco, A. Iranzo, Isolated rapid eye movement sleep behavior disorder and cyclic alternating pattern: Is sleep microstructure a predictive parameter of neurodegeneration?, Sleep. 42 (2019) 1–7. https://doi.org/10.1093/sleep/zsz142.

F. Mendonça, S.S. Mostafa, F. Morgado-Dias, A.G. Ravelo-García, I. Rosenzweig, Towards automatic EEG cyclic alternating pattern analysis: a systematic review, Biomed. Eng. Lett. (2023) 273–291. https://doi.org/10.1007/s13534-023-00303-w.

F. Mendonça, S.S. Mostafa, A. Gupta, E.S. Arnardottir, T. Leppänen, F. Morgado-Dias, A.G. Ravelo-García, A-phase index: an alternative view for sleep stability analysis based on automatic detection of the A-phases from the cyclic alternating pattern, Sleep. 46 (2023). https://doi.org/10.1093/sleep/zsac217.

F. Mendonça, S.S. Mostafa, F. Morgado-Dias, A.G. Ravelo-García, A portable wireless device for cyclic alternating pattern estimation from an EEG monopolar derivation, Entropy. 21 (2019) 1203. https://doi.org/10.3390/e21121203.

S. Dhok, V. Pimpalkhute, A. Chandurkar, A.A. Bhurane, M. Sharma, U.R. Acharya, Automated phase classification in cyclic alternating patterns in sleep stages using Wigner–Ville Distribution based features, Comput. Biol. Med. 119 (2020). https://doi.org/10.1016/j.compbiomed.2020.103691.

M. Sharma, H. Lodhi, R. Yadav, N. Sampathila, K.S. Swathi, U.R. Acharya, Automated Explainable Detection of Cyclic Alternating Pattern (CAP) Phases and Sub-Phases Using Wavelet-Based Single-Channel EEG Signals, IEEE ACCESS. 11 (2023) 50946–50961. https://doi.org/10.1109/ACCESS.2023.3278800.

A. Alves, F. Mendonça, S.S. Mostafa, F. Morgado-Dias, Sleep Analysis by Evaluating the Cyclic Alternating Pattern A Phases, Electron. 13 (2024). https://doi.org/10.3390/electronics13020333.

B. Halder, T. Anjum, M.I.H. Bhuiyan, An attention-based multi-resolution deep learning model for automatic A-phase detection of cyclic alternating pattern in sleep using single-channel EEG, Biomed. Signal Process. Control. 83 (2023) 104730. https://doi.org/10.1016/j.bspc.2023.104730.

A. Gupta, F. Mendonça, S.S. Mostafa, A.G. Ravelo-García, F. Morgado-Dias, Visual Explanations of Deep Learning Architectures in Predicting Cyclic Alternating Patterns Using Wavelet Transforms, Electron. 12 (2023). https://doi.org/10.3390/electronics12132954.

A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, N. Houlsby, An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, (2020). https://doi.org/10.48550/arXiv.2010.11929.

Rechtschaffen A., Kales A., A manual of standardized terminology, techniques and scoring system of sleep stages in human subjects, Los Angeles Brain Inf. Serv. Res. Inst. (1968).

K. He, X. Zhang, S. Ren, J. Sun, Deep Residual Learning for Image Recognition, in: Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., IEEE Computer Society, 2015: pp. 770–778. https://doi.org/10.48550/arxiv.1512.03385.

M. Agarwal, A. Singhal, Classification of cyclic alternating patterns of sleep using EEG signals, SLEEP Med. 124 (2024) 282–288. https://doi.org/10.1016/j.sleep.2024.09.025.

Y. Kahana, A. Aberdam, A. Amar, I. Cohen, Deep-Learning-Based Classification of Cyclic-Alternating-Pattern Sleep Phases, Entropy. 25 (2023). https://doi.org/10.3390/e25101395.

Downloads

Published

2025-03-08

How to Cite

Yaman, S., & Güler, H. (2025). ResFormer-CAP-Net: A Hybrid Deep Learning Model for Automated CAP A-Phase and Subtype Classification. International Journal of Advanced Natural Sciences and Engineering Researches, 9(3), 253–261. https://doi.org/10.5281/zenodo.15038531

Issue

Section

Articles