arXiv:2606.00328cs.LG2026-06

提出轻量图模型检测KBQA中的幻觉答案,提升可信度。

KG-Guard: Graph-Based Hallucination Detection for Knowledge Base Question Answering

  • 将问答任务建模为图上的节点分类,用图结构验证答案合理性。
  • 在三个数据集上F1最高达87.4,参数量仅为基线的1/305。
  • 可生成可操作反馈,用于迭代优化问答系统性能。

大型语言模型(LLMs)在知识库问答(KBQA)中应用广泛,需从问题相关的知识图谱子图中选择实体作答。然而,即使提供图谱作为知识源,模型仍可能依赖参数化知识或进行无效推理,产生幻觉答案,限制其在医疗等高风险领域的部署。本文将KBQA中的幻觉检测建模为答案节点分类问题,提出一种轻量级图基框架,将问答实例表示为增强图:用实体语义表示初始化节点特征,学习标记主题实体与模型提出的答案节点,并将虚拟问题节点连接至主题实体。图编码器生成面向验证的节点表示,小型MLP结合问题嵌入对每个候选答案节点进行分类。在WebQSP、ComplexWebQuestions和PUGG上的实验表明,该检测器在所有基准上均取得最高F1(分别为82.0、87.4、84.3),显著优于基于LLM评判和采样方法的基线,且参数量仅为参考方法的约1/305。此外,节点级反馈具有可操作性:将被标记的答案回传至KBQA系统进行迭代优化后,下游系统F1提升13.0–14.5点,精确匹配率提升16.9–17.6点。

原文摘要 · Abstract (English)

Large language models (LLMs) are increasingly used for knowledge base question answering (KBQA), where answering requires selecting entities from a question-specific knowledge-graph subgraph. Yet LLMs are known to hallucinate across tasks, and KBQA is no exception: even when we provide a graph as the knowledge source, the model may rely on parametric knowledge instead of graph evidence or perform invalid reasoning over the given relations. Such hallucinated answer nodes can limit the practical deployment of KBQA systems, especially in high-stakes domains such as healthcare. We formulate hallucination detection in KBQA as an answer-node classification problem and propose a lightweight graph-based framework that treats the answering LLM as a black box. \methodname represents each KBQA instance as an augmented graph. It initializes node features with semantic representations of KG entities, marks topic entities and LLM-proposed answer nodes with learned vectors, and connect a virtual question node to the topic entities. A graph encoder then produces verification-oriented node representations, and a small MLP classifies each proposed answer node using its graph representation together with the question embedding. Experiments on WebQSP, ComplexWebQuestions, and PUGG show that our detector achieves the highest F1 on all three benchmarks ($82.0$, $87.4$, and $84.3$), outperforming LLM-as-judge and sampling-based baselines, while having $\sim305\times$ fewer parameters than the reference approaches. Beyond detection, the node-level feedback is actionable: when flagged answers are fed back to the KBQA system for iterative refinement, downstream KBQA F1 improves by $13.0$--$14.5$ points and Exact Match by $16.9$--$17.6$ points.

知识图谱幻觉检测问答系统图神经网络

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