Improving Empathetic Response Generation by Recognizing Emotion Cause in Conversations (2021)

Abstract: Current approaches to empathetic response generation focus on learning a model to predict an emotion label and generate a response based on this label and have achieved promising results. However, the emotion cause, an essential factor for empathetic responding, is ignored. The emotion cause is a stimulus for human emotions. Recognizing the emotion cause is helpful to better understand human emotions so as to generate more empathetic responses. To this end, we propose a novel framework that improves empathetic response generation by recognizing emotion cause in conversations. Specifically, an emotion reasoner is designed to predict a context emotion label and a sequence of emotion cause-oriented labels, which indicate whether the word is related to the emotion cause. Then we devise both hard and soft gated attention mechanisms to incorporate the emotion cause into response generation. Experiments show that incorporating emotion cause information improves the performance of the model on both emotion recognition and response generation.

## introduction in recent years, open-domain dialogue systems are becoming increasingly ubiquitous and have been extensively leveraged for mental healthcare and entertainment @xcite @xcite . in part, this progress is driven by advances in neural response generation models @xcite @xcite which have shown success in generating fluent and relevant responses, given a wide variety of user inputs. however, people can still feel a clear gap between humans and machines when conversing with them. one of the primary reasons is that existing dialogue systems lack emotion understanding and empathy @xcite . empathetic responding is a desirable communicative skill that can make more natural communication in daily conversations @xcite . most of the existing approaches improve empathetic response generation from two directions. the first usually promotes the model's emotion understanding @xcite @xcite . in this line of work, models are often trained to predict an emotion state of the speaker and generate a response based on the emotion state. the second focuses on improving response generation strategy @xcite @xcite . for example, @xcite proposes to use the look-ahead of user emotion to model empathetic response generation and improve the empathetic responding model via reinforcement learning. @xcite presents an ap-proach to mimic the emotion of the speaker while accounting for their affective polarity. however, both kinds of existing methods only consider using the surface information of emotions such as emotion labels to improve the quality of generated responses. the emotion cause, an essential factor for empathetic responding, is ignored. we argue that such surface information of emotions is not sufficient for empathetic responding. the model can better understand human emotions and respond empathetically if it has the ability to perform reasoning about emotions in conversations, which means it needs to identify the cause of a certain emotion. for example in to this end, we propose a novel framework to improve empathetic response generation by endowing the empathetic dialogue model with the ability to reason about human emotions in conversations. specifically, our model is able to identify the cause behind the emotions in addition to the types of emotions. our framework involves two components, an emotion reasoner and a response generator. the emotion reasoner first performs a contextlevel emotion prediction and a word-level emotion cause detection, providing emotional information for response generation. the response generator then makes use of such deep emotional information to generate empathetic responses. to incorporate emotion cause information into the response generator, we devise a gated attention mechanism and explore both hard and soft gating strategies to allow the model to focus more on words related to the emotion cause. for model training, we use multitask learning to build the connection between the emotion reasoner and the response generator. our contributions can be summarized as follows: ## related work in recent years, neural approaches to open-domain dialogue systems have achieved great progress @xcite @xcite @xcite . especially, incorporating personality and emotional features can make dialogue systems more human-like. for emotion-aware response generation, it aims at generating responses corresponding to specific emotions. several methods are proposed to tackle this task @xcite @xcite @xcite @xcite . empathetic response generation is a sub-task of emotion-aware response generation, @xcite first proposes a standard benchmark that contains large-scale empathetic conversations. @xcite adapts gpt2 @xcite to generate empathetic responses via transfer learning and continues to improve its response quality via active learning and negative training. welivita and pu (2020) develops a taxonomy of empathetic listener intents by human judges to generate more controlled and interpretable responses. @xcite utilizes reinforcement learning to improve the empathetic responding model, in which the model is rewarded with an estimated user sentiment look-ahead. @xcite models empathy in conversations through mixture of experts @xcite and gets final output based on emotion distribution. @xcite argues that empathetic response generation can mimic the emotion of the speaker, and introduces the emotion stochastic sampling strategy during training. @xcite leverages multi-type knowledge to enrich the dialogue history so that the model can soft gate: 𝑔 𝑖 = 𝑝 𝑐 𝑖 = 1 𝒗 𝑥 𝑖 , 𝑔 𝑖 ∈ [0,1] transformer encoder 𝒉 𝑥 𝑗 masked self-attention cross attention gated attention transformer encoder 𝒉 𝑥0 𝑎 0 (𝑙) 𝑎 𝑁 (𝑙) 𝑔 0 𝒒 𝑙 𝑎 𝑖 (𝑙) 𝒉 𝑥0 𝒉 𝑥1 emotion prediction 𝒗 𝑥0 𝒗 𝑥1 𝒗 𝑥 𝑗 𝒗 𝑥 𝑖 𝒗 𝑥𝑁 𝒉 𝑥 𝑖 𝒉 𝑥𝑁 emotion cause detection 𝒉 𝑥 𝑖 𝑔 𝑖 𝒒 𝑙 𝒉 𝑥𝑁 𝑔 𝑁 𝒒 𝑙 𝑎 𝑖 (𝑙) = 𝑔 𝑖 ʘ exp(𝒒 𝑙 𝒉 𝑥 𝑖 t ) 𝑗=1 𝑁 𝑔 𝑗 ʘ exp(𝒒 𝑙 𝒉 𝑥 𝑗 t ) gates: 𝑮 = 𝑔 0 , 𝑔 1 , … , 𝑔 𝑁 hard gate: 𝑔 𝑖 = gumbel(𝑐 𝑖 ), 𝑔 𝑖 ∈ {0,1} [context emotion 𝜖] ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ context emotion 𝜖 [context emotion 𝜖] attention output (a) emotion reasoner (b) response generator cls 𝑥 1 ⋯ 𝑥 𝑗 [sep] ⋯ 𝑥 𝑖 ⋯ 𝑥 𝑁 cls 𝑥 1 ⋯ 𝑥 𝑗 [sep] ⋯ 𝑥 𝑖 ⋯ 𝑥 𝑁 ⋯ bos 𝑦 1 ⋯ 𝑦 𝑀 𝒀: 𝑦 1 ⋯ 𝑦 𝑀 [eos] ⋯ ⋮ ⋮ multi-head attention decoder ⋯ ⋯ figure 1: architecture of the proposed framework. our framework contains two components: an emotion reasoner (a) and a response generator (b). the emotion reasoner is used to predict a context emotion label and locate words related to the emotion cause, based on the dialogue context. the response generator makes use of the emotional information obtained from the emotion reasoner to generate the response. specifically, a gated attention mechanism is designed to incorporate emotion cause information into the response generator. accurately perceive and respond to implicit emotions. li et al. (2020a) exploits user feedback and multi-granularity emotion, and introduces an adversarial learning framework to capture the nuances of user emotion. emotion cause extraction (ece), aims at exploring the reason for emotion change and what causes a certain emotion. lee et al. (2010); chen et al. (2010) first define it as a word-level and clauselevel task respectively. gui et al. (2016) proposes the first open dataset for ece, and it serves as a standard benchmark up till now. xia and ding (2019) reforms ece into emotion-cause pair extraction task. similar to ece, poria et al. (2020) first introduces the task of recognizing emotion cause in conversations. ## task formulation we formulate the task of empathetic response generation as follows. given a dialogue context following the previous work @xcite , we concatenate the l utterances together as input. specifically, we separate utterances by @xcite tokens and insert a special token [cls] at the start of the sequence to form an input sequence @xmath0, x 1 , • • • , x n } (see figure 1 for example). therefore, given an input sequence x, our goal is to generate an empathetic response @xmath1, y 1 , • • • , y m } that is emotionally appro-priate and relevant to the dialogue context. ## approach our framework that explicitly considers the emotion cause for empathetic response generation is shown in figure 1 . our framework contains two components: an emotion reasoner and a response generator. the emotion reasoner is used to predict a context emotion label and locate words related to the emotion cause, based on the dialogue context. the response generator is responsible for incorporating the information obtained from the emotion reasoner then generating the response. below we first introduce how we construct training samples for emotion cause detection, then we describe the two components in detail. ## conclusion in this paper, we presented a novel framework that can incorporate emotion cause information into empathetic response generation. our approach consists of an emotion reasoner and a response generator. the emotion reasoner first predicts a context emotion label and locating the words in the dia-logue context which are associated with the emotion cause. the response generator then generates a response with the predicted context emotion label and the emotion cause information. to incorporate the emotion cause information into response generation, we devise a gated attention mechanism and explore both hard and soft gating strategies. automatic and manual evaluations show that our proposed models can generate more meaningful and empathetic responses.