arXiv:2504.09482cs.CLcs.AI2025-04被引 8

通过分析模型内部分布变化,检测大模型生成中的幻觉倾向。

HalluShift: Measuring Distribution Shifts towards Hallucination Detection in LLMs

  • 从内部状态与词元概率分布变化入手,捕捉生成过程中的微妙偏差。
  • 在多个基准数据集上优于现有方法,能有效识别潜在幻觉。
  • 适合关注大模型可靠性与可信生成的研究者与开发者。

大语言模型(LLMs)因其在多领域生成创新回应的能力而备受关注,但常因幻觉问题生成错误信息,同时保持结构完整和语义连贯。本文假设幻觉源于模型内部动态。观察发现,生成过程中模型逐渐偏离事实,在响应的细微部分产生偏差,最终导致误导性内容,这一现象类似于人类认知中在逻辑连贯中嵌入不确定性的幻觉行为。为此,我们提出新方法 HalluShift,用于分析模型内部状态空间与词元概率分布的变化。该方法在多个基准数据集上表现优于现有基线,代码已开源。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have recently garnered widespread attention due to their adeptness at generating innovative responses to the given prompts across a multitude of domains. However, LLMs often suffer from the inherent limitation of hallucinations and generate incorrect information while maintaining well-structured and coherent responses. In this work, we hypothesize that hallucinations stem from the internal dynamics of LLMs. Our observations indicate that, during passage generation, LLMs tend to deviate from factual accuracy in subtle parts of responses, eventually shifting toward misinformation. This phenomenon bears a resemblance to human cognition, where individuals may hallucinate while maintaining logical coherence, embedding uncertainty within minor segments of their speech. To investigate this further, we introduce an innovative approach, HalluShift, designed to analyze the distribution shifts in the internal state space and token probabilities of the LLM-generated responses. Our method attains superior performance compared to existing baselines across various benchmark datasets. Our codebase is available at https://github.com/sharanya-dasgupta001/hallushift.

大模型幻觉检测分布偏移可信生成

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