Large language models (LLMs) have made remarkable strides in various natural language processing tasks, but their performance on complex reasoning problems remains hindered by a lack of explainability and trustworthiness. This issue, often manifesting as hallucinations or unattributable reasoning processes, limits their applicability in complex reasoning scenarios. To address this, we propose Knowledge Graph-constrained Trajectory Reasoning Attribution and Chain Explanation Supervision (KG-TRACES), a novel framework that enhances the reasoning ability of LLMs through explicit supervision over reasoning paths and processes. KG-TRACES jointly supervises the model to: (1) predict symbolic relation paths, (2) predict full triple-level reasoning paths, and (3) generate attribution-aware reasoning processes grounded in the reasoning paths. At inference phase, the model adapts to both KG-available and KG-unavailable scenarios, retrieving reasoning paths from a KG when possible or predicting plausible reasoning paths with only intrinsic knowledge when not. This design enables the model to reason in an explainable and source-attributable pattern. Through extensive experiments on complex reasoning tasks, we demonstrate that KG-TRACES significantly outperforms existing SOTA: it improves Hits@1 by 1.6% and F1 by 4.7% on WebQSP, and achieves improvements of 4.8% in Hits@1 and 2.1% in F1 on CWQ. Moreover, we show its transferability to specialized domains such as medicine. By visualizing the intermediate steps of reasoning processes, we further show that the explicit supervision introduced by KG-TRACES leads to more stable and goal-directed reasoning processes, aligning closely with correct answers. Code is available at https://github.com/Edaizi/KG-TRACES.
翻译:大语言模型(LLMs)在各类自然语言处理任务中取得了显著进展,但其在复杂推理问题上的表现仍因缺乏可解释性与可信度而受限。这一问题通常表现为幻觉或无法溯源的推理过程,限制了其在复杂推理场景中的应用。为此,我们提出知识图谱约束的轨迹推理归因与链式解释监督框架(KG-TRACES),该框架通过对推理路径与过程进行显式监督来增强大语言模型的推理能力。KG-TRACES联合监督模型以:(1)预测符号化关系路径,(2)预测完整的三元组级推理路径,以及(3)生成基于推理路径的、具备归因意识的推理过程。在推理阶段,模型可适应知识图谱可用与不可用两种场景:在可能时从知识图谱中检索推理路径,否则仅依靠内部知识预测合理的推理路径。这一设计使模型能够以可解释且来源可溯的模式进行推理。通过在复杂推理任务上的大量实验,我们证明KG-TRACES显著优于现有最优方法:在WebQSP上其Hits@1提升1.6%、F1值提升4.7%,在CWQ上其Hits@1提升4.8%、F1值提升2.1%。此外,我们展示了其在医学等专业领域的可迁移性。通过对推理过程中间步骤的可视化,我们进一步表明KG-TRACES引入的显式监督能产生更稳定且目标导向的推理过程,并与正确答案高度吻合。代码发布于 https://github.com/Edaizi/KG-TRACES。