RePPL: Recalibrating Perplexity by Uncertainty in Semantic Propagation and Language Generation for Explainable QA Hallucination Detection

📄 arXiv: 2505.15386v2 📥 PDF

作者: Yiming Huang, Junyan Zhang, Zihao Wang, Biquan Bie, Yunzhong Qiu, Yi R. Fung, Xinlei He

分类: cs.CL, cs.AI

发布日期: 2025-05-21 (更新: 2025-08-26)


💡 一句话要点

提出RePPL以解决语言模型幻觉检测的可解释性问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 幻觉检测 可解释性 不确定性测量 语义传播 语言生成 大型语言模型 问答系统

📋 核心要点

  1. 现有方法在幻觉检测中缺乏对幻觉发生原因的解释,无法识别输入的哪些部分会触发幻觉。
  2. 本文提出RePPL,通过重新校准语义传播和语言生成中的不确定性测量,为每个token生成可解释的不确定性分数。
  3. 实验结果显示,RePPL在多种问答数据集上实现了0.833的平均AUC,显著提升了幻觉检测的性能。

📝 摘要(中文)

大型语言模型(LLMs)已成为强大的工具,但幻觉问题仍然是其可信使用的重要障碍。尽管以往的研究通过测量不确定性提高了幻觉检测能力,但缺乏对幻觉发生原因的解释。本文提出RePPL,重新校准不确定性测量,结合语义传播和语言生成中的不确定性,为每个token分配可解释的不确定性分数,并以Perplexity风格的对数平均形式聚合为总分。实验表明,该方法在多种问答数据集上实现了最佳的综合检测性能,且能够生成token级别的不确定性分数作为幻觉的解释。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在问答任务中幻觉检测的可解释性问题。现有方法虽然能检测幻觉,但无法解释幻觉产生的原因,导致用户对模型的信任度降低。

核心思路:RePPL通过结合语义传播和语言生成中的不确定性,重新校准不确定性测量,从而为每个token提供可解释的分数。这种设计使得模型不仅能检测幻觉,还能解释幻觉的来源。

技术框架:RePPL的整体架构包括两个主要模块:语义传播模块和语言生成模块。语义传播模块利用注意力机制逐层融合token信息,而语言生成模块则基于概率选择高层语义。最终,模型将每个token的不确定性分数聚合为总分。

关键创新:RePPL的创新在于其能够为每个token生成不确定性分数,并以可解释的方式展示幻觉的发生原因。这与现有方法的主要区别在于,后者通常只提供整体的幻觉检测结果,而缺乏细粒度的解释。

关键设计:在参数设置上,RePPL采用了对数平均的聚合方式,以确保不确定性分数的稳定性。此外,损失函数设计考虑了不确定性分数的可解释性,确保模型在训练过程中能够有效学习到幻觉的特征。整体网络结构则基于现有的先进模型进行优化,以提升检测性能。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,RePPL在多种问答数据集上实现了平均AUC值为0.833,显著优于现有的基线方法。这一提升不仅表明了模型在幻觉检测方面的有效性,还展示了其在生成可解释性分数方面的潜力。

🎯 应用场景

该研究的潜在应用领域包括智能问答系统、对话系统和信息检索等。通过提供可解释的幻觉检测,RePPL能够增强用户对大型语言模型的信任,促进其在实际应用中的推广与使用。未来,该方法还可能扩展到其他自然语言处理任务中,提升模型的可靠性与可解释性。

📄 摘要(原文)

Large Language Models (LLMs) have become powerful, but hallucinations remain a vital obstacle to their trustworthy use. While previous works improved the capability of hallucination detection by measuring uncertainty, they all lack the ability to explain the provenance behind why hallucinations occur, i.e., which part of the inputs tends to trigger hallucinations. Recent works on the prompt attack indicate that uncertainty exists in semantic propagation, where attention mechanisms gradually fuse local token information into high-level semantics across layers. Meanwhile, uncertainty also emerges in language generation, due to its probability-based selection of high-level semantics for sampled generations. Based on that, we propose RePPL to recalibrate uncertainty measurement by these two aspects, which dispatches explainable uncertainty scores to each token and aggregates in Perplexity-style Log-Average form as total score. Experiments show that our method achieves the best comprehensive detection performance across various QA datasets on advanced models (average AUC of 0.833), and our method is capable of producing token-level uncertainty scores as explanations for the hallucination. Leveraging these scores, we preliminarily find the chaotic pattern of hallucination and showcase its promising usage.