One-shot Learning for iEEG Seizure Detection
- The paper introduces a one-shot learning framework for iEEG seizure detection that achieves 100% sensitivity in some patients using hyperdimensional binary encoding.
- It employs subject-invariant feature extraction and channel-adaptive deep fusion methods to generalize seizure detection from a single seizure event.
- Comparative evaluations reveal that adversarial domain adaptation and hybrid approaches improve accuracy, reduce latency, and ensure low computational footprint for clinical integration.
One-shot learning for iEEG seizure detection refers to algorithmic frameworks that enable accurate classification or detection of epileptic seizures from intracranial EEG data when only one (or very few) annotated seizure examples are available per patient. This paradigm addresses clinical constraints where extensive seizure recordings for algorithmic training are impractical, leveraging strategies such as hyperdimensional binary encoding, domain-adaptive deep learning, and adversarial feature alignment to generalize robustly from minimal subject-specific data.
1. Problem Setting and Technical Motivation
Seizure detection using iEEG presents substantial challenges due to variability in both signal morphology and electrode configuration across patients. Traditional supervised approaches require multiple annotated seizures per subject for reliable classifier training, leading to poor generalization for new patients with limited data. One-shot learning strategies are designed to overcome this bottleneck by (i) exploiting subject-invariant features, (ii) constructing robust class prototypes or embeddings from single seizure examples, and (iii) incorporating cross-patient knowledge through statistical, vector-symbolic, and deep learning models. The rationale and benefits of such methods are delineated in multiple recent studies (Burrello et al., 2018, Carzaniga et al., 22 Dec 2025, Zhu et al., 2021).
2. Hyperdimensional Binary Encoding Approaches
The algorithm by Rahimi et al. utilizes local binary patterns (LBP) combined with brain-inspired hyperdimensional computing to realize fully binary, highly memory-efficient one-shot seizure detection (Burrello et al., 2018). The pipeline comprises:
- Bandpass filtering and downsampling of raw iEEG.
- For electrode at time , a length- LBP code is computed:
- Each electrode and each LBP symbol is assigned a random atomic vector , with .
- Binding is implemented as bitwise XOR: .
- Bundling across electrodes by component-wise majority yields , and further aggregation over a 0.5s window yields the histogram hypervector via thresholding over the sum of .
- Prototypes for interictal () and ictal () states are constructed by majority-thresholding the aggregated over respective temporal windows.
- Classification operates by assigning at each window to the closest prototype in Hamming space:
with post-processing by majority voting over a brief (e.g., 5s) window.
This pipeline achieves 100% sensitivity and specificity for one-shot learning in 10/16 patients, with low latency and a memory footprint 200kB—orders of magnitude smaller than competing SVM and MLP approaches (Burrello et al., 2018).
3. Channel-Adaptive Deep Fusion Methods
The composable channel-adaptive (CA) architecture developed by Papyan et al. advances one-shot seizure detection by fusing single-channel encodings using vector-symbolic fusion and accumulating long-term context via temporal convolutions (Carzaniga et al., 22 Dec 2025). The model operates as follows:
- For channels, the iEEG is sliced into overlapping patches .
- Channel-wise encoders (EEGNet/EEGWaveNet variants) transform each into .
- Fusion uses a vector-symbolic algorithm harnessing circular convolution in the Fourier domain:
where is channel-specific, and are trainable scalars.
- Fused bundle is normalized and aggregated over a long-term window by causal TCN layers.
- The classifier, trained on the aggregated context features, outputs seizure probability estimates.
Training is performed in two stages:
- Extensive multi-subject pre-training for seizure/non-seizure discrimination.
- Rapid leave-all-but-one-out (LABOC) fine-tuning on all windows from a single seizure of the new subject.
Empirical LABOC evaluations reveal superior median F1-scores for CA-EEGNet (0.79) and CA-EEGWaveNet (0.78) compared to subject-specific baselines trained on all but one seizure (0.74 and 0.76, respectively). Fine-tuning processes complete in under 10 minutes per subject (Carzaniga et al., 22 Dec 2025).
4. Adversarial Unsupervised Domain Adaptation
Zhu & Shoaran introduced an adversarial learning framework for cross-subject, few-shot seizure detection using domain-invariant feature alignment (Zhu et al., 2021). The procedure includes:
- Handcrafted feature extraction per 1s iEEG window (e.g., line length, bandpower in standard frequency bands).
- Feature encoder trained to map input windows to latent vector .
- Domain discriminator predicts subject identity from ; seizure classifier predicts seizure/non-seizure.
- Training protocol:
- Binary cross-entropy loss for one-shot labeled examples from the target subject.
- Domain-adversarial loss (cross-entropy over subject classes) to enforce indistinguishability of source and target domains.
- Training employs a gradient reversal layer (GRL) so that is optimized to maximize ’s loss while minimizing classification loss.
After adaptation, a downstream LightGBM classifier is trained on the concatenated features, integrating all source and single target labeled windows. Results indicate a 9.4% absolute improvement in one-shot classification AUC (mean 0.899) compared to conventional subject-specific classifiers (mean 0.822), validating the efficacy of adversarial domain alignment (Zhu et al., 2021).
5. Quantitative Results and Comparative Analysis
The principal methods yield the following one-shot performance metrics:
| Model | Median F1 (CA, LABOC) | Mean AUC (Domain-Adapt) | Sens/Spec (Hyperdim) |
|---|---|---|---|
| CA-EEGNet (Carzaniga et al., 22 Dec 2025) | 0.79 | N/A | N/A |
| CA-EEGWaveNet (Carzaniga et al., 22 Dec 2025) | 0.78 | N/A | N/A |
| Adversarial DA (Zhu et al., 2021) | N/A | 0.899 | N/A |
| Hyperdim. LBP (Burrello et al., 2018) | N/A | N/A | 100% / 100% (10/16) |
Each approach generalizes rapidly from a single seizure provided sufficient cross-patient priors or subject-invariant representations. Memory and computational efficiency is notable in binary hyperdimensional models (∼200 kB) versus deep fusion models (multiple MB), while CA architectures deliver higher temporal context sizes (∼2 min), potentially enabling earlier and more robust seizure onset detection.
6. Implementation and Clinical Integration Considerations
For practical deployment:
- Hyperdimensional approaches (Burrello et al., 2018): All computations are binary/integer and amenable to low-power hardware, enabling implantable real-time seizure detectors with rapid prototype adaptation (no gradient descent).
- CA deep learning methods (Carzaniga et al., 22 Dec 2025): Require GPU or optimized multicore hardware for real-time inference, but deliver strong adaptation to heterogeneous electrode layouts and support long-context temporal modeling.
- Adversarial DA (Zhu et al., 2021): Best suited for cross-patient clinical settings with limited labeled target data; improvements hinge on the capacity and proper regularization of the encoder.
- All methods report performance on iEEG datasets with 32–128 channels, 500–512 Hz sampling rates, and various clinical montages. Data pre-processing commonly includes bandpass filtering, windowing, and normalization.
7. Methodological Insights and Limitations
Hyperdimensional binary operations exploit the near-orthogonality of high-dimensional random vectors, and prototype formation via majority-vote makes the model highly noise-tolerant and parameter-free. CA fusion algorithms leverage channel-keyed vector-symbolic operations for scalable multivariate feature integration. Adversarial adaptation aligns subject domains to facilitate knowledge transfer. Each method exhibits sensitivity to hyperparameter choices (e.g., code length , dimensionality , learning rates, domain loss weight ).
Potential limitations include residual domain shift in adversarial adaptation, longer seizure detection delays in memory-centric approaches (e.g., CA architectures incur ≈18s latency post-onset), and requirement for hand-engineered features in domain-adaptive pipelines. Further research directions suggest extending feature encoders toward raw iEEG, optimizing context lengths for faster detection, and exploring adaptive channel selection regimes.
Papers cited: (Burrello et al., 2018, Carzaniga et al., 22 Dec 2025, Zhu et al., 2021).