Continuous Adversarial Text Representation Learning for Affective Recognition

Seungah Son, Andres Saurez, Dongsoo HarIcaiic 2025

TL;DR

This paper introduces a novel framework, Continuous Adversarial Representation Learning (CARL), to improve how AI understands nuanced human emotions in text. By combining a continuous valence-arousal labeling system with a dynamic token perturbation mechanism, CARL significantly enhances emotion-aware text representations, leading to better performance in affective recognition tasks.

What Problem Does This Paper Address?

While pre-trained language models (PLMs) like BERT and GPT are excellent at understanding the semantic meaning of text, they often fall short when it comes to capturing the subtle and complex nuances of human emotions. This limitation hinders their effectiveness in affective recognition tasks, which are crucial for applications like human-computer interaction, recommendation systems, and more. Existing methods often rely on simplified, discrete emotion labels (e.g., positive/negative) or static lexicons, which fail to capture the multidimensional and dynamic nature of emotions. Furthermore, some approaches use narrow masking strategies that overlook broader emotional patterns within text. This paper aims to bridge this gap by developing a more sophisticated method for learning emotion-aware text representations.

Methods

The proposed framework, CARL, integrates two key pre-training tasks:

  1. Momentum Continuous Contrastive Learning (MCCL): This is a sentence-level inter-sample training method. It uses a momentum update strategy (inspired by BYOL) with two networks: an online network that learns representations and a target network that provides stable representations. This approach is grounded in Russell's circumplex model of affect, which uses continuous valence (pleasure-displeasure) and arousal (activation-deactivation) labels. By leveraging these multidimensional labels, MCCL captures more nuanced emotional variations than traditional discrete labels.
  2. Gradient-Based Perturbed Token Detection (PTD): This is a token-level intra-sample training method. Instead of random masking, PTD uses gradients to identify tokens with the highest sentiment relevance. It then applies adversarial perturbations to these important tokens, making it harder for the model to correctly classify them. The model is then trained to detect these perturbed tokens. This dynamic approach helps the model become more sensitive to subtle emotional cues and improves its ability to understand sentiment at a granular level.

The overall loss function combines the losses from MCCL and PTD, with weighting factors to balance their contributions.

Datasets

The paper uses several datasets for training and evaluation:

  • Training Data: A diverse set of corpora annotated with valence and arousal labels, including:
  • EmoBank: Texts with fine-grained emotional annotations.
  • IEMOCAP: Dyadic interactions annotated for emotion categories and dimensions.
  • Facebook Posts: Social media texts reflecting everyday emotional language.
  • EmoTales: Folk tale sentences with emotional labels.
  • Note: The paper standardizes label ranges across these datasets using min-max normalization.
  • Downstream Tasks (Evaluation):
    • Valence and Arousal Alignment: Evaluated using linear regression on sentence embeddings.
  • Polarity Classification: Evaluated on standard sentiment benchmarks from the SentEval toolkit: MR, CR, SST5, and IMDB.
  • Emotion Classification: Evaluated on the GoEmotions dataset (28 emotion categories), with a focus on six emotions from Ekman's theory.
  • Embedding Quality: Assessed using alignment and uniformity metrics on the GoEmotions dataset.

Key Insights and Ideas

  • Continuous Labels are Crucial: The paper strongly advocates for using continuous valence-arousal labels over discrete ones. This multidimensional approach allows for a much richer and more accurate representation of human emotions, which are inherently continuous and complex.
  • Adversarial Perturbations Enhance Sensitivity: Dynamically perturbing sentiment-relevant tokens forces the model to learn more robust representations. By making the model work harder to identify correct sentiment in the face of subtle "attacks," it becomes more attuned to fine-grained emotional cues.
  • Momentum for Stability: The use of a momentum-based update strategy for the target network in contrastive learning provides more stable embeddings compared to direct encoder updates, which can be sensitive to batch size.
  • Balancing Alignment and Uniformity: The evaluation of embedding quality using alignment and uniformity metrics is key. The proposed CARL model achieves a good balance, meaning its embeddings are both cohesive (uniformity) and accurately reflect the underlying emotional states (alignment).

Key Results

  • Significant Performance Gains: CARL demonstrated superior performance across all evaluated tasks.
  • Valence and Arousal Alignment: Achieved up to a 7.1% improvement in Pearson correlation for valence and 8.1% for arousal with BERT-based models, and up to 9.4% for valence and 2.4% for arousal with RoBERTa-based models. MAE was also reduced.
  • Polarity Classification: Achieved a 12.9% improvement over base BERT on the SST5 task and 9.2% on IMDB. RoBERTa-based CARL showed a 10.2% improvement over base RoBERTa on SST5.
  • Emotion Classification: BERT-based CARL achieved a 12.9% accuracy improvement over base BERT and RoBERTa-based CARL achieved a 15.5% accuracy improvement over base RoBERTa.
  • Embedding Quality: The model achieved a good balance between alignment and uniformity, visualized effectively through PCA.

Limitations and Future Work

  • Ablation Study Findings: The paper's ablation studies (Table V) show that removing either the token perturbation detection or the momentum continuous contrastive learning objective leads to notable performance degradation. This highlights the importance of both components. For instance, removing PTD caused a 2.5% drop in BERT's performance on polarity classification, while removing MCCL caused a 4.2% drop.
  • Future Directions: While not explicitly detailed as future work, the paper's success in improving affective recognition suggests that this framework could be extended to other emotion-related NLP tasks, such as emotion cause detection, emotion intensity prediction, or even cross-lingual affective understanding. The robustness of the learned embeddings also points towards potential applications in dialogue systems and content moderation.

Summary updated

BibTeX
@inproceedings{son2025continuous,
  author = {Seungah Son and Andres Saurez and Dongsoo Har},
  title = {{Continuous Adversarial Text Representation Learning for Affective Recognition}},
  booktitle = {Icaiic},
  year = {2025},
  doi = {10.1109/icaiic64266.2025.10920876},
}
Figure