Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (18): 130-136.DOI: 10.3778/j.issn.1002-8331.2101-0329

• Generative Adversarial Networks • Previous Articles     Next Articles

Emotional Dialogue Response Generation Based on Generative Adversarial Network

LI Kaiwei, MA Li   

  1. 1.Network and Data Center, Northwest University, Xi’an 710127, China
    2.School of Computer, Xi’an University of Posts & Telecommunications, Xi’an 710121, China
  • Online:2022-09-15 Published:2022-09-15

基于生成对抗网络的情感对话回复生成

李凯伟,马力   

  1. 1.西北大学 网络和数据中心,西安 710127
    2.西安邮电大学 计算机学院,西安 710121

Abstract: In recent years, with the development of neural network technology and natural language processing technology, the research on dialogue generation based on deep neural networks has made breakthrough progress, making human-machine dialogue systems widely used in life to provide convenience, such as e-commerce customer service, voice assistant, etc. However, existing models tend to produce general answers and generally lack emotional factors. To solve this problem, this paper proposes an emotional dialogue content generation model based on a generative confrontation network—EC-GAN(emotional conversation generative adversarial network), which generates more meaningful and customizable emotional responses by combining multi-index rewards and emotional editing constraints. For the generator, the Seq2Seq model is used to generate responses, accept the rewards of the discriminator, and guide the generated sentence to improve diversity and emotional richness. For the discriminator, dual discriminator and the content discriminator is used to determine whether the reply belongs to general response, the emotion discriminator discriminates the consistency between the emotion of the generated sentence and the specified emotion category, and the discriminating result is fed back to the generator to guide the generation of the reply. The emotional changes between input and response are paid attention to and the directionality of interactive emotional resonance is verified. Experiments in NLPCC 2017 Shared Task 4—emotional conversation generation show that the model can not only improve the fluency and diversity of responses, but also significantly increase the emotional richness.

Key words: emotional dialogue generation, emotional editing, generative adversarial network, multiple classifier

摘要: 近年来,随着神经网络技术和自然语言处理技术的不断深入发展,基于深度神经网络的对话生成研究取得了突破性的进展,使得人机对话系统广泛应用于生活中,提供便利,比如电商客服、语音助手等。然而,现有的模型倾向于产生一般的回答,普遍缺乏情感因素。针对该问题,提出了一种基于生成对抗网络的情感对话内容生成模型——EC-GAN(emotional conversation generative adversarial network),通过结合多指标奖励与情感编辑约束产生更有意义和可定制的情感回复。对于生成器,使用Seq2Seq模型生成回复,接受判别器的奖励,引导生成句子的回复,提高多样性和情感丰富度;对于判别器,使用双判别器、内容判别器可以确定回复是否属于通用回复,情感判别器判别生成语句的情感与指定的情感类别的一致性,并将判别结果反馈到生成器,指导回复生成。注意观察输入与回复之间的情感变化,验证交互情感的共鸣度存在的方向性。在NLPCC 2017 Shared Task 4——emotional conversation generation的实验表明,模型不仅可以提高回复的流畅性和多样性,同时也显著提高了情感丰富度。

关键词: 情感对话生成, 情感编辑, 生成对抗网络, 多分类器