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

通过自适应令牌选择实现大语言模型中的鲁棒幻觉检测

Robust Hallucination Detection in LLMs via Adaptive Token Selection

Imperial College London, UK(伦敦帝国学院);Singapore Management University(新加坡管理大学)

Mengjia Niu, Hamed Haddadi, Guansong Pang

AI总结:

针对LLM幻觉检测在自由生成文本中因固定令牌选择导致性能波动的问题,本文提出HaMI方法,将幻觉检测建模为多实例学习,自适应选择关键令牌并联合优化,在四个基准上显著超越现有方法。

摘要:

大语言模型(LLMs)中的幻觉带来了显著的安全隐患,阻碍了其更广泛的部署。近期关于幻觉检测的研究表明,LLMs 的内部表示中包含真实性的线索,可用于训练检测器。然而,这些检测器的性能严重依赖于预定令牌的内部表示,在处理长度不一且幻觉实体分布稀疏的自由形式生成内容时,性能波动较大。为解决这一问题,我们提出了 HaMI,一种通过自适应选择和学习最能指示幻觉的关键令牌来实现鲁棒幻觉检测的新方法。我们通过将幻觉检测任务创新性地表述为序列内令牌级表示上的多实例(HaMI)学习,从而在不同形式的生成序列上促进令牌选择与幻觉检测的联合优化。在四个幻觉基准上的综合实验结果表明,HaMI 显著优于现有的最先进方法。

英文摘要:

Hallucinations in large language models (LLMs) pose significant safety concerns that impede their broader deployment. Recent research in hallucination detection has demonstrated that LLMs' internal representations contain truthfulness hints, which can be harnessed for detector training. However, the performance of these detectors is heavily dependent on the internal representations of predetermined tokens, fluctuating considerably when working on free-form generations with varying lengths and sparse distributions of hallucinated entities. To address this, we propose HaMI, a novel approach that enables robust detection of hallucinations through adaptive selection and learning of critical tokens that are most indicative of hallucinations. We achieve this robustness by an innovative formulation of the Hallucination detection task as Multiple Instance (HaMI) learning over token-level representations within a sequence, thereby facilitating a joint optimisation of token selection and hallucination detection on generation sequences of diverse forms. Comprehensive experimental results on four hallucination benchmarks show that HaMI significantly outperforms existing state-of-the-art approaches.

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

↑