Global Adaptive Transformer for Cross-Subject Enhanced EEG Classification

Yonghao Song, Qingqing Zheng, Qiong Wang, Xiaorong Gao, Pheng‐Ann HengIEEE Transactions on Neural Systems and Rehabilitation Engineering 2023 · DOI

Abstract

Due to individual differences, EEG signals from source subjects can rarely be used directly to decode the mental intentions of a target subject. While transfer learning has shown promise, existing methods often suffer from poor feature representation or neglect long-range dependencies. We propose the Global Adaptive Transformer (GAT), a domain adaptation method designed to utilize source data for cross-subject enhancement. Our method employs parallel convolutions to capture temporal and spatial features simultaneously. A novel attention-based adaptor then implicitly transfers source features to the target domain by emphasizing global correlations. We further utilize a discriminator to reduce marginal distribution discrepancy through adversarial learning and an adaptive center loss to align conditional distributions. Experiments on two widely used EEG datasets demonstrate that GAT outperforms state-of-the-art methods, primarily due to the effectiveness of the adaptor, indicating significant potential for enhancing the practicality of Brain-Computer Interfaces (BCIs).

Introduction

Brain-Computer Interfaces (BCIs) often require extensive calibration because electroencephalograph (EEG) signals are highly subject-specific. A "move left hand" signal from one user may look significantly different from another's. This variability presents a significant domain adaptation challenge: how can we leverage existing "source" data from multiple subjects to improve decoding for a new "target" subject with minimal data?

Existing transfer learning approaches often struggle with poor feature representation or fail to capture long-range temporal dependencies. The Global Adaptive Transformer (GAT) addresses these issues by combining parallel convolutional feature extraction with a novel attention-based adaptor, effectively translating EEG data across subjects and reducing the "calibration headache" for new users.

Methodology

The GAT architecture is designed to extract robust, domain-invariant features through four primary components:

  1. Parallel Convolutional Feature Extractor: Unlike traditional serial models, GAT processes temporal and spatial information in parallel. This prevents the loss of structural information that can occur when filters are applied sequentially.
  2. Global Adaptor: At the core of GAT is a multi-head attention mechanism. It calculates non-local correlations within the target subject's data to create an "attention map," which is then used to transform source features to align with the target domain.
  3. Domain Discriminator: Utilizing an adversarial framework, the discriminator attempts to distinguish between source and target features, forcing the extractor and adaptor to produce features that are domain-invariant.
  4. Adaptive Center Loss: This component ensures that while distributions are aligned, class-specific clusters (e.g., "left hand" vs. "right hand") remain distinct by pulling similar class features toward a central point.
Overview of the Global Adaptive Transformer (GAT) architecture.

Experimental Results

The model was evaluated on two benchmarks from BCI Competition IV: Dataset 2a (4-class motor imagery) and Dataset 2b (2-class motor imagery).

Performance Benchmarks

GAT achieved state-of-the-art results on both datasets:

  • Dataset 2a: 76.58% average accuracy, outperforming the previous best (DRDA) by 1.84%.
  • Dataset 2b: 84.44% average accuracy.

Key Insights

  • Parallel Processing: Ablation studies showed that parallel spatio-temporal processing yields a 6.13% accuracy boost over serial connections, highlighting the importance of preserving signal context.
  • Adaptor Efficacy: Removing the Global Adaptor resulted in the most significant performance drop (~10%), confirming that attention-based global context is critical for effective domain adaptation.
  • Robustness: GAT demonstrated consistent improvements across nearly all subjects, including those with typically "noisy" signals who often fail with standard models.
Classification accuracy across subjects for Dataset 2a and 2b.

Discussion and Future Work

While GAT significantly advances cross-subject EEG classification, several avenues for future research remain. Currently, the model treats all source subjects as equally relevant; implementing a "subject selection" mechanism could further refine adaptation by identifying the most similar users in the database. Additionally, while this study focused on motor imagery, future work should explore GAT's generalizability to other paradigms like emotion recognition. Finally, transitioning from offline analysis to real-time, "plug-and-play" BCI systems is a key goal for practical application.

Summary updated

Abstract

Due to the individual difference, EEG signals from other subjects (source) can hardly be used to decode the mental intentions of the target subject. Although transfer learning methods have shown promising results, they still suffer from poor feature representation or neglect long-range dependencies. In light of these limitations, we propose Global Adaptive Transformer (GAT), an domain adaptation method to utilize source data for cross-subject enhancement. Our method uses parallel convolution to capture temporal and spatial features first. Then, we employ a novel attention-based adaptor that implicitly transfers source features to the target domain, emphasizing the global correlation of EEG features. We also use a discriminator to explicitly drive the reduction of marginal distribution discrepancy by learning against the feature extractor and the adaptor. Besides, an adaptive center loss is designed to align the conditional distribution. With the aligned source and target features, a classifier can be optimized to decode EEG signals. Experiments on two widely used EEG datasets demonstrate that our method outperforms state-of-the-art methods, primarily due to the effectiveness of the adaptor. These results indicate that GAT has good potential to enhance the practicality of BCI.
BibTeX
@article{song2023global,
  author = {Yonghao Song and Qingqing Zheng and Qiong Wang and Xiaorong Gao and Pheng‐Ann Heng},
  title = {{Global Adaptive Transformer for Cross-Subject Enhanced EEG Classification}},
  journal = {IEEE Transactions on Neural Systems and Rehabilitation Engineering},
  year = {2023},
  doi = {10.1109/tnsre.2023.3285309},
}
Figure