Language models have achieved impressive performances on dialogue generation tasks. However, when generating responses for a conversation that requires factual knowledge, they are far from perfect, due to an absence of mechanisms to retrieve, encode, and reflect the knowledge in the generated responses. Some knowledge-grounded dialogue generation methods tackle this problem by leveraging facts from Knowledge Graphs (KGs); however, they do not guarantee that the model utilizes a relevant piece of knowledge from the KG. To overcome this limitation, we propose SUbgraph Retrieval-augmented GEneration (SURGE), a framework for generating context-relevant and knowledge-grounded dialogues with the KG. Specifically, our SURGE framework first retrieves the relevant subgraph from the KG, and then enforces consistency across facts by perturbing their word embeddings conditioned by the retrieved subgraph. Then, we utilize contrastive learning to ensure that the generated texts have high similarity to the retrieved subgraphs. We validate our SURGE framework on OpendialKG and KOMODIS datasets, showing that it generates high-quality dialogues that faithfully reflect the knowledge from KG.
翻译:语言模型在对话生成任务上已取得令人瞩目的表现。然而,在生成需要事实性知识的对话响应时,由于缺乏检索、编码并在生成响应中体现知识的机制,这些模型仍远非完美。部分基于知识驱动的对话生成方法通过利用知识图谱中的事实来应对这一问题,但无法保证模型能够使用知识图谱中相关的知识片段。为克服这一局限,我们提出子图检索增强生成框架,该框架借助知识图谱生成上下文相关且知识驱动的对话。具体而言,我们的SURGE框架首先从知识图谱中检索相关子图,然后通过扰动由检索子图条件化的词嵌入来强制事实间的一致性。随后,我们利用对比学习确保生成文本与检索子图具有高度相似性。我们在OpendialKG和KOMODIS数据集上验证了SURGE框架,结果表明该框架生成的对话不仅能高质量忠实反映知识图谱中的知识。