Source-linked AI summary

Spatiotemporal Hyperedges for EEG Seizure Detection and Prediction

Hyunju Kim, Sheo Yon Jhin, Noseong Park, Nabil Imam

arXiv:2609.37730v1cs.AI

TL;DR

Seizure detection and prediction are difficult because rare events occur within long EEG recordings, while pairwise dynamic graphs miss direct cross-time, cross-channel coupling. HyBrain uses a compact set of spatiotemporal hyperedges for detection and prediction, achieving the best AUROC across reported settings on two datasets.

  • Problem

    Seizures are rare intervals in long EEG recordings, and pairwise dynamic graphs do not directly represent cross-time, cross-channel coupling.

    Source: §1 · pp. 1–2
  • Method

    HyBrain pools channel-time tokens into shared group embeddings through learnable spatiotemporal hyperedges and uses a shared encoder across EEG tasks.

    Source: §1 · p. 2
  • Results

    HyBrain achieves the best AUROC across reported detection and prediction settings on TUSZ and CHB-MIT against ten baselines, with the largest gain on long-clip preictal prediction.

    Source: §1 · p. 2, §6 · p. 9
  • Takeaways & Limitations

    A single learned hyperedge remains active across the preictal, ictal, and postictal trajectory, indicating one group embedding can support both detection and prediction.

    Source: §6 · p. 9

Abstract

from arXiv · show

Seizure detection and prediction from EEG are clinically important but challenging because seizures are rare, temporally localized, and propagate as coordinated events across multiple channels. Recent dynamic graph neural networks model this by running a temporal model over a sequence of per-time-step pairwise channel edges. However, this pairwise construction misses the spatiotemporal coupling that constitutes a seizure, at substantial training cost. We propose HyBrain, which summarizes spatiotemporal EEG evidence through a small set of soft hyperedges rather than pairwise edges. A per-channel Mamba backbone produces one token per (channel, second), and a spatiotemporal hyperedge block pools these tokens into E_h shared group embeddings through soft memberships and broadcasts them back. The same encoder serves three downstream tasks: window-based detection, one-second point-wise detection, and preictal seizure prediction. On TUSZ and CHB-MIT, HyBrain achieves the best AUROC on every reported setting against ten baselines, with the largest gap on long-clip preictal prediction. It also matches the most efficient baselines in training time and peak GPU memory. A qualitative analysis shows that even a single learned hyperedge cleanly captures the preictal -> ictal -> postictal trajectory on a real seizure clip.

1 Introduction

HyBrain addresses the difficulty of finding rare seizure events in long EEG recordings and the limits of pairwise dynamic graphs for representing seizure-related channel-time coupling. It uses learnable spatiotemporal hyperedges for three EEG tasks and achieves the best AUROC on all reported settings.

1 Introduction

  • Seizures are rare intervals in long, high-dimensional EEG recordings, making manual review impractical and timely automated recognition clinically important.Epilepsy affects approximately 50 million people worldwide.Source: §1 · p. 1
  • Dynamic GNNs track time-varying pairwise channel relations but do not directly model cross-time, cross-channel coupling and retain edge-level activations at added computational and memory cost.Source: §1 · p. 1
  • HyBrain replaces dense per-time-step pairwise graphs with learnable spatiotemporal hyperedges that pool channel-time tokens into shared group embeddings and broadcast group context back to tokens.A per-channel Mamba backbone produces one token per channel-second, followed by hyperedge aggregation and a Set-Transformer–style readout.Source: §1 · p. 2
  • The same encoder supports window-based detection, one-second point-wise detection, and preictal prediction, with only the task-specific readout head changed.Source: §1 · p. 2
  • HyBrain achieves the best AUROC across reported detection and prediction settings on TUSZ and CHB-MIT against ten baselines, with its largest gain on long-clip preictal prediction.It also matches the most efficient baselines in training time and peak GPU memory.Source: §1 · p. 2

2 Related Work

Prior EEG seizure models range from temporal sequence and static-graph approaches to dynamic pairwise GNNs, while hypergraph work has generally relied on predefined incidences. HyBrain learns channel-time hyperedges and addresses both one-second detection and preictal prediction as complementary tasks.

2.1 EEG Deep Learning Models

  • Sequential EEG models emphasize temporal processing, while static-graph methods make electrode topology explicit through fixed adjacency structures.Examples include EEGNet and CNN–LSTM for sequential modeling, and TGCN and self-supervised graph neural networks for static graphs.Source: §2.1 · p. 2
  • Dynamic GNNs update channel graphs within clips, but still use pairwise edges, leaving higher-order multi-channel coordination and its temporal consistency modeled indirectly.Some methods track temporal dynamics over edge sequences with per-edge GRU or Mamba models.Source: §2.1 · p. 2
  • Unlike prior hypergraph methods using predefined groups or k-NN features, HyBrain learns input-conditioned hyperedges over the channel-time grid with a small fixed budget per clip.Prior EEG hypergraph work cited here applies separate spatial and temporal hypergraphs to emotion recognition.Source: §2.1 · p. 2

