Manuscript Offprint

arXiv:2609.37730

Spatiotemporal Hyperedges for EEG Seizure Detection and Prediction

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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 EhE_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

Epilepsy affects approximately 50 million people worldwide, and timely recognition of seizure activity is critical for preventing injuries and life-threatening complications [9,10,19,24][9, 10, 19, 24]. In clinical practice, seizure monitoring is performed on continuous multi-channel electroencephalography (EEG), a long and high-dimensional time series in which seizures occupy only brief intervals scattered across hours to days of recording [3][3]. Reliably surfacing these rare events from large-scale streaming biosignal data is impractical for manual review, making automated EEG seizure detection a long-standing problem at the intersection of biomedical informatics and time-series data mining [27,28][27, 28].

Three families of methods have shaped EEG seizure modeling. Early models treat EEG as a multi-channel time series and

Sheo Yon Jhin ∗^{*}

sheoyon.jhin@kaist.ac.kr

School of Computing

Korea Advanced Institute of Science and Technology

Daejeon, Republic of Korea

Nabil Imam

nimam6@gatech.edu

School of Computational Science and Engineering

Georgia Institute of Technology

Atlanta, GA, USA

Figure

Figure 1: Membership of one spatiotemporal hyperedge over the channel-time tokens of a 60s TUSZ clip. The membership regime shifts across phases (dashed lines), coupling the tokens of each phase into a distinguishable group-level embedding. This emerges because our model learns hyperedges well-suited for seizure detection.

apply CNNs or RNNs along the time axis only, leaving the relations among electrodes implicit [2, 20]. A second line constructs a static pairwise graph over channels and runs a GNN on top, capturing electrode relations but not how they change during a seizure [6, 30]. To capture time-varying connectivity, recent methods introduce dynamic graph neural networks (GNNs) that replace the static adjacency with a pairwise channel graph at each time step [23, 25, 29]. These models see both spatial and temporal variation, but each relation is still defined between two channels within the same time step. A heavier subfamily further applies a temporal model to the per-time-step edge sequence [13, 18], explicitly tracking how each pairwise edge evolves over time. However, this still does not directly model cross-time, cross-channel coupling, such as one channel at one time influencing another channel at a later time. It also decomposes a multi-channel seizure event into many bilateral edge trajectories and requires retaining edge-level activations over time, which increases the computational and memory cost of the graph pipeline.

∗^{*}Both authors contributed equally to this research.

We address these limitations with HyBrain, which learns a small set of spatiotemporal hyperedges over channel-time tokens. This formulation models channel-time coupling and group-level interaction directly, and does not require dense per-time-step pairwise graphs. The encoder follows a node → hyperedge → node flow. A per-channel Mamba backbone [14] first produces one token per (channel, second) pair. A spatiotemporal hyperedge block then pools all NT tokens into EhE_h shared group embeddings through soft memberships, and broadcasts the same EhE_h group embeddings back to every token weighted by its own memberships, so each token absorbs the group-level context relevant to it (cf. Figure 1). A Set-Transformer-style Pooling by Multi-head Attention (PMA) readout [21] finally aggregates the updated tokens for each task head. This design summarizes the entire channel-time field through Eh≪NTE_h \ll NT group embeddings rather than reconstructing it from per-time-step pairwise edges.

We evaluate HyBrain on TUSZ [27] and CHB-MIT [28] across three tasks: window-based detection, one-second point-wise detection, and preictal seizure prediction. The same encoder supports all three tasks because HyBrain learns task-relevant hyperedge memberships over channel-time tokens, while only the lightweight readout head is changed for each task (cf. Figure 1).

Our contributions are:

(1) We introduce learnable hyperedges over channel-time tokens that model cross-time and cross-channel coupling without pairwise decomposition.

(2) We use the same encoder for window-based detection, point-wise detection, and preictal prediction by learning task-relevant hyperedge memberships, with only the readout head changed per objective.

(3) Against ten baselines, HyBrain achieves the best AUROC across all reported detection and prediction settings on TUSZ and CHB-MIT, with the largest gain on long-clip preictal prediction, while matching the most efficient baselines in time and memory.

Code is available at https://github.com/hhyy0401/seizure.

References (4)