arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1907.05339cs.CLcs.LG
收藏

ReCoSa:基于自注意的关联语境检测多轮对话生成

ReCoSa: Detecting the Relevant Contexts with Self-Attention for Multi-turn Dialogue Generation

Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学)

Hainan Zhang, Yanyan Lan, Liang Pang, Jiafeng Guo, Xueqi Cheng

摘要:

在多话轮对话生成中,回应通常只与少数几个上下文相关。因此,理想的模型应该能够检测这些相关的上下文,并相应地产生合适的响应。然而,广泛使用的分层递归编码器解码器模型只是不加区别地对待所有的上下文,这可能会损害后续的响应生成过程。一些研究者尝试使用余弦相似度或传统的注意力机制来寻找相关语境,但这些方法要么存在关联假设不足,要么存在位置偏差问题。在本文中,我们提出了一个新的模型,名为ReCoSa,来解决这个问题。首先,进行词级LSTM编码器以获得每个上下文的初始表示。然后,自我注意力机制被用来更新上下文和掩蔽响应表示。最后,计算每个上下文和响应表示之间的注意力权重,并将其用于进一步的解码过程。在中文客户服务数据集和英文Ubuntu对话数据集上的实验结果表明,ReCoSa在基于度量的评估和人工评估方面都显着优于基线模型。对注意力的进一步分析表明,ReCoSa检测到的相关上下文与人类的理解高度一致,验证了ReCoSa的正确性和可解释性。

英文摘要:

In multi-turn dialogue generation, response is usually related with only a few contexts. Therefore, an ideal model should be able to detect these relevant contexts and produce a suitable response accordingly. However, the widely used hierarchical recurrent encoderdecoder models just treat all the contexts indiscriminately, which may hurt the following response generation process. Some researchers try to use the cosine similarity or the traditional attention mechanism to find the relevant contexts, but they suffer from either insufficient relevance assumption or position bias problem. In this paper, we propose a new model, named ReCoSa, to tackle this problem. Firstly, a word level LSTM encoder is conducted to obtain the initial representation of each context. Then, the self-attention mechanism is utilized to update both the context and masked response representation. Finally, the attention weights between each context and response representations are computed and used in the further decoding process. Experimental results on both Chinese customer services dataset and English Ubuntu dialogue dataset show that ReCoSa significantly outperforms baseline models, in terms of both metric-based and human evaluations. Further analysis on attention shows that the detected relevant contexts by ReCoSa are highly coherent with human's understanding, validating the correctness and interpretability of ReCoSa.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