博客专栏

EEPW首页 > 博客 > 腾讯PCG长文:探究对话数据的局部分布特性与对抗回复生成模型的内在联系(2)

腾讯PCG长文:探究对话数据的局部分布特性与对抗回复生成模型的内在联系(2)

发布人:机器之心 时间:2021-10-07 来源:工程师 发布文章

局部分布状态的描述

在这里我们希望找到一个方法,对给定 query 的回复集合 R_q 在语义空间中的局部状态进行建模和描述,这个目标可以形象地描述为确定语义空间中 R_q 这个簇的具体形状。为了达到这个目标,我们引入 free energy 首先对 (q, r) 的状态进行定义:

7.png

此处的能量函数 E 是在隐变量 H 的基础上对 (q, r) 能量状态的定义,在本文的场景下,其物理意义等价于度量 q 和 r 的语义关联。进一步地,在同样的物理意义下,我们引入 Deep Boltzmann Machine (DBM,如下图)对函数 E 进行定义如下:

8.png9.png

由此,对于一个给定的 q 和回复集合 R_q,可以得到其 average free energy:

10.png

事实上,在通过上述公式定义 average free energy 之后,(q, R_q)在语义空间中的状态已经被形式化定义了,但是由于实际训练语料是有限的,因此我们很难有效枚举 R_q 的全集,也就是说,逻辑上需要通过有限可见的 response 集合去估计实际 R_q 的近似状态,从而实现一个可操作的训练过程。

为了达到这个目的,这里不妨假设在 R_q 的集合成员在语义空间中满足正态分布,其均值向量记为 r_c,协方差矩阵为 \ sigma,于是可以得到以下引理和定理:

11.png12.png

引理 1 的意义在于明确了语义空间中的欧式距离与 free energy 的状态函数之间的依赖关系,即样本空间上的距离近似可以推导出相应能量函数上的近似。定理 1 则在引理 1 的基础上,找到了公式 9 中 average free energy 的一个近似估计,即通过正确完整训练的 DBM 在输入 q 的情况下得到 \ hat(r_c),则 F(q, \hat(r_c))即为 average free energy 的近似解。引理 1 和定理 1 的证明相对比较复杂,详见论文原文。

Hybrid Objective 与 LocalGAN

基于以上的定义和推导,一个描述给定 query 的回复集合 R_q 的空间局部分布状态的方法呼之欲出。在此之前,我们先给出描述两个回复 r_i 和 r_j 之间的能量差异的数值定义:

13.png

进一步则可以定义给定的回复簇中 R_q 中任意一个 r 相对于 r_c 的能量差异:

14.png

又根据定理 1,有如下近似关系:

15.png

这里我们称 alpha 为 (q, r) 的径向分布函数。进而,对于任意一个由生成模型 G 得到的 fake response \tilde(r),我们可以计算与其对应的真实回复 r 之间的径向分布差异:

16.png

公式 16 度量的是 r 与 \ tilde(r)相对于 cluster center 的径向分布差异。于是,通过融合经典 GAN 的训练目标与上述径向分布差异,我们最终得到了一个新的 hybrid objective,即 LocalGAN 的 training objective:

基于该训练目标,可以构造 LocalGAN 的训练算法如下:

17.png

实验结果

我们对 LocalGAN 的实际效果进行了多方面的验证,包括基于经典中英文对话训练数据 OpenSubtitles Corpus 和 Sina Weibo Corpus,使用面向相关性和多样性的典型 metric 进行评测。Baseline 方面,论文引入了截至完稿的各种主要对抗学习模型进行对比。结果如下:

18.png

在人工评测方面,主要考虑了相关性和信息丰富度的评价维度:

19.png

与此同时,我们也观察了对抗模型训练的稳定性,结果如下图:

20.png

部分参考文献:

[1]Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems 27, pages 2672-2680, 2014.

[2]Lifeng Shang, Zhengdong Lu, and Hang Li. Neural responding machine for short-text conversation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (ACL-IJCNLP), pages 1577-1586, 2015.

[3]Alessandro Sordoni, Michel Galley, Michael Auli, Chris Brockett, Yangfeng Ji, Margaret Mitchell, Jian-Yun Nie, Jianfeng Gao, and Bill Dolan. A neural network approach to context-sensitive generation of conversational responses. In Proceedings of the 14th Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), pages 196-205, 2015.

[4]Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. A diversity-promoting objective function for neural conversation models. In Proceedings of NAACL-HLT, pages 110-119, 2016.

[5]Zhen Xu, Bingquan Liu, Baoxun Wang, SUN Chengjie, Xiaolong Wang, Zhuoran Wang, and Chao Qi. Neural response generation via gan with an approximate embedding layer. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing,pages 628-637, 2017.

[6]Ruqing Zhang, Jiafeng Guo, Yixing Fan, Yanyan Lan, Jun Xu, and Xueqi Cheng. Learning to control the specicity in neural response generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1108-1117, Melbourne, Australia, July 2018a. Association for Computational Linguistics.

[7]Jun Gao, Wei Bi, Xiaojiang Liu, Junhui Li, Guodong Zhou, and Shuming Shi. A discrete cvae for response generation on short-text conversation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1898-1908, 2019. 25

[8]Bowen Wu et al., Guiding Variational Response Generator to Exploit Persona. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020). pages 53-65, 2020

[9] Gao, Jun, et al. "A Discrete CVAE for Response Generation on Short-Text Conversation." Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). 2019

[10]Jiwei Li, Will Monroe, Tianlin Shi, Alan Ritter, and Dan Jurafsky. Adversarial learning for neural dialogue generation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2157-2169, 2017.

[11]Geoffrey E. Hinton and Richard S Zemel. Autoencoders, minimum description length and helmholtz free energy. In Advances in neural information processing systems, pages 3-10, 1994.

[12]Ruslan Salakhutdinov and Geoffrey E. Hinton. Deep boltzmann machines. In International Conference on Artifcial Intelligence and Statistics, pages 448-455, 2009.

*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。



关键词: 深度学习

相关推荐

技术专区

关闭