Towards Modality-Agnostic Seizure Classification: A Unified Deep Learning Framework for Heterogeneous EEG and Intracranial EEG Signals
Authors: Ramya Sundaram, Muhammad Aslam Jarwar, M Uma, Sunder Ali Khowaja, Qurat-Ul-Ain Mastoi
Organizations: School of Computing and Digital Technologies, Sheffield Hallam University, Sheffield and University of Strathclyde, Glasgow, United Kingdom. · School of Computing and Digital Technologies, Sheffield Hallam University, Sheffield, United Kingdom · Department of Cmputational Intelligence, SRM Institute of Science and Technology,Kattankulathur-603203, India. · Faculty of Engineering and Computing, Dublin City University, Ireland. · Department of Computer Science and Creative Technologies, University of the West of England, Bristol, United Kingdom.
Seizure prediction and detection, essential for clinical treatment of epilepsy, remain the crucial task of this neurological disease. EEG and iEEG are widely used to analyze epilepsy due to its capability of capturing discriminative brain activities at high time resolution. However, existing works generally analyze either EEG or iEEG seizure activity separately, where EEG analysis has been well-researched, while more and more works consider iEEG for its higher specificity at the spatial level and signal quality. Currently, most of the existing seizure prediction systems are single-modal in nature, which limits its application to a variety of clinical conditions. Therefore, a common framework to analyze seizures with both EEG and iEEG signals needs to be developed. This paper presents a new framework of multimodal seizure classification integrating the heterogeneous EEG and iEEG recordings from different subjects and sources. A specific framework, called Unified Multimodal Signal Harmonization (UMSH), is developed for harmonizing signals with varied sampling rates and recording conditions. Moreover, to handle the extremely class-imbalanced problem in the data sets, we use a Conditional Generative Adversarial Network (cGAN) based data augmentation technique to generate synthetic samples to balance the class distribution. The proposed framework uses the EEGNet-Vision Transformer (EEGNet-ViT) as the feature extraction and classification network to learn the local discriminative patterns as well as global contextual information in the multimodal seizure data. Experimental results demonstrate the effectiveness of the proposed framework for robust seizure classification, emphasizing the potential of integrated EEG-iEEG multimodal learning in advancing next-generation epilepsy monitoring and clinical decision-support systems.
Figures & tables
Fig. 1: General block diagram of the proposed methodology.
Fig. 2: Proposed Multimodel dataset creation (Unified Multimodel Signal Harmonization.
Fig. 3: General block diagram of the EEGNet-ViT Architecture for multimodal classification.
Name
Original
After Down-sampling
Merging 4 Consecutive Records
Final Dataset
DatasetFnusa – Non seizure
66581×15000
66581×768
66581/4=16645.25
16645×3072
DatasetFnusa – Ictal
18184×15000
18184×768
18184/4=4546.00
4546×3072
DatasetMayo – Non seizure
44259×15000
44259×768
44259/4=11064.75
11064×3072
DatasetMayo – Ictal
6099×15000
6099×768
6099/4=1524.75
1524×3072
TABLE I: Dataset Details of the iEEG Dataset
Final Combined Dataset
Records
Total
Non-seizure (iEEG only)
27,709
27,709
Ictal (iEEG + CHB-MIT)
6,070 + 885
6,925
Preictal (CHB-MIT only)
8,613
8,613
TABLE II: Dataset Details of the EEG-iEEG Combined Dataset
Fig. 4: Performance analysis of proposed EEG–iEEG Seizure Classification Framework on Training, Testing, and Validation Datasets.
Fig. 5: Confusion matrix of proposed EEG–iEEG seizure classification model’s performance across training, testing, and validation datasets.
Fig. 6: Performance Comparison of the Proposed Framework with Existing State-of-the-Art Methods.
Electroencephalography (EEG) models used for epilepsy are often limited to specific datasets and tasks. This limited approach can make it challenging to apply these models across different datasets or in various situations. However, recent studies in foundation models and self-supervised learning suggest that an adaptable EEG backbone could support a range of EEG related tasks. In this study, we have developed a multimodal EEG foundation model that combines a raw signal encoder based on the Mamba architecture, a Vision Transformer (ViT)-style encoder for time-frequency data, and a lightweight encoder for text, all within a shared embedding space. The pretraining process relies on several innovative techniques, such as masked modeling, cross-view contrastive alignment, and temporal consistency losses. These methods are designed to create rich, seizure-relevant representations without requiring labeled data. To assess the efficacy and generalization of our pretrained model, we fine-tuned it on the canonical CHB-MIT seizure detection benchmark and additional seizure detection datasets, and conducted extensive experiments comparing different model variants. On the standard CHB-MIT split, our best single model achieved an AUROC of 0.874, and an ensemble variant reached 0.878 AUROC, representing state-of-the-art performance on this benchmark. In addition to standard train-test splits, we evaluated performance under a leave-one-subject-out (LOSO) protocol, which is rarely reported in prior EEG seizure modeling work and highlights the difficulty of patient-independent seizure detection, with a mean LOSO balanced accuracy of 0.558 across 19 subjects. Across datasets and evaluation settings, our multimodal foundation model enabled robust seizure detection and straightforward adaptation to new seizure detection scenarios, while also supporting interpretable seizure localization.
Targol Bakhtiarvand, Jugal Kalita, Adham Atyabi
Department of Computer Science, University of Colorado Colorado Springs, Colorado Springs, CO, USA
Automated seizure detection from electroencephalography (EEG) is essential for continuous neurological monitoring, particularly for subclinical epileptic seizures that may exhibit only subtle electrographic changes. Existing time-series methods are often designed for fixed EEG channel configurations, thereby limiting their applicability to heterogeneous EEG recordings with irregular channel layouts. Although visual and language modeling offer promising alternatives, aligning heterogeneous EEG representations with clinical semantics remains challenging. We introduce ViTexSZ, a heterogeneous Vision-Text knowledge distillation framework for EEG seizure detection. ViTexSZ converts EEG recordings into structured waveform images and introduces a query-based multi-channel alignment module that maps source-dependent visual features into a unified token space. A heterogeneous teacher further integrates the aligned EEG representations with clinical prompts through a multimodal large language model, associating high-level clinical semantics with seizure-related evidence. Vision-text knowledge distillation then transfers the teacher representations to a lightweight student during detection. Experiments on four EEG seizure datasets demonstrate the generalizability of ViTexSZ across both subclinical and general seizure detection scenarios, achieving the highest accuracy on all datasets and relative improvements of up to 12.9% over the second-best baselines, showing its effectiveness.
Chenxi Liu, Mingzhao Li, Yicong Liu +4
Centre for Artificial Intelligence and Robotics, Hong Kong Institute of Science & Innovation, Chinese Academy of Sciences, Hong Kong SAR · The First Affiliated Hospital, Sun Yat-sen University, China · The Hong Kong Polytechnic University, Hong Kong SAR +2
Neonatal seizures carry substantial risks of acute brain injury and long-term neurodevelopmental impairment, motivating the need for timely identification of impending seizure activity. While continuous electroencephalogram (EEG) monitoring remains the clinical gold standard, reliable patient-independent seizure prediction in neonates remains largely under-explored. We propose an interpretable multimodal framework that combines EEG and electrocardiogram (ECG) signals for neonatal seizure prediction. Our method uses mel-frequency cepstral coefficient (MFCC) representations processed by a lightweight (approx. 70k-parameter) convolutional neural network with squeeze-and-excitation attention. The framework was evaluated on the Helsinki neonatal EEG-ECG dataset and the Siena scalp EEG-ECG dataset. Under strict leave-one-patient-out (LOPO) evaluation, patient-independent prediction proved challenging (mean accuracy 58.5%, F1-score 60.3%), highlighting substantial inter-subject variability in neonatal EEG. However, fine-tuning the pretrained model with only five minutes of patient-specific data per class improved performance to 95.87% accuracy and 95.85% F1-score, demonstrating the feasibility of rapid patient-adaptive transfer learning. SHapley Additive exPlanations (SHAP) identified informative EEG channels that showed partial spatial agreement with clinically reported seizure origins. These findings suggest that fully patient-independent neonatal seizure prediction remains challenging, but that patient-adaptive fine-tuning with a small amount of data may provide a practical pathway toward personalized neonatal seizure prediction systems.
Sithmini Ranasingha, Agasthi Haputhanthri, Hansa Marasinghe +5
Department of Electronic and Telecommunication Engineering, University of Moratuwa, Sri Lanka · Department of Electrical and Computer Engineering, University of British Columbia, Canada · Department of Biomedical Engineering, University of Melbourne, Australia +1