Pre-Ictal Seizure Prediction from EEG Using an Attention-Augmented Temporal Learning Framework
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.