Lune

ICML2026Top-tier venue

Automatic Layer Selection for Hallucination Detection

Xinpeng Wang, William Cao, Andrew Wilson, Zhe Zeng

Abstract

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

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs cites Uncertainty Estimation in Autoregressive Structured Prediction
  • INSIDE: LLMs' Internal States Retain the Power of Hallucination Detection cites The Internal State of an LLM Knows When It's Lying
  • INSIDE: LLMs' Internal States Retain the Power of Hallucination Detection cites Uncertainty Estimation in Autoregressive Structured Prediction
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on21

  1. Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMsMiao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li et al.ICLR 2024 · 867 citations
  2. Uncertainty Estimation in Autoregressive Structured PredictionAndrey Malinin, Mark J. F. GalesICLR 2021 · 439 citations
  3. INSIDE: LLMs' Internal States Retain the Power of Hallucination DetectionChao Chen, Kai Liu, Ze Chen, Yi Gu et al.ICLR 2024 · 281 citations
  4. HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language ModelsJunyi Li, Xiaoxue Cheng, Xin Zhao, Jian-Yun Nie et al.EMNLP 2023 · 224 citations
  5. The Internal State of an LLM Knows When It's LyingAmos Azaria, Tom M. MitchellEMNLP Findings 2023 · 177 citations

Related papers

  1. Characterizing Truthfulness in Large Language Model Generations with Local Intrinsic DimensionFan Yin, Jayanth Srinivasa, Kai-Wei ChangICML 2024 · 43 citations
  2. Training a Generalist Hallucination Detector across Multiple Domains via Adaptive Layer AggregationXinyi Li, Zhen Fang, Yadan Luo, Yongxin Deng et al.KDD 2026
  3. HILL: A Hallucination Identifier for Large Language ModelsFlorian Leiser, Sven Eckhardt, Valentin Leuthe, Merlin Knaeble et al.CHI 2024 · 67 citations
  4. PHPFND: Detecting Fake News via Post-Hoc Processing of LLMs HallucinationJinke Ma, Jiachen Ma, Wei Zhang, Yong LiuAAAI 2026
  5. Expanding before Inferring: Enhancing Factuality in Large Language Models through Premature Layers InterpolationDingwei Chen, Ziqiang Liu, Feiteng Fang, Chak Tou Leong et al.EMNLP 2025
Dusk over the sea between two cliffs drawn in fine vertical lines