arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.03799cs.CLcs.SYeess.SY
收藏

通过噪声注入增强幻觉检测

Enhancing Hallucination Detection through Noise Injection

Qualcomm AI Research(高通人工智能研究)

Litian Liu, Reza Pourreza, Sunny Panchal, Apratim Bhattacharyya, Yubing Jian, Yao Qin, Roland Memisevic

AI总结:

提出一种基于贝叶斯模型不确定性的无训练噪声注入方法,通过扰动模型参数或隐藏单元激活来改进采样过程,显著提升大语言模型幻觉检测性能。

摘要:

大型语言模型(LLMs)容易生成看似合理但错误的响应,即幻觉。因此,有效检测幻觉对于LLMs的安全部署至关重要。最近的研究将幻觉与模型不确定性联系起来,表明可以通过测量从模型中抽取的多个样本的答案分布离散度来检测幻觉。虽然从模型定义的词元分布中抽取样本是一种自然的方式,但在这项工作中,我们认为这对于检测幻觉而言并非最优。我们表明,通过以贝叶斯方式考虑模型不确定性,可以显著改进检测。为此,我们提出了一种非常简单、无需训练的方法,该方法基于在采样过程中扰动适当子集的模型参数,或等效地扰动隐藏单元激活。我们证明,我们的方法在跨不同数据集、模型架构和不确定性度量上,显著优于标准采样的推理时幻觉检测。

英文摘要:

Large Language Models (LLMs) are prone to generating plausible yet incorrect responses, known as hallucinations. Effectively detecting hallucinations is therefore crucial for the safe deployment of LLMs. Recent research has linked hallucinations to model uncertainty, suggesting that hallucinations can be detected by measuring dispersion over answer distributions obtained from multiple samples drawn from a model. While drawing from the distribution over tokens defined by the model is a natural way to obtain samples, in this work, we argue that it is suboptimal for the purpose of detecting hallucinations. We show that detection can be improved significantly by taking into account model uncertainty in the Bayesian sense. To this end, we propose a very simple, training-free approach based on perturbing an appropriate subset of model parameters, or equivalently hidden unit activations, during sampling. We demonstrate that our approach significantly improves inference-time hallucination detection over standard sampling across diverse datasets, model architectures, and uncertainty metrics.

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

↑