Incorporating external graph knowledge into neural chatbot models has been proven effective for enhancing dialogue generation. However, in conventional graph neural networks (GNNs), message passing on a graph is independent from text, resulting in the graph representation hidden space differing from that of the text. This training regime of existing models therefore leads to a semantic gap between graph knowledge and text. In this study, we propose a novel framework for knowledge graph enhanced dialogue generation. We dynamically construct a multi-hop knowledge graph with pseudo nodes to involve the language model in feature aggregation within the graph at all steps. To avoid the semantic biases caused by learning on vanilla subgraphs, the proposed framework applies hierarchical graph attention to aggregate graph features on pseudo nodes and then attains a global feature. Therefore, the framework can better utilise the heterogeneous features from both the post and external graph knowledge. Extensive experiments demonstrate that our framework outperforms state-of-the-art (SOTA) baselines on dialogue generation. Further analysis also shows that our representation learning framework can fill the semantic gap by coagulating representations of both text and graph knowledge. Moreover, the language model also learns how to better select knowledge triples for a more informative response via exploiting subgraph patterns within our feature aggregation process. Our code and resources are available at https://github.com/tangg555/SaBART.
翻译:将外部图知识融入神经聊天机器人模型已被证明可有效增强对话生成。然而,传统图神经网络(GNNs)中,图上的消息传递与文本相互独立,导致图表示的隐空间与文本隐空间存在差异。因此,现有模型的训练机制会造成图知识与文本之间的语义鸿沟。本研究提出一种新颖的知识图谱增强对话生成框架。我们通过动态构建带伪节点的多跳知识图谱,使语言模型在所有步骤中参与图内的特征聚合。为避免在原始子图上学习导致的语义偏差,该框架应用层级图注意力机制在伪节点上聚合图特征,进而获取全局特征。由此,框架能更好地利用对话上下文与外部图知识中的异质特征。大量实验表明,本框架在对话生成任务上优于现有最优(SOTA)基线模型。进一步分析显示,我们的表示学习框架可通过融合文本与图知识的表示来填补语义鸿沟。此外,语言模型还能通过特征聚合过程中的子图模式挖掘,学习如何更精准地选择知识三元组以生成信息更丰富的回复。我们的代码与资源已开源至 https://github.com/tangg555/SaBART。