Topic-Driven and Knowledge-Aware Transformer for Dialogue Emotion Detection (2021)

Abstract: Emotion detection in dialogues is challenging as it often requires the identification of thematic topics underlying a conversation, the relevant commonsense knowledge, and the intricate transition patterns between the affective states. In this paper, we propose a Topic-Driven Knowledge-Aware Transformer to handle the challenges above. We firstly design a topic-augmented language model (LM) with an additional layer specialized for topic detection. The topic-augmented LM is then combined with commonsense statements derived from a knowledge base based on the dialogue contextual information. Finally, a transformer-based encoder-decoder architecture fuses the topical and commonsense information, and performs the emotion label sequence prediction. The model has been experimented on four datasets in dialogue emotion detection, demonstrating its superiority empirically over the existing state-of-the-art approaches. Quantitative and qualitative results show that the model can discover topics which help in distinguishing emotion categories.

## introduction the abundance in dialogues extracted from online conversations and tv series provides unprecedented opportunity to train models for automatic emotion detection, which are important for the development of empathetic conversational agents or chat bots for psychotherapy @xcite @xcite . however, it is challenging to capture the contextual semantics of personal experience described in one's utterance. for example, the emotion of the sentence "i just passed the exam" can be either happy or sad depending on the expectation of the subject. there are strands of works utilizing the dialogue context to enhance the utterance representation @xcite ; a: oh , spinach , i think. a: i like drinking tea at teahouses. b: oh, so do i. ☺ b: great. we can chat while enjoying a cup there. a: why don't we go for one now? ## experimental setup in this section, we present the details of the datasets used, the methods for comparison, and the implementation details of our models. datasets we use the following datasets for experimental evaluation: dailydialog @xcite is collected from daily communications. it takes the ekman's six emotion types @xcite as the annotation protocol, that is, it annotates an utterance with one of the six basic emotions: anger, disgust, fear, happiness, sadness, or surprise. those showing ambiguous emotions are annotated as neutral. meld @xcite is constructed from scripts of 'friends', a tv series on urban life. same as dailydialog, the emotion label falls into ekman's six emotion types, or neutral. iemocap @xcite is built with subtitles from improvised videos. its emotion labels are happy, sad, neutral, angry, excited and frustrated. emorynlp (zahiri and choi, 2018) foot_3 is also built with conversations from 'friends' tv series, but with a slightly different annotation scheme in which disgust, anger and surprise become peaceful, mad and powerful, respectively. following @xcite and @xcite , the 'neutral' label of dailydialog is not counted in the evaluation to avoid highly imbalanced classes. for meld and emorynlp, we consider a dialogue as a sequence of utterances from the same scene id. baselines we compare the performance of tod-kat with the following methods: higru @xcite simply inherits the recurrent attention framework that an attention layer is placed between two grus to aggregate the signals from the encoder gru and pass them to the decoder gru. dialoguegcn @xcite creates a graph from interactions of speakers to take into account the dialogue structure. a graph convolutional network (gcn) is employed to encode the speakers. emotion labels are predicted with the combinations of the global context and speakers' status. ket @xcite is the first model which integrates common-sense knowledge extracted from conceptnet and emotion information from an emotion lexicon into conversational text. a transformer encoder is employed to handle the influence from past utterances. cosmic @xcite is the state-of-theart approach that leverages atomic for improved emotion detection. comet is employed in their model to retrieve the event-eccentric commonsense knowledge from atomic. we modified the script 6 of language model finetuning in the hugging face library @xcite for the implementation of topic-driven finetuning. we use one transformer encoder layer. as for the decoder, there are n layers where n is the number of utterances in a dialogue. we refer the readers to the appendix for the detailed settings of the proposed models. ## results and analysis comparison with baselines experiment results of todkat and its ablations are reported in ablation study the lower half of ## conclusion we have proposed a topic-driven and knowledge-aware transformer model that incorporates topic representation and the commonsense knowledge from atomic for emotion detection in dialogues. a topic-augmented language model based on finetuning has been developed for topic extraction. pointer network and additive attention have been explored for knowledge selection. all the novel components have been integrated into the transformer encoder-decoder structure that enables seq2seq prediction. empirical results demonstrate the effectiveness of the model in topic representation learning and knowledge integration, which have both boosted the performance of emotion detection.