Automated seizure detection from scalp electroencephalography (EEG) is difficult because seizure morphology varies among patients and seizure samples are substantially outnumbered by non-seizure samples. This paper presents an attention-enhanced dual-branch network that jointly learns time--frequency and temporal representations from the same EEG segment. A continuous wavelet transform converts each segment into a scalogram processed by an ImageNet-pretrained ConvNeXt-Tiny backbone and squeeze-and-excitation attention. In parallel, a bidirectional long short-term memory network followed by multi-head self-attention models the raw signal. The two feature vectors are concatenated and classified by a weighted multilayer perceptron. Experiments use 14 subjects from the CHB-MIT scalp EEG database with subject-wise partitioning performed before overlapping segmentation. The model obtains 97.88% accuracy and 97.51% F1-score over ten across-subject splits, and 97.51% accuracy, 96.59% F1-score, and 98.02% area under the ROC curve under 14-fold leave-one-subject-out validation. Removing temporal attention causes the largest ablation loss. The model requires 28.26 million parameters and 4.56 GFLOPs, with a measured network-only inference latency of 4.64 ms per segment.
Figures & tables
Fig. 1: Proposed pipeline. Each filtered EEG window is represented simultaneously as a raw sequence and a CWT scalogram. The two attention-refined branches are concatenated before binary classification.
Protocol
Acc.
Prec.
Sens.
Spec.
F1
AUC
Across-subject
97.88±0.52
97.32±0.57
97.70±0.43
98.12±0.42
97.51±0.49
98.52±0.30
LOSO
97.51±2.01
96.21±2.11
96.97±2.05
97.76±1.93
96.59±2.08
98.02±1.84
TABLE I: Subject-Independent Detection Performance (Mean ± Standard Deviation, %)
Test subject
Accuracy
Precision
Sensitivity
Specificity
F1-score
AUC
CHB01
97.89
96.67
97.45
98.45
97.06
98.67
CHB03
99.23
98.12
98.78
99.56
98.45
99.67
CHB06
93.45
91.89
92.78
94.23
92.33
94.89
CHB08
99.45
98.34
99.01
99.78
98.67
99.89
CHB10
98.12
96.89
97.67
98.78
97.28
98.89
CHB11
95.67
94.12
95.01
96.34
94.56
96.78
TABLE II: Complete Subject-Wise LOSO Results (%)
Fig. 2: Training and validation accuracy (left) and loss (right) for a representative LOSO fold.
Model
Input
Accuracy (%)
F1 (%)
CNN
Scalogram
84.21
84.09
ResNet50
Scalogram
92.58
93.71
BiLSTM
Raw EEG
88.07
90.86
ConvNeXt-only
Scalogram
93.66
93.21
Proposed
Both
97.88
97.51
TABLE III: Baseline Models Under the Same Across-Subject Protocol
Variant
Accuracy (%)
F1 (%)
Full model (SE + MHSA)
97.88
97.51
MHSA only (without SE)
96.40
95.33
SE only (without MHSA)
94.99
94.76
Without SE and MHSA
94.08
93.97
TABLE IV: Attention Ablation Under the Across-Subject Protocol
Study
Technique
Protocol
Acc. (%)
F1 (%)
Shen et al. [ 14 ]
CWT + GoogLeNet
LOSO
93.20
–
Shen et al. [ 14 ]
STFT + GoogLeNet
LOSO
97.74
–
Song et al. [ 12 ]
STFT + ResCon-LSTM
Across
96.59
96.37
Abdulwahhab et al. [ 13 ]
STFT + CNN-LSTM
Hold-out
97.12
97.27
Zhao et al. [ 15 ]
S-trans. + ConvNeXt
8:1:1
98.83
–
Proposed
CWT + raw EEG
LOSO
97.51
96.59
TABLE V: Comparison with Representative CHB-MIT Studies
Deep learning for EEG-based seizure detection faces critical challenges: severe annotation scarcity and extreme class imbalance, where ictal events comprise less than 10% of clinical recordings. We present DiffEEG, a 9.6M-parameter self-supervised foundation model that addresses both limitations through denoising diffusion pre-training and reinforcement learning (RL)-based fine-tuning. Pre-trained on 1.3M unlabeled segments from the Temple University Hospital Seizure Corpus (TUHSZ), DiffEEG learns generic neural representations via a 1D U-Net with multi-head self-attention. For downstream adaptation, a reinforced decision layer employs policy gradient optimization to directly maximize F1-score, prioritizing sensitivity to rare seizure events over overall accuracy. Under strict patient-wise evaluation (279 patients, Leave-One-Fold-Out), DiffEEG achieves 61% accuracy and 59% F1 for 4-class seizure subtyping, and 81% accuracy with 85% weighted F1 for binary detection, maintaining clinically viable seizure recall (59%) despite extreme imbalance (6.7% prevalence). Segment-level evaluation establishes an upper bound of 97.6% accuracy, confirming strong architectural capacity. DiffEEG demonstrates that diffusion-based pre-training combined with metric-aware reinforcement learning enables clinically deployable seizure monitoring with minimal labeled data requirements.
Abdulkader Helwan, Lina Abou-Abbas, Hussein El Amouri +2
Department of Electrical and Computer Engineering, Lebanese American University, Byblos, Lebanon · Institute of Applied Artificial Intelligence, T´ELUQ University, Montreal, Canada
Seizure detection and prediction from EEG are clinically important but challenging because seizures are rare, temporally localized, and propagate as coordinated events across multiple channels. Recent dynamic graph neural networks model this by running a temporal model over a sequence of per-time-step pairwise channel edges. However, this pairwise construction misses the spatiotemporal coupling that constitutes a seizure, at substantial training cost. We propose HyBrain, which summarizes spatiotemporal EEG evidence through a small set of soft hyperedges rather than pairwise edges. A per-channel Mamba backbone produces one token per (channel, second), and a spatiotemporal hyperedge block pools these tokens into E_h shared group embeddings through soft memberships and broadcasts them back. The same encoder serves three downstream tasks: window-based detection, one-second point-wise detection, and preictal seizure prediction. On TUSZ and CHB-MIT, HyBrain achieves the best AUROC on every reported setting against ten baselines, with the largest gap on long-clip preictal prediction. It also matches the most efficient baselines in training time and peak GPU memory. A qualitative analysis shows that even a single learned hyperedge cleanly captures the preictal -> ictal -> postictal trajectory on a real seizure clip.
Hyunju Kim, Sheo Yon Jhin, Noseong Park +1
School of Computational Science and Engineering Georgia Institute of Technology Atlanta, GA, USA · School of Computing Korea Advanced Institute of Science and Technology Daejeon, Republic of Korea
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