Abstract
Electroencephalography (EEG) is a popular method to monitor brain activity, but it can be difficult to evaluate EEG-based analysis methods because no ground-truth brain activity is available for comparison. Therefore, in order to test and evaluate such methods, researchers often use simulated EEG data instead of actual EEG recordings, ensuring that it is known beforehand which effects are present in the data. As such, simulated data can be used, among other things, to assess or compare signal processing and machine learning algorithms, to model EEG variabilities, and to design source reconstruction methods. In this paper, we present SEREEGA, short for Simulating Event-Related EEG Activity. SEREEGA is a MATLAB-based open-source toolbox dedicated to the generation of simulated epochs of EEG data. It is modular and extensible, at initial release supporting five different publicly available head models and capable of simulating multiple different types of signals mimicking brain activity. This paper presents the architecture and general workflow of this toolbox, as well as a simulated data set demonstrating some of its functions.
Introduction
Electroencephalography (EEG) is a cornerstone of neuroscience, yet it faces a fundamental validation crisis: the lack of "ground truth" for actual human brain activity. Without knowing exactly what occurs inside the brain during recording, it is difficult to determine if a new analysis method is uncovering a genuine signal or merely identifying patterns in noise. While researchers often create idiosyncratic "toy data" to test methods, these simulations frequently lack realistic spatial information and documentation. SEREEGA (Simulating Event-Related EEG Activity) addresses this by providing a general-purpose, modular framework that makes complex EEG simulation accessible, reproducible, and anatomically grounded.
Methodology and Architecture
SEREEGA operates by solving the forward problem of EEG, calculating how electrical activity at a specific brain source ($s$) projects onto scalp electrodes ($x$) via a projection matrix ($A$): $x = As + \epsilon$.
The toolbox features a modular architecture where users define "components" consisting of a source location, dipole orientation, and signal type. It supports five distinct signal classes, including Event-Related Potentials (ERPs), oscillatory activity (ERSPs), various colors of noise, and autoregressive models for connectivity.
Spatial Realism and Head Models
Unlike simulations using random mixing weights, SEREEGA utilizes established lead field theory to ensure scalp maps resemble real EEG data. This is critical for validating source localization algorithms. The toolbox integrates several high-density head models, including the ICBM-NY (New York Head) with 75,000 sources and various Pediatric Head Atlases.
Procedural variability is a core strength; users can define template participants and generate cohorts with random variations in source locations and orientations, mimicking real-world anatomical differences and biological effects like habituation or fatigue.
Validation and Results
To validate the toolbox, the authors simulated a "Visual Go/No-Go" experiment across 10 participants. Analysis using standard tools (EEGLAB, DIPFIT) confirmed:
- Signal Recovery: ERP analysis successfully recovered simulated N70-P100-N135 and P3 complexes.
- Frequency Analysis: Replicated "mu" and "beta" band desynchronization during motor responses.
- BCI Performance: A windowed-means classifier achieved 69% accuracy—significantly above chance but realistic, proving the data's utility for testing machine learning algorithms under non-trivial signal-to-noise ratios.
Conclusion
SEREEGA provides a standardized environment for EEG simulation. While it currently treats components as independent at runtime and abstracts away low-level biophysics, its modularity allows for future community-driven extensions. It stands as a vital tool for the rigorous validation of EEG analysis pipelines.
Summary updated