arXiv:2610.35540cs.LGOct 2026

Manuscript Offprint

arXiv:2610.35540

Beyond Modeling Order: Dual-Path Spatiotemporal Representation Learning for Cross-Subject EEG Emotion Recognition

Zehui Xiao, Yi Zheng, Guixing Fu, Wenkai Lu, Lingfei He, Tao Tan, Yue Liu, Silun Wang, Junhai Xu, Mengting Liu

Zehui Xiao, Yi Zheng, Guixing Fu, Wenkai Lu, Lingfei He, Tao Tan, Yue Liu, Silun Wang, Junhai Xu, and Mengting Liu

Abstract—Cross-subject generalization remains a major challenge for EEG-based emotion recognition due to pronounced inter-subject variability in neural activity and emotion-related spatiotemporal patterns. Existing methods mainly alleviate inter-subject differences through distribution alignment or contrastive learning, while paying limited attention to representation bias associated with fixed spatiotemporal modeling orders. We hypothesize that high-level emotion representations of the same EEG signal should remain consistent across different spatiotemporal modeling paths. Based on this hypothesis, we propose a Dual-Path Spatiotemporal Contrastive Learning (DP-STCL) framework for cross-subject EEG emotion recognition. DP-STCL employs two complementary encoders with independent parameters, namely a Temporal-to-Spatial (TS) path and a Spatial-to-Temporal (ST) path, to model EEG spatiotemporal information under different integration orders. During representation learning, the same emotional stimulus is used to establish cross-subject associations, while three complementary relations jointly constrain representation variations across subjects and modeling paths. This promotes stable and discriminative stimulus-related emotion representations. To further handle limited labeled target-subject data, we introduce a LoRA-based few-shot adaptation strategy with low parameter overhead. Extensive cross-subject experiments on SEED, SEED-IV, SEED-V, and FACED show that DP-STCL consistently outperforms the compared methods, demonstrating its effectiveness in improving cross-subject EEG emotion recognition.

Index Terms—Cross-subject emotion recognition, EEG, contrastive learning, spatiotemporal representation learning, few-shot adaptation.

I. INTRODUCTION

ELECTROENCEPHALOGRAPHY EEG-based emotion recognition has attracted considerable attention in affective computing and brain-computer interfaces, with applica-

Zehui Xiao and Yi Zheng contributed equally to this work.

Zehui Xiao, Yi Zheng, Guixing Fu, and Mengting Liu are with the School of Biomedical Engineering, Shenzhen Campus of Sun Yat-sen University, Shenzhen 518107, China (e-mail: xiaozh26@mail2.sysu.edu.cn; zhengy323@mail2.sysu.edu.cn; fugx3@mail2.sysu.edu.cn; liumd55@mail.sysu.edu.cn).

Wenkai Lu, Lingfei He, and Junhai Xu are with the School of Computer Science and Technology, Tianjin University, Tianjin 300354, China (e-mail: 3020244261@tju.edu.cn; lingfei@tju.edu.cn; jhxu@tju.edu.cn). Tao Tan and Yue Liu are with the Faculty of Applied Sciences, Macao Polytechnic University, Macao, China (e-mail: taotan@mpu.edu.mo; yue.liu@mpu.edu.mo). Silun Wang is with Shenzhen Dr. Brain Technologies Co., Ltd., Shenzhen 518057, China (e-mail: dr.brain@drbrain.com.cn).

Junhai Xu and Mengting Liu are the corresponding authors (e-mail: jhxu@tju.edu.cn; liumd55@mail.sysu.edu.cn).

This work was supported by the Joint Funds of the National Natural Science Foundation of China under Grant U24A20340, the Shenzhen Science and Technology Innovation Program under Grant JCYJ20240813112459030, the National Natural Science Foundation of China under Grant 62671639, and the Science and Technology Development Fund, Macau SAR (File No. 0170/2026/AGJ) under the FDCT-GDST Joint Funding Scheme.

tions in mental health assessment, human-computer interaction, and intelligent healthcare [1]–[5]. In recent years, deep learning methods have significantly improved the performance of EEG-based emotion recognition [6]–[10]. However, these models often rely heavily on the training subjects and show substantial performance degradation when applied to unseen subjects. This performance degradation is largely caused by substantial inter-individual variability in EEG signals. Different subjects exhibit considerable differences in neural activity patterns, spatial distributions, signal statistics, and noise levels [11]–[13]. Therefore, improving generalization to unseen subjects is critical for practical EEG emotion recognition. To address this issue, existing research has primarily focused on reducing inter-subject distribution differences, employing methods such as domain adaptation, transfer learning, and domain-adversarial learning to mitigate statistical shifts between subjects through feature distribution matching or domain-invariant representation learning [12], [14]–[18]. In recent years, contrastive learning has also been applied to EEG representation learning by constructing positive relations across different views or subjects to encourage the learning of shared representations [13], [19]–[22]. Although these methods improve cross-subject generalization, they mainly focus on reducing subject-related variation while paying limited attention to how EEG spatiotemporal information itself is modeled.