2.2 EEG Seizure Tasks

  • Point-wise detection preserves one-second onset and offset localization, complementing recent dynamic-GNN detectors that train with a single label per 12 s or 60 s window.HyBrain reports per-second results alongside window-level results.Source: §2.2 · p. 2
  • Preictal prediction tests whether weak evidence distributed across channels can be aggregated over long clips, rather than detecting patterns already expressed in an ictal interval.Prediction distinguishes preictal from interictal EEG under a specified seizure prediction horizon and seizure occurrence period.Source: §2.2 · pp. 2–3
  • HyBrain’s overview processes one-second channel-time spectral tokens with a per-channel Mamba encoder, then aggregates them through hyperedges and temporal attention for task-specific heads.The heads support window-based detection, point-wise detection, and preictal seizure prediction.Source: Figure 2 · p. 3

3 Proposed Methods

HyBrain maps EEG into channel-time tokens and uses a small set of shared hyperedges to model spatiotemporal interactions. The section defines its three binary tasks, describes their shared encoder and task-specific heads, and analyzes hyperedge interaction rank and cost.

3.1 Problem Formulation

  • EEG clips are represented as N-channel, T-second tensors of per-second STFT features and support clip-level, per-second, and preictal-versus-interictal binary tasks.The preictal state is the 60-second window immediately before seizure onset.Source: §3.1 · p. 3

3.2 Overall Workflow

  • A per-channel Mamba encodes each channel-second token; soft hyperedges pool and broadcast cross-channel-time context, temporal attention refines it, and PMA-style heads serve the three tasks.The hyperedge block avoids explicit dynamic graph construction.Source: §3.2 · p. 3

3.3 Channel-Time Token Encoding

  • The Mamba stack processes each channel’s spectral sequence along time independently, then adds a learnable channel embedding before cross-channel mixing.No cross-channel mixing occurs in the per-channel recurrence itself.Source: §3.3 · pp. 3–4

3.4 Spatiotemporal Hyperedge Aggregation

  • The hyperedge block learns soft token memberships, forms membership-weighted group embeddings, and broadcasts them back, allowing overlapping spatiotemporal patterns.Sigmoid memberships permit a token to belong to multiple hyperedges.Source: §3.4 · p. 4

3.5 Task-Specific Heads and Training Objective

  • Clip-level heads pool over time before readout, while point-wise detection preserves per-second outputs and adds adjacent-frame logit smoothness to encode label contiguity.The regularizer penalizes consecutive logit differences while allowing sharp seizure onset and offset transitions.Source: §3.5 · p. 4

3.6 Theoretical Analysis

  • The induced global mixing operator has rank at most E_h while coupling every pair of channel-time tokens in one step.The operator routes interactions through E_h shared hyperedges.Source: §3.6 · pp. 4–5
  • Dense pairwise graphs yield an edge-stream-to-hyperedge compute improvement of O(N/E_h) and an edge-related activation-memory reduction of approximately O(Nd/E_h), under the stated membership-tensor dominance assumption.For sparse graphs, the corresponding compute and activation-memory ratios are approximately c/E_h and cd/E_h, respectively.Source: §3.6 · p. 5, Table 1 · p. 5

4 Experiments

The experiments compare HyBrain with baselines on seizure-detection and prediction tasks. HyBrain leads reported AUROC settings, with strong results on long-clip preictal prediction.

4.1 Experimental Settings

  • Inputs are 200 Hz EEG converted to one-second, 100-bin log-magnitude STFTs; point-wise baselines retain their backbones but use shared per-timestep readouts.For point-wise labels, a second is positive when its one-second window overlaps an annotated seizure interval.Source: §4.1 · pp. 5–6

