Supervised Adversarial Contrastive Learning for Emotion Recognition in Conversations (2023)

Abstract: Extracting generalized and robust representations is a major challenge in emotion recognition in conversations (ERC). To address this, we propose a supervised adversarial contrastive learning (SACL) framework for learning class-spread structured representations in a supervised manner. SACL applies contrast-aware adversarial training to generate worst-case samples and uses joint class-spread contrastive learning to extract structured representations. It can effectively utilize label-level feature consistency and retain fine-grained intra-class features. To avoid the negative impact of adversarial perturbations on context-dependent data, we design a contextual adversarial training (CAT) strategy to learn more diverse features from context and enhance the model’s context robustness. Under the framework with CAT, we develop a sequence-based SACL-LSTM to learn label-consistent and context-robust features for ERC. Experiments on three datasets show that SACL-LSTM achieves state-of-the-art performance on ERC. Extended experiments prove the effectiveness of SACL and CAT.

## introduction emotion recognition in conversations (erc) aims to detect emotions expressed by speakers during a conversation. the task is a crucial topic for developing empathetic machines @xcite . existing works mainly focus on context modeling @xcite @xcite and emotion representation learning @xcite @xcite to recognize emotions. however, these methods have limitations in discovering the intrinsic structure of data relevant to emotion labels, and struggle to extract generalized and robust representations, resulting in mediocre recognition performance. in the field of representation learning, labelbased contrastive learning @xcite * corresponding author. @xcite techniques are used to learn a generalized representation by capturing similarities between examples within a class and contrasting them with examples from other classes. since similar emotions often have similar context and overlapping feature spaces, these techniques that directly compress the feature space of each class are likely to hurt the fine-grained features of each emotion, thus limiting the ability of generalization. to address these, we propose a supervised adversarial contrastive learning (sacl) framework to learn class-spread structured representations in a supervised manner. sacl applies contrast-aware adversarial training to generate worst-case samples and uses a joint class-spread contrastive learning objective on both original and adversarial samples. it can effectively utilize label-level feature consistency and retain fine-grained intra-class features. specifically, we adopt soft foot_0 scl @xcite on original samples to obtain contrast-aware adversarial perturbations. then, we put perturbations on the hidden layers to generate hard positive examples with a min-max training recipe. these generated samples can spread out the representation space for each class and confuse robust-less networks. after that, we utilize a new soft scl on obtained adversarial samples to maximize the consistency of class-spread representations with the same label. under the joint objective on both original and adversarial samples, the network can effectively learn label-consistent features and achieve better generalization. in context-dependent dialogue scenarios, directly generating adversarial samples interferes with the correlation between utterances, which is detrimental to context understanding. to avoid this, we design a contextual adversarial training (cat) strategy to adaptively generate context-level worst-case samples and extract more diverse features from context. this strategy applies adversarial perturbations to the context-aware network structure in a multi-channel way, instead of directly putting perturbations on context-free layers in a single-channel way @xcite . after introducing cat, sacl can further learn more diverse features and smooth representation spaces from context-dependent inputs, as well as enhance the model's context robustness. under sacl framework, we design a sequencebased method sacl-lstm to recognize emotion in the conversation. it consists of a dual long shortterm memory (dual-lstm) module and an emotion classifier. dual-lstm is a modified version of the contextual perception module @xcite , which can effectively capture contextual features from a dialogue. with the guidance of sacl, the model can learn label-consistent and context-robust emotional features for the erc task. we conduct experiments on three public benchmark datasets. results consistently demonstrate that our sacl-lstm significantly outperforms other state-of-the-art methods on the erc task, showing the effectiveness and superiority of our method. moreover, extensive experiments prove that our sacl framework can capture better structured and robust representations for classification. the main contributions are as follows: 1) we propose a supervised adversarial contrastive learning (sacl) framework to extract class-spread structured representations for classification. it can effectively utilize label-level feature consistency and retain fine-grained intra-class features. 2) we design a contextual adversarial training (cat) strategy to learn more diverse features from contextdependent inputs and enhancing the model's context robustness. 3) we develop a sequence-based method sacl-lstm under the framework to learn label-consistent and context-robust emotional features for erc foot_2 . 4) experiments on three benchmark datasets show that sacl-lstm significantly outperforms other state-of-the-art methods, and prove the effectiveness of the sacl framework foot_3 . ## methodology in this section, we first present the methodology of sacl framework. besides, for better adaptation to context-independent scenarios, we introduce a cat strategy to sacl framework. finally, we apply the proposed sacl framework for emotion recognition in conversations and provide a sequence-based method sacl-lstm. ## conclusion we propose a supervised adversarial contrastive learning framework to learn class-spread structured representations for classification. it applies a contrast-aware adversarial training strategy and a joint class-spread contrastive learning objective. besides, we design a contextual adversarial training strategy to learn more diverse features from context-dependent inputs and enhance the model's context robustness. under the sacl framework with cat, we develop a sequence-based method sacl-lstm to learn label-consistent and contextrobust features on context-dependent data for better emotion recognition. experiments verified the effectiveness of sacl-lstm for erc and sacl for learning generalized and robust representations.