Source-linked AI summary
EEG-GAN: Generative adversarial networks for electroencephalograhic (EEG) brain signals
Kay Gregor Hartmann, Robin Tibor Schirrmeister, Tonio Ball
TL;DR
Generating naturalistic EEG remains an underexplored application of GANs, despite potential uses for artificial brain-signal data. EEG-GAN applies convolutional GANs with modified Wasserstein training and evaluates architectural choices and several metrics. The authors report stable generation of artificial EEG signals resembling real single-channel EEG in time and frequency, while concluding that multiple metrics are needed and that future work should address multichannel recordings.
Problem
Raw EEG generation with GANs was largely unexplored, although artificial brain signals could support data augmentation and investigation of data distributions.
Method
EEG-GAN uses regular convolutional neural networks, a modified improved Wasserstein GAN training procedure, progressive signal generation, and multiple evaluation metrics.
Results
The framework generated artificial EEG signals in a stable fashion that strongly resembled single-channel real EEG in the time and frequency domains.
Takeaways & Limitations
Evaluating EEG generators with FID, sliced Wasserstein distance, and Euclidean distance together gave a better indication of overall properties than any single metric.
Takeaways & Limitations
The study generated single-channel signals, leaving complete multichannel EEG modeling and broader quality evaluation for future work.
Abstract
from arXiv · showhide
Generative adversarial networks (GANs) are recently highly successful in generative applications involving images and start being applied to time series data. Here we describe EEG-GAN as a framework to generate electroencephalographic (EEG) brain signals. We introduce a modification to the improved training of Wasserstein GANs to stabilize training and investigate a range of architectural choices critical for time series generation (most notably up- and down-sampling). For evaluation we consider and compare different metrics such as Inception score, Frechet inception distance and sliced Wasserstein distance, together showing that our EEG-GAN framework generated naturalistic EEG examples. It thus opens up a range of new generative application scenarios in the neuroscientific and neurological context, such as data augmentation in brain-computer interfacing tasks, EEG super-sampling, or restoration of corrupted data segments. The possibility to generate signals of a certain class and/or with specific properties may also open a new avenue for research into the underlying structure of brain signals.
1. Introduction
EEG-GAN applies GANs to raw EEG generation, addressing a gap in time-series generative modeling. It modifies Wasserstein GAN training and examines architectural choices to produce naturalistic EEG signals.
- Artificial data generation can augment training sets with natural-looking samples absent from the original data.
- GANs achieved major successes for image generation, while relatively few studies had addressed time-series generation.
- Before this work, raw EEG generation with GANs had not been published to the authors’ knowledge.
- EEG-GAN applies GANs to generate artificial EEG signals using regular convolutional neural networks rather than autoregressive models.
- The framework modifies improved Wasserstein GAN training to increase stability and compares evaluation metrics and network architectural choices.
- CNNs are selected partly because their local and hierarchical structure may support interpretability in neuroscientific and clinical contexts.
2. Methods
The methods address GAN training instability and EEG-specific architectural choices, especially distribution-distance-sensitive gradient penalties and upsampling. Evaluation combines visual inspection with EEG-adapted inception, Fréchet, and sliced Wasserstein measures.
- GAN background and improvement: Mode collapse can arise when discriminator instability narrows the input modes recognized as real, limiting generator diversity.This motivates stabilizing the critic during GAN training.
- GAN background and improvement: The proposed WGAN-GP improvement scales the one-sided gradient penalty by the current critic difference, relaxing the constraint as distributions become closer.The penalty is therefore emphasized when distinguishing real and generated distributions remains difficult.
- GAN background and improvement: Critics trained with the proposed loss exhibit stable gradients as the distance between distributions decreases.This addresses the vanishing-gradient behavior observed for WGAN-GP critics under decreasing distribution distance.
- Training and architecture choices: Nearest-neighbor upsampling introduces stronger high-frequency aliasing than linear or cubic interpolation, motivating interpolation choices for EEG generation.Figure 2 examines mean frequency spectra after average-pooling downsampling and different upsampling methods.
- Evaluation: Evaluation uses an EEG-adapted inception classifier alongside FID and sliced Wasserstein distance because inception score alone is sensitive to noise and misses mode collapse.The pretrained Deep4 model replaces the usual inception model for EEG data, while FID compares embedding distributions and sliced Wasserstein distance uses one-dimensional projections.
3. Data
The EEG training data came from a simple rest-versus-left-hand-movement motor task, using channel FCC4h from a 128-electrode system sampled at 250 Hz. The data were scaled to [−1, 1], and Table 2 reports architecture comparisons including WGAN-GP.
- Dataset: The signals came from a motor task in which subjects either rested or moved their left hand, recorded with a 128-electrode EEG system and downsampled to 250 Hz.Only channel FCC4h was used for GAN training; the dataset contained 438 signals.
- Dataset: The dataset was scaled to [−1, 1] by subtracting its mean and dividing by its maximum absolute value.
- Architecture comparisons: Table 2 compares GAN architectures using average pooling or strided convolution for downsampling and nearest-neighbor, linear, or cubic interpolation for upsampling.
- Architecture comparisons: All models except WGAN-GP were trained with the authors’ method, and WGAN-GP collapsed during training.
4. Results
The results show that the modified training avoided collapse across tested architectures, while metric performance depended on architectural choice. Generated signals matched real temporal and spectral distributions to varying degrees, but class-specific high-gamma activity was not reproduced.
- 4.1. Distance results: The WGAN-GP model collapsed according to visual inspection, FID, and sliced Wasserstein distance, whereas none of the models trained with the authors’ method collapsed.The authors note that they performed neither hyperparameter searches nor multiple runs for either training method; IS gave no strong evidence of collapse.
- 4.1. Distance results: Different architectures performed best on different metrics: CONV-LIN for IS, AVG-NN for FID and EDmin, and CONV-CUB for SWD.CONV-CUB was worst on all metrics except SWD.
- 4.1. Distance results: Similarity between generated and real value distributions increased from architecture 1 to 4, with AVG-NN deviating clearly and CONV-CUB fitting well.
- 4.2.2. FREQUENCY SPECTRA: AVG-NN and CONV-NN deviated from real frequency spectra at low frequencies, while CONV-LIN and CONV-CUB fit better; no model properly matched frequencies above 100 Hz.The text reports a possible low- versus high-frequency fit distinction between CONV-LIN and CONV-CUB, while noting that power above 100 Hz was very low.
- 4.2.3. GENERATED SAMPLES: Random samples from AVG-NN and CONV-CUB appeared visually sound, although CONV-CUB often generated weakly oscillating sequences indicative of fake signals.
- 4.3. Class-specific properties: Generated left-hand-movement signals matched the real decrease in alpha and beta activity up to around 40 Hz but lacked the real increase in high-gamma activity.Signals were selected using the inception classifier for class probabilities above 90%.
5. Discussion & Conclusion
EEG-GAN generated stable, naturalistic single-channel EEG signals resembling real EEG in both time and frequency domains. Evaluation also showed that no single metric reliably captured signal quality, making combined assessment necessary.
- Training and generation: A modified improved WGAN training procedure enabled progressively stable generation of artificial EEG signals resembling real single-channel EEG.The resemblance was observed in both the time and frequency domains.
- Evaluation metrics: Models with the lowest Frechet inception distances did not necessarily reproduce real signals' spatial and spectral properties.The model with the most natural spatial and spectral distributions received the worst FID.
- Evaluation metrics: No single metric sufficiently characterized model quality, whereas combining FID, SWD, and ED provided a better indication of overall properties.The authors therefore discourage optimizing EEG-GAN toward IS or FID alone.
- Evaluation metrics: The model with the most natural spatial and spectral distributions achieved the best sliced Wasserstein distance.
6. Outlook
The outlook extends EEG-GAN beyond single-channel generation toward complete multi-channel recordings and broader applications. Future work will examine architectural effects and assess generated signals across subjects with medical experts.
- 6. Outlook: Future work will extend generation from single-channel signals to complete multi-channel EEG recordings.
- 6. Outlook: Further investigation is needed into convolution size and up- and down-sampling because convolution size influenced which frequency ranges the generator expressed correctly.
- 6. Outlook: The models are being applied to EEG recordings from different subjects, with quality evaluation planned by an ensemble of medical experts.
- 6. Outlook: EEG-GANs may support data augmentation, spatial or temporal super-sampling, and restoration of corrupted signals.
- 6. Outlook: The framework may also support research into brain-signal structure by generating signals with specified classes or properties.