Abstract
EEG-based emotion recognition (EER) has gained significant attention due to its potential for understanding and analyzing human emotions. While recent advancements in deep learning techniques have substantially improved EER, the field lacks a convincing benchmark and comprehensive open-source libraries. This absence complicates fair comparisons between models and creates reproducibility challenges for practitioners, which collectively hinder progress. To address these issues, we introduce LibEER, a comprehensive benchmark and algorithm library designed to facilitate fair comparisons in EER. LibEER carefully selects popular and powerful baselines, harmonizes key implementation details across methods, and provides a standardized codebase in PyTorch. By offering a consistent evaluation framework with standardized experimental settings, LibEER enables unbiased assessments of seventeen representative deep learning models for EER across the six most widely used datasets. Additionally, we conduct a thorough, reproducible comparison of model performance and efficiency, providing valuable insights to guide researchers in the selection and design of EER models. Moreover, we make observations and in-depth analysis on the experiment results and identify current challenges in this community. We hope that our work will not only lower entry barriers for newcomers to EEG-based emotion recognition but also contribute to the standardization of research in this domain, fostering steady development. The library and source code are publicly available at https://github.com/XJTU-EEG/LibEER.
Introduction: Addressing the Reproducibility Crisis
Despite the explosion of deep learning research in EEG-based emotion recognition, the field currently suffers from a significant reproducibility crisis. Comparing results across different EER publications is often an "apples-to-oranges" endeavor. Researchers frequently use varying preprocessing techniques, inconsistent train/test split ratios, and occasionally questionable practices—such as trial-dependent configurations—that risk data leakage and inflate performance metrics.
Furthermore, codebases are fragmented across different platforms (PyTorch, TensorFlow, MATLAB), making it difficult for newcomers to enter the field or for veterans to verify state-of-the-art (SOTA) claims. LibEER addresses three core issues: a lack of standardized benchmarking, a lack of unified open-source libraries, and a lack of in-depth analysis of existing SOTA research.
The LibEER Framework
LibEER is a comprehensive toolkit built on PyTorch, structured into three primary modules to bring order to the "Wild West" of EER research:
- Data Loader: Standardizes disparate dataset formats into a uniform (session, subject, trial) structure. It provides automated preprocessing, including bandpass filtering, eye-artifact removal, and feature extraction.
- Data Split: Implements rigorous partitioning (0.6:0.2:0.2 for train/val/test) to prevent data leakage and ensure that models are evaluated on truly unseen data.
- Model Training and Evaluation: Provides a unified pipeline for 17 representative models, categorized by their architecture: CNNs, RNNs, GNNs, DNNs, and Transformers.
A key methodological contribution is the reproduction study. The authors attempted to replicate the original results of these 17 models using the original papers' settings before moving them into the standardized LibEER benchmark. This process revealed that, on average, reproduced model performances were 3.85% lower than those reported in original papers, highlighting how missing implementation details can inflate reported results.
Standardized Evaluation Protocols
To ensure fair comparisons, LibEER supports several standardized experimental settings. These protocols are critical for understanding how well a model generalizes from a single individual to a broader population.
- Subject-Dependent Tasks: Models are trained and tested on data from the same individual. While this yields higher accuracy, it limits real-world applicability.
- Cross-Subject Tasks: Models are tested on individuals not seen during training. Performance typically drops significantly here, but models like BiDANN and R2G-STNN, which incorporate transfer learning, show the most promise in this area.
Key Insights and Benchmarking Results
Through extensive testing across six gold-standard datasets (SEED, SEED-IV, SEED-V, DEAP, MAHNOB-HCI, and MPED), several critical insights emerged:
- GNNs are the Current Kings: Graph Neural Networks (GNNs) like DGCNN and GCBNet consistently outperformed other architectures. This suggests that modeling the spatial relationships between EEG electrode channels as a graph is more effective than treating them as simple 2D images or sequences.
- The "SVM Baseline" Reality Check: In several scenarios, traditional Support Vector Machines (SVM) actually outperformed sophisticated deep learning models. This serves as a reminder that when data is scarce, complex deep networks often struggle to learn effective representations and may overfit compared to simpler baselines.
- The Random Seed Trap: Changing the random seed could swing a model's accuracy by as much as 20% (notably for CDCN). This underscores the absolute necessity of reporting random seeds to ensure results aren't just the product of "lucky" initializations.
- Label Quality: Models performed significantly better on the SEED datasets compared to DEAP or MAHNOB-HCI. This is likely due to the higher quality of discrete emotion labels in SEED versus the more subjective valence-arousal self-assessments used in other datasets.
Conclusion
LibEER provides a much-needed "ground truth" for the EER community. By standardizing the entire pipeline—from data loading to evaluation—it enables researchers to focus on architectural innovation rather than fighting with data formats. While future work will expand to include more datasets and cross-dataset generalization tasks, LibEER currently stands as the most comprehensive library for fostering steady, reproducible development in EEG-based emotion recognition.
Summary updated