[论文解读] Graph-constrained Reasoning: Faithful Reasoning on Knowledge Graphs with Large Language Models
GCR 引入一个以知识图谱为基础的解码框架,通过 KG-Trie 索引约束大语言模型推理,实现对知识图谱的忠实、零幻觉推理,并达到最先进的 KGQA 性能。
Large language models (LLMs) have demonstrated impressive reasoning abilities, but they still struggle with faithful reasoning due to knowledge gaps and hallucinations. To address these issues, knowledge graphs (KGs) have been utilized to enhance LLM reasoning through their structured knowledge. However, existing KG-enhanced methods, either retrieval-based or agent-based, encounter difficulties in accurately retrieving knowledge and efficiently traversing KGs at scale. In this work, we introduce graph-constrained reasoning (GCR), a novel framework that bridges structured knowledge in KGs with unstructured reasoning in LLMs. To eliminate hallucinations, GCR ensures faithful KG-grounded reasoning by integrating KG structure into the LLM decoding process through KG-Trie, a trie-based index that encodes KG reasoning paths. KG-Trie constrains the decoding process, allowing LLMs to directly reason on graphs and generate faithful reasoning paths grounded in KGs. Additionally, GCR leverages a lightweight KG-specialized LLM for graph-constrained reasoning alongside a powerful general LLM for inductive reasoning over multiple reasoning paths, resulting in accurate reasoning with zero reasoning hallucination. Extensive experiments on several KGQA benchmarks demonstrate that GCR achieves state-of-the-art performance and exhibits strong zero-shot generalizability to unseen KGs without additional training.
研究动机与目标
- 桥接结构化 KG 知识与非结构化的 LLM 推理以获得可信的 KG 感知答案
- 通过以 KG 结构约束 LLM 解码来消除幻觉
- 在一个轻量级的 KG 专用 LLM 与一个强大的一般性 LLM 之间实现高效、对多路径进行归纳推理
- 在对未见 KG 的零-shot 泛化下达到最先进的 KGQA 性能
- 展示相较检索-和代理式 KG 推理方法的效率提升
提出的方法
- 将 KG 转换为 KG-Trie 作为推理路径的结构化索引
- 使用带有 KG 专用 LLM 的图约束解码,在 KG-Trie 约束下生成基于 KG 的推理路径与假设答案
- 在图约束解码数据上对轻量级的 KG 专用 LLM 进行微调
- 向通用 LLM(FiD 风格)输入多条 KG- grounded 路径进行最终的归纳推理和答案生成
- 通过对未见 KG 应用 KG-Trie 实现零-shot 泛化,无需额外训练
实验结果
研究问题
- RQ1GCR 能否以有利的效率达到最先进的推理性能?
- RQ2GCR 能否消除幻觉并确保对 KG 的忠实落地推理?
- RQ3GCR 能否在零-shot 设置下对未见 KG 进行泛化?
- RQ4KG 专用 LLM 与通用 LLM 在 GCR 中的贡献分别是什么?
- RQ5束宽度(beam size)和路径长度(path length)如何影响性能和效率?
主要发现
- GCR 在 WebQSP 和 CWQ 上实现了最先进的命中率,击败基线在命中率和 F1 上的表现。
- KG 约束在两个数据集上实现了 100% 的忠实推理,测试用例中不存在幻觉。
- 零-shot 实验表明 GCR 在转移到未见 KG 时,优于 ChatGPT 和 GPT-4o-mini 的表现,适用于 CSQA 和 MedQA。
- 一个轻量级的 KG 专用 LLM(0.5B)经微调后可超越某些更大模型,凸显专业化的好处。
- 束宽度和路径长度(K 和 L)在探索性与可靠性之间取得平衡;K=10、L=2 在性能与效率之间提供了良好的折中。
- 通过使用 KG-Trie 约束进行解码,GCR 保持了效率,可在不增加额外 LLM 调用的情况下实现并行探索。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。