arXiv:2508.14496cs.LG2025-08被引 19

用词向量能量检测大模型幻觉,比传统方法更准。

Semantic Energy: Detecting LLM Hallucination Beyond Entropy

  • 直接分析模型中间层的原始输出,捕捉内在置信度。
  • 在多个基准上检测幻觉的准确率显著提升。
  • 适合需要高可靠性推理的场景,如医疗、金融。

大型语言模型在实际应用中日益普及,但仍易产生流畅却错误的幻觉输出,导致决策失误。不确定性估计是检测幻觉的有效手段。例如,语义熵通过多采样响应的语义多样性来估计不确定性,但其依赖后 softmax 概率,无法捕捉模型内在不确定性,在某些情况下失效。为此,我们提出语义能量(Semantic Energy),一种基于模型中间层原始 logits 的新不确定性估计框架。该方法结合语义聚类与玻尔兹曼启发的能量分布,更有效地捕捉语义熵失效时的不确定性。在多个基准上的实验表明,语义能量显著提升了幻觉检测和不确定性估计性能,为幻觉检测等下游应用提供了更可靠的信号。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are being increasingly deployed in real-world applications, but they remain susceptible to hallucinations, which produce fluent yet incorrect responses and lead to erroneous decision-making. Uncertainty estimation is a feasible approach to detect such hallucinations. For example, semantic entropy estimates uncertainty by considering the semantic diversity across multiple sampled responses, thus identifying hallucinations. However, semantic entropy relies on post-softmax probabilities and fails to capture the model's inherent uncertainty, causing it to be ineffective in certain scenarios. To address this issue, we introduce Semantic Energy, a novel uncertainty estimation framework that leverages the inherent confidence of LLMs by operating directly on logits of penultimate layer. By combining semantic clustering with a Boltzmann-inspired energy distribution, our method better captures uncertainty in cases where semantic entropy fails. Experiments across multiple benchmarks show that Semantic Energy significantly improves hallucination detection and uncertainty estimation, offering more reliable signals for downstream applications such as hallucination detection.

大模型幻觉检测不确定性

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