A Composable Channel-Adaptive Architecture for Seizure Classification

Francesco Carzaniga, Michael Hersche, Kaspar Schindler, Abbas Rahimi

TL;DR

This paper introduces a channel-adaptive (CA) deep learning architecture for seizure classification that can seamlessly process intracranial EEG (iEEG) recordings with an arbitrary number and configuration of electrodes. By decoupling channel-wise feature extraction from spatial fusion using vector-symbolic architectures, the model enables large-scale pre-training across multiple subjects and achieves ultra-fast personalization to new patients using 5× fewer training epochs and minimal data.

What Problem Does This Paper Address?

Intracranial electroencephalography (iEEG) is a vital tool for locating seizure onset zones in patients with drug-resistant epilepsy. However, applying deep learning (DL) to iEEG data is notoriously difficult due to three main bottlenecks:

  1. Fixed Channel Setups: Unlike standard scalp EEG, iEEG electrode placement is entirely customized to each patient's clinical needs. Standard DL models require a fixed number and layout of input channels, forcing researchers to train separate models from scratch for every single patient.
  2. Limited Data Sources: Because models cannot generalize across different channel configurations, they cannot leverage large, multi-subject datasets for pre-training, severely limiting data efficiency.
  3. Short Context Windows: To keep computational complexity manageable, current DL models typically analyze only a few seconds of data at a time. In contrast, human neurologists look at minutes of context to accurately identify unusual or slow-evolving seizure presentations.

The authors tackle these challenges by designing a composable, channel-adaptive architecture that scales to any electrode configuration while expanding the temporal context window to over a minute.

Methods

The proposed architecture is split into three distinct, modular components:

Fig. 1: Architecture of the CA classifier. The classifier consists of three components. The Encoder component acts channel-wise and extracts short-term temporal features from each channel. The holographic (HRR) Fusion component combines the channel- wise features while preserving the spatial structure. Finally, the Memory component (TCN) extracts the relevant long-term temporal features and outputs the classification decision.
  • Encoder (Short-Term Features): To handle an arbitrary number of channels, the architecture processes each channel completely independently. It divides the signal into short patches (e.g., 7.5 seconds) and passes them through a standard base model (like EEGNet or EEGWaveNet) to extract temporal features channel-by-channel, ignoring any inter-channel interaction at this stage.
  • HRR Fusion (Spatial Features): To merge the independent channel features without losing spatial relationships, the authors introduce a learnable fusion schema based on Holographic Reduced Representations (HRR)—a type of Vector Symbolic Architecture (VSA). Each channel is assigned a single learnable scalar parameter ($m_{ch}$) that represents a rotation angle in Fourier space. Channel features are bound to these rotated vectors via circular convolution and then summed (bundled) together. This allows the network to flexibly learn spatial relationships with minimal parameters.
  • Memory (Long-Term Features): Multiple fused short-term patches are stacked into a long-term memory buffer (e.g., 14 patches of 7.5 seconds, totaling 105 seconds of context). This memory stack is processed using a Temporal Convolutional Network (TCN), which efficiently captures long-term temporal dependencies without the computational pitfalls of recurrent neural networks (RNNs).

Datasets

The architecture was evaluated on two public datasets from the Inselspital Bern (SWEC):

  • Short-term SWEC iEEG: Contains 16 subjects with 14 hours of total recording and 104 ictal (seizure) events, including 3 minutes of pre-ictal and post-ictal data for each event.
  • Long-term SWEC iEEG: A massive, continuous dataset containing 18 subjects and 2,321 hours of recording with 244 ictal events. To manage the vast amount of non-seizure data during pre-training, the authors used a curation strategy based on the Delta power of the signal to select representative 100-minute windows per subject.

Key Insights and Ideas

  • Decoupling is Key: Processing channels independently before fusing them completely bypasses the rigid input constraints of traditional convolutional networks. This allows the exact same encoder weights to be used regardless of whether a patient has 32 or 128 electrodes.
  • Maximally Efficient Spatial Encoding: Traditional spatial fusion methods (like graph neural networks or dense layers) scale poorly with variable channel counts. The HRR fusion mechanism requires only one learnable parameter per channel, making it incredibly lightweight while remaining fully differentiable.
  • Biologically Plausible Learning: As training progresses, the model autonomously learns the spatial structure of the brain. Visualizations of the channel key vectors show that the model naturally groups channels belonging to the same physical electrode array and identifies long-range functional connections.

