arXiv:2605.26366cs.AIcs.LG2026-05中稿 · ICML被引 3

自动选层提升大模型幻觉检测效果,无需训练且开销极低。

Automatic Layer Selection for Hallucination Detection

  • 提出新准则FEPoID,自动识别最优中间层进行幻觉检测。
  • 在问答与摘要任务中,性能超越现有方法与基线模型。
  • 结合文本截断策略,进一步增强幻觉信号,适合实际部署。

近期研究表明,大语言模型(LLMs)的中间层比最终层更强烈编码幻觉相关信号。尽管已有研究尝试利用这一特性进行幻觉检测,但如何自动化选择高性能层仍缺乏系统方法。本文首先提出若干关于该现象成因的假设,并在多种模型架构、规模及任务(包括问答与摘要类幻觉检测基准)上评估多个筛选标准,发现现有方法均无法稳定表现良好。为此,本文提出一种新准则——内在维度首次有效峰值(FEPoID),可一致地识别出最优或近优层,显著优于已有标准与基线方法。FEPoID无需训练,计算开销可忽略。此外,通过分析生成行为,引入一种简单有效的文本截断策略,进一步强化幻觉信号,大幅提高整体检测性能。代码已公开于https://github.com/DesoloYw/Automatic-Layer-Selection-for-Hallucination-Detection.git。

原文摘要 · Abstract (English)

Recent studies on hallucination detection have shown that hallucination-related signals are more strongly encoded in intermediate layers than in the final layer of large language models (LLMs). Although a growing body of work has sought to exploit this property for hallucination detection, how to automate the selection of high-performing layers remains underexplored, and principled methods for this purpose are still lacking. To address this gap, we first propose several hypotheses for why such signals emerge in intermediate layers and evaluate corresponding criteria for automatic layer selection across diverse LLM architectures, scales, and tasks, covering both question answering and summarization hallucination detection benchmarks. However, we find that none of these criteria consistently delivers satisfactory performance. We therefore propose a new selection criterion, First Effective Peak of Intrinsic Dimension (FEPoID), which consistently identify optimal or near-optimal layers and outperforms both the aforementioned criteria and existing hallucination detection baselines. FEPoID is training-free and incurs negligible computational overhead. In addition, we study the generation behaviors of LLMs and introduce a simple yet effective truncation strategy, which further amplifies hallucination-related signals and substantially improves overall detection performance. Code is publicly available at https://github.com/DesoloYw/Automatic-Layer-Selection-for-Hallucination-Detection.git

幻觉检测大模型自动选层无训练

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