Neighbor-Consistency Abstention for Sensor-Graph Seizure Detectors

Automated seizure detectors read scalp electroencephalography (EEG), the voltage recorded by about twenty electrodes on the head. They look excellent on curated corpora and then fail in the clinic. In the SzCORE challenge, published models reporting 80–90% F1 fell to 32% F1 on unseen ambulatory recordings (Quantifying the Generalization Gap in Seizure Detection). One natural fix is to let the detector say "I don't know" and hand the window to a human. The obvious version thresholds the detector's own confidence, and it has a blind spot. A single loose electrode can produce a sharp non-physiological spike that a neural network reads, with high confidence, as seizure activity. The detector has no way of knowing that one of its inputs is broken.

We propose to use the physical layout of the sensors to catch broken inputs. Brain activity reaches the scalp through tissue that blurs it spatially, so a real signal shows up, attenuated, on several neighboring electrodes. A contact failure or electrode pop usually appears on one electrode alone. We therefore train a small graph network to predict each electrode's signal from its physical neighbors. An electrode that its neighbors cannot explain is treated as faulty and dropped for that window. A cluster of neighboring electrodes that deviate together is treated as possible real activity and kept. A detector trained to work on incomplete electrode sets then decides on the surviving electrodes. The window is deferred to a human only if too few electrodes survive in some brain region, or if the detector is unsure. The deferral threshold is calibrated across held-out patients, so the system can report a false-alarm budget it is designed to meet.

Core Claim

The claim is that disagreement between a sensor and its spatial neighbors is a better abstention signal than either the detector's own confidence or uncertainty averaged across neighbors. It also lets the system abstain on individual electrodes rather than only on whole windows.

This turns around the closest graph work. Conformal Prediction Sets for Graph Neural Networks (DAPS) improves prediction sets by averaging each node's uncertainty score with its neighbors' scores. That helps only when connected nodes tend to agree, a property called homophily, and the authors report it gives little benefit when nodes disagree. During electrode faults and focal seizures, EEG neighbors disagree. Averaging would spread one bad electrode's noise onto its clean neighbors. We use that disagreement as evidence instead of smoothing it away.

The claim also extends COMPOSER. COMPOSER rejects whole sepsis-monitoring windows whose embeddings fall outside a conformally calibrated "trust set" of familiar patterns. It treats inputs as a flat vector, so one drifting variable rejects the entire window. Our design can drop one electrode and still predict from the rest.

Research Program

The system has three components.

Neighbor reconstructor. This is a lightweight masked graph network over the 19-electrode 10-20 layout (the standard international electrode placement). Edges come from Gaussian kernels over 3D electrode coordinates, following A Meta-GNN approach to personalized seizure detection. The network is trained on non-seizure, artifact-light training data to predict electrode $i$'s short-time spectrum from its graph neighbors $\mathcal{N}(i)$ alone. For each window, electrode $i$ receives a residual $r_i = \lVert x_i - \hat{x}_i(x_{\mathcal{N}(i)}) \rVert$. This residual is converted into a per-electrode conformal p-value $p_i$, the fraction of held-out-patient residuals for that electrode that are at least as large.

An electrode is marked faulty when two conditions hold. Its own p-value must be small, and its neighbors must not be anomalous as well:

$$ \text{fault}_i = \mathbb{I}\left[p_i < \alpha \ \text{and}\ \operatorname{median}_{j \in \mathcal{N}(i)} p_j \ge \beta\right], $$

where $\alpha$ is the threshold for an isolated anomaly and $\beta$ is the minimum neighbor p-value that counts as "neighbors look normal." The second condition is how the design handles disagreement between neighbors. A coherent regional deviation, which is what a focal seizure looks like, is never discarded by this rule.

Dropout-trained detector. The second component is a spatio-temporal graph detector in the style of Temporal Graph Convolutional Networks for Automatic Seizure Detection (TGCN). Its layers concatenate each electrode's own features with aggregated neighbor features. During training, random sets of electrodes are removed, so the detector learns to predict on subgraphs. TGCN used channel removal only after training, to visualize which electrodes mattered. Here the same operation becomes a training augmentation, and inference runs on whichever electrodes survive.

Window-level gate. The window is accepted only under two conditions. Each of five scalp regions must retain at least $m$ non-faulty electrodes. The detector's softmax confidence (its largest output probability) on the surviving subgraph must exceed a threshold $\tau$.

The pair $(m, \tau)$ is chosen with Selection with Guaranteed Risk (SGR) from Selective Classification for Deep Neural Networks. SGR searches over thresholds and uses a binomial bound so that the error rate on accepted inputs stays below a target with high probability. We make one change to account for correlated data. Overlapping sliding windows from the same patient are not independent, so the calibration unit is the held-out patient, not the window. The bound then applies to per-patient selective false-alarm rates. This guarantee is weaker than a window-level one, but it is honest. It still assumes that test patients resemble calibration patients, so cross-dataset deployment can break it. We measure how often that happens rather than assuming it away.

We will also analyze a concern the literature raises without testing. Missed seizures are short: the median duration of seizures caught by fewer than 25% of models is 48 seconds, against 118 seconds for easily detected ones (SzCORE challenge). A confidence-based gate may preferentially defer exactly these events. We will report deferral rates stratified by seizure duration for every method.

