Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Automatic Layer Selection for Hallucination Detection

About

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

Xinpeng Wang, William Cao, Andrew Gordon Wilson, Zhe Zeng• 2026

Related benchmarks

TaskDatasetResultRank
Hallucination DetectionTriviaQA
AUROC0.8805
621
Hallucination DetectionHotpotQA
AUROC0.8287
249
Hallucination DetectionHaluEval
AUROC0.7808
131
Hallucination DetectionCoQA
AUROC84.66
108
Hallucination DetectionCoQA
Mean AUROC0.7468
107
Hallucination DetectionSQuAD
AUROC0.89
82
Hallucination DetectionPsiloQA
AUROC92.08
56
Hallucination DetectionCoQA
AUROC82.64
39
Hallucination DetectionCNN/DM
AUROC76.14
14
Hallucination DetectionHotpotQA
Accuracy80.3
14
Showing 10 of 13 rows

Other info

Follow for update