Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2022, Vol. 56 Issue (3): 520-530    DOI: 10.3785/j.issn.1008-973X.2022.03.011
    
Dialogue generation model based on knowledge transfer and two-direction asynchronous sequence
Yong-chao WANG1(),Yu CAO2,Yu-hui YANG1,Duan-qing XU2,*()
1. Information Technology Center, Zhejiang University, Hangzhou 310027, China
2. College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China
Download: HTML     PDF(1025KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

A dialogue generation model based on knowledge transfer and two-direction asynchronous sequence generation was proposed, aiming to the generally meaningless safe replies and the problem of a large number of repetitive words in view of the end-to-end dialogue generation models, and the challenge of introducing external knowledge into the dialogue system. The external knowledge in the knowledge base was fused into the dialogue generation model and explicitly generated in the reply sentences. A pre-trained model based on the question and answering of the knowledge base was used to obtain the knowledge expressions of the input sentences, the knowledge expressions of the candidate answers, and keywords. The keywords were then used in the reply. Two encoder-decoder structure models were proposed, and the keywords were generated explicitly in the dialogue reply by two-direction asynchronous generation. The knowledge expressions and understanding capabilities of the pre-trained model were introduced to capture knowledge information to dialog generation at the encoding and decoding stages. A repetitive detection-penalty mechanism was proposed to reduce the repeated words problem by giving weight to punish the repetitive words. Experimental results show that the model outperforms better than existing methods in both automatic evaluation and manual evaluation indicators.



Key wordsdialogue generation      knowledge entity      knowledge base question and answer      two-direction asynchronous generation      sequence-to-sequence model     
Received: 11 July 2021      Published: 29 March 2022
CLC:  TP 391  
Fund:  国家重点研发计划资助项目(2020YFC1523101, 2019YFC1521304);浙江省重点研发计划资助项目(2021C03140);宁波市2021科技创新重大专项(20211ZDYF020028)
Corresponding Authors: Duan-qing XU     E-mail: ychwang@zju.edu.cn;xdq@cs.zju.edu.cn
Cite this article:

Yong-chao WANG,Yu CAO,Yu-hui YANG,Duan-qing XU. Dialogue generation model based on knowledge transfer and two-direction asynchronous sequence. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 520-530.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2022.03.011     OR     https://www.zjujournals.com/eng/Y2022/V56/I3/520


基于知识迁移和双向异步序列的对话生成模型

针对端到端的对话生成模型普遍存在无意义安全回复和大量重复词汇的问题,和将外部知识引入对话系统的挑战,提出基于知识迁移和双向异步序列的对话生成模型.将知识库中的外部知识融合到对话生成模型并显式地生成在回复语句中;使用预训练的知识库问答模型获取输入语句的知识表达、候选知识表达以及关键字;搭建2个编码器?解码器结构,通过双向异步解码将关键字显式地生成在对话回复中;编、解码阶段均引入预训练模型的知识理解和知识表达能力,提升对话生成对知识信息的捕捉能力.提出重复检测惩罚机制,通过赋予惩罚权重的方式减少对话生成中的重复词汇.实验结果表明,所提模型在自动评估和人工评价指标上均优于已有的对话生成方法.


关键词: 对话生成,  知识实体,  知识库问答,  双向异步生成,  序列到序列模型 
Fig.1 Overall architecture diagram of dialogue generation model based on knowledge transfer and two-direction asynchronous squence generation
问题
关系级 词汇级
written_by Harry Potter JK
1:Is JK the author of the Harry
Potter?
the author of the Harry
Potter
author
2:What book is written by JK? is written by book written
Tab.1 Examples of text matching triples with different granularities
Fig.2 Single neuron structure diagram in BiLSTM network
Fig.3 BiLSTM network structure diagram
模型 问答对/对话回复数据集 知识库数据集
名称 数量 名称 数量
知识库问答 训练集 75 910 实体 2×106
验证集 10 845 关系 31 940
测试集 21 687 三元组 1×107
对话生成 Reddit 训练集 3 384 185 实体 2×106
Reddit 验证集 8 000 关系 31 940
Reddit 测试集 16 000 三元组 1×107
Daily Dialog 训练集 41 982 实体 2×106
Daily Dialog 验证集 4 000 关系 31 940
Daily Dialog 测试集 8 000 三元组 1×107
Tab.2 Details of datasets used in research
评估层面 分值 标准
语言 0 生成回复语句不通顺且语法不正确
1 生成回复语句不通顺但语法正确
2 生成回复语句通顺但语法存在歧义
3 生成回复语句通顺且语法完全正确
知识 0 生成回复语句中完全没有引入事实知识
1 生成回复语句中引入部分事实知识
2 生成回复语句中引入事实知识全面但不准确
3 生成回复语句中引入事实知识全面且准确
Tab.3 Artificial evaluation criteria for evaluating dialogue generative model
模型 BLEU PPL ES
Reddit Daily Dialog Reddit Daily Dialog Reddit Daily Dialog
Seq2Seq 0.21 0.23 54.94 67.23 0.564 0.443
CopyNet 0.27 0.22 47.54 54.78 0.932 0.769
CCM 0.24 0.25 43.78 57.45 1.034 0.947
TransDG 0.34 0.33 40.19 48.19 1.148 1.026
本研究 0.39 0.37 38.77 44.83 1.482 1.279
Tab.4 Statistics of automatic evaluation results with different models
模型 ${{R} }_{\text{l} }$ ${{R} }_{\text{k} }$ ${{R} }_{\text{h} }$
Seq2Seq 0.49 0.80 0.65
CopyNet 1.08 1.47 1.28
CCM 0.96 1.87 1.42
TransDG 2.13 1.79 1.96
原始数据 2.84 2.56 2.70
本研究 2.32 1.95 2.14
Tab.5 Statistics of manual evaluation results with different models
模型 文本类型 文本内容
原始数据 输入 Interstellar is a pretty good movie. we will tell you it is a documentary.
原始数据 回复 I gonna watch that one next week! I like documentary. But I heard the ending to interstellar is just awful.
Seq2Seq 生成回复 It’s a movie, but it’s not.
CopyNet 生成回复 I 'm really very sorry but movies can be documentary.
CCM 生成回复 I’m not a movie, but I’m not a movie.
TransDG 生成回复 I’m a fan of movie, but I have not watched it yet.
本研究 生成回复 Documentary is a genre of movies, but I'll have to take your word for watching it.
Tab.6 Example comparisons of generating responses with different models
[1]   FERGUSON G, ALLEN J, MILLER B. TRAINS-95: towards a mixed-initiative planning assistant [C]// Proceedings of the Third Conferece on Artificial Intelligence Planning Systems. Edinburgh: [s.n.], 1996: 70-77.
[2]   GRAESSER A C, CHIPMAN P, HAYNES B C, et al AutoTutor: an intelligent tutoring system with mixed-initiative dialogue[J]. IEEE Transactions on Education, 2005, 48 (4): 612- 618
doi: 10.1109/TE.2005.856149
[3]   WANG H, LU Z, LI H, et al. A dataset for research on short-text conversations [C]// Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing. Seattle: ACL, 2013: 935-945.
[4]   RITTER A, CHERRY C, DOLAN W B. Data-driven response generation in social media [C]// Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing. Edinburgh: ACL, 2011: 583-593.
[5]   VINYALS O, LE Q V. A neural conversational model [EB/OL]. [2021-06-22]. https://arxiv.org/pdf/1506.05869v1.pdf.
[6]   SHANG L, LU Z, LI H. Neural responding machine for short-text conversation [C]// Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing. Beijing: ACL, 2015: 1577-1586.
[7]   SERBAN I, 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. Phoenix: AAAI, 2016: 3776-3783.
[8]   LI J, GALLEY M, BROCKETT C, et al. A diversity-promoting objective function for neural conversation models [C]// The 2016 Conference of the North American Chapter of the Association for Computational Linguistics. San Diego: [s.n.]. 2016: 110-119.
[9]   ZHOU H, YOUNG T, HUANG M, et al. Commonsense knowledge aware conversation generation with graph attention [C]// Proceedings of the 27th International Joint Conference on Artificial Intelligence. Stockholm: [s.n.]. 2018: 4623-4629.
[10]   LONG Y, WANG J, XU Z, et al. A knowledge enhanced generative conversational service agent [C]// Proceedings of the 6th Dialog System Technology Challenges (DSTC6) Workshop. Long Beach: [s.n.], 2017.
[11]   GHAZVININEJAD M, BROCKETT C, CHANG M W, et al. A knowledge-grounded neural conversation model [EB/OL]. [2021-06-22]. https://arxiv.org/pdf/1702.01932.pdf.
[12]   ZHU W, MO K, ZHANG Y, et al. Flexible end-to-end dialogue system for knowledge grounded conversation [EB/OL]. [2021-06-23]. https://arxiv.org/pdf/1709.04264v1.pdf.
[13]   LIU S, CHEN H, REN Z, et al. Knowledge diffusion for neural dialogue generation [C]// Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics. Melbourne: [s.n.], 2018: 1489-1498.
[14]   LIAN R, XIE M, WANG F, et al. Learning to select knowledge for response generation in dialog systems [C]// Proceedings of the 28th International Joint Conference on Artificial Intelligence. Macao: [s.n.], 2019: 5081.
[15]   WU S, LI Y, ZHANG D, et al. Diverse and informative dialogue generation with context-specific commonsense knowledge awareness [C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Online: [s.n.], 2020: 5811-5820.
[16]   ZHOU S, RONG W, ZHANG J, et al. Topic-aware dialogue generation with two-hop based graph attention [C]// ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). Toronto: IEEE, 2021: 7428-7432.
[17]   XU H, BAO J, ZHANG G. Dynamic knowledge graph-based dialogue generation with improved adversarial meta-learning [EB/OL]. [2021-06-17]. https://arxiv.org/ftp/arxiv/papers/2004/2004.08833.pdf.
[18]   AUER S, BIZER C, KOBILAROV G, et al. DBpedia: a nucleus for a web of open data [M]// ABERER K, CHOI K-S, NOY N, et al. The semantic web. Heidelberg: Springer, 2007: 722-735.
[19]   BOSSELUT A, LE BRAS R, CHOI Y. Dynamic neuro-symbolic knowledge graph construction for zero-shot commonsense question answering [C]// Proceedings of the 35th AAAI Conference on Artificial Intelligence. Vancouver: AAAI, 2021: 4923-4931.
[20]   WANG J, LIU J, BI W, et al. Improving knowledge-aware dialogue generation via knowledge base question answering [EB/OL]. [2021-06-22]. https://arxiv.org/pdf/1912.07491v1.pdf.
[21]   CHAUDHURI D, RONY M R A H, LEHMANN J. Grounding dialogue systems via knowledge graph aware decoding with pre-trained transformers [C]// The Semantic Web 18th International Conference. Auckland: Springer, 2021: 323-339.
[22]   王勇超, 杨英宝, 曹钰, 邢卫 基于对抗学习和全局知识信息的关系检测技术研究[J]. 计算机应用研究, 2021, 38 (5): 1327- 1330
WANG Yong-chao, YANG Ying-bao, CAO Yu Research on relationship detection technology based on adversarial learning and global knowledge information[J]. Computer Application Research, 2021, 38 (5): 1327- 1330
[23]   MOU L, SONG Y, YAN R, et al. Sequence to backward and forward sequences: a content-introducing approach to generative short-text conversation [C]// Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers. Osaka: ACL, 2016: 3349-3358.
[24]   YU M, YIN W, HASAN K S, et al. Improved neural relation detection for knowledge base question answering [C]// Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics. Vancouver: [s.n.], 2017: 571-581.
[25]   GARDNER M W, DORLING S R Artificial neural networks (the multilayer perceptron): a review of applications in the atmospheric sciences[J]. Atmospheric Environment, 1998, 32 (14/15): 2627- 2636
[26]   CHO K, MERRIENBOER B, GULCEHRE C, et al. Learning phrase representations using RNN encoder-decoder for statistical machine translation [C]// Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. Doha: ACL, 2014: 1724-1734.
[27]   张全聪 略谈英语词的重复形式[J]. 英语知识, 1991, (1): 30
ZHANG Quan-cong On the repetitive forms of English words[J]. English knowledge, 1991, (1): 30
[28]   BORDES A, USUNIER N, CHOPRA S, et al. Large-scale simple question answering with memory networks [EB/OL]. [2021-06-17]. https://arxiv.org/pdf/1506.02075.pdf.
[29]   LI Y, SU H, SHEN X, et al. DailyDialog: a manually labelled multi-turn dialogue dataset [C]// Proceedings of the Eighth International Joint Conference on Natural Language Processing. Taipei: AFNLP, 2017: 986-995.
[30]   CAI H, CHEN H, SONG Y, et al. Data manipulation: towards effective instance learning for neural dialogue generation via learning to augment and reweight [C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Online: [s.n.], 2020: 6334-6343.
[31]   KIM S E, LIM Y S, PARK S B Strong influence of responses in training dialogue response generator[J]. Applied Sciences, 2021, 11 (16): 7415
doi: 10.3390/app11167415
[32]   PENNINGTON J, SOCHER R, MANNING C D. Glove: global vectors for word representation [C]// Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. Doha: ACL, 2014: 1532-1543.
[33]   KINGMA D P, BA J. Adam: a method for stochastic optimization [C]// Proceedings of the 3rd International Conference on Learning Representations. San Diego: [s.n.], 2015.
[34]   SUTSKEVER I, VINYALS O, LE Q V. Sequence to sequence learning with neural networks [EB/OL]. [2021-06-17]. https://arxiv.org/pdf/1409.3215.pdf.
[1] Ruo-ran CHENG,Xiao-li ZHAO,Hao-jun ZHOU,Han-chen YE. Review of Chinese font style transfer research based on deep learning[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 510-519, 530.
[2] Huang-he ZHENG,Zhi-qiu HUANG,Wei-wei LI,Yao-shen YU,Yong-chao WANG. API recommendation method based on natural nearest neighbors and collaborative filtering[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 494-502.
[3] Lin-li LI,Fu GU,Hao LI,Xin-jian GU,Guo-fu LUO,Zhi-qiang WU,Yi-jin GANG. Framework and key technologies of digital twin system cyber security under perspective of bionics[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(3): 419-435.
[4] Lin TONG,Zheng GUAN,Li-wei WANG,Wen-tao YANG,Yang YAO. New energy ramp event prediction based on time series decomposition and error correction[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 338-346.
[5] Ting WANG,Xiao-fei ZHU,Gu TANG. Knowledge-enhanced graph convolutional neural networks for text classification[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 322-328.
[6] Fei HE,Cang-hong JIN,Ming-hui WU. Uncertain behavior sequence prediction method based on intent identification[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 254-262.
[7] Ying-li LIU,Rui-gang WU,Chang-hui YAO,Tao SHEN. Construction method of extraction dataset of Al-Si alloy entity relationship[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 245-253.
[8] Yuan-jun NONG,Jun-jie WANG,Hong CHEN,Wen-han SUN,Hui GENG,Shu-yue LI. A image caption method of construction scene based on attention mechanism and encoding-decoding architecture[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 236-244.
[9] Hang-yao TU,Wan-liang WANG,Jia-chen CHEN,Guo-qing LI,Fei WU. Dehazing algorithm combined with atmospheric scattering model based on generative adversarial network[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 225-235.
[10] Pei-zhi WEN,Jun-mou CHEN,Yan-nan XIAO,Ya-yuan WEN,Wen-ming HUANG. Underwater image enhancement algorithm based on GAN and multi-level wavelet CNN[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 213-224.
[11] Hong-zhao DONG,Hao-jie FANG,Nan ZHANG. Multi-scale object detection algorithm for recycled objects based on rotating block positioning[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(1): 16-25.
[12] Xin WANG,Qiao-hong CHEN,Qi SUN,Yu-bo JIA. Visual question answering method based on relational reasoning and gating mechanism[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(1): 36-46.
[13] Tong CHEN,Jian-feng GUO,Xin-zhong HAN,Xue-li XIE,Jian-xiang XI. Visible and infrared image matching method based on generative adversarial model[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(1): 63-74.
[14] Hao-yuan WANG,Yu LIANG,Wei ZHANG. Real-time smoke segmentation algorithm fused with multi-resolution representation[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(12): 2334-2341.
[15] Yue-lin CHEN,Wen-jing TIAN,Xiao-dong CAI,Shu-ting ZHENG. Text matching model based on dense connection networkand multi-dimensional feature fusion[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(12): 2352-2358.