NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Masked Generative-Contrastive Representation Learning for Cross-Dataset EEG-Based Emotion Recognition

Huqin Weng, Jiayang Huang, Yimin Wen, Jie Du, Chi-Man Vong, Chuangquan ChenarXiv 2026

TL;DR

The paper introduces Masked Generative-Contrastive Representation Learning (MGCRL), a novel self-supervised learning framework designed to decode human emotions from EEG signals across different datasets. By cleverly combining latent-space generative prediction with a dynamic contrastive learning strategy under a shared masking mechanism, MGCRL successfully overcomes cross-dataset challenges like varying channel layouts and high signal noise. The framework sets a new state-of-the-art for cross-subject and cross-session emotion recognition while maintaining a highly efficient computational footprint.

What Problem Does This Paper Address?

Using Electroencephalography (EEG) for brain-computer interfaces (aBCIs) holds massive potential for emotion recognition due to its non-invasiveness and high temporal resolution. However, deploying these models in the real world hits a major roadblock: cross-dataset heterogeneity.

As illustrated in the paper, when you move from one EEG dataset to another, you face three distinct types of discrepancies:

  1. Device Heterogeneity: Different recording equipment and sampling rates.
  2. Channel Heterogeneity: Varying numbers and placements of electrodes across setups.
  3. Label Heterogeneity: Incompatible emotional label spaces between datasets.
Fig. 1. Illustration of heterogeneities in the cross-dataset problem. These include device heterogeneity, label heterogeneity, and channel heterogeneity.

Existing self-supervised learning (SSL) methods struggle to handle these variations. Generative SSL models often waste capacity trying to reconstruct noisy, low-level raw signals, while contrastive SSL models usually fail to capture fine-grained local spatial relationships or account for individual subject variability.

Methods

MGCRL addresses these gaps through a unified three-stage framework (Pre-training, Fine-tuning, and Testing) built around three core architectural innovations:

Fig. 2. The overall structure of MGCRL. (a) MGCRL consists of three stages: pre-training, fine-tuning, and testing. During pre-training, the model jointly optimizes JEPA-based generative and masked dynamic contrastive learning module. The resulting model is fine-tuned on a specific dataset and evaluated on an unseen subject to ensure cross-subject generalization. (b) The Region-aware Spatiotemporal Encoder Module. (c) Masked Dynamic Contrastive Learning Module.
  1. Region-Aware Spatiotemporal Encoder: To handle varying channel layouts, the authors project EEG signals onto a standardized $9 \times 9$ spatial grid. They introduce an Intra-Brain-Region Graph Convolutional Network (IBR-GCN) that groups channels into 17 distinct functional brain regions. It uses an adaptive adjacency matrix combining physical electrode distances with dynamic, sample-specific functional dependencies.
  2. JEPA-Based Generative Learning: Instead of predicting raw pixel- or signal-level details (which introduces noise), MGCRL adopts a Joint Embedding Predictive Architecture (JEPA). The model masks segments of the spatiotemporal features and tasks a predictor with forecasting the abstract latent representations of the missing blocks.
  3. Masked Dynamic Contrastive Learning: The framework reuses the masking mechanism as a data augmentation view. It optimizes a contrastive loss that aligns masked and unmasked features from the same sample (intra-sample consistency) while dynamically weighting similarities between different subjects exposed to the same emotional stimulus (inter-subject invariance).

Datasets

The authors evaluated MGCRL using a rigorous cross-dataset transfer protocol:

  • Pre-training Dataset: FACED, a large-scale dataset containing 30 effective channels from 123 subjects watching 28 emotion-eliciting video clips (9 emotion categories).
  • Fine-tuning & Testing Datasets: The model was evaluated on three distinct target datasets from the popular SEED series:
  • SEED-IV: 62 channels, 15 subjects, 4 emotion categories.
  • SEED-V: 62 channels, 16 subjects, 5 emotion categories.
  • SEED-VII: 62 channels, 20 subjects, 7 emotion categories.

Key Insights and Ideas

  • Unification via Masking: Instead of treating generative and contrastive learning as separate multi-task objectives, MGCRL structurally unifies them by reusing the masking mechanism. Masking acts as a contextual reconstruction challenge for the generative branch and a data augmentation view for the contrastive branch.
  • Abstract vs. Exact Reconstruction: Moving away from raw signal reconstruction (like standard Masked Autoencoders) to latent-space prediction (JEPA) prevents the model from overfitting to high-frequency background noise inherent in raw EEG data.
  • Dynamic Inter-Subject Weighting: Rather than forcing hard positive/negative pairs across different subjects, the model uses a relation matrix that adaptively refines weights based on feature similarity under shared stimuli, accommodating the natural "fuzzy" variations in how individuals experience emotion.

Key Results

MGCRL was evaluated using a challenging Leave-One-Subject-Out Cross-Validation (LOSO-CV) protocol, outperforming competitive baselines like LaBraM, BIOT, and EEG2Rep.

  • Within-Session Accuracy: MGCRL achieved 41.47% on SEED-IV, 34.99% on SEED-V, and 34.73% on SEED-VII, outperforming the best baseline (EEG2Rep) by 4.27%, 3.01%, and 3.70% respectively.
  • Cross-Session Generalization: When tested on entirely unseen video stimuli across different days, MGCRL maintained its edge, achieving 40.07% on SEED-IV and 33.56% on SEED-V.
  • Efficiency: Despite its performance, MGCRL is highly lightweight. With only 1.29M parameters and 0.041G FLOPs, it requires a fraction of the computational resources used by massive foundation models like CBraMod (21.77M parameters) or LaBraM (5.82M parameters).

Limitations and Future Work

The primary limitation acknowledged by the authors is MGCRL's dependence on stimulus-related metadata. The dynamic contrastive learning module relies on knowing which EEG segments correspond to the same video clip or stimulus to construct positive pairs. This restricts the framework's immediate applicability to datasets that lack explicit stimulus tracking.

Future work will focus on developing more generalized self-supervised strategies that can discover cross-subject invariant representations without relying on external stimulus labels.

Summary updated

BibTeX
@misc{weng2026masked,
  author = {Huqin Weng and Jiayang Huang and Yimin Wen and Jie Du and Chi-Man Vong and Chuangquan Chen},
  title = {{Masked Generative-Contrastive Representation Learning for Cross-Dataset EEG-Based Emotion Recognition}},
  year = {2026},
  eprint = {2607.04139},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.04139},
}
Figure