arXiv:2410.18415cs.CL2024-10被引 26

让大模型在知识图谱上生成有逻辑的推理链,提升问答准确性。

Decoding on Graphs: Faithful and Sound Reasoning on Knowledge Graphs through Generation of Well-Formed Chains

  • 定义‘结构合理链’:从问题实体出发,逐步推导到答案的连贯三元组序列。
  • 通过图结构约束解码,确保大模型生成符合知识图谱拓扑的推理路径。
  • 无需训练,兼容多种开源大模型,适用于不同知识图谱问答任务。

知识图谱(KG)因其结构化表示,可作为问答系统的可靠知识源。现有基于大语言模型(LLM)的方法多依赖子图检索或迭代提示,忽视了LLM的逐步推理能力与KG结构性之间的协同潜力。本文提出DoG(Decoding on Graphs),一种促进LLM与KG深度协同的新框架。首先定义‘结构合理链’——由知识图谱中相互关联的三元组构成的序列,从问题实体出发,最终指向答案。我们认为该概念可作为保证推理忠实性与严谨性的原则。为使LLM生成此类链,我们提出图感知的约束解码方法,利用图谱拓扑生成约束,调控模型生成过程。该方法在不改变模型参数的前提下,确保生成路径的合理性,同时充分发挥LLM的逐步推理能力。实验表明,DoG在多个不同背景的知识图谱问答任务中均取得优异且稳健的表现,且对多种开源大模型具有广泛适用性。

原文摘要 · Abstract (English)

Knowledge Graphs (KGs) can serve as reliable knowledge sources for question answering (QA) due to their structured representation of knowledge. Existing research on the utilization of KG for large language models (LLMs) prevalently relies on subgraph retriever or iterative prompting, overlooking the potential synergy of LLMs' step-wise reasoning capabilities and KGs' structural nature. In this paper, we present DoG (Decoding on Graphs), a novel framework that facilitates a deep synergy between LLMs and KGs. We first define a concept, well-formed chain, which consists of a sequence of interrelated fact triplets on the KGs, starting from question entities and leading to answers. We argue that this concept can serve as a principle for making faithful and sound reasoning for KGQA. To enable LLMs to generate well-formed chains, we propose graph-aware constrained decoding, in which a constraint derived from the topology of the KG regulates the decoding process of the LLMs. This constrained decoding method ensures the generation of well-formed chains while making full use of the step-wise reasoning capabilities of LLMs. Based on the above, DoG, a training-free approach, is able to provide faithful and sound reasoning trajectories grounded on the KGs. Experiments across various KGQA tasks with different background KGs demonstrate that DoG achieves superior and robust performance. DoG also shows general applicability with various open-source LLMs.

知识图谱推理链大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。