SSLCL: An Efficient Model-Agnostic Supervised Contrastive Learning Framework for Emotion Recognition in Conversations

Tao Shi, Xiao Liang, Yaoyuan Liang, Xinyi Tong, Shao-Lun Huang · OpenReview

Abstract

Emotion recognition in conversations (ERC) is a rapidly evolving task within the natural language processing community, which aims to detect the emotions expressed by speakers during a conversation. Recently, a growing number of ERC methods have focused on leveraging supervised contrastive learning (SCL) to enhance the robustness and generalizability of learned features. However, current SCL-based approaches in ERC are impeded by the constraint of large batch sizes and the lack of compatibility with most existing ERC models. To address these challenges, we propose an efficient and model-agnostic SCL framework named Supervised Sample-Label Contrastive Learning with Soft-HGR Maximal Correlation (SSLCL), which eliminates the need for a large batch size and can be seamlessly integrated with existing ERC models without introducing any model-specific assumptions. Specifically, we introduce a novel perspective on utilizing label representations by projecting discrete labels into dense embeddings through a shallow multilayer perceptron, and formulate the training objective to maximize the similarity between sample features and their corresponding ground-truth label embeddings, while minimizing the similarity between sample features and label embeddings of disparate classes. Moreover, we innovatively adopt the Soft-HGR maximal correlation as a measure of similarity between sample features and label embeddings, leading to significant performance improvements over conventional similarity measures. Additionally, multimodal cues of utterances are effectively leveraged by SSLCL as data augmentations to boost model performances. Extensive experiments on two ERC benchmark datasets, IEMOCAP and MELD, demonstrate the compatibility and superiority of our proposed SSLCL framework compared to existing state-of-the-art SCL methods.

Introduction

Emotion Recognition in Conversations (ERC) is the task of identifying the emotional state of speakers in a dialogue. While Supervised Contrastive Learning (SCL) has recently become a popular way to improve model robustness, it faces significant hurdles in ERC. Standard SCL (like SupCon) relies on finding "positive pairs" (samples of the same class) within a single training batch. Because ERC datasets are often heavily imbalanced, massive batch sizes are required to ensure minority-class samples have partners, which is computationally expensive. Furthermore, many existing SCL-based ERC methods are architecture-specific and fail to fully exploit multimodal cues like audio and video.

Methods

The proposed SSLCL (Supervised Sample-Label Contrastive Learning) framework addresses these challenges by shifting the contrastive paradigm. Instead of sample-sample contrast, SSLCL contrasts sample features against learned dense label embeddings.

The SSLCL framework architecture, illustrating label learning, sample-label contrastive learning with Soft-HGR, and multimodal data augmentation.

Key components include:

  • Sample-Label Contrast: Utterance features are contrasted against label embeddings learned via a shallow MLP. This ensures every sample has a positive pair regardless of batch size, effectively breaking the "batch size barrier."
  • Soft-HGR Maximal Correlation: Unlike standard dot product or cosine similarity, SSLCL employs the Soft-Hirschfeld-Gebelein-Rényi (Soft-HGR) objective. This measure from information theory captures complex, non-linear dependencies between features and labels.
  • Multimodal Data Augmentation: Different combinations of modalities (text, audio, video) are treated as "views" of the same utterance, creating additional positive pairs without needing external data.
  • Label-Label Discrimination: An auxiliary loss ensures that learned label embeddings remain distinct, preventing the model from collapsing different emotions into similar feature spaces.

Results

The framework was evaluated on the IEMOCAP and MELD benchmarks. SSLCL achieved state-of-the-art (SOTA) results, reaching a weighted-F1 of 71.98% on IEMOCAP and 66.92% on MELD when integrated with the M3Net model.

Performance comparison of SSLCL across various baseline models on IEMOCAP and MELD datasets.

As shown in the results table, SSLCL is remarkably model-agnostic, providing consistent improvements when plugged into six different baselines, including DialogueRNN, HiTrans, and DAG-ERC. It also demonstrates superior efficiency, maintaining high performance even with small batch sizes where traditional SupCon degrades. Ablation studies confirmed that the use of Soft-HGR consistently outperforms dot product and cosine similarity measures, highlighting its ability to model the high-dimensional, non-linear relationships inherent in emotional expression.

Conclusion

SSLCL provides a robust, efficient, and model-agnostic framework for ERC. By leveraging sample-label contrast and Soft-HGR correlation, it overcomes the batch size limitations of traditional contrastive learning. Future work may explore more complex label embedding architectures and the interpretability of the learned latent emotion space to see how closely related emotions cluster together.

Summary updated

BibTeX
@misc{shi2023sslcl,
  author = {Tao Shi and Xiao Liang and Yaoyuan Liang and Xinyi Tong and Shao-Lun Huang},
  title = {{SSLCL: An Efficient Model-Agnostic Supervised Contrastive Learning Framework for Emotion Recognition in Conversations}},
  year = {2023},
  eprint = {2310.16676},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.16676},
}
Figure