[Paper Review] Knowledge-Enriched Transformer for Emotion Detection in Textual Conversations
This paper proposes a Knowledge-Enriched Transformer (KET) for emotion detection in textual conversations by integrating hierarchical self-attention for contextual modeling and a context-aware affective graph attention mechanism to dynamically incorporate external commonsense knowledge from ConceptNet and NRC_VAD. KET achieves state-of-the-art performance across multiple datasets, with significant F1 score improvements over prior models, demonstrating the effectiveness of jointly leveraging context and commonsense knowledge.
Messages in human conversations inherently convey emotions. The task of detecting emotions in textual conversations leads to a wide range of applications such as opinion mining in social networks. However, enabling machines to analyze emotions in conversations is challenging, partly because humans often rely on the context and commonsense knowledge to express emotions. In this paper, we address these challenges by proposing a Knowledge-Enriched Transformer (KET), where contextual utterances are interpreted using hierarchical self-attention and external commonsense knowledge is dynamically leveraged using a context-aware affective graph attention mechanism. Experiments on multiple textual conversation datasets demonstrate that both context and commonsense knowledge are consistently beneficial to the emotion detection performance. In addition, the experimental results show that our KET model outperforms the state-of-the-art models on most of the tested datasets in F1 score.
Motivation & Objective
- To address the challenge of detecting emotions in textual conversations, where context and commonsense knowledge are critical but often overlooked in existing models.
- To improve emotion detection performance by integrating hierarchical contextual modeling with dynamic, context-aware, and affectively relevant knowledge from external knowledge bases.
- To investigate the impact of both contextual information and commonsense knowledge on emotion detection, particularly in cases of implicit or nuanced emotional expressions.
- To develop a model that generalizes across diverse conversational domains and can be adapted to low-resource or multilingual settings.
Proposed method
- KET employs a hierarchical self-attention mechanism that separates context and response into encoder and decoder branches, enabling efficient modeling of conversational structure.
- The model uses cross-attention to capture inter-utterance dependencies, allowing the decoder to attend to relevant context from the encoder.
- External commonsense knowledge is retrieved from ConceptNet and linked to words via entity embeddings, with relevance weighted by a context-aware affective graph attention mechanism.
- The attention mechanism dynamically balances relatedness and affectiveness of retrieved knowledge using a learnable parameter λk, optimizing knowledge injection based on emotional relevance.
- Knowledge entities are enriched using NRC_VAD for affective values (valence, arousal, dominance), which are used to guide the attention mechanism toward emotionally salient knowledge.
- The model is trained end-to-end using cross-entropy loss on multi-class emotion classification, with ablation studies to validate the contribution of context and knowledge components.
Experimental results
Research questions
- RQ1How does integrating hierarchical self-attention improve emotion detection in conversational contexts compared to RNN- or CNN-based models?
- RQ2To what extent does dynamically incorporating commonsense knowledge from external knowledge bases enhance emotion detection performance?
- RQ3What is the optimal trade-off between knowledge relatedness and affectiveness in the attention mechanism for emotion detection?
- RQ4How does the model perform across diverse conversational datasets with varying emotional complexity and data size?
- RQ5Can the model generalize to low-resource or multilingual settings using multilingual knowledge bases and emotion lexicons?
Key findings
- KET achieves state-of-the-art F1 scores on all tested datasets, including EC (0.7451), DailyDialog (0.5544), MELD (0.5401), EmoryNLP (0.3712), and IEMOCAP (0.5389), outperforming prior models.
- Ablation studies show that removing either context or knowledge leads to significant performance drops, with context having a greater impact in longer conversations.
- The optimal λk value for the affective graph attention mechanism lies between 0.3 and 0.7, with λk=0.7 yielding the best performance on most datasets.
- Performance improves with increasing ConceptNet size, plateauing only after a certain threshold, confirming the value of extensive commonsense knowledge.
- The model struggles most with detecting disgust and fear, particularly in MELD, where the F1 score for fear is as low as 0.0667, due to their low valence and high arousal similarity and limited training data.
- The model demonstrates robustness across domains and can be adapted to other languages using multilingual knowledge bases and emotion lexicons.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.