arXiv:2512.07515cs.CLcs.AI2025-12ACL被引 2

通过分解生成概率,精准定位大模型幻觉的源头。

TPA: Next Token Probability Attribution for Detecting Hallucinations in RAG

  • 将每个词的概率归因到7个来源,包括查询、上下文、历史词等。
  • 发现名词过度依赖层归一化是幻觉的关键信号,检测准确率领先。
  • 适合需要提升生成可信度的RAG系统开发者和研究者使用。

检索增强生成中的幻觉检测仍具挑战性。现有方法仅关注前馈网络与检索内容之间的二元冲突,忽略了用户查询、历史生成词、自注意力项及最终层归一化等组件的影响。为此,本文提出TPA,从数学上将每个词的概率归因于七个独立来源:查询、RAG上下文、过去词、自词、前馈网络、最终层归一化与初始嵌入。该归因量化了各成分对下一词生成的贡献。进一步按词性(POS)聚合归因分数,揭示不同语言类别中各组件的作用模式。例如,当名词生成严重依赖层归一化时,即为幻觉信号。大量实验表明,TPA达到当前最优性能。

原文摘要 · Abstract (English)

Detecting hallucinations in Retrieval-Augmented Generation remains a challenge. Prior approaches attribute hallucinations to a binary conflict between internal knowledge stored in FFNs and the retrieved context. However, this perspective is incomplete, failing to account for the impact of other components of the LLM, such as the user query, previously generated tokens, the self token, and the final LayerNorm adjustment. To comprehensively capture the impact of these components on hallucination detection, we propose TPA which mathematically attributes each token's probability to seven distinct sources: Query, RAG Context, Past Token, Self Token, FFN, Final LayerNorm, and Initial Embedding. This attribution quantifies how each source contributes to the generation of the next token. Specifically, we aggregate these attribution scores by Part-of-Speech (POS) tags to quantify the contribution of each model component to the generation of specific linguistic categories within a response. By leveraging these patterns, such as detecting anomalies where Nouns rely heavily on LayerNorm, TPA effectively identifies hallucinated responses. Extensive experiments show that TPA achieves state-of-the-art performance.

幻觉检测RAG归因分析大模型可信度

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