arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.07515cs.CLcs.AI

TPA:用于检测RAG中幻觉的下一个令牌概率归因

TPA: Next Token Probability Attribution for Detecting Hallucinations in RAG

Australian Artificial Intelligence Institute (AAII)(澳大利亚人工智能研究所)

Pengqian Lu, Jie Lu, Anjin Liu, Guangquan Zhang

AI总结:

TPA通过归因七个来源量化各组件对生成下一个令牌的影响,有效识别幻觉响应,实验显示其性能领先。

摘要:

检测检索增强生成中的幻觉仍具挑战性。先前方法将幻觉归因于FFN内部知识与检索上下文的二元冲突,但此视角不完整,未考虑其他LLM组件如用户查询、先前生成的令牌、自令牌和最终LayerNorm调整的影响。为全面捕捉这些组件对幻觉检测的影响,我们提出TPA,数学上将每个令牌的概率归因于七个不同来源:查询、RAG上下文、过去令牌、自令牌、FFN、最终LayerNorm和初始嵌入。此归因量化了每个来源对生成下一个令牌的贡献。具体而言,我们通过词性标注聚合这些归因分数,以量化每个模型组件对响应中特定语言类别生成的贡献。通过利用这些模式,如检测名词严重依赖LayerNorm的异常,TPA有效识别幻觉响应。大量实验显示,TPA实现了最先进的性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