arXiv:2504.03579cs.LG2025-04被引 4

用贝叶斯方法高效估算语义熵,低成本检测大模型幻觉

Hallucination Detection on a Budget: Efficient Bayesian Estimation of Semantic Entropy

  • 采用贝叶斯框架优化样本利用效率,提升语义熵估计精度
  • 仅需原方法53%的样本量,即可达到相同幻觉检测效果(AUROC)
  • 支持自适应采样,难例自动分配更多样本,适合资源受限场景

检测大语言模型生成内容中的幻觉是一个重要研究挑战。一种有前景的方法是估算生成序列分布的语义熵(Farquhar et al., 2024)。本文提出一种新算法,具有两大优势:首先,通过贝叶斯方法,在给定样本预算下显著提升语义熵估计质量;其次,可自适应调整采样数量,使“更难”上下文获得更多样本。实验证明,本方法系统性优于基线,仅需Farquhar等(2024)所用样本量的53%,即可在AUROC指标上达到相同幻觉检测性能。更为反直觉的是,即使仅使用1个样本,该估计器仍具实用性。

原文摘要 · Abstract (English)

Detecting whether an LLM hallucinates is an important research challenge. One promising way of doing so is to estimate the semantic entropy (Farquhar et al., 2024) of the distribution of generated sequences. We propose a new algorithm for doing that, with two main advantages. First, due to us taking the Bayesian approach, we achieve a much better quality of semantic entropy estimates for a given budget of samples from the LLM. Second, we are able to tune the number of samples adaptively so that `harder' contexts receive more samples. We demonstrate empirically that our approach systematically beats the baselines, requiring only 53% of samples used by Farquhar et al. (2024) to achieve the same quality of hallucination detection as measured by AUROC. Moreover, quite counterintuitively, our estimator is useful even with just one sample from the LLM.

幻觉检测贝叶斯方法语义熵高效推理

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