Key Results

The authors evaluated their channel-adaptive models (CA-EEGNet and CA-EEGWaveNet) in a highly challenging, realistic clinical scenario: pre-training on a pool of subjects, and then fine-tuning on only a single seizure of an unseen test subject (Leave-All-But-One-Out Cross-Validation, or LABOC).

Fig. 2: Seizure classification performance of our CA models on the Long-term SWEC iEEG Dataset. The CA models are fine-tuned on a single seizure of the subject (LABOC), compared with all but one seizures for the baseline models (LOOC). The mean (dashed line), median (solid line), and quartile boxes are visible.
  • Superior Performance with Less Data: On the long-term dataset, CA-EEGWaveNet achieved a median F1-score of 0.78, outperforming the baseline EEGWaveNet (0.76), which had to be trained on all but one of the subject's seizures. Similarly, CA-EEGNet outperformed its baseline with an F1-score of 0.79 vs 0.74.
  • 5× Faster Deployment: Because the base encoder is pre-trained on other subjects, personalizing the model to a new patient requires 5× fewer training epochs than training a baseline model from scratch.
  • Ablation Validation: Removing any of the core components caused performance to collapse. Without pre-training, HRR fusion, or TCN memory, the median F1-scores dropped drastically to the 0.45–0.51 range, proving that all three dimensions (short-term, long-term, and spatial) are critical.

Limitations and Future Work

  • Non-Linear Scaling: While performance improved as the number of pre-training subjects increased from 5 to 15, the returns were non-linear, suggesting that the scaling advantage may saturate. The authors note that more powerful encoder architectures might be required to fully exploit even larger datasets.
  • Model Capacity Constraints: The CA models are intentionally kept compact (~1M parameters) to remain practical for clinical deployment. However, this limited size might restrict the model's ability to absorb massive, diverse multi-center datasets without underfitting.

Summary updated

Abstract

Objective: We develop a channel-adaptive (CA) architecture that seamlessly processes multi-variate time-series with an arbitrary number of channels, and in particular intracranial electroencephalography (iEEG) recordings. Methods: Our CA architecture first processes the iEEG signal using state-of-the-art models applied to each single channel independently. The resulting features are then fused using a vector-symbolic algorithm which reconstructs the spatial relationship using a trainable scalar per channel. Finally, the fused features are accumulated in a long-term memory of up to 2 minutes to perform the classification. Each CA-model can then be pre-trained on a large corpus of iEEG recordings from multiple heterogeneous subjects. The pre-trained model is personalized to each subject via a quick fine-tuning routine, which uses equal or lower amounts of data compared to existing state-of-the-art models, but requiring only 1/5 of the time. Results: We evaluate our CA-models on a seizure detection task both on a short-term (~20 hours) and a long-term (~2500 hours) dataset. In particular, our CA-EEGWaveNet is trained on a single seizure of the tested subject, while the baseline EEGWaveNet is trained on all but one. Even in this challenging scenario, our CA-EEGWaveNet surpasses the baseline in median F1-score (0.78 vs 0.76). Similarly, CA-EEGNet based on EEGNet, also surpasses its baseline in median F1-score (0.79 vs 0.74). Conclusion and significance: Our CA-model addresses two issues: first, it is channel-adaptive and can therefore be trained across heterogeneous subjects without loss of performance; second, it increases the effective temporal context size to a clinically-relevant length. Therefore, our model is a drop-in replacement for existing models, bringing better characteristics and performance across the board.
BibTeX
@article{carzaniga2025composable,
  author = {Francesco Carzaniga and Michael Hersche and Kaspar Schindler and Abbas Rahimi},
  title = {{A Composable Channel-Adaptive Architecture for Seizure Classification}},
  journal = {IEEE J. Biomed. Health Informatics},
  year = {2025},
}
Figure