Baselines

The naive reference point is the forced-choice detector with no abstention. Every window receives a prediction at full coverage, and we report its false alarms per day and event-level F1.

The strongest flat competitor is ResNet-short + LSTM from Real-Time Seizure Detection using EEG. Among the 15 architectures that paper compared, it scored best on TUSZ bipolar montage, with AUROC 0.92 and AUPRC 0.91. We will retrain it on our splits with the same tuning budget as our detector and attach a softmax-confidence gate calibrated by SGR. This is the baseline to beat. Selective Classification for Deep Neural Networks shows that plain softmax confidence is hard to outperform: 1% error at 78% coverage on CIFAR-10. We found no reported risk-coverage result on Lacuna for EEG seizure detection, so we will establish this number ourselves.

The graph counterpart is TGCN with the same softmax-confidence gate. The original paper reports AUROC 0.928 on the Cleveland Clinic corpus. That corpus is not in our evaluation, so we re-establish the model's performance on our own splits.

Three published abstention methods are adapted to EEG, all with identical calibration patients:

  • DAPS-style diffusion. Detector confidence is averaged across physical neighbors before thresholding.
  • COMPOSER-style trust set. Windows are rejected when the detector's embedding fails a conformal test against calibration embeddings.
  • Deep ensemble or Monte Carlo dropout. Prediction variance across repeated passes is thresholded, as in Tousignant et al..

Four ablations isolate the key ingredient:

  • Flat reconstructor. Each electrode is predicted from all other electrodes rather than from physical neighbors. This tests whether geometry matters.
  • No cluster rule. The neighbor condition is removed, so every high-residual electrode is marked faulty.
  • Correlation heuristic. Each electrode is flagged by its raw correlation with its neighbors, with no learned model.
  • Augmentation only. The detector keeps dropout training, but channel flagging is removed.

Beating the baselines means one of two things on cross-dataset test sets. Either the system achieves a lower selective false-alarm rate at matched coverage, or higher coverage at a matched false-alarm budget. The improvement must hold across patients, judged by a paired bootstrap over patients. The system must also defer short seizures no more often than the softmax-confidence baseline does.

Why not just…?

Why not just threshold softmax confidence on a strong model? This is the main threat, and we take it seriously. The argument against it rests on the electrode-pop mechanism and on COMPOSER's finding that a trust-set check cut false alarms 5–10× relative to deep baselines. That finding came from sepsis data, not EEG. The augmentation-only ablation decides the question. If a detector trained with electrode dropout plus a confidence gate matches the full system, the flagging stage adds nothing. In that case we would report dropout training as the contribution and drop the stronger claim.

Why not just clean channels with Autoreject or ICA first? Autoreject repairs bad channels with thresholds and interpolation. Independent component analysis (ICA) separates the recording into statistically independent sources so that artifact sources can be removed. Interpolation can erase focal spikes, and multi-channel ICA strains the sub-second latency budget described in Real-Time Seizure Detection using EEG. Autoreject, however, is a fair per-channel flagger and costs little. We will run it as a drop-in replacement for our reconstructor inside the same gate. If it matches our flagger, the learned geometric model is not needed.

Why not just average uncertainty over neighbors as DAPS does? DAPS's own results show that averaging helps only when neighbors agree. Our artifact-injection experiment measures whether averaging spreads a single fault's uncertainty onto clean electrodes, and therefore whether it raises deferral of windows that were otherwise salvageable.

Why not just reject whole windows with a COMPOSER-style trust set? A whole-window rule cannot keep the clean 18 electrodes when one fails. The cost of such a rule should appear as lost coverage on windows with a single-electrode fault, and we measure that cost directly.

Proposed Experiments

We train on TUSZ v1.5.2 (675 subjects) and test on CHB-MIT, Siena and SeizeIT1 through the SzCORE framework. SzCORE uses a 19-electrode common-average montage at 256 Hz and provides event-based scoring. That paper shows cross-dataset event F1 falling from 59.3% to 21.2% for its random-forest baseline, which makes it the natural stress test. Calibration patients are drawn from the training dataset only. The Filadelfia set, where the challenge winner reached 32% F1 at 1.34 false positives per day, is private. We will request access but do not depend on it.

The first decisive check uses controlled artifact injection. We insert electrode pops, flatlines and impedance jumps into single electrodes of clean windows, which gives ground-truth fault labels. We measure the area under the ROC curve for fault detection with each flagger, and the coverage each system retains on injected windows.

The second check is the focal-seizure safety test. Using seizure-onset windows, we measure the fraction of seizure-involved electrodes wrongly flagged as faulty, with and without the cluster rule. If the flagger routinely removes onset electrodes, the design fails.

The third check covers risk and coverage on natural cross-dataset shift. We report risk-coverage curves and their area, false alarms per day on accepted time, event sensitivity on accepted time, and the violation rate of the per-patient false-alarm budget on held-out test patients.

The fourth check is the duration-stratified deferral analysis described above. It compares the proposed system against the softmax-confidence baseline on short versus long seizures.

Throughout, we report CPU latency per one-second stride against the sub-one-second requirement for real-time monitoring.