Abstract
There are approximately 50 million people worldwide living with epilepsy, highlighting the need for strong early warning systems to enable prompt clinical management. Despite the high performance of recently developed deep learning models based on Convolutional Neural Networks (CNNs) and Bidirectional Long Short-Term Memory (Bi-LSTM/GRU) networks, they are highly sensitive to ictal features and are not very effective in detecting the subtle temporal transitions leading to seizure onset. This article introduces an attention-improved deep learning model to predict pre-ictal seizures using EEG signals. The suggested model combines CNN-based feature extraction, Bi-LSTM/GRU temporal sequence modelling, and a learnable temporal attention mechanism to identify the early neural dynamics before the onset of seizures. The experimental dataset was constructed from four publicly available EEG repositories following the proposed temporal labeling strategy and comprises EEG recordings from 25 selected patients, 243 annotated seizure events, and 2,847 hours of continuous EEG recordings, using a patient-wise stratified 5-fold cross-validation protocol. Experimental evaluation demonstrates that the proposed framework achieves a predictive accuracy of 93% (±1.2%), sensitivity of 90% (±1.4%), specificity of 90% (±1.1%), an AUC-ROC of 0.93 (±0.012), a PR-AUC of 0.961 (±0.009), and a low false alarm rate of 0.12 ± 0.015 per hour. To confirm statistical reliability, all reported metrics are validated across 10 independent runs and supplemented with 95% confidence intervals and paired Wilcoxon signed-rank tests (p < 0.05) against all baselines. Attention weight analysis verifies that the model selectively targets temporally informative pre-ictal EEG regions and improves clinical interpretability.References
- Epilepsy, W. H. O. "A Public Health Imperative." Geneva, Switzerland: WHO (2019).
- Cherian, Resmi, and E. Gracemary Kanaga. "Theoretical and Methodological Analysis of EEG Based Seizure Detection and Prediction: An Exhaustive Review." Journal of neuroscience methods 369 (2022): 109483.
- Shoeibi, Afshin, Marjane Khodatars, Navid Ghassemi, Mahboobeh Jafari, Parisa Moridian, Roohallah Alizadehsani, Maryam Panahiazar et al. "Epileptic Seizures Detection Using Deep Learning Techniques: A Review." International journal of environmental research and public health 18, no. 11 (2021): 5780.
- Rasheed, Khansa, Adnan Qayyum, Junaid Qadir, Shobi Sivathamboo, Patrick Kwan, Levin Kuhlmann, Terence O’Brien, and Adeel Razi. "Machine Learning for Predicting Epileptic Seizures Using EEG Signals: A Review." IEEE reviews in biomedical engineering 14 (2020): 139-155.
- LeCun, Yann, and Yoshua Bengio. "Convolutional Networks for Images, Speech, and Time Series." The handbook of brain theory and neural networks (1998).
- Zarei, Arman, Bingzhao Zhu, and Mahsa Shoaran. "Enhancing Epileptic Seizure Detection with EEG Feature Embeddings." In 2023 IEEE Biomedical Circuits and Systems Conference (BioCAS), IEEE, 2023, 1-5.
- Thara, D. K., and B. G. PremaSudha. "Epileptic Seizure Detection and Prediction Using Stacked Bidirectional Long Short Term Memory." Pattern Recognition Letters 128 (2019): 529-535.
- Nafea, Mohamed Sami, and Zool Hilmi Ismail. "Supervised Machine Learning and Deep Learning Techniques for Epileptic Seizure Recognition Using EEG Signals—A Systematic Literature Review." Bioengineering 9, no. 12 (2022): 781.
- Ahmad, Ijaz, Chen Yao, Lin Li, Yan Chen, Zhenzhen Liu, Inam Ullah, Mohammad Shabaz et al. "An Efficient Feature Selection and Explainable Classification Method for EEG-Based Epileptic Seizure Detection." Journal of Information Security and Applications 80 (2024): 103654.
- Acharya, U. Rajendra, Shu Lih Oh, Yuki Hagiwara, Jen Hong Tan, Hojjat Adeli, and D. Puthankattil Subha. "Automated EEG-based Screening of Depression Using Deep Convolutional Neural Network." Computer methods and programs in biomedicine 161 (2018): 103-113.
- Shawly, Tawfeeq, and Ahmed A. Alsheikhy. "Eeg-based Detection of Epileptic Seizures in Patients with Disabilities Using a Novel Attention-Driven Deep Learning Framework with SHAP Interpretability." Egyptian Informatics Journal 31 (2025): 100734.
- Amrani, Ghita, Amina Adadi, and Mohammed Berrada. "An Attention Mechanism-Based Interpretable Model for Epileptic Seizure Detection and Localization with Self-Supervised Pre-Training." IEEE Access (2025).
- Qiu, Yunqing, Jingqi Fu, Shuang Guo, and Jing Hu. "An Automated System for Epilepsy Detection Using EEG Brain Signals Based on Tunable Q-Factor Wavelet Transform and Local Binary Transitions Pattern Approach." In 2023 42nd Chinese Control Conference (CCC), IEEE, 2023, 3121-3126.
- Jain, Shraddha, and Rajeev Srivastava. "Electroencephalogram (EEG) Based Fuzzy Logic and Spiking Neural Networks (FLSNN) for Advanced Multiple Neurological Disorder Diagnosis." Brain Topography 38, no. 3 (2025): 33.
- Xia, Lili, Ruiqi Wang, Haiming Ye, Bochang Jiang, Guang Li, Chao Ma, and Zhongke Gao. "Hybrid LSTM–Transformer Model for the Prediction of Epileptic Seizure Using Scalp EEG." IEEE Sensors Journal 24, no. 13 (2024): 21123-21131.
- Y. Wu, E. L. M. Su, M. Wu, C. Y. Ooi and W. Holderbaum, "A Review of Machine Learning and Deep Learning Trends in EEG-Based Epileptic Seizure Prediction," in IEEE Access, vol. 13, 2025, 159812-159842.
- Yang, Xiaoli, Lipei Liu, Zhenwei Li, Yuxin Xia, Zhipeng Fan, and Jiayi Zhou. "Semi-Supervised Seizure Prediction Model Combining Generative Adversarial Networks and Long Short-Term Memory Networks." Applied Sciences 13, no. 21 (2023): 11631.
- Yuan, Zhizhang, Daoze Zhang, Yang Yang, Junru Chen, and Yafeng Li. "Ppi: Pretraining Brain Signal Model for Patient-Independent Seizure Detection." Advances in Neural Information Processing Systems 36 (2023): 69586-69604.
- Wang, Zhongpeng, Xiaoxin Song, Long Chen, Jinxiang Nan, Yulin Sun, Meijun Pang, Kuo Zhang, Xiuyun Liu, and Dong Ming. "Research Progress of Epileptic Seizure Prediction Methods Based on EEG." Cognitive Neurodynamics 18, no. 5 (2024): 2731-2750.
- Goldberger, Ary L., Luis AN Amaral, Leon Glass, Jeffrey M. Hausdorff, Plamen Ch Ivanov, Roger G. Mark, Joseph E. Mietus, George B. Moody, Chung-Kang Peng, and H. Eugene Stanley. "PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals." circulation 101, no. 23 (2000): e215-e220.
- Detti, Paolo. "Siena Scalp EEG Database." physionet 10 (2020): 493.
- Andrzejak, Ralph G., Klaus Lehnertz, Florian Mormann, Christoph Rieke, Peter David, and Christian E. Elger. "Indications of Nonlinear Deterministic and Finite-Dimensional Structures in Time Series of Brain Electrical Activity: Dependence on Recording Region and Brain State." Physical Review E 64, no. 6 (2001): 061907.

Journal of Innovative Image Processing