Context-Dependent Embedding Utterance Representations for Emotion Recognition in Conversations

Patrícia Pereira, Helena Moniz, Isabel Dias, Joao Paulo CarvalhoACL 2023

TL;DR

This paper proposes a novel approach to emotion recognition in conversations by creating context-dependent utterance embeddings. By feeding previous conversational turns directly into a pre-trained language model (RoBERTa), they achieve state-of-the-art results on both open-domain and task-oriented dialogue datasets, demonstrating the critical role of conversational context.

What Problem Does This Paper Address?

Recognizing emotions in conversations is crucial for building more effective and empathetic conversational agents. While previous research has acknowledged the importance of conversational context, many approaches have modeled it separately after obtaining utterance embeddings. This can be complex and may not fully capture the nuanced interplay of emotions within a dialogue. The authors aim to bridge this gap by directly integrating conversational context into the utterance representation itself, simplifying the model architecture while enhancing performance.

Methods

The core of this paper's contribution lies in its "context-dependent embedding utterance representations." Instead of generating independent embeddings for each utterance and then modeling context, they concatenate the utterance to be classified with a specified number of preceding utterances. This combined input is then fed into a pre-trained RoBERTa encoder. The authors hypothesize that RoBERTa, with its Transformer architecture, is better at preserving contextual information due to its shorter information flow path compared to traditional RNNs.

After obtaining the contextualized embeddings from RoBERTa, a simple linear classification module is used to predict the emotion. This approach bypasses the need for complex post-embedding contextual modeling, as the embeddings themselves are designed to be context-rich. The authors also investigate the impact of varying the number of preceding turns included in the context.

Datasets

The proposed method is evaluated on two datasets:

  • DailyDialog: A publicly available, open-domain, chit-chat dataset labeled with six basic emotions (anger, disgust, fear, happiness, sadness, surprise) and neutral.
  • EmoWOZ: A task-oriented dialogue dataset derived from MultiWOZ, annotated with emotions such as fear, dissatisfaction, apologetic, abusive, excited, satisfied, and neutral.

The paper notes that both datasets are imbalanced, which influences their choice of evaluation metric.

Key Insights and Ideas

  • Context is King (and Directly Integrated): The most significant insight is that directly feeding conversational context into a powerful pre-trained language model like RoBERTa is highly effective. This approach simplifies the architecture by embedding context directly into the utterance representation, rather than modeling it separately.
  • Transformer Advantage: The paper suggests that Transformer-based models like RoBERTa are inherently better suited for capturing long-range dependencies in conversations compared to RNNs, due to their attention mechanisms and shorter information flow paths.
  • Simplicity Can Be Powerful: The authors demonstrate that a simple linear classification head, when applied to context-rich embeddings from RoBERTa, can achieve state-of-the-art results, challenging the need for overly complex downstream models.
  • Optimal Context Length: There's a sweet spot for context. Including too little context (c=0) is suboptimal, and performance generally increases with more context up to a certain point (around 3-4 turns), after which it can degrade.

Key Results

The proposed context-dependent approach achieved state-of-the-art results on both datasets.

  • DailyDialog: The model achieved a macro-F1 score of 51.23% with 3 context turns, outperforming other BERT/RoBERTa-based approaches.
  • EmoWOZ: The model achieved a macro-F1 score of 65.33% with 3 context turns, setting a new state-of-the-art for task-oriented emotion recognition datasets.

Qualitative analysis revealed that the contextual classifier was better at identifying emotions like Sadness and Happiness in scenarios where context was crucial for disambiguation, whereas a non-contextual classifier often defaulted to "neutral."

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while their model outperforms many baselines, the "Psychological" model achieved slightly higher performance on DailyDialog, potentially due to its use of a larger commonsense knowledge base and a more elaborate classifier.
  • The authors note that the ideal number of context turns varies per dataset and even per emotion, suggesting a need for adaptive context window selection.
  • Future Work:
    • The authors suggest exploring architectures that combine their context-dependent embeddings with more elaborate classification modules.
  • Future work could also focus on capturing other influencing factors like self and inter-speaker emotional influence, and the emotion of preceding utterances more explicitly.
  • The paper also highlights the importance of considering ethical aspects of emotion recognition in conversations, such as data privacy, bias, and responsible deployment.

Summary updated

BibTeX
@inproceedings{pereira2023context,
  author = {Patrícia Pereira and Helena Moniz and Isabel Dias and Joao Paulo Carvalho},
  title = {{Context-Dependent Embedding Utterance Representations for Emotion Recognition in Conversations}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
}
Figure