4.2 Seizure Detection and Prediction

  • F1 is comparable to top window-based methods; point-wise HyBrain has highest CHB-MIT F1, while Dense-EvoBrain narrowly leads TUSZ 12 s F1.HyBrain matches GRU-GCN's training time (29.1 vs. 31.1 s/epoch), runs about 2× faster than EvoBrain (29.1 vs. 58.0 s/epoch), and uses roughly an order of magnitude less peak GPU memory than either.Source: §4.2 · p. 6
  • For per-second prediction, Mamba preserves the time axis, hyperedges pool coordinated channel evidence, and temporal attention refines logits for consistency.The point-wise baselines are adapted with a per-timestep readout head; HyBrain adds temporal smoothness regularization for its reported strongest results.Source: §4.2 · pp. 6–7, §4.1 · p. 6
  • HyBrain attains the highest AUROC across reported settings; on TUSZ 60 s prediction, it has substantial AUROC and F1 leads over every baseline.Table 4 reports seizure prediction on TUSZ; Tables 2 and 3 cover window-based and point-wise detection, respectively.Source: Table 2 · p. 6, §4.2 · pp. 6–7, Table 4 · p. 7
  • A single hyperedge pools the full 60 s preictal window into one group embedding, whereas 12 s captures only part of that interval.The authors describe 12 s as a short-context stress test, with absolute performance low across methods.Source: §4.2 · p. 7
  • Table 5 reports a hyperedge-block ablation for TUSZ window-based detection, with each Δ row measuring change relative to the best HyBrain configuration in that column.Source: Table 5 · p. 7

5 Additional Analyses

The analyses test the hyperedge block, compare HyBrain’s accuracy and efficiency with baselines, visualize learned memberships, and assess sensitivity to hyperedge count.

5.1 Ablation Study

  • Removing the hyperedge block costs 1.1 pt AUROC and 5.1 pt F1 on TUSZ 12 s, and 4.2 pt AUROC and 9.2 pt F1 on TUSZ 60 s; swapping the backbone costs less.The ablation removes soft memberships, aggregation, broadcast, and post-residual mixing; “w/o Mamba” substitutes a GRU.Source: §5.1 · pp. 7–8

5.2 Effectiveness of HyBrain

  • HyBrain achieves state-of-the-art AUROC on TUSZ 60 s; excluding LSTM, only GraphS4mer matches its efficiency on both axes (1.00× time, 1.02× memory).The comparison covers computational efficiency for TUSZ 60 s detection.Source: Table 6 · p. 8, Figure 3 · p. 8, §5.2 · p. 8

5.3 Visualization: From Pairwise Relations to Spatiotemporal Hyperedges

  • One learned hyperedge shows fluctuating preictal bursts, sustained spatially broad membership during the ictal interval, and suppression after offset.Unlike the pairwise EvoBrain visualization at fixed time points, HyBrain’s memberships span the full trajectory.Source: §5.3 · p. 8

5.4 Hyperedge Sensitivity

  • Across E_h ∈ {1, 3, 5, 7, 9}, AUROC stays within [0.868, 0.908] and F1 within [0.537, 0.636]; E_h = 3 gives the best 60 s result.A single hyperedge also captures the phase-discriminative behavior shown in the seizure-clip visualization.Source: §5.4 · p. 8, §5.3 · p. 8

6 Conclusion

HyBrain replaces per-time-step pairwise graph construction with a small set of learnable spatiotemporal hyperedges. It achieves state-of-the-art AUROC across the reported seizure tasks, while a single learned hyperedge spans a seizure’s phases.

6 Conclusion

  • HyBrain reaches state-of-the-art AUROC on window-based detection, one-second point-wise detection, and preictal prediction on TUSZ and CHB-MIT.The largest margin is on long-clip prediction, and peak GPU memory is up to an order of magnitude lower than for edge-stream dynamic-GNN baselines.Source: §6 · pp. 8–9
  • One learned hyperedge remains active across the preictal–ictal–postictal trajectory, unlike EvoBrain’s pairwise connectivity views at selected time points.The conclusion describes this as evidence that one group embedding suffices to support detection and prediction.Source: Figure 4 · p. 9, Figure 5 · p. 9, §6 · p. 9

A Additional Hyperedge Visualizations

Across clips and seizure subtypes, learned membership shows a recurring progression across seizure phases.

B Additional Hyperedge Visualizations

B Hyperparameters

The appendix reports HyBrain’s hyperparameter search, selected settings, and training procedure.

B Hyperparameters

  • HyBrain’s grid search varies learning rate, weight decay, dropout, hidden dimension, and temporal-attention gate, selecting configurations by dev AUROC.The searched values are specified for each parameter in the appendix.Source: B Hyperparameters · p. 9
  • The selected hidden dimension is 128, except 192 for 12 s window detection; the temporal-attention gate is 1 for detection and 0 for prediction.The selected learning rate and dropout also vary by dataset and task; weight decay is 5×10^-4.Source: B Hyperparameters · p. 9
  • Models use Adam, gradient clipping at 5, up to 40 epochs, and early stopping on dev AUROC with patience 5.Batch sizes vary by task and dataset; test batch size is 64.Source: B Hyperparameters · p. 9
Loading 2609.37730v1…