Introduction
Automating seizure detection in Electroencephalograms (EEGs) is a critical yet challenging task in clinical neurology. Traditional deep learning approaches typically rely on supervised learning, which necessitates vast amounts of expert-labeled data. However, acquiring such labels is labor-intensive, expensive, and prone to inter-rater subjectivity. Furthermore, standard models often treat EEG signals as simple time-series or spectrograms, neglecting the complex spatial and functional connectivity of the brain.
This paper introduces EEG-CGS (Contrastive and Generative Self-supervised Learning for EEG Graphs), a novel framework designed to detect seizures and localize anomalous channels without requiring labeled seizure data during training. By learning the inherent patterns of "normal" brain activity, the model identifies seizures as significant deviations from these learned norms.
Methodology
The EEG-CGS framework operates on the principle that understanding normal brain states is sufficient for anomaly detection. The process involves four key stages:
- Multi-View Graph Construction: To capture diverse brain relationships, the model constructs four graph types: physical distance-based (Dist), random (Rand), functional correlation (Corr), and directional influence (DTF).
- Sub-Graph Sampling: Using Random Walk with Restart (RWR), the system samples local "positive" (relevant) and "negative" (distant) sub-graphs for each electrode.
- Self-Supervised GNN Autoencoder: The model employs a Graph Neural Network (GNN) trained with dual objectives: Contrastive Learning (maximizing similarity between a target node and its positive sub-graphs) and Generative Learning (reconstructing masked target node features from their surrounding context).
- Anomaly Scoring: During inference, high contrastive or reconstruction losses flag a channel as anomalous. A clip is classified as a seizure if a sufficient number of channels exhibit anomalous behavior.
Experimental Results
The model was evaluated on the TUSZ (Temple University Hospital EEG Seizure Corpus), the largest public seizure dataset, and a synthetic dataset designed for channel-level localization.
EEG-CGS achieved state-of-the-art (SOTA) performance, outperforming several supervised baselines. Specifically, the combined graph model (EEGt-CGS) reached an F1 score of 0.534, surpassing supervised models like EEGNet (0.474) and Corr-DCRNN (0.448). The model also demonstrated high sensitivity (0.501) and exceptional specificity (0.974).
Beyond clip-level detection, the framework proved highly effective at localizing anomalous channels. In synthetic tests, it achieved an F1 score of 0.883 for localization, successfully distinguishing between focal and generalized seizures in real-world visualizations.
Discussion and Conclusion
The success of EEG-CGS underscores several key insights. First, self-supervised learning on "normal" data is a viable and powerful alternative to supervised learning for medical anomaly detection. Second, focusing on local sub-graph context is essential for pinpointing the epileptogenic zone. Finally, representing brain activity through multi-dimensional connectivity (physical, functional, and directional) provides a more robust and accurate model of neural dynamics.
While the computational cost of generating multiple graph views may be a consideration for real-time applications, the inherent robustness of the sub-graph approach makes it well-suited for clinical environments where data may be noisy or incomplete. Future work will explore extending this methodology to other neurological assessments and incorporating more complex node attributes.
Summary updated