Emotion-related EEG activity inherently exhibits complex spatiotemporal coupling: spatial coordination patterns among brain regions evolve dynamically over time, while local temporal dynamics can in turn shape and reorganize spatial interactions across regions [23], [24]. Inter-subject variability further increases the diversity of these spatiotemporal patterns, making them difficult to characterize using a single fixed modeling scheme [11]–[13]. However, existing methods typically adopt a predefined spatiotemporal modeling order, such as spatial-to-temporal or temporal-to-spatial processing [25], [26]. Because temporal and spatial information are strongly coupled, applying these operations in different orders may emphasize different aspects of the same EEG signal. A single modeling order may therefore introduce a structural preference toward the features emphasized by that path and overlook complementary spatiotemporal patterns. Furthermore, for the same EEG segment, different spatiotemporal modeling paths may capture local features with different emphases, but their high-level emotion-related representations should remain consistent or compatible. In other words, if the model truly learns stable stimulus-related emotion representations rather than modeling-path bias introduced by the information integration order, the representations produced by different modeling paths should ultimately converge toward a shared high-level semantic space.

Based on these considerations, we propose a Dual-Path Spatiotemporal Contrastive Learning (DP-STCL) framework for cross-subject EEG emotion recognition. DP-STCL employs two complementary encoders with independent parameters: a Temporal-to-Spatial (TS) path and a Spatial-to-Temporal (ST) path. The TS branch first applies temporal convolution to EEG signals to capture multiscale temporal dynamics and then models dependencies across brain regions through spatial convolution. In contrast, the ST branch first applies spatial convolution to aggregate whole-brain spatial information and then models its temporal evolution through temporal convolution. Through this dual-path design, the model learns EEG spatiotemporal features from different perspectives, thereby enhancing representation diversity and robustness. During representation learning, the same emotional stimulus is used as the basis for establishing cross-subject relations, and three complementary relations are constructed to account for subject variation and differences between the two modeling paths. The same-subject cross-path relation enhances the consistency between representations of the same EEG sample obtained through the TS and ST modeling paths, thereby reducing modeling path bias introduced by different information integration orders. The same-path cross-subject relation encourages different subjects exposed to the same emotional stimulus to form similar representations, thereby reducing subject-specific variations. The cross-subject cross-path relation further promotes the stability of emotion representations when both the subject and the modeling path vary simultaneously. Through the joint constraints of these three relations, the model learns more stable, subject-invariant, and discriminative emotion representations, thereby improving the generalization ability of cross-subject EEG emotion recognition.

Furthermore, although subject invariant representations can improve a model's generalization to unseen subjects, individual differences may still persist in practical applications and cannot be fully eliminated through a unified representation. At the same time, acquiring a large amount of labeled EEG data for new subjects is typically costly. Therefore, this paper further addresses individual adaptation when only a small number of labeled samples are available for the target subject. Building upon a frozen pretrained dual-path encoder, we adopt a strategy that combines few-shot classification with Low-Rank Adaptation (LoRA) [27]–[29]. Specifically, we first freeze the parameters of the pretrained encoder and train only the classifier on data from multiple subjects. Subsequently, in the few-shot setting for a target subject, we fine-tune only the LoRA parameters in the classifier, thereby achieving efficient subject adaptation with very few labeled samples. This design significantly reduces training costs and the risk of overfitting in downstream tasks while maintaining the model's generalization performance.

The main contributions of this paper are summarized as follows:

• We propose a dual-path spatiotemporal contrastive learning framework for cross-subject EEG emotion recognition. The framework exploits the spatiotemporal structural characteristics of EEG signals through two complementary modeling paths, including a temporal feature driven spatial correlation mining paradigm and a spatial pattern driven temporal dynamics mining paradigm.

• We use the same emotional stimulus as the basis for establishing cross-subject associations and explicitly model three complementary relations, including same-path cross-subject, same-subject cross-path, and cross-subject cross-path relations. Same-path cross-subject relations are optimized through contrastive learning, whereas same-subject and cross-subject cross-path relations are incorporated into semantic alignment. These complementary relations jointly constrain representation stability under subject variation and modeling-path variation, thereby learning more robust emotion-related representations for cross-subject recognition.

• We introduce a subject adaptation strategy that combines few-shot learning with LoRA in downstream tasks, enabling efficient cross-subject emotion recognition under limited sample conditions.

• Extensive experiments on multiple public EEG emotion datasets demonstrate the effectiveness and superiority of the proposed method for cross-subject emotion recognition.

References (51)