Emp- RFT : Empathetic Response Generation via Recognizing Feature Transitions between Utterances (2022)

Abstract: Each utterance in multi-turn empathetic dialogues has features such as emotion, keywords, and utterance-level meaning. Feature transitions between utterances occur naturally. However, existing approaches fail to perceive the transitions because they extract features for the context at the coarse-grained level. To solve the above issue, we propose a novel approach of recognizing feature transitions between utterances, which helps understand the dialogue flow and better grasp the features of utterance that needs attention. Also, we introduce a response generation strategy to help focus on emotion and keywords related to appropriate features when generating responses. Experimental results show that our approach outperforms baselines and especially, achieves significant improvements on multi-turn dialogues.

## introduction humans have empathy which is the ability to understand situations others have experienced and emotions they have felt from the situations @xcite . that ability also enables to interest and console others while sharing a conversation. thus, empathetic response generation task has been considered noteworthy. figure 1 shows an example of a multi-turn empathetic dialogue dataset, empatheticdialogues @xcite constructed to solve the task. a speaker talks about one of 32 emotion labels and a situation related to the emotion label, and a listener empathizes, responding to the speaker. existing approaches @xcite @xcite @xcite for the task achieve promising results but show limitations when dialogues become long because they extract features from the concatenation of all tokens in the context at the coarse-grained level. however, at the fine-grained level, each utterance in multi-turn empathetic dialogues has features such as emotion, keywords that each denote what an interlocutor feels and primarily says, and utterance-level meaning that can be known when looking at the entire utterance. in addition, it is a natural phenomenon that features of each utterance differ from the previous, as the dialogue is prolonged. hence, we humans instinctively recognize these feature transitions, which helps us understand how the dialogue flows and grasp the features of utterance that needs attention. also, humans respond to others, focusing on emotion and keywords related to appropriate features. take the example in figure 1 . in the first turn, the speaker is excited to see the speaker's sister in a long time by mentioning keywords (e.g., 'sister', 'visit', 'decade'), and the listener reacts to the excitement and asks about her by mentioning keywords (e.g., 'exciting', 'see', 'live'). however, in the second speaker utterance, the speaker becomes embarrassed because of the speaker's boyfriend's bad table manners by mentioning keywords (e.g., 'boyfriend', 'loud', 'eater'). we humans recognize that the features of second speaker utterance have changed compared to those of previous utterances, and usually decide to be attentive to the features of the second utterance. then, by focusing on information such as keywords of that utterance and emotion and keywords (e.g., 'bad', 'impression') related to the features of that utterance, humans generate empathetic, coherent, and non-generic responses like response a. however, the model which produces non-empathetic and incoherent response like response b, considers that the features of the first speaker utterance represent the context from the coarse-grained view. in this paper, we first propose to annotate features on each utterance at the fine-grained level ( §4). then, we introduce a novel empathetic response generator based on recognizing feature transitions (emp-rft), which has two essential parts: feature transition recognizer and response generation strategy. the first part recognizes feature transitions between utterances, utilizing comparison functions of @xcite , which makes emp-rft understand the dialogue flow and grasp appropriate features of utterance that needs attention. the second part helps emp-rft focus on emotion and keywords related to appropriate features. specifically, by fusing context with keywords, such keywords are emphasized within each utterance and get more attention when generating responses. then, emp-rft detects next emotion and keywords that denote emotion and keywords of the response, which helps figure out proper emotion and keywords for generation. lastly, inspired by @xcite ; @xcite , a new mechanism of plug and play language model(pplm), contrastive pplm using contrastive loss, is introduced, which controls emp-rft to actively use the keywords detected to be next keywords when generating responses. we conduct experiments on empatheticdialogues. emp-rft outperforms strong baselines, particularly, when dialogues are multi-turn. our main contributions are as follows. (1) we introduce a novel approach that recognizes feature transitions between utterances, which results in understanding how the dialogue flows and grasping the features of utterance that the model should be attentive to. recently, many studies have shown remarkable improvements through recognizing transitions of features between utterances in open-domain multiturn dialogues. @xcite perceive transitions of emotion states for context modelling. @xcite propose a module to manage keyword transitions. @xcite model external knowledge transitions to select a knowledge used for generation. in multi-turn empathetic dialogues, we consider emotions, keywords, and utterancelevel meaning @xcite as important features of each utterance and propose a novel approach of recognizing feature transitions between utterances. ## task formulation given context @xmath0, . . . , u ## data preparataion in this section, we introduce feature annotation in the speaker and listener utterances. ## the emp-rft model in this section, we detail emp-rft whose overall architecture is shown in figure 2 . ## experiments 6.1 dataset and baselines dataset. experiments were conducted on empa-theticdialogues (rashkin et al., 2019) which contains 24,850 multi-turn dialogues. for each dialogue, we can extract a certain number of instances corresponding to the number of turns within the dialogue. this totals to 47,611 instances, where 22,761 are multi-turn. in one turn of a dialogue, a speaker talks about one of 32 evenly distributed emotion labels and a situation related to the emotion label and a listener empathizes by responding to the speaker. following the instructions of the dataset, we use 8:1:1 train/valid/test split. baselines. we compared emp-rft to the following five baseline models: (1) moel @xcite is a transformer-based generative model, which has decoders for each emotion and integrates outputs of the decoders according to predicted emotion distribution. (2) empdg @xcite uses emotional words and consists of an adversarial framework including a generator and discriminators which reflect the user feedback. (3) mime @xcite is also a transformer-based generative model which mimics user emotion based on emotion grouping and uses stochastic sampling for varied responses. (4) mime+focused s1 and (5) blender+focused s1 @xcite attach rsa framework to mime and blender @xcite . blender is a pretrained model with 90m parameters size, using an immense number of dialogues. it is finetuned on empatheticdialogues. using distractors and bayes' rules, rsa framework makes the models focus on certain parts of the post, such as emotion cause words when generating responses in the single-turn dialogues foot_3 . implementation details about emp-rft and baselines are covered in appendix a.1. ## conclusion we proposed a novel approach that recognizes feature transitions between utterances, which led to understanding the dialogue flow and grasping the features of utterance that needs attention. also, to make our model focus on emotion and keywords related to appropriate features, we introduced a response generation strategy including fusing context with keywords, next emotion and keywords detection, and contrastive pplm. experimental results showed that our model outperformed baselines, and especially, achieved significant improvements on multi-turn instances, which proved our approach was effective for empathetic, coherent, and nongeneric response generation.