---
title: CA-EEGNet for iEEG Seizure Classification
url: https://www.emergentmind.com/topics/ca-eegnet
type: topic
---

# CA-EEGNet for iEEG Seizure Classification

CA-EEGNet is a channel-adaptive deep neural architecture for seizure classification in intracranial electroencephalography (iEEG), unifying per-channel encoding, vector-symbolic fusion, and long-range temporal modeling. It enables seamless transfer across heterogeneous electrode montages and supports efficient personalized adaptation, outperforming prior state-of-the-art models in seizure detection tasks while offering a clinically relevant temporal context [2512.19123].

## 1. Model Architecture

CA-EEGNet processes iEEG signals $X \in \mathbb{R}^{C \times T}$ (where $C$ is the number of channels and $T$ is the number of timepoints) through four principal modules:

1. **Windowing**: Overlapping data segments $x_{i,j} \in \mathbb{R}^W$ are extracted from each channel ($i = 1, \ldots, C$; $j = 1, \ldots, \lfloor T/S \rfloor$) with window size $W = 7.5$ s (at 512 Hz) and stride $S = 1$ s.
2. **Channel-wise Encoder (EEGNet)**: Each window $x_{i,j}$ is processed independently by EEGNet, yielding an embedding $p_{i,j} \in \mathbb{R}^d$. EEGNet comprises three stages: temporal convolution with $F_1 = 16$ filters and kernel length $K_1 = 64$ samples, a depthwise spatial layer, and $F_2 = 2$ pointwise filters, followed by nonlinearities, batch normalization, average pooling, and dropout (rate 0.25).
3. **Channel-Adaptive Fusion**: Features are fused using a hyperdimensional vector-symbolic method, binding the per-channel outputs $p_{i,j}$ into a single vector $f_j \in \mathbb{R}^d$ via circular convolution with fractional Fourier-domain powers of a unitary basis vector. Each channel’s spatial role is encoded by a trainable scalar $m_{\mathrm{ch}^i} \in [1,2]$.
4. **Temporal Memory (TCN)**: The temporal context is extended by inputting the sequence of $M=14$ fused vectors $\{f_{j-M+1}, ..., f_j\}$ (totaling 105 s) into a 4-layer temporal convolutional network (kernel size 3, dilation doubling each layer) that outputs classification $\hat y_j \in \{0,1\}$ (seizure/non-seizure).

## 2. Vector-Symbolic Channel Fusion

CA-EEGNet's spatial fusion employs a Holographic Reduced Representation (HRR) framework, allowing adaptation to arbitrary and changing channel layouts. For each channel $i$, a key vector $k_i = \mathrm{rot}(v, m_{\mathrm{ch}^i})$ is generated by rotating the Fourier-domain unitary basis $v$ to the scalar power $m^i$. Each feature $p_{i,j}$ is bound to its key via circular convolution $b_{i,j} = p_{i,j} \circledast k_i$, and the fused vector is summed: $f_j = \sum_{i=1}^C b_{i,j}$. This preserves spatial information and permits recovery (unbinding) of individual contributions via the (approximate) circular-correlation inverse. A plausible implication is that CA-EEGNet can accommodate inter-subject variability in channel configuration, supporting robust pretraining and transfer across datasets.

## 3. Temporal Contextual Memory

The temporal convolutional network (TCN) aggregates sequential fused embeddings for context-aware decision-making. With $M=14$ and 7.5 s windows, the effective context reaches 105 seconds, approximating the temporal extent considered by clinical experts. Each TCN layer applies a 1D convolution with exponentially increasing dilation ($d_l = 2^{l-1}$, $L=4$), capturing phenomena over both fine and coarse timescales. A final linear and sigmoid layer yields seizure probabilities.

Ablation studies reveal that omitting the memory module (i.e., $M=1$) degrades the F1-score to approximately 0.51 (from 0.78 when $M=14$), indicating the necessity of long-term temporal aggregation for reliable seizure detection.

## 4. Training Protocol and Personalization

CA-EEGNet employs a two-stage training process:

- **Pre-training**: The encoder and memory modules are pre-trained on heterogeneous subject datasets (Short-term SWEC: 16 subjects, ~14 hours, 104 seizures; Long-term SWEC: 18 subjects, ~2300 hours, 244 seizures). At each iteration, samples from a randomly selected subject ensure equitable representation. AdamW optimization ($\mathrm{lr}=5.5\times 10^{-4}$, decay $10^{-2}$) is used, with training until the validation F1-score plateaus (minimum 25, maximum 50 epochs).
- **Fine-tuning (“personalization”)**: After pre-training, the encoder and memory are frozen. Only the per-channel fusion scalars $m_{\mathrm{ch}}$ are adapted, using subject-specific data. Fine-tuning is conducted under two regimes: LOOC (leave-one-out; all but one event used for adaptation) and LABOC (leave-all-but-one-out; a single seizure for adaptation). This adaptation converges in $\sim$5× fewer epochs (up to 10, $\mathrm{lr}=5.5\times 10^{-4}$) than training EEGNet from scratch.

Baselines (EEGNet, EEGWaveNet) are trained per subject with no pretraining, with different learning rates and window lengths.

## 5. Quantitative Performance and Ablation Results

CA-EEGNet achieves superior performance to prior models across datasets and fine-tuning settings. Representative results are listed for short-term (LOOC) and long-term (LABOC) settings:

| Model           | F1-score (short-term) | F1-score (long-term) | #Params (M) |
|-----------------|----------------------|---------------------|-------------|
| EEGNet          | 0.80 (0.17)          | 0.74 (0.18)         | 2.0         |
| CA-EEGNet       | **0.82 (0.15)**      | **0.79 (0.13)**     | 1.7         |

Ablations indicate that removal of pretraining or the fusion module results in a substantial drop in F1-score (to 0.47 and 0.45, respectively), while removing the memory module also impairs detection (F1 = 0.51). This suggests each component—pretraining, spatial fusion, and temporal memory—is integral.

## 6. Clinical Relevance and Deployability

CA-EEGNet's channel-adaptive design permits deployment across arbitrary electrode arrays without reconfiguration, accommodating heterogeneous subject data. Pretraining with rapid fine-tuning shortens model adaptation to new patients by hours, facilitating clinical translation. The expanded temporal context (up to 2 minutes) aligns automated review with clinical workflows that rely on assessing multi-minute iEEG records. Median F1 improvements of 0.02–0.05 over strong baselines signify clinically meaningful gains in seizure detection, where misclassifications carry significant patient risk.

## 7. Summary and Implications

CA-EEGNet exemplifies a composable framework for multivariate time-series analysis in bioelectrical signal domains with spatially variable sensors. The integration of per-channel encoding, vector-symbolic spatial adaptation, and extended TCN memory provides a drop-in architecture for seizure detection, applicable across diverse electrode montages and patient populations. Its accelerated personalization and performance gains over baselines highlight CA-EEGNet's potential impact in both research and clinical neuroengineering [2512.19123].

Source: https://www.emergentmind.com/topics/ca-eegnet