Domain-Invariant Representation Learning from EEG with Private Encoders

David Bethge, Philipp Hallgarten, Tobias Grosse-Puppendahl, Mohamed Kari, Ralf Mikut, Albrecht Schmidt, Ozan Özdenizci

Abstract

Electroencephalography (EEG)-based emotion recognition faces significant challenges due to domain shift across different datasets and the sensitive nature of brainwave data. We present Domain Aligned Private Encoders (DAPE), a framework that learns domain-invariant representations by utilizing dataset-specific private encoders and a shared global classifier. By aligning feature distributions via Maximum Mean Discrepancy (MMD), DAPE effectively strips dataset-specific "fingerprints" while preserving emotional content. Our adaptive variant, aDAPE, achieves a mean emotion classification accuracy of 49.09% across four benchmark datasets, significantly outperforming standard adversarial methods while maintaining high levels of domain privacy.

Introduction

Training robust deep learning models for EEG emotion recognition is hindered by "domain shift"—variations in data distribution caused by different hardware, electrode configurations, and experimental protocols. A model optimized for one dataset often fails to generalize to others. Furthermore, the inherent sensitivity of EEG data precludes simple centralized pooling due to privacy concerns. Existing domain adaptation techniques, such as Domain-Adversarial Neural Networks (DANN), often require centralized data access and can be unstable during training.

Methodology

The DAPE framework addresses these challenges through a decentralized architecture consisting of two primary components:

  1. Private Encoders: Each data source $M$ is assigned a dedicated encoder $\theta_M$ (based on DeepConvNet) that processes raw EEG data locally.
  2. Shared Classifier: The latent representations $z_M$ generated by these encoders are transmitted to a global classifier $\theta_C$.

To ensure that the shared representations are domain-invariant, the model employs Maximum Mean Discrepancy (MMD). This statistical measure penalizes the model if feature distributions from different encoders diverge significantly, forcing the encoders to focus on universal emotional features rather than dataset-specific noise. An adaptive version, aDAPE, incorporates Adaptive Batch Normalization to further smooth inter-dataset variances during inference.

The DAPE framework architecture featuring private encoders and a shared global classifier.

Experimental Setup

The study evaluated the framework using four public affective EEG benchmarks: DEAP, DREAMER, SEED, and SEED-IV. These datasets vary in electrode count (14 to 62) and sampling rates (128 Hz to 200 Hz). To facilitate cross-dataset learning, labels were unified into three classes: Negative, Neutral, and Positive.

Key Results

The experimental results demonstrate that aDAPE significantly improves cross-dataset generalization. As shown in the performance table, aDAPE reached a mean accuracy of 49.09%, surpassing both the Global Model baseline (40.32%) and the adversarial DANN approach (39.82%).

Performance comparison of DAPE and aDAPE against baseline models in emotion and domain classification.

Beyond accuracy, the framework provides robust privacy. A "domain classifier" (an attacker model) attempting to identify the source dataset from latent features achieved 99.87% accuracy on local models. However, with aDAPE, this accuracy dropped to 52.76%—near the chance level for a four-class problem—indicating that the learned representations are effectively stripped of source-identifying information.

Discussion and Conclusion

While multi-source models currently trail slightly behind specialized "local" models (which average ~51.9% accuracy but lack generalization), DAPE represents a significant step toward privacy-preserving, cross-site EEG analysis. The results suggest that privacy-centric alignment not only protects data but also enhances the model's ability to generalize across diverse populations. This architecture holds promise for clinical applications like BCI-based stroke rehabilitation and longitudinal time-series monitoring where data is naturally distributed across multiple institutions.

Summary updated

BibTeX
@inproceedings{bethge2022domain,
  author = {David Bethge and Philipp Hallgarten and Tobias Grosse-Puppendahl and Mohamed Kari and Ralf Mikut and Albrecht Schmidt and Ozan Özdenizci},
  title = {{Domain-Invariant Representation Learning from EEG with Private Encoders}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2022},
  doi = {10.1109/icassp43922.2022.9747398},
}
Figure