Abstract
Dialogue Emotion Detection (DED) is a challenging task where the emotional state of an utterance depends heavily on conversational topics and external commonsense knowledge. We present TODKAT (Topic-Driven and Knowledge-Aware Transformer), a framework that integrates a topic-augmented language model with a Transformer encoder-decoder architecture. By explicitly modeling latent topics and incorporating knowledge from ATOMIC and COMET, TODKAT achieves state-of-the-art performance on major benchmarks including MELD and EmoryNLP.
Introduction: The Challenge of Contextual Emotion
Detecting emotions in a conversation is significantly more complex than analyzing standalone sentences. The emotional valence of an utterance often shifts based on the overarching topic and the implicit knowledge shared between participants.
For instance, consider the phrase "He was doing so well." In the context of a marriage proposal, it carries a positive sentiment. However, in the context of a eulogy or a discussion about a recent death, the same words convey a tragic, negative emotion. Most traditional models struggle to capture these holistic properties—specifically how topics evolve and how commonsense reasoning (e.g., understanding that "losing a job" typically leads to "feeling stressed") informs emotional states.
Methodology: The TODKAT Framework
The TODKAT framework consists of three primary innovative components designed to address the limitations of previous DED models.
1. Topic-Driven Language Model
The authors modify a pre-trained RoBERTa model by inserting a specialized "topic layer." Utilizing a Variational Autoencoder (VAE) approach, the model learns latent topic vectors ($z_n$) for each utterance. This allows the system to ground its emotional analysis in the thematic domain of the conversation.
2. Commonsense Knowledge Integration
To bridge the gap of unstated information, TODKAT incorporates knowledge from ATOMIC, a large-scale commonsense knowledge graph. This is achieved through a dual approach:
- Retrieval: Identifying the most similar existing nodes using SBERT.
- Generation: Leveraging COMET (a generative transformer trained on ATOMIC) to synthesize relevant intentions and reactions. A Pointer Network dynamically determines which source—retrieved or generated—is more reliable for a given context.
3. Transformer Encoder-Decoder Classifier
Departing from the standard recurrent units (like GRUs) common in prior research, TODKAT employs a full Transformer architecture. The encoder processes the sequence of utterances augmented with topic and knowledge features, while the decoder predicts the sequence of emotion labels, effectively capturing the "flow" and transitions of emotions over time.
Experimental Setup and Results
TODKAT was evaluated on four widely-used dialogue emotion detection benchmarks: DailyDialog, MELD, EmoryNLP, and IEMOCAP.
Key Results
- State-of-the-Art Performance: TODKAT outperformed previous leading models, such as COSMIC, on MELD and EmoryNLP by 3-5% in Weighted Avg-F1.
- Ablation Impact: The integration of the Knowledge Base (KB) proved to be the most critical component. Removing it resulted in a performance drop of nearly 10% on EmoryNLP, highlighting commonsense as a vital element for emotional understanding.
- Topic Discovery: Even without explicit topic labels during training, the VAE-based layer successfully discovered 141 distinct topics, helping the model distinguish between ambiguous emotional states.
Insights and Discussion
Analysis of the model revealed that topics act as emotional anchors. T-SNE visualizations of learned topic vectors showed that certain topics naturally cluster with specific emotions (e.g., "Office/Work" with "disgust," "Family" with "happiness"). Furthermore, the use of a sequence-to-sequence (Seq2Seq) approach was justified by the observation that the emotion of a current utterance depends heavily on the predicted labels of preceding utterances.
Limitations and Future Work
While effective, TODKAT showed a slight performance dip on IEMOCAP, the smallest dataset, suggesting that latent topic discovery requires larger data volumes to reach full potential. Additionally, the model's reasoning is constrained by the coverage of its external knowledge sources (ATOMIC). Future research may explore multi-modal settings—incorporating audio and video signals—or the development of more empathetic conversational AI agents.
Summary updated