Welcome to Francis Academic Press

Academic Journal of Computing & Information Science, 2025, 8(11); doi: 10.25236/AJCIS.2025.081103.

An Improved Self-Supervised Framework on EEG Signals for Seizure Detection and Classification

Author(s)

Jia Han1, Xuande Zhang1, Long Xu2, Zhijie Gao3, Xin Huang2 

Corresponding Author:
Xin Huang
Affiliation(s)

1School of Electronic Information and Artificial Intelligence, Shaanxi University of Science and Technology, Xi’an, 710021, China

2Faculty of Electrical Engineering and Computer Science, Ningbo University, Ningbo, 315211, China

3Department of Neurology, Capital Center for Children's Health, Capital Medical University, Beijing, 100045, China

Abstract

Supervised learning approaches for deep learning-based epilepsy detection from Electroencephalogram (EEG) signals face significant limitations, including poor generalization across patients and a heavy reliance on large-scale labeled datasets. The acquisition of such datasets is highly labor-intensive, which in turn restricts the practical deployment of these methods. Here, we propose a self-supervised learning (SSL) framework to reduce this dependency for seizure detection and classification. Our method combines a time-frequency data augmentation module with a representation-level reconstruction task, guided by a novel semantic-subsequence-preserving (SSP) masking strategy, to learn semantic representations from unlabeled EEG. When evaluated on 5,499 public EEG recordings, our model achieves an AUROC of 0.848 for detection and a weighted F1-score of 0.900 for classification. This demonstrates the ability of our SSL approach to deliver high performance with minimal labeled data, offering a promising path toward more scalable and accurate clinical diagnostic tools.

Keywords

self-supervised learning; Electroencephalogram; seizure detection; seizure classification

Cite This Paper

Jia Han, Xuande Zhang, Long Xu, Zhijie Gao, Xin Huang. An Improved Self-Supervised Framework on EEG Signals for Seizure Detection and Classification. Academic Journal of Computing & Information Science (2025), Vol. 8, Issue 11: 23-31. https://doi.org/10.25236/AJCIS.2025.081103.

References

[1] Jiang L, Fan Q, Ren J, Dong F, Jiang T, Liu J. An improved BECT spike detection method with functional brain network features based on PLV. Front. Neurosci. 2023, 17, 1150668.

[2] Slater JD, Benbadis S, Verrier RL. The brain-heart connection: Value of concurrent ECG and EEG recordings in epilepsy management. Epilepsy Behav Rep. 2024, 28, 100726. 

[3] Vidyaratne, L.S.; Iftekharuddin, K.M. Real-Time Epileptic Seizure Detection Using EEG. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 2146-2156. 

[4] Tripathi PM, Kumar A, Kumar M, Komaragiri RS. Automatic seizure detection and classification using super-resolution superlet transform and deep neural network - a preprocessing-less method. Comput. Methods Programs Biomed. 2023, 240, 107680. 

[5] Kantipudi MVVP, Kumar NSP, Aluvalu R, et al. An improved GBSO-TAENN-based EEG signal classification model for epileptic seizure detection. Sci Rep. 2024, 14, 843. 

[6] Liu S, Wang J, Li S, Cai L. Multi-dimensional hybrid bilinear CNN-LSTM models for epileptic seizure detection and prediction using EEG signals. J Neural Eng. 2024, 21, 066045. 

[7] Priyasad D, Fernando T, Denman S, Sridharan S, Fookes C. Interpretable seizure classification using unprocessed EEG with multi-channel attentive feature fusion. IEEE Sens J. 2021, 21, 19186-97. 

[8] Afzal, A.; Chrysos, G.; Cevher, V.; Shoaran, M. REST: Efficient and accelerated EEG seizure analysis through residual state updates. In Proceedings of the 41st International Conference on Machine Learning, Vienna, Austria, 21–27 July 2024; pp. 271–290.

[9] Lih OS, Jahmunah V, Palmer EE, Barua PD, Dogan S, Tuncer T, et al. EpilepsyNet: novel automated detection of epilepsy using transformer model with EEG signals from 121 patient population. Comput Biol Med. 2023, 164, 107312. 

[10] Zhu R, Pan WX, Liu JX, et al. Epileptic seizure prediction via multidimensional transformer and recurrent neural network fusion. J Transl Med. 2024, 22, 895. 

[11] Hu S, et al. Exploring the applicability of transfer learning and feature engineering in epilepsy prediction using hybrid transformer model. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 1321-32. 

[12] Holguin-Garcia SA, Guevara-Navarro E, Daza-Chica AE, et al. A comparative study of CNN-capsule-net, CNN-transformer encoder, and traditional machine learning algorithms to classify epileptic seizure. BMC Med Inform Decis Mak. 2024, 24, 60. 

[13] Lu, G.; Peng, J.; Huang, B.; Gao, C.; Stefanov, T.; Hao, Y.; et al. SlimSeiz: Efficient Channel-Adaptive Seizure Prediction Using a Mamba-Enhanced Network. In Proceedings of the 2025 IEEE International Symposium on Circuits and Systems (ISCAS), Seoul, Korea, 2025; pp. 1–5. 

[14] Deng Q, Wang Q, Liu W, Xue Y. EEG VMamba: vision Mamba for seizure prediction based on EEG. In Proceedings of the 2024 6th International Conference on Video, Signal and Image Processing; 2025; New York, NY, USA. p. 119-24. 

[15] Li, Z. Research on EEG Acquisition System of Smart Internet of Things with Enhanced Mamba. In Proceedings of the 5th International Conference on Signal Processing and Machine Learning (CONF-SPML 2025), Hybrid Conference, Portsmouth, UK, 2025; pp. 190–195. 

[16] Wang, J.; Zhao, S.; Luo, Z.; Zhou, Y.; Li, S.; Pan, G. EEGMamba: An EEG Foundation Model with Mamba. Neural Netw. 2025, 192, 107816. https://doi.org/10.1016/j.neunet.2025.107816.

[17] Tang, S.; Dunnmon, J.; Saab, K.K.; Zhang, X.; Huang, Q.; Dubost, F.; Rubin, D.; Lee-Messer, C. Self-supervised graph neural networks for improved electroencephalographic seizure analysis. In Proceedings of the 10th International Conference on Learning Representations (ICLR), Virtual, 25–29 April 2022.

[18] Van Lam; Oliugbo, C.; Parida, A.; Linguraru, M.G.; Anwar, S.M. Self-Supervised Learning for Seizure Classification Using ECoG Spectrograms. In Proceedings of the SPIE Medical Imaging 2024: Computer-Aided Diagnosis, San Diego, CA, USA, 2024; 12927, 129272J.

[19] Han H, Fan H, Huang X, Han C. Self-supervised multi-transformation learning for time series anomaly detection. Expert Syst Appl. 2024, 253, 124339. 

[20] Kostas D, Aroca-Ouellette S, Rudzicz F. BENDR: using transformers and a contrastive self-supervised learning task to learn from massive amounts of EEG data. Front Hum Neurosci. 2021, 15, 653659. 

[21] Chien, H.-Y.S.; Goh, H.; Sandino, C.M.; Cheng, J.Y. MAEEG: Masked auto-encoder for EEG representation learning. In Proceedings of the NeurIPS 2022 Workshop on Learning from Time Series for Health, New Orleans, LA, USA, 2 December 2022.

[22] Chen, X.; Ding, M.; Wang, X.; Yan, Z.; Wong, K.; Xu, Q.; Han, Y.; Zhang, P.; Li, H.; Han, X.; et al. Context Autoencoder for Self-supervised Representation Learning. Int. J. Comput. Vis. 2024, 132, 208–223. 

[23] Misra, I.; van der Maaten, L. Self-supervised learning of pretext-invariant representations. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 6706–6716.

[24] Goyal, P.; Mahajan, D.K.; Gupta, A.K.; Misra, I. Scaling and benchmarking self-supervised visual representation learning. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Korea, 27 October–2 November 2019; pp. 6390–6399.

[25] Mohammadi Foumani, N.; Mackellar, G.; Ghane, S.; Irtza, S.; Nguyen, N.; Salehi, M. EEG2Rep: Enhancing self-supervised EEG representation through informative masked inputs. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD '24), Barcelona, Spain, 25–29 August 2024; pp. 5544–5555.

[26] Liu, J.; Chen, S. TimesURL: Self-Supervised Contrastive Learning for Universal Time Series Representation Learning. Proc. AAAI Conf. Artif. Intell. 2024, 38, 13918-13926.

[27] Chambon S, Galtier MN, Arnal PJ, Wainrib G, Gramfort A. A deep learning architecture for temporal sleep stage classification using multivariate and multimodal time series. IEEE Trans Neural Syst Rehabil Eng. 2018, 26, 758-69. 

[28] Baevski, A.; Hsu, W.-N.; Xu, Q.; Babu, A.; Gu, J.; Auli, M. data2vec: A general framework for self-supervised learning in speech, vision and language. In Proceedings of the 39th International Conference on Machine Learning, Baltimore, Maryland, USA, 17–23 July 2022; pp. 1298–1312.

[29] Zhou, J.; Wei, C.; Wang, H.; Shen, W.; Xie, C.; Yuille, A.; Kong, T. Image BERT pre-training with online tokenizer. In Proceedings of the 10th International Conference on Learning Representations, Virtual, 25–29 April 2022.

[30] Shah V, von Weltin E, Lopez S, McHugh JR, Veloso L, Golmohammadi M, et al. The Temple University Hospital seizure detection corpus [dataset]. Front Neuroinform. 2018, 12, 83. 

[31] Fisher RS, Cross JH, French JA, Higurashi N, Hirsch E, Jansen FE, et al. Operational classification of seizure types by the International League Against Epilepsy: position paper of the ILAE Commission for Classification and Terminology. Epilepsia. 2017, 58, 522-30. 

[32] Cappelletti, W.; Xie, Y.; Frossard, P. Learning Self-Supervised Dynamic Networks for Seizure Analysis. In Proceedings of the ICLR 2024 Workshop on Learning from Time Series for Health, Vienna, Austria, 2024.