Papers
Topics
Authors
Recent
Search
2000 character limit reached

One-shot Learning for iEEG Seizure Detection

Updated 26 January 2026
  • 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 jj at time tt, a length-ll LBP code is computed:

dtk=xt+k+1xt+k;btk={1if dtk>0 0otherwised_{tk} = x_{t+k+1} - x_{t+k};\quad b_{tk} = \begin{cases} 1 & \text{if } d_{tk} > 0 \ 0 & \text{otherwise} \end{cases}

LBPt=k=0l1btk2k\mathrm{LBP}_t = \sum_{k=0}^{l-1} b_{tk}\cdot 2^k

  • Each electrode and each LBP symbol is assigned a random atomic vector EjE_j, Ci{0,1}dC_i \in \{0,1\}^d with d=10,000d=10,000.
  • Binding is implemented as bitwise XOR: Bj,t=EjCLBP(j,t)B_{j,t} = E_j \oplus C_{\mathrm{LBP}(j,t)}.
  • Bundling across electrodes by component-wise majority yields StS_t, and further aggregation over a 0.5s window yields the histogram hypervector HtH_t via thresholding over the sum of StS_t.
  • Prototypes for interictal (PnonP_{non}) and ictal (PictP_{ict}) states are constructed by majority-thresholding the aggregated HtH_t over respective temporal windows.
  • Classification operates by assigning HtH_t at each window to the closest prototype in Hamming space:

Lt={ictalif dict<dnon non-ictalotherwiseL_t = \begin{cases} \text{ictal} & \text{if } d_{ict} < d_{non} \ \text{non-ictal} & \text{otherwise} \end{cases}

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 \sim200kB—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 CC channels, the iEEG is sliced into overlapping patches xc,jx_{c,j}.
  • Channel-wise encoders (EEGNet/EEGWaveNet variants) transform each xc,jRWx_{c,j} \in \mathbb{R}^W into pc,jRdp_{c,j} \in \mathbb{R}^d.
  • Fusion uses a vector-symbolic algorithm harnessing circular convolution in the Fourier domain:

hc(j)mc:=hc(j) cconv rot(v,mc)h_c(j) \otimes m_c := h_c(j)\ \mathrm{cconv}\ \text{rot}(v, m_c)

where rot(v,mc)\text{rot}(v, m_c) is channel-specific, and mcm_c are trainable scalars.

  • Fused bundle H(j)=c=1Chc(j)mcH(j) = \bigoplus_{c=1}^C h_c(j) \otimes m_c 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 F()F(\cdot) trained to map input windows to latent vector zR2048z \in \mathbb{R}^{2048}.
  • Domain discriminator DD predicts subject identity from zz; seizure classifier CC 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 FF is optimized to maximize DD’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 ll, dimensionality dd, learning rates, domain loss weight λ\lambda).

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).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to One-shot Learning for iEEG Seizure Detection.