EEG-GAN: Generative adversarial networks for electroencephalograhic (EEG) brain signals

Kay Gregor Hartmann, Robin Tibor Schirrmeister, Tonio BallarXiv 2018

Introduction

Electroencephalography (EEG) data is a cornerstone of neuroscience and clinical diagnostics, yet it remains notoriously difficult to utilize in machine learning contexts. EEG signals are expensive to collect, often scarce, and highly susceptible to noise. While Generative Adversarial Networks (GANs) have revolutionized image and audio generation, applying them to raw EEG time series is challenging due to the signals' non-stationary nature and the inherent instability of GAN training.

This research introduces EEG-GAN, a specialized framework designed to generate "naturalistic" EEG signals. By producing realistic synthetic data, this tool aims to enable data augmentation for Brain-Computer Interface (BCI) classifiers, facilitate signal restoration for corrupted segments, and provide a deeper understanding of the underlying structures of brain activity.

Methods and Materials

The researchers developed EEG-GAN by building upon the Wasserstein GAN with Gradient Penalty (WGAN-GP), introducing several key innovations tailored for EEG data:

  1. Modified Gradient Penalty: To prevent vanishing gradients as the generator improves, the authors proposed scaling the penalty by the current "critic difference." This ensures the gradient constraint is only heavily enforced when the real and fake distributions are significantly different.
  2. Progressive Growing: Adopting the "ProGAN" approach, the model was trained in stages, starting at a low resolution (24 time samples) and doubling it over six steps to reach a final resolution of 768 samples.
  3. Upsampling Optimization: The study compared three methods for increasing signal resolution: Nearest-Neighbor, Linear, and Cubic interpolation.
  4. Evaluation Metrics: Given the complexity of EEG, the authors utilized a suite of metrics including Inception Score (IS), Frechet Inception Distance (FID), Sliced Wasserstein Distance (SWD), and Euclidean Distance (EDmin).

The study utilized EEG data from a motor imagery task where subjects either rested or moved their left hand. Data was recorded via a 128-electrode system at 250 Hz, focusing on channel FCC4h, a location known for distinct alpha, beta, and gamma wave changes during motor tasks.

Key Insights: The Role of Upsampling

A critical finding of the study was the impact of upsampling techniques on the physiological realism of the generated signals. While nearest-neighbor upsampling is standard in image-based GANs, it introduces high-frequency "aliasing" artifacts in time-series data.

Frequency spectra comparison of different upsampling methods.

As shown in the spectral analysis, Cubic Interpolation produced the most naturalistic frequency spectra. Unlike other methods, it did not force the generator to learn how to "filter out" artificial jaggedness, leading to a more accurate representation of the original signal's frequency characteristics.

Results and Performance

The EEG-GAN framework successfully generated signals that mimic real-world physiological phenomena. Specifically, generated signals for "left hand movement" correctly exhibited a decrease in alpha and beta power (8–30 Hz), matching the known phenomenon of event-related desynchronization.

Comparison of real and generated EEG frequency spectra across different model architectures.

The CONV-CUB model—utilizing strided convolutions for downsampling and cubic interpolation for upsampling—achieved the best performance with a Sliced Wasserstein Distance of 0.078. While it did not always yield the absolute lowest FID, it provided the most realistic visual and spectral fit. Furthermore, the modified WGAN-GP loss ensured training stability across all architectural variations, preventing the model collapse observed with the standard WGAN-GP on this dataset.

Discussion and Future Work

While EEG-GAN represents a significant step forward, several limitations remain. The current model is restricted to single-channel generation, whereas real-world applications require multi-channel outputs that capture spatial correlations across the scalp. Additionally, the model struggled to perfectly capture frequencies above 100 Hz, which are critical for certain clinical applications like detecting epileptic ripples.

Future research will focus on training on larger, multi-subject datasets to develop a more universal model of brainwave patterns and conducting expert validation to determine if synthetic signals can be distinguished from real clinical recordings by medical professionals.

Summary updated

BibTeX
@misc{hartmann2018eeg,
  author = {Kay Gregor Hartmann and Robin Tibor Schirrmeister and Tonio Ball},
  title = {{EEG-GAN: Generative adversarial networks for electroencephalograhic (EEG) brain signals}},
  year = {2018},
  eprint = {1806.01875},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.01875},
}
Figure