arXiv:2505.08200cs.CLcs.AI2025-05EMNLP被引 29

给大模型加两个专用头,自动识别幻觉内容。

A Head to Predict and a Head to Question: Pre-trained Uncertainty Quantification Heads for Hallucination Detection in LLM Outputs

  • 用预训练的不确定度头捕捉模型输出置信度
  • 在跨领域提示下仍保持顶尖幻觉检测性能
  • 支持多语言且已开源,适合部署落地

大语言模型容易产生幻觉,即随机生成虚假或虚构信息,而这些内容往往极具说服力,用户难以识别。不确定性量化(UQ)为评估模型输出可靠性提供了框架,有助于发现潜在幻觉。本文提出预训练的不确定性量化头:一种基于监督学习的辅助模块,显著提升大模型对不确定性的捕捉能力。其优异表现源于设计中采用的强大Transformer结构及从模型注意力图中提取的丰富特征。实验表明,该方法在域内与域外提示下均实现当前最优的声明级幻觉检测效果,并展现出对未显式训练语言的强泛化能力。我们为Mistral、Llama和Gemma 2等主流大模型系列预训练了多组UQ头,代码与模型均已公开发布。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have the tendency to hallucinate, i.e., to sporadically generate false or fabricated information. This presents a major challenge, as hallucinations often appear highly convincing and users generally lack the tools to detect them. Uncertainty quantification (UQ) provides a framework for assessing the reliability of model outputs, aiding in the identification of potential hallucinations. In this work, we introduce pre-trained UQ heads: supervised auxiliary modules for LLMs that substantially enhance their ability to capture uncertainty compared to unsupervised UQ methods. Their strong performance stems from the powerful Transformer architecture in their design and informative features derived from LLM attention maps. Experimental evaluation shows that these heads are highly robust and achieve state-of-the-art performance in claim-level hallucination detection across both in-domain and out-of-domain prompts. Moreover, these modules demonstrate strong generalization to languages they were not explicitly trained on. We pre-train a collection of UQ heads for popular LLM series, including Mistral, Llama, and Gemma 2. We publicly release both the code and the pre-trained heads.

幻觉检测不确定性量化大模型安全预训练头

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