Transformer-based Models for Seizure Prediction from EEG Time-series Data
FNU VAIBHAV1, Vipul Kaliraman2, Aditya Duhan3, Simran Cheema4, Ankit LNU5, Pardeep Kumar1
1Pt. B.D. Sharma PGIMS, 2Maulana Azad Medical College, 3University of Colorado Anschutz, 4University of Alabama at Birmingham, 5Northern Lincolnshire and Goole NHS Foundation Trust
Objective:

Transformers enable precise preictal detection by modeling EEG dynamics. This work validates their utility in clinical settings, focusing on patient-specific models for better epilepsy care and practical deployment.

Background:

Epilepsy impacts over 50 million people worldwide, with unpredictable seizures causing injury risks, social challenges, and higher mortality. Accurate seizure prediction offers timely alerts for better management. While CNNs and RNNs struggle with long-range EEG patterns, transformers excel at capturing temporal dependencies in multichannel signals. This study explores transformer frameworks for personalized seizure forecasting.

Design/Methods:

Using a scalp EEG dataset (CHB-MIT dataset) from 22 pediatric patients with 198 seizures, signals were segmented into 10-second epochs, filtered (0.5-50 Hz) via MNE-Python, and denoised with independent component analysis (ICA). Short-time Fourier transform (STFT) generated time-frequency inputs for a transformer with multi-head attention and positional encoding. Models discriminated 30-minute preictal from interictal states using patient-specific training and cross-validation. Metrics analyzed were sensitivity, specificity, area under curve (AUC), false alarm rate (FAR). Extensions included vision transformer (ViT) on spectrograms and additional dataset testing.

Results:

The model achieved sensitivity of ~82% (95% confidence interval [CI]: 78.5-85.9%), specificity of ~76% (95% CI: 72.4-80.2%), AUC of ~0.84 (p < 0.001), and low FAR across patients. Patient-specific variations showed higher sensitivity in focal seizure cases (up to 88%), with extensions via ViT improving AUC by 5-7% on spectrograms. Compared to baseline convolutional neural network (CNN) models, transformers reduced FAR by 15%, demonstrating superior handling of temporal patterns and robustness to dataset expansions.

Conclusions:

This transformer-based approach offers reliable, patient-specific seizure prediction, potentially improving epilepsy management through early warnings and reduced false alarms. Future work will focus on real-time integration and validation in diverse adult cohorts to expand its clinical applicability.

10.1212/WNL.0000000000217883
Disclaimer: Abstracts were not reviewed by Neurology® and do not reflect the views of Neurology® editors or staff.