Open-Source EEG Toolbox Standardizes Emotion Recognition Benchmarks

Science China Press

Researchers from Tsinghua University, Xi'an Jiaotong University and Tongji University have developed EEGEmoLib, an open-source Python toolbox designed to make electroencephalogram (EEG)-based emotion recognition more standardized, interpretable and reproducible. The work, reported in National Science Review, combines a broad survey of the field with controlled benchmark experiments and ready-to-use software.

Emotions shape attention, decision-making and social interaction, yet outward cues such as facial expressions and speech can be deliberately controlled. EEG records electrical activity at the scalp and offers a non-invasive way to study brain responses that may be harder to mask. But EEG signals are noisy, change over time and vary substantially among individuals. Researchers have also used different datasets, preprocessing procedures and data-splitting rules, making published results difficult to compare directly.

EEGEmoLib addresses this fragmentation by organizing the full research pipeline into four modules: datasets, feature extraction, feature selection and recognition models. Its current implementation supports eight public datasets, 18 categories of handcrafted features, 11 feature-selection methods, five traditional machine-learning models and 15 deep-learning architectures, spanning convolutional, recurrent, graph-based and Transformer approaches.

Unlike most machine-learning-oriented researches that treat emotion recognition as a purely data-driven classification task, EEGEmoLib translates findings from psychology and neuroscience into computational components. The toolbox includes mechanisms that model the relative importance of EEG frequency bands and electrode locations, along with features that capture differences between the brain's left and right hemispheres. These designs allow researchers to test whether biologically motivated assumptions improve performance rather than simply taking them for granted.

"Emotion recognition should not be treated as a purely data-driven classification problem," said Yong-Jin Liu of Tsinghua University, the corresponding author. "By connecting algorithm design with known brain mechanisms and evaluating models under the same protocols, EEGEmoLib aims to make results more interpretable, comparable and reproducible."

To compare models under consistent conditions, the team benchmarked seven representative neural networks on three widely used datasets - SEED, DEAP and SEED-V. The evaluation covered subject-dependent settings, in which training and testing involved the same person, and subject-independent settings, in which a model had to recognize emotions in a person excluded from training.

Under the unified, non-model-specific training setup, the Transformer-based EEG-Conformer was among the strongest models in subject-dependent tasks. The pattern changed when systems had to generalize to unseen individuals. In those tests, shallower networks or models with explicit domain-adaptation mechanisms often showed stronger out-of-the-box robustness. The authors emphasize that this is not an absolute ranking: complex architectures may improve with specialized tuning, and the conclusions apply to the datasets, features and protocols evaluated in the study.

The experiments also showed that neurophysiological priors can help, but their value depends on the model. Learning to weight different frequency bands or electrode locations improved several architectures. Explicitly representing hemispheric asymmetry particularly helped some graph-based and recurrent models, while a stronger Transformer model appeared able to learn part of that structure without added feature engineering.

By providing common data pipelines, model implementations, configuration files and evaluation protocols, EEGEmoLib offers researchers a shared starting point for reproducing past work and testing new ideas. The authors note, however, that the toolbox is a research resource and not a clinical diagnostic system. The team expects the platform to support academic research toward adaptive human-computer interaction, mental-health studies and real-time affective feedback.

EEGEmoLib is freely available at https://eegemolib.github.io .

The research was supported by the National Natural Science Foundation of China.

/Public Release. This material from the originating organization/author(s) might be of the point-in-time nature, and edited for clarity, style and length. Mirage.News does not take institutional positions or sides, and all views, positions, and conclusions expressed herein are solely those of the author(s).View in full here.