Common Spatial Generative Adversarial Networks based EEG Data Augmentation for Cross-Subject Brain-Computer Interface

Yonghao Song, Lie Yang, Xueyu Jia, Longhan XiearXiv 2021

Abstract

The cross-subject application of EEG-based brain-computer interface (BCI) has always been limited by large individual difference and complex characteristics that are difficult to perceive. Therefore, it takes a long time to collect the training data of each user for calibration. Even transfer learning method pre-training with amounts of subject-independent data cannot decode different EEG signal categories without enough subject-specific data. Hence, we proposed a cross-subject EEG classification framework with a generative adversarial networks (GANs) based method named common spatial GAN (CS-GAN), which used adversarial training between a generator and a discriminator to obtain high-quality data for augmentation. A particular module in the discriminator was employed to maintain the spatial features of the EEG signals and increase the difference between different categories, with two losses for further enhancement. Through adaptive training with sufficient augmentation data, our cross-subject classification accuracy yielded a significant improvement of 15.85% than leave-one subject-out (LOO) test and 8.57% than just adapting 100 original samples on the dataset 2a of BCI competition IV. Moreover, We designed a convolutional neural networks (CNNs) based classification method as a benchmark with a similar spatial enhancement idea, which achieved remarkable results to classify motor imagery EEG data. In summary, our framework provides a promising way to deal with the cross-subject problem and promote the practical application of BCI.

Introduction

Brain-Computer Interfaces (BCIs) translate neural activity into control signals for external devices. However, a major hurdle in their widespread adoption is the "cross-subject" problem: EEG signals are highly non-stationary and vary significantly between individuals due to physiological differences like skull thickness and neural wiring. Consequently, a BCI model trained on one subject often fails when applied to another without extensive, exhausting calibration sessions for the new user.

To address this, we introduce CS-GAN (Common Spatial Generative Adversarial Network), a framework designed to generate high-quality synthetic EEG data. By using a small "seed" of subject-specific data, CS-GAN produces thousands of realistic samples to augment training, significantly reducing calibration time while improving classification accuracy.

Methodology: The CS-GAN Framework

Standard GANs often struggle with the multi-channel spatial relationships inherent in EEG data. CS-GAN overcomes this by integrating Common Spatial Patterns (CSP) logic directly into the adversarial training process.

Dual-Module Discriminator and Spatial Constraints

The architecture features a generator and a specialized dual-module discriminator. While one module evaluates raw EEG data, the second evaluates data projected into a "Common Spatial" (CS) subspace. This dual approach forces the generator to respect the spatial physics of the brain.

Architecture of the CS-GAN framework, highlighting the Generator, dual-module Discriminator, and spatial constraints.

To further refine the quality of generated signals, two custom loss functions are employed:

  • Covariance Loss (cov-loss): Ensures synthetic data maintains the same spatial correlations between channels as real EEG signals.
  • Eigenvalue Loss (ev-loss): Enhances the discriminability between different task categories (e.g., left vs. right hand imagery) by optimizing the distribution of eigenvalues in the spatial filters.

Experimental Results

The framework was evaluated on the BCI Competition IV Dataset 2a (22-channel motor imagery). The baseline performance using a Leave-One-Subject-Out (LOO) approach was only 52.12%. Fine-tuning with 100 real subject-specific samples improved this to 59.40%. However, augmenting those 100 samples with 3000 synthetic samples from CS-GAN pushed the accuracy to 67.97%, a total improvement of 15.85% over the baseline.

Ablation Study

To validate the "secret sauce" of our method, we compared CS-GAN against standard augmentation techniques like Gaussian noise, Variational Autoencoders (VAE), and DCGAN. We also performed an ablation study to measure the impact of our specific spatial constraints.

Comparison of classification accuracy across different data augmentation methods and ablation variants.

As shown in the results, removing the CS module or the specific loss functions (cov-loss and ev-loss) led to a noticeable drop in performance, confirming that spatial feature preservation is critical for effective EEG data augmentation.

Conclusion

CS-GAN provides a robust solution to the cross-subject challenge in BCI research. By prioritizing spatial relationships and class discriminability in the generative process, the framework allows for high-performance classification with minimal subject-specific data. Future work will focus on addressing cross-session variability and optimizing the model for real-time, wearable BCI applications.

Summary updated

BibTeX
@misc{song2021common,
  author = {Yonghao Song and Lie Yang and Xueyu Jia and Longhan Xie},
  title = {{Common Spatial Generative Adversarial Networks based EEG Data Augmentation for Cross-Subject Brain-Computer Interface}},
  year = {2021},
  eprint = {2102.04456},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.04456},
}
Figure