arXiv:2605.28264cs.AI2026-05

用熵分布检测大模型幻觉,只需一次生成即可实现高精度、可比性检测。

Entropy Distribution as a Fingerprint for Hallucinations in Generative Models

论文配图:Entropy Distribution as a Fingerprint for Hallucinations in Generative Models
图 1 · 摘自论文原文
  • 通过分析生成文本中每个词的熵分布形状与尾部特征,捕捉幻觉信号。
  • 在8个问答基准上,对10种模型检测准确率领先单次通过方法。
  • 无需模型内部信息,适合实时大规模部署,且有严格统计保障。

大型语言模型常产生事实错误输出,即幻觉,严重影响可信度与高风险场景应用。现有检测方法多需多次前向传播或访问模型内部结构。本文从理论上和实证上证明,词级熵的分布形态(而不仅是平均值)可作为幻觉的指纹,其分布形状与尾部行为蕴含独立信号。我们将幻觉检测形式化为统计假设检验,提出轻量级算法校准熵得分(CES),仅需一次前向传播和黑盒访问词元概率,结合均值与最大熵信号,通过校准参考累积分布函数生成跨模型、跨任务可比的分数。我们基于新颖的随机长度Dvoretzky-Kiefer-Wolfowitz不等式建立了有限样本校准保证,并证明了在生成长度增加时,检测幻觉的概率以指数速度趋近于1。在8个问答基准与10种生成模型(涵盖开源与API模型)上,CES在所有单次通过黑盒方法中表现最佳,且具备现有启发式方法所缺乏的形式化误差保证。惊人的是,其性能在统计上与需大量计算的多样本方法无异,显著缩小了轻量与高成本检测间的差距,适用于实时、大规模部署。

原文摘要 · Abstract (English)

Large Language Models (LLMs) often generate factually incorrect outputs, commonly termed hallucinations, that undermine trust and limit deployment in high-stakes settings. Existing hallucination detection methods typically require multiple forward passes, or access to model internals. In this work, we provide theoretical background and empirical evidence that the distribution of token-level entropies, beyond the mean captured by perplexity or length-normalised entropy, serves as a fingerprint of hallucination, with distributional shape and tail behaviour carrying independent signal. We formalize hallucination detection as a statistical hypothesis test and propose the Calibrated Entropy Score (CES), a lightweight algorithm requiring only a single forward pass and black-box access to token logits. CES combines the mean signal with the maximum signal of the generated entropy through a calibrated reference CDF, producing scores that are directly comparable across models and tasks. We establish finite-sample calibration guarantees via a novel random-length Dvoretzky--Kiefer--Wolfowitz inequality, and also prove that CES detects hallucinations with probability converging to one exponentially fast in the generation length. Across eight QA benchmarks and ten generator models spanning open-source and API access models, CES achieves the highest detection performance among all single-pass black-box methods while providing formal error guarantees that existing heuristics lack. Remarkably, CES is statistically indistinguishable from multi-sample methods that require far greater computational cost, closing the gap between lightweight and expensive detection and making it suitable for real-time, large-scale deployment.

幻觉检测熵分析大模型评估轻量检测

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