Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (14): 114-123.DOI: 10.3778/j.issn.1002-8331.2203-0588

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Empathetic Response Generation by Integrating Topic Prediction and Emotion Reasoning

TANG Hong, PENG Jinzhi, GUO Yanxia, LIU Jie   

  1. 1.School of Communication and Information Engineering, Chongqing University of Posts and Communications, Chongqing 400065, China
    2.Chongqing Key Lab of Mobile Communications Technology, Chongqing University of Posts and Communications, Chongqing 400065, China
  • Online:2023-07-15 Published:2023-07-15

融合主题预测和情感推理的共情回复生成方法

唐宏,彭金枝,郭艳霞,刘杰   

  1. 1.重庆邮电大学 通信与信息工程学院,重庆 400065
    2.重庆邮电大学 移动通信技术重庆市重点实验室,重庆 400065

Abstract: More and more studies begin to focus on the generation of empathetic responses. However, the existing studies often focus on the surface emotional factors affecting empathy, but ignore the changes of the topic in the dialogue and the reasons behind the emotion, which will lead to the generation of empathetic responses that are not related to the topic or lack of empathy, thus reducing the user’s interactive experience. Therefore, an empathetic response generation method integrating topic information and deep emotional information is proposed. Firstly, the method predicts the topic controlled by the context through the topic prediction module to obtain a candidate topic word sequence. Secondly, through the emotion reasoning module, the emotion tags of the dialogue context are predicted and the words related to emotion reasons in the dialogue context are detected, and an emotion reason word tag sequence is obtained. Finally, in the response generation module, the topic word gated attention mechanism and emotional reason word label gated attention mechanism are introduced to dynamically select the topic words and emotional reason words used to generate empathetic response, so as to promote the dialogue model to generate topic related and emotional resonance empathetic response. Experiments on the dataset EmpatheticDialogues show that the responses generated by this method are richer in content, more relevant in topic and more emotionally resonant than those generated by the baseline methods.

Key words: empathetic response generation, dialogue system, topic prediction module, emotion reasoning module, gated attention mechanism

摘要: 越来越多的研究开始聚焦于共情回复生成,然而现有的研究往往只关注于影响共情的表面情感因素,却忽略了对话中主题的变化和情感背后的原因,这将会导致生成的共情回复与主题不相关或共情性不足,从而降低用户的交互体验。因此提出一种融合主题信息和深层次情感信息的共情回复生成方法。通过主题预测模块进行受上下文控制的主题预测,得到一个候选主题词序列;通过情感推理模块预测出对话上下文的情感标签和检测出对话上下文中与情感原因相关的词,得到一个情感原因词标签序列;在回复生成模块中引入主题词门控注意力机制和情感原因词标签门控注意力机制,动态地选择出用于生成共情回复的主题词和情感原因词,促使对话模型生成主题相关且情感共鸣的共情回复。在数据集EmpatheticDialogues上的实验表明,该方法生成的回复的内容更加丰富、主题更加相关、情感更加共鸣。

关键词: 共情回复生成, 对话模型, 主题预测模块, 情感推理模块, 门控注意机制