arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.02696cs.AI
收藏

通过扰动揭示:基于扰动的LLM幻觉检测

Shaking to Reveal: Perturbation-Based Detection of LLM Hallucinations

Australian Artificial Intelligence Institute, University of Technology Sydney(澳大利亚人工智能研究所,悉尼技术大学);Department of Computer Sciences, University of Wisconsin-Madison(计算机科学系,威斯康星大学麦迪逊分校)

Jinyuan Luo, Zhen Fang, Yixuan Li, Seongheon Park, Ling Chen

AI总结:

本文提出样本特定提示(SSP)框架,通过分析LLM中间表示在扰动下的变化来改进自我评估,从而更可靠地检测幻觉,并在多个基准上显著超越已有方法。

摘要:

幻觉仍然是大型语言模型(LLM)在现实世界问答任务中可靠部署的关键障碍。一种被广泛采用的幻觉检测策略称为自我评估,它依赖模型自身的输出置信度来估计其答案的事实准确性。然而,该策略假设模型的输出分布紧密反映真实数据分布,而这在实践中并不总是成立。随着偏差在模型各层中累积,最终输出可能偏离底层的推理过程,使得输出层面的置信度成为不可靠的幻觉检测信号。在这项工作中,我们提出了样本特定提示(Sample-Specific Prompting,SSP),这是一个通过分析中间表示上的扰动敏感性来改进自我评估的新框架。这些中间表示受模型偏差影响较小,能够更忠实地反映模型潜在的推理过程。具体而言,SSP为每个输入动态生成噪声提示,并采用一个轻量级编码器来放大由扰动引起的表示变化。然后使用对比距离度量来量化这些差异,并将真实回答与幻觉回答区分开来。通过利用中间表示在扰动下的动态行为,SSP实现了更可靠的自我评估。大量实验表明,SSP在一系列幻觉检测基准上显著优于先前的方法。

英文摘要:

Hallucination remains a key obstacle to the reliable deployment of large language models (LLMs) in real-world question answering tasks. A widely adopted strategy to detect hallucination, known as self-assessment, relies on the model's own output confidence to estimate the factual accuracy of its answers. However, this strategy assumes that the model's output distribution closely reflects the true data distribution, which may not always hold in practice. As bias accumulates through the model's layers, the final output can diverge from the underlying reasoning process, making output-level confidence an unreliable signal for hallucination detection. In this work, we propose Sample-Specific Prompting (SSP), a new framework that improves self-assessment by analyzing perturbation sensitivity at intermediate representations. These representations, being less influenced by model bias, offer a more faithful view of the model's latent reasoning process. Specifically, SSP dynamically generates noise prompts for each input and employs a lightweight encoder to amplify the changes in representations caused by the perturbation. A contrastive distance metric is then used to quantify these differences and separate truthful from hallucinated responses. By leveraging the dynamic behavior of intermediate representations under perturbation, SSP enables more reliable self-assessment. Extensive experiments demonstrate that SSP significantly outperforms prior methods across a range of hallucination detection benchmarks.

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

↑