Mosaic:montage-agnostic self-distilled graph learning for subject-independent ieeg seizure detection

Arya Jalali, Mahsa ShoaranarXiv 2026 · arXiv

TL;DR

MOSAIC is a lightweight graph-learning framework designed to detect seizures in intracranial EEG (iEEG) data across different patients, regardless of their specific electrode placement. By dynamically inferring channel connections and stabilizing them through a novel self-distillation objective, it achieves state-of-the-art performance while being significantly faster than Transformer-based alternatives.

What Problem Does This Paper Address?

Seizure detection using intracranial EEG (iEEG) is a powerful tool for managing drug-resistant epilepsy, offering high signal-to-noise ratios and precise localization. However, a major hurdle for automated systems is montage heterogeneity. Because surgeons place electrodes based on each patient's unique clinical needs, no two patients have the same number of channels or electrode locations.

Most existing deep learning models (like CNNs or standard GNNs) assume a fixed electrode arrangement. When these models are tested on a new patient with a different "montage," their performance often collapses. While Transformers can handle arbitrary channel counts via self-attention, they are computationally expensive and often produce "noisy," unstable connectivity maps that fluctuate wildly between short time windows. MOSAIC aims to bridge this gap by being both montage-agnostic and temporally stable.

Methods

The MOSAIC (MOntage-agnostic Self-distilled Adaptive Inter-channel Connectivity) architecture consists of four main stages:

  1. Shared Temporal Encoder: Every iEEG channel is processed independently by a 1D CNN. A key innovation here is the use of both mean and max pooling to capture both general signal trends and the sharp, spike-like transients characteristic of seizure onset. Shared temporal encoder details
  2. Channel-Attention Adjacency: Instead of relying on a fixed physical map, the model uses a shared attention mechanism to infer a weighted adjacency matrix (a graph of how channels relate) for every window of data.
  3. EMA Self-Distillation: To prevent the inferred graph from being too sensitive to local noise, the authors introduce an Exponential Moving Average (EMA) teacher. During training, the model maintains a slowly updated "consensus" graph for each patient. A KL-divergence loss regularizes the current window's graph toward this stable patient-specific teacher. EMA self-distillation process
  4. Residual GCN: Finally, standard graph convolution layers propagate information across the inferred graph, followed by a linear head for seizure classification. Full MOSAIC architecture
Shared temporal encoder details
EMA self-distillation process
Full MOSAIC architecture

Datasets

The authors evaluated MOSAIC on four public iEEG corpora:

  • SWEC-ETHZ (Short-term & Long-term): Continuous multi-channel recordings used to test the model's ability to handle complex, varying montages.
  • Mayo & FNUSA: Large-scale datasets consisting of single-channel clips. These were used to demonstrate that MOSAIC remains competitive even when the graph-learning component is "degenerate" (i.e., reduced to a standard CNN for single channels).

Key Insights and Ideas

  • Stability is Key: The authors found that simply learning an adjacency matrix isn't enough. Without regularization, the learned graphs are noisy and provide no benefit over a simple uniform graph. The EMA self-distillation is the "secret sauce" that makes the attention mechanism useful by enforcing structural consistency across time.
  • Efficiency through Reuse: Unlike Transformers that recompute attention at every single layer, MOSAIC infers the adjacency matrix once and reuses it across all graph convolution layers. This allows it to train 3x faster than a Multitask Transformer.
  • Learned vs. Physical Graphs: MOSAIC demonstrates that a model can learn meaningful connectivity directly from the signal, bypassing the need for precise electrode coordinates which are often difficult to obtain in real-time clinical settings.

Key Results

MOSAIC outperformed all state-of-the-art baselines on the multi-channel SWEC-ETHZ datasets:

  • Performance Gains: It improved Cohen’s $\kappa$ (a measure of agreement that accounts for chance) by 1.8 points on short-term data and 3.3 points on long-term data compared to the strongest baseline.
  • Superiority over Graph Baselines: It crushed traditional graph models like DCRNN, showing improvements of over 30 points in $\kappa$ on long-term recordings.
  • Robustness: Ablation studies showed that the combination of the temporal encoder and the self-distillation was critical; removing the distillation caused the model's performance to drop back to the level of a simple uniform-graph control.

Limitations and Future Work

The authors note that while the EMA teacher is excellent at reducing variance (noise), it cannot correct for systematic bias. If the model consistently focuses on the wrong channel, the teacher will simply reinforce that mistake.

Future work may involve:

  • Incorporating external supervisory signals to guide the graph construction.
  • Evaluating the framework on scalp EEG, which has lower signal quality but is much more common than invasive iEEG.
  • Exploring more complex distillation targets beyond a simple per-patient average.

Summary updated

Abstract

Intracranial EEG provides high signal-to-noise ratio and spatial resolution for detecting epileptic activity, but patient-specific electrode placement leads to substantial variation in channel count and montage across subjects. This heterogeneity limits the generalization of existing detectors under subject-independent evaluation. We propose MOSAIC (MOntage-agnostic Self-distilled Adaptive Inter-channel Connectivity learning), a lightweight graph-learning framework for subject-independent iEEG seizure detection. MOSAIC pairs a shared convolutional channel encoder with a patient-agnostic channel-attention module that infers a weighted inter-channel adjacency matrix from the encoded features, requiring no fixed montage graph. An exponential moving average self-distillation objective regularizes each prediction toward a slowly updated per-patient teacher. Across four public iEEG corpora (SWEC-ETHZ long- and short-term, Mayo, FNUSA), MOSAIC outperforms state-of-the-art baselines in F2 and Cohen's $κ$ while learning more stable inter-channel adjacencies, demonstrating that self-distilled connectivity learning transfers across unseen implantations.
BibTeX
@misc{jalali2026mosaic,
  author = {Arya Jalali and Mahsa Shoaran},
  title = {{Mosaic:montage-agnostic self-distilled graph learning for subject-independent ieeg seizure detection}},
  year = {2026},
  eprint = {2611.09496},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.09496},
}
Figure