Skip to main content
QUICK REVIEW

[Paper Review] A Hierarchical Transformer with Speaker Modeling for Emotion Recognition in Conversation

Jiangnan Li, Zheng Lin|arXiv (Cornell University)|Dec 29, 2020
Sentiment Analysis and Opinion MiningComputer Science22 references10 citations
TL;DR

This paper proposes a hierarchical Transformer with speaker modeling (TRMSM) for Emotion Recognition in Conversation, simplifying complex speaker interactions into binary Intra- and Inter-Speaker dependencies. By designing three specialized masks for conventional, intra-speaker, and inter-speaker attention in separate Transformer blocks, and fusing their outputs via learnable attention, the model achieves state-of-the-art performance on IEMOCAP and MELD by effectively capturing long-range contextual and speaker-aware information.

ABSTRACT

Emotion Recognition in Conversation (ERC) is a more challenging task than conventional text emotion recognition. It can be regarded as a personalized and interactive emotion recognition task, which is supposed to consider not only the semantic information of text but also the influences from speakers. The current method models speakers' interactions by building a relation between every two speakers. However, this fine-grained but complicated modeling is computationally expensive, hard to extend, and can only consider local context. To address this problem, we simplify the complicated modeling to a binary version: Intra-Speaker and Inter-Speaker dependencies, without identifying every unique speaker for the targeted speaker. To better achieve the simplified interaction modeling of speakers in Transformer, which shows excellent ability to settle long-distance dependency, we design three types of masks and respectively utilize them in three independent Transformer blocks. The designed masks respectively model the conventional context modeling, Intra-Speaker dependency, and Inter-Speaker dependency. Furthermore, different speaker-aware information extracted by Transformer blocks diversely contributes to the prediction, and therefore we utilize the attention mechanism to automatically weight them. Experiments on two ERC datasets indicate that our model is efficacious to achieve better performance.

Motivation & Objective

  • To address the computational complexity and scalability issues of existing methods that model pairwise speaker interactions in conversation.
  • To simplify speaker interaction modeling from fine-grained relations to a binary Intra- and Inter-Speaker dependency structure for better generalization and extensibility.
  • To enable long-range context modeling in hierarchical Transformers by integrating speaker-aware dependencies through custom attention masks.
  • To automatically weigh and fuse diverse speaker-aware contextual representations using an attention mechanism for improved emotion prediction.

Proposed method

  • The model uses a two-level hierarchical Transformer: BERT at the sentence level for utterance encoding, and a dialogue-level Transformer for context modeling.
  • Three distinct masks are designed: Conventional Mask for standard self-attention, Intra-Speaker Mask to attend to same-speaker utterances, and Inter-Speaker Mask to attend to all other speakers collectively.
  • Each mask is applied to a separate, independent Transformer block at the dialogue level to learn distinct representations of contextual dependencies.
  • Speaker-aware representations from the three blocks are dynamically fused using a learnable attention mechanism to prioritize informative features for emotion classification.
  • Alternative fusion strategies (addition and concatenation) are evaluated to demonstrate the superiority of the attention-based fusion.
  • The model is trained end-to-end on two public ERC datasets: IEMOCAP and MELD, with ablation studies to validate each component.

Experimental results

Research questions

  • RQ1Can simplifying speaker interaction modeling from pairwise relations to a binary Intra- and Inter-Speaker dependency structure improve scalability and performance in ERC?
  • RQ2Can specialized attention masks in a hierarchical Transformer effectively model conventional, intra-speaker, and inter-speaker dependencies simultaneously?
  • RQ3Does attention-based fusion of speaker-aware representations outperform fixed fusion methods like addition or concatenation in ERC?
  • RQ4How does the model perform with increasing context length, especially in comparison to models limited to local context?
  • RQ5To what extent do Intra- and Inter-Speaker dependencies contribute to emotion prediction in diverse conversational contexts?

Key findings

  • The proposed TRMSM model achieves state-of-the-art performance on both IEMOCAP and MELD datasets, outperforming prior methods including DialogueGCN.
  • Ablation studies show that removing either the Conventional Mask or the Inter-Speaker Mask leads to significant performance drops, confirming the importance of all three components.
  • The model with full attention-based fusion (TRMSM-Att) consistently outperforms models using addition or concatenation for feature fusion, demonstrating the effectiveness of learnable attention.
  • Performance improves with longer context windows, and TRMSM-Att achieves better results than DialogueGCN even with full context, indicating superior long-range modeling capability.
  • Case studies confirm that the model correctly identifies when Intra-Speaker dependencies (e.g., persistent emotional states) or Inter-Speaker dependencies (e.g., emotional influence from others) are most relevant to prediction.
  • On MELD, increasing the number of layers leads to overfitting on rare emotion classes (Fear, Disgust), suggesting data imbalance remains a challenge requiring further study.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.