Source-linked AI summary
Self-Supervised Graph Neural Networks for Improved Electroencephalographic Seizure Analysis
Siyi Tang, Jared A. Dunnmon, Khaled Saab, Xuan Zhang, Qianying Huang, Florian Dubost, Daniel L. Rubin, Christopher Lee-Messer
TL;DR
Prior automated EEG seizure studies leave challenges in representing non-Euclidean structure, classifying rare seizure types, and quantitatively assessing seizure localization. The paper combines graph-based recurrent modeling, self-supervised pre-training, and quantitative interpretability analysis, achieving stronger detection and classification results while improving rare-type classification and focal-seizure localization.
Problem
Prior automated EEG seizure studies inadequately represent non-Euclidean structure, classify rare seizure types, and quantitatively assess seizure localization.
Method
The paper uses recurrent GNNs with geometry- or connectivity-based EEG graphs, self-supervised next-period signal prediction, and quantitative localization metrics.
Results
The method achieves 0.875 AUROC for seizure detection and 0.749 weighted F1-score for seizure classification, while precisely localizing 25.4% of focal seizures, 21.9 points above existing CNNs.
Takeaways & Limitations
Graph structure and self-supervision improve seizure detection and classification, particularly for rare seizure types, while the interpretability analysis supports quantitative localization assessment and visualization.
Takeaways & Limitations
Additional validation across institutions, populations, age groups, and an approved EEG waveform-based classification scheme is needed before real-world clinical use.
Abstract
from arXiv · showhide
Automated seizure detection and classification from electroencephalography (EEG) can greatly improve seizure diagnosis and treatment. However, several modeling challenges remain unaddressed in prior automated seizure detection and classification studies: (1) representing non-Euclidean data structure in EEGs, (2) accurately classifying rare seizure types, and (3) lacking a quantitative interpretability approach to measure model ability to localize seizures. In this study, we address these challenges by (1) representing the spatiotemporal dependencies in EEGs using a graph neural network (GNN) and proposing two EEG graph structures that capture the electrode geometry or dynamic brain connectivity, (2) proposing a self-supervised pre-training method that predicts preprocessed signals for the next time period to further improve model performance, particularly on rare seizure types, and (3) proposing a quantitative model interpretability approach to assess a model's ability to localize seizures within EEGs. When evaluating our approach on seizure detection and classification on a large public dataset, we find that our GNN with self-supervised pre-training achieves 0.875 Area Under the Receiver Operating Characteristic Curve on seizure detection and 0.749 weighted F1-score on seizure classification, outperforming previous methods for both seizure detection and classification. Moreover, our self-supervised pre-training strategy significantly improves classification of rare seizure types. Furthermore, quantitative interpretability analysis shows that our GNN with self-supervised pre-training precisely localizes 25.4% focal seizures, a 21.9 point improvement over existing CNNs. Finally, by superimposing the identified seizure locations on both raw EEG signals and EEG graphs, our approach could provide clinicians with an intuitive visualization of localized seizure regions.
1 INTRODUCTION
Automated EEG analysis could reduce the time burden of manual seizure review, but prior approaches leave gaps in graph representation, rare-seizure classification, and quantitative seizure localization. This work addresses these gaps with graph-based modeling, self-supervised pre-training, and quantitative interpretability analysis.
- Manual EEG review is resource- and time-intensive, motivating automated seizure detection and classification.
- Prior studies often use CNNs that assume Euclidean EEG structure, overlooking the natural geometry of EEG electrodes.
- Rare seizure types remain difficult to classify with traditional supervised learning, while prior self-supervised approaches did not model EEGs as graphs or address automated seizure classification.
- Prior work provided qualitative interpretability visualizations but did not quantitatively assess models’ ability to localize seizures.
- The proposed recurrent GNN represents EEG sensor geometry or dynamic brain connectivity and models spatiotemporal dependencies in EEGs.
- Self-supervised pre-training predicts preprocessed EEG signals for the next time period and is designed to improve performance, particularly for rare seizure types.
- 0.875 AUROC on seizure detection and 0.749 weighted F1-score on seizure classification outperform previous approaches on a large public dataset.
- 25.4% of focal seizures were precisely localized, improving by 21.9 points over a prior state-of-the-art CNN.
2 METHODS
The methods represent EEG clips as graphs and use graph-based recurrent models to capture spatial and temporal dependencies for seizure detection and classification. Self-supervised future-signal prediction and occlusion-based localization analyses extend the modeling and interpretability pipeline.
- Task definitions: Seizure detection predicts seizure presence in an EEG clip, whereas seizure classification predicts seizure type from a seizure clip, using 12-s and 60-s windows.The two window lengths support fast and slow detection and classification.
- EEG graph construction: An EEG clip is represented as G = {V, E, W}, with electrodes as nodes, edges describing relationships, and W as the adjacency matrix.This graph representation provides the structure used by subsequent graph neural network operations.
- EEG graph construction: The distance graph encodes electrode geometry through thresholded Gaussian-kernel weights, producing a universal undirected weighted graph based on standard 10-20 electrode placement.The selected sparsity threshold κ = 0.9 yields a graph resembling clinically used EEG montages.
- EEG graph construction: The correlation graph captures dynamic brain connectivity by assigning edge weights from absolute normalized cross-correlation and retaining top-τ neighbors for each node.This produces a unique directed weighted graph for each EEG clip.
- Graph neural network: DCRNN models EEG spatiotemporal dependencies through diffusion convolutions, with graph transitions based on outward and inward diffusion processes.For undirected distance graphs, Chebyshev spectral graph convolutions are used instead.
- Graph neural network: DCGRU replaces GRU matrix multiplications with diffusion or Chebyshev graph convolutions, and stacked DCGRUs feed a fully connected layer for detection and classification.The recurrent architecture combines graph-based spatial processing with temporal gating.
- Self-supervised pre-training: Self-supervised pre-training predicts the next preprocessed EEG clip from a preceding clip using an encoder-decoder built from stacked DCGRUs and mean absolute error.The strategy is intended to learn task-agnostic representations for downstream seizure tasks.
- Interpretability and localization: Occlusion analysis zero-fills one-second channel segments for detection and drops entire channels for classification to measure changes in model outputs.Detection produces an N × T occlusion map whose values are superimposed on raw EEG signals and graph structures.
3 EXPERIMENTS
Experiments evaluate DCRNNs with distance- and correlation-based EEG graphs against CNN and recurrent baselines on TUSZ, including self-supervised pre-training, rare-class performance, and seizure localization.
- Experimental setup: The study uses TUSZ v1.5.2, with patient-wise train, validation, and held-out test splits for evaluating generalization to unseen patients.The dataset contains 5,612 EEGs, 3,050 annotated seizures, eight seizure types, and 19 EEG channels; five overlapping train/test patients are excluded.
- Graph neural network performance: Dist-DCRNN and Corr-DCRNN without self-supervised pre-training perform on par with or better than the baselines on seizure detection and classification.The baselines include Dense-CNN, LSTM, and CNN-LSTM, trained and evaluated on the same preprocessed data.
- Self-supervised pre-training: Self-supervised pre-training improves DCRNN performance on both seizure detection and classification, with pre-trained Dist-DCRNN reaching 0.875 AUROC on 60-s seizure detection.This matches a supervised-pre-trained CNN trained on a labeled dataset five times larger than TUSZ, while the same pre-trained weights generalize across detection and classification tasks.
- Rare seizure classification: 74% accuracy on rare CT seizures is achieved by pre-trained Dist-DCRNN, a 47-point increase over Dense-CNN and a 48-point increase over non-pretrained Dist-DCRNN.Non-pretrained Dist-DCRNN also reaches 93% accuracy on rare AB seizures, two points above the best baseline.
- Comparison with transfer learning: Self-supervised pre-training consistently outperforms transfer learning when DCRNNs are pre-trained and fine-tuned for seizure detection and classification on TUSZ.The comparison uses a large in-house dataset containing 40,316 EEGs for pre-training.
- Seizure localization: Pre-trained Corr-DCRNN precisely localizes 25.4% of focal seizures, compared with 3.5% for Dense-CNN, using localization score > 0.8.Pre-trained Dist-DCRNN precisely localizes 21.8%, while both non-pretrained DCRNNs localize 6.3%.
- Comparison between graph structures: Corr-DCRNN localizes focal seizures better than Dist-DCRNN, particularly with self-supervised pre-training, despite comparable detection and classification performance.The correlation graph also offers an interpretable representation of focal seizure EEGs.
4 CONCLUSION
The study combines graph-based EEG modeling, self-supervised pre-training, and quantitative interpretability to improve seizure detection, classification, and localization.
- The proposed method combines graph-based modeling and self-supervised pre-training for EEG seizure detection and classification, with an interpretability method to quantify seizure localization.
- The method achieves state-of-the-art performance on seizure detection and classification, improves classification of rare seizure classes, and more accurately localizes seizures.
- The correlation-based graph localizes focal seizures more accurately than the distance-based graph.
- The improved localization and graph visualizations could provide clinicians with insights about localized seizure regions in clinical settings.
ETHICS STATEMENT
The study uses an anonymized, publicly available EEG corpus with IRB approval and reports no conflicts of interest. Additional validation is needed before real-world clinical use.
- The Temple University Hospital EEG Seizure Corpus is anonymized, publicly available, and covered by full IRB approval.
- The authors report no conflict of interest and no harmful insights from the described seizure models.
- Additional validation is needed across institutions, populations and age groups, and neurologist-approved EEG waveform classification schemes before clinical deployment.
A DATA PREPROCESSING
The preprocessing pipeline resamples EEGs, creates task-specific clips and labels, transforms signals into the frequency domain, and evaluates frequency-domain inputs and focal-class merging decisions.
- Preprocessing: EEG recordings are resampled to 200 Hz before preprocessing into frequency-domain clips and labels.
- Preprocessing: For seizure detection, non-overlapping 12-s or 60-s windows are labeled positive when they contain at least one seizure event.
- Preprocessing: For classification, clips begin 2 s before seizure onset, may be truncated to avoid multiple seizure types, and use four seizure classes.
- Preprocessing: Self-supervised pre-training uses the same EEG clips as seizure detection, while all tasks transform signals into frequency-domain inputs using windowing and FFT.
- Preprocessing: Frequency-domain inputs significantly outperform time-domain inputs in DCRNN detection and classification experiments.
- Preprocessing: The study merges focal non-specific, simple partial, and complex partial seizures because EEG signals alone may not distinguish these types reliably.
- Evaluation: Table 4 reports seizure detection and classification results for time-domain and frequency-domain DCRNN inputs across five random runs.
- Data splits: Train, validation, and test sets contain distinct patients for the self-supervised, detection, and classification tasks.
E DETAILS OF MODEL TRAINING PROCEDURES AND HYPERPARAMETERS
Model training uses task-specific losses, schedules, graph settings, thresholds, and baseline architectures selected through validation and fixed training procedures.
- Hyperparameter search: Hyperparameter search varies learning rate, correlation-graph neighbors, DCGRU depth and width, diffusion steps, and final-layer dropout.
- Seizure detection: Seizure detection undersamples negative examples to 50% positives, uses binary cross-entropy, and trains for 100 epochs.
- Evaluation: Focal seizure confusion matrices are averaged across five runs for 60-s and 12-s clips, with each row normalized to sum to one.
- Seizure detection: Detection thresholds are selected on validation data by maximizing F1-score before test-set predictions are assigned.
- Seizure classification: Seizure classification uses multi-class cross-entropy for 60 epochs with two 64-unit DCGRU layers and top-3 correlation-graph neighbors.
- Self-supervised pre-training: Self-supervised pre-training predicts future 12-s preprocessed clips using mean absolute error over 350 training epochs.
- Baselines: Baseline comparisons include Dense-CNN, LSTM, and CNN-LSTM architectures.
F DATA AUGMENTATION
Training uses two EEG-specific augmentations: amplitude scaling and reflection across the scalp midline.
- Amplitude scaling randomly multiplies raw EEG signals by a factor between 0.8 and 1.2.
- Scalp-midline reflection randomly mirrors the EEG signals during training.
- Both augmentations are selected using EEG domain knowledge.
G ADDITIONAL EVALUATION RESULTS ON SEIZURE DETECTION
Additional seizure-detection evaluation reports multiple performance metrics and compares Dense-CNN localization with the proposed model.
- Table 6 reports F1-score, AUPR, sensitivity, and specificity for seizure-detection models.
- Dense-CNN occlusion maps show high saliency that does not localize in seizure regions.
- The Dense-CNN localization examples use correctly predicted 60-s EEG clips from the test set.
I SEIZURE CLASSIFICATION OCCLUSION MAPS FROM DCRNN
Occlusion maps from the pretrained Corr-DCRNN associate saliency with focal seizure regions, while generalized seizure regions are less salient.
- For CF seizures, high-saliency regions correspond to brain areas where focal seizures are localized.
- For other generalized seizure types, less-salient regions correspond to less localized seizure information.
- The maps are computed by dropping one EEG channel at a time and measuring the relative change in model output.
J COMPARISON BETWEEN SELF-SUPERVISED PRE-TRAINING AND TRANSFER LEARNING
The study compares self-supervised pre-training with transfer learning on an in-house EEG dataset and reports consistently better results for self-supervised pre-training.
- The comparison evaluates DCRNNs for seizure detection and classification after pre-training on the in-house dataset.
- Self-supervised pre-training on the in-house dataset consistently outperforms transfer learning from that dataset.
- The authors speculate that transfer learning is less comparable because the in-house dataset differs in population and data distribution.
- Self-supervised pre-training is intended to learn task-agnostic representations and mitigate distribution shift.
M USING SELF-SUPERVISED PREDICTION AS AN AUXILIARY TASK
The study evaluates self-supervised prediction as an auxiliary objective for seizure detection, using future preprocessed EEG clips as targets. Compared with self-supervised pre-training, auxiliary learning provides limited gains for 12-s detection and is inferior for 60-s detection.
- Auxiliary-task design: The auxiliary task predicts the next 6-s or 30-s preprocessed EEG clip from the preceding 6-s or 30-s clip, respectively.The seizure-detection loss and self-supervised prediction loss are combined with a validation-tuned weighting parameter λ.
- Detection results: Auxiliary learning only marginally improves Dist-DCRNN performance on 12-s seizure detection, without statistical significance.
- Detection results: Self-supervised pre-training significantly outperforms auxiliary learning for 60-s seizure detection.