arXiv:2609.04007cs.LGSep 2026

Manuscript Offprint

arXiv:2609.04007

RobustSeiz: An Open-Source Framework for Benchmarking the Robustness of EEG Seizure Detection Models

Mohammad Mohammadi, Alireza Zarei

Abstract

Objective: Despite strong predictive performance on held-out electroencephalography (EEG) data, seizure detectors may fail under real-world acquisition variability, artifacts, and adversarial inputs. We introduce RobustSeiz, an open-source, model-agnostic framework whose main contribution is a standardized, reproducible protocol for stress-testing and comparing seizure detectors under controlled, clinically motivated distribution shifts before deployment.

Materials and Methods: We standardize four public scalp-EEG corpora (CHB-MIT, TUSZ, Siena, and SeizeIT1) into Brain Imaging Data Structure for EEG (BIDS-EEG) trees with 10-20 recordings at 256 Hz and evaluate subject-independent detectors on held-out splits. Environment, noise, and adversarial transforms model instrumentation and clinical variability and are swept over predefined hyperparameter grids. Each run reports sample- and event-level sensitivity, precision, F1, false positives per 24h, Lead and Lag onset timing, and Monte Carlo dropout predictive agreement.

Results: RobustSeiz provides a Dockerized graphics processing unit (GPU) pipeline, experiment registry, and full-evaluation and research-subset operating modes. We demonstrate the framework with a contemporary seizure detector on TUSZ across the complete implemented shift grid. A representative additive white Gaussian noise (AWGN) analysis shows how perturbation severity changes detection quality, onset timing, and predictive agreement; complete per-perturbation results are provided in the Supplementary Appendix.

Discussion: Held-out accuracy alone does not establish deployment readiness. Domain-guided robustness reporting can expose clinically consequential failure modes, including missed seizures and alarm flooding.

Conclusion: RobustSeiz contributes a shared benchmarking standard for evaluating seizure-detector robustness under realistic clinical stressors, extending pre-deployment assessment from clean-data accuracy toward reproducible, multidimensional robustness characterization.

Keywords: electroencephalography; epilepsy; seizure detection; robustness; adversarial attacks

Lay Summary

Seizure-detection software is increasingly used to watch EEG recordings in hospitals and at home. Even when a model looks accurate on clean research data, real recordings can be noisy, incomplete, or altered by equipment problems. In RobustSeiz we provide an open-source framework for benchmarking model robustness that deliberately recreates those real-world problems, so researchers and clinicians can see whether a detector remains trustworthy before it is used for patient care.

*Corresponding author: mohammad.mohammadi97@sharif.edu

References (62)