计算机科学 ›› 2025, Vol. 52 ›› Issue (1): 307-314.doi: 10.11896/jsjkx.231100130

• 人工智能 • 上一篇    下一篇

融合情感和常识知识的对话生成模型

程金凤, 蒋宗礼   

  1. 北京工业大学信息学部 北京 100124
  • 收稿日期:2023-11-20 修回日期:2024-05-23 出版日期:2025-01-15 发布日期:2025-01-09
  • 通讯作者: 蒋宗礼(jiangzl@bjut.edu.cn)
  • 作者简介:(996226508@qq.com)

Dialogue Generation Model Integrating Emotional and Commonsense Knowledge

CHENG Jinfeng, JIANG Zongli   

  1. Faculty of Information Technology,Beijing University of Technology,Beijing 100124,China
  • Received:2023-11-20 Revised:2024-05-23 Online:2025-01-15 Published:2025-01-09
  • About author:CHENG Jinfeng,born in 1990,postgraduate.Her main research interests include natural language processing and so on.
    JIANG Zongli,born in 1956,professor,Ph.D,Ph.D supervisor.His main research interests include network information processing and so on.

摘要: 随着深度学习技术的发展,开放域对话系统作为人机对话系统的重要分支也得到了快速发展。但目前开放域对话模型生成的回复语句依然存在同理心较差、多样性较低等问题。对此,提出一种融合情感和常识知识的对话生成模型。首先依据情感词典和常识知识图谱获取每个单词对应的常识知识向量,然后将该向量和单词本身的词嵌入向量一同输入编码器中进行编码,接着通过两阶段解码来生成回复语句:第一个解码阶段预测要生成单词的情感强度,并据此获得该单词对应的情感向量,第二阶段解码结合第一阶段编码的结果和已生成单词的词嵌入向量及其对应的常识知识向量作为输入,预测要生成的单词。实验结果表明,该模型生成的回复语句更具同理心和多样性,并且在PPL,BLEU,ACC和DISTINCT等指标上相比基线模型都有一定提升。

关键词: 对话模型, 情感词典, 常识知识图谱, 两阶段解码, 情感强度

Abstract: With the development of deep learning technology,as an important branch of human-machine dialogue system,open domain dialogue system has also developed rapidly.However,there are still problems such as poor empathy and low diversity in response sentences generated by existing dialogue models in open domains.To address these problems,a dialogue generation model integrating emotional and commonsense knowledge is proposed in this paper.Commonsense knowledge vector corresponding to each word is firstly obtained based on the emotion dictionary and commonsense knowledge graph,and the vector is input into the encoder for encoding along with the word embedding vector of the word itself.Then a two-stage decodingprocess is used to ge-nerate response sentence:the first decoding stage is to predict the emotional intensity of the word to be generated and obtain the corresponding emotional vector for that word based on it,the second decoding stage combines the encoding result of the first stage with the word embedding vector of the generated word and its corresponding common sense knowledge vector as input to predict the word to be generated.Experimental results show that the response sentences generated by the proposed model are more empathetic and diverse,and it has a certain improvement in PPL,BLEU,ACC and DISTINCT evaluation compared with the baseline models.

Key words: Dialogue model, Emotional dictionary, Commonsense knowledge graph, Two-stage decoding, Emotional intensity

中图分类号: 

  • TP391
[1]CHEN X,ZHOU Q.A survey of research onopen domain dialogue systems[J].Journal of Chinese Information Processing,2021,35(11):1-12.
[2]VINYALS O,LE Q.A neural conversational model[J].arXiv:1506.05869,2015.
[3]SHAO L,GOUWS S,BRITZ D,et al.Generating high-quality and informative conversation responses with sequence-to-sequence models[C]//Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing.2017:2210-2219.
[4]VASWANI A,SHAZEER N,PARMAR N,et al.Attention isall you need[C]//Advances in Neural Information Processing Systems.2017:5998-6008.
[5]ZHANG S X,LI J,ZHU G L,et al.Dialogue generation model based on improved encoder-decoder and emotion dictionary[J].Computer Engineering and Design,2023,44(2):570-575.
[6]KESKIN C S.From what isn’t Empathy to Empathic Learning Process[J].Procedia-Social and Behavioral Sciences,2014,116:4932-4938.
[7]SPEER R,CHIN J,HAVASI C.ConceptNet 5.5:An open multi-lingual graph of general knowledge[J].arXiv:1612.03975,2017.
[8]MOHAMMAD S.Obtaining reliable human ratings of valence,arousal,and dominance for 20000 English words[C]//Procee-dings of the 56th Annual Meeting of the Association for Computational Linguistics(volume 1:Long papers).2018:174-184.
[9]RASHKIN H,SMITH E M,LI M,et al.Towards empatheticopen-domain conversation models:A new benchmark and dataset[J].arXiv.1811.00207,2018.
[10]SERBAN I V,SORDONI A,BENGIO Y,et al.Building end-to-end dialogue systems using generative hierarchical neural network models[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2016.
[11]SERBAN I V,KLINGER T,TESAURO G.Multiresolution recurrent neural networks:An application to dialogue response generation[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2017.
[12]LI J,MONROE W,RITTER A,et al.Deep reinforcement lear-ning for dialogue generation[J].arXiv:1606.01541,2016.
[13]LIU L M,CHEN Y Z,ZHEN J T.Multi-turn Dialogue Model for Domain Data Augmentation and Multi-granularity Semantic Understanding[J].Journal of Chinese Computer Systems.2024,45(7):1585-1591.
[14]CHENG T T,YAO C L,YU X Q,et al.Empathetic DialogueGeneration by Incorporating Commonsense Knowledge Based on Multi-Head Attention Mechanism[J].Computer Engineering,2024,50(6):94-101.
[15]ZHOU H,HUANG M,ZHANG T,et al.Emotional chattingmachine:Emotional conversation generation with internal and external memory[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2018.
[16]LIN Z,MADOTTO A,SHINI J,et al.MoEL:Mixture of empathetic listeners[C]//Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing.2019:121-132.
[17]MAJUMDER N,HONG P,PENG S,et al.MIME:MIMickingemotions for empathetic response generation[C]//Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing.2020:8968-8979.
[18]LI Q,LI P,REN Z,et al.Knowledge bridging for empathetic dia-logue generation[C]//Proceedings of the AAAI Conference on Artificial Intelligence.British Columbia,Canada,2022:10993-11001.
[19]SABOUR S,ZHENG C,HUANG M.Cem:Commonsense-aware empathetic response generation[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2022:11229-11237.
[20]WANG L,LI J,LIN Z,et al.Empathetic dialogue generation via sensitive emotion recognition and sensible knowledge selection.[C]//Findings of the Association for Computational Linguistics.2022:4634-4645.
[21]LIU Q,CHEN Y,CHEN B,et al.You impress me:Dialoguegeneration via mutual persona perception[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.2020:1417-1427.
[22]CHE M Y,LI S,YANG Y.EmpHi:Generating empathetic responses with human-like intents[C]//Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies.2022:1063-1074.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!