DialogueRNN: An Attentive RNN for Emotion Detection in Conversations

Navonil Majumder, Soujanya Poria, Devamanyu Hazarika, Rada Mihalcea, Alexander F. Gelbukh, Erik Cambria

Abstract

Emotion detection in conversations is a necessary step for a number of applications, including opinion mining over chat history, social media threads, debates, argumentation mining, understanding consumer feedback in live conversations, etc. Currently, systems do not treat the parties in the conversation individually by adapting to the speaker of each utterance. In this paper, we describe a new method based on recurrent neural networks that keeps track of the individual party states throughout the conversation and uses this information for emotion classification. Our model outperforms the state of the art by a significant margin on two different datasets.

Introduction

Emotion detection in conversations is critical for applications like opinion mining, social media analysis, and customer service. However, human conversations are complex webs of inter-personal (between people) and intra-personal (within oneself) dynamics.

Previous state-of-the-art systems, such as Conversational Memory Networks (CMN), treated dialogue history as a somewhat generic pool of context. They failed to explicitly distinguish between the different parties in a conversation or track how an individual speaker's emotional state evolves over time in response to others. To accurately predict emotion, a model needs to know not just what was said, but who said it, what their previous state was, and how the overall context of the conversation influences them.

A sample conversation flow between two parties (PA and PB) showing how emotions like 'neutral' and 'frustrated' evolve across turns.

DialogueRNN introduces a novel recurrent neural network architecture for emotion detection that explicitly tracks the individual states of different speakers. By using distinct Gated Recurrent Units (GRUs) to model the global context, the speaker's state, and the emotional flow, it significantly outperforms previous models.

Methodology

The authors propose DialogueRNN, a network built on Gated Recurrent Units (GRUs) that models three distinct factors: the speaker, the global context, and the preceding emotions. It does this using three interconnected GRUs:

  1. Global GRU: Captures the shared context of the conversation by jointly encoding the current utterance and the speaker's state.
  2. Party GRU: Maintains a distinct state vector for each participant. When a person speaks, this GRU updates their specific state based on the incoming utterance and the global context (gathered via an attention mechanism over previous global states).
  3. Emotion GRU: Acts as a decoder. It takes the updated speaker state and the emotion representation of the previous utterance to predict the current emotion.
The detailed architecture of DialogueRNN, illustrating the interaction between Global, Party, and Emotion GRUs alongside the attention mechanism.

The authors also introduce variants, including a Bidirectional DialogueRNN (which looks at both past and future utterances) and DialogueRNN+Att (which applies an attention mechanism over final emotion representations to find relevant context from anywhere in the dialogue).

Experimental Setup

The model was evaluated on two standard emotion recognition datasets:

  • IEMOCAP: A dataset of dyadic (two-person) video conversations classified into six discrete categories: happy, sad, neutral, angry, excited, and frustrated.
  • AVEC (2012): A dataset featuring interactions between humans and AI agents, using continuous affective attributes: valence, arousal, expectancy, and power.

Both datasets were evaluated primarily using textual features extracted via CNNs, though multimodal (text + audio + video) experiments were also conducted.

Key Results and Discussion

On the IEMOCAP dataset (text-only), the base DialogueRNN outperformed the previous state-of-the-art (CMN) by 2.77% in accuracy and 3.76% in F1-score. The best performing variant, BiDialogueRNN+Att, achieved an F1-score of 62.75%, a massive 6.62% improvement over CMN. On the AVEC dataset, DialogueRNN consistently achieved lower Mean Absolute Error (MAE) and higher Pearson correlation ($r$) across all attributes.

Insights

  • Individual tracking is paramount: Ablation studies showed that removing the "Party State" caused the biggest drop in performance (4.33% F1-score). Knowing who is speaking is the most vital component.
  • Listeners don't need explicit updates: Explicitly updating the listener's state based on visual cues did not improve performance. The internal state of a listener seemingly only impacts the conversation when they eventually speak.
  • Long-term emotional dependencies: Attention weights revealed the model frequently looks 20 to 40 turns into the past or future to disambiguate emotions, such as distinguishing "excited" from "happy."

Conclusion and Future Work

While DialogueRNN sets a new benchmark, it faces challenges with abrupt emotional shifts—correctly predicting only 47.5% of such instances compared to 69.2% for stable emotions. It also occasionally confuses similar emotions like "angry" and "frustrated."

Future work will focus on scaling the model to handle multi-party settings (more than two speakers), which introduces significantly more complex inter-personal dynamics.

Summary updated

BibTeX
@inproceedings{majumder2019dialoguernn,
  author = {Navonil Majumder and Soujanya Poria and Devamanyu Hazarika and Rada Mihalcea and Alexander F. Gelbukh and Erik Cambria},
  title = {{DialogueRNN: An Attentive RNN for Emotion Detection in Conversations}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33016818},
}
Figure