arXiv:2507.04137cs.CLcs.LG2025-07被引 1

通过分析生成概率的波动,无参考地检测大模型每一步的幻觉。

Detecting Token-Level Hallucinations Using Variance Signals: A Reference-Free Approach

  • 用多次随机生成中令牌概率的方差识别幻觉
  • 在SQuAD v2上验证,方差与幻觉高度相关
  • 无需真实答案,适合实时或事后分析

大语言模型虽生成能力出色,但常产生自信却错误的幻觉内容。本文提出一种无参考、逐标记的幻觉检测框架,利用多次随机生成中令牌对数概率的方差来识别不稳定性。该方法不依赖真实参考文本,适用于任意自回归模型,具备可解释性,可用于实时或事后分析。我们在SQuAD v2的不可回答问题上进行评估,对比GPT-Neo 125M、Falcon 1B和Mistral 7B三种不同规模模型。定量指标与可视化诊断均表明,令牌级方差能有效揭示输出不稳定性,并与幻觉模式显著相关。该框架轻量、可复现、可迁移,为评估大模型生成可靠性提供了实用工具。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have demonstrated impressive generative capabilities across diverse tasks but remain susceptible to hallucinations, confidently generated yet factually incorrect outputs. We introduce a reference-free, token-level hallucination detection framework that leverages the variance in token log-probabilities across multiple stochastic generations. Unlike prior methods that require ground-truth references or sentence-level verification, our approach is model-agnostic, interpretable, and suited for real-time or post-hoc analysis. We evaluate our method on unanswerable question prompts from the SQuAD v2 dataset and benchmark across three autoregressive models of varying scales: GPT-Neo 125M, Falcon 1B, and Mistral 7B. Through both quantitative metrics and visual diagnostics, we show that token-level variance reliably highlights instability in model outputs and correlates with hallucination patterns. Our framework is lightweight, reproducible, and adaptable to multiple domains, offering a valuable diagnostic tool for analyzing generative reliability in LLMs.

幻觉检测无参考概率方差LLM可靠性

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