Table of Contents
Fetching ...

Detecting LLM Hallucination Through Layer-wise Information Deficiency: Analysis of Ambiguous Prompts and Unanswerable Questions

Hazel Kim, Tom A. Lamb, Adel Bibi, Philip Torr, Yarin Gal

TL;DR

The paper tackles LLM hallucination by introducing layer-wise usable information, $\mathcal{L}$I, which tracks cross-layer information flow to detect when prompts are ambiguous or questions are unanswerable. Built on the $\mathcal{V}$-usable information framework, $\mathcal{L}$I does not require fine-tuning and uses two forward passes to compute per-layer predictive entropy differences, aggregating them across all layers. Empirical results across CoQA, QuAC, and CondaQA with Llama3 and Phi3 models show that $\mathcal{L}$I reliably distinguishes unanswerable cases and reflects prompt quality better than final-layer baselines, with favorable AUROC and calibration (ECE) metrics and minimal computational overhead. The approach demonstrates that tracking information dynamics throughout the model depth yields robust signals of model reliability, offering a practical tool for safer deployment of LLMs in contexts with uncertain or incomplete information.

Abstract

Large language models (LLMs) frequently generate confident yet inaccurate responses, introducing significant risks for deployment in safety-critical domains. We present a novel, test-time approach to detecting model hallucination through systematic analysis of information flow across model layers. We target cases when LLMs process inputs with ambiguous or insufficient context. Our investigation reveals that hallucination manifests as usable information deficiencies in inter-layer transmissions. While existing approaches primarily focus on final-layer output analysis, we demonstrate that tracking cross-layer information dynamics ($\mathcal{L}$I) provides robust indicators of model reliability, accounting for both information gain and loss during computation. $\mathcal{L}$I integrates easily with pretrained LLMs without requiring additional training or architectural modifications.

Detecting LLM Hallucination Through Layer-wise Information Deficiency: Analysis of Ambiguous Prompts and Unanswerable Questions

TL;DR

The paper tackles LLM hallucination by introducing layer-wise usable information, I, which tracks cross-layer information flow to detect when prompts are ambiguous or questions are unanswerable. Built on the -usable information framework, I does not require fine-tuning and uses two forward passes to compute per-layer predictive entropy differences, aggregating them across all layers. Empirical results across CoQA, QuAC, and CondaQA with Llama3 and Phi3 models show that I reliably distinguishes unanswerable cases and reflects prompt quality better than final-layer baselines, with favorable AUROC and calibration (ECE) metrics and minimal computational overhead. The approach demonstrates that tracking information dynamics throughout the model depth yields robust signals of model reliability, offering a practical tool for safer deployment of LLMs in contexts with uncertain or incomplete information.

Abstract

Large language models (LLMs) frequently generate confident yet inaccurate responses, introducing significant risks for deployment in safety-critical domains. We present a novel, test-time approach to detecting model hallucination through systematic analysis of information flow across model layers. We target cases when LLMs process inputs with ambiguous or insufficient context. Our investigation reveals that hallucination manifests as usable information deficiencies in inter-layer transmissions. While existing approaches primarily focus on final-layer output analysis, we demonstrate that tracking cross-layer information dynamics (I) provides robust indicators of model reliability, accounting for both information gain and loss during computation. I integrates easily with pretrained LLMs without requiring additional training or architectural modifications.

Paper Structure

This paper contains 22 sections, 10 equations, 7 figures, 7 tables, 1 algorithm.

Figures (7)

  • Figure 1: Distribution of $\mathcal{V}$-information ($\mathcal{V}$I) values in first and last layers, and $\mathcal{L}$-information ($\mathcal{L}$I) values (summation of $\mathcal{V}$I scores across all layers), as a function of prompt ambiguity. Results compare two prompt categories: (1) no instruction prompts and (2) binary instruction prompts ('Is this answerable?').
  • Figure 2: $\mathcal{V}$-usable information ($\mathcal{V}$I; XuZSSE20) across layers for CondaQA, CoQA, and QuAC. Solid lines denote models without instruction prompts and dashed lines denote models with binary prompts ("Is this answerable?"). The quantity of $\mathcal{V}$I is not monotonically increased or decreased across depth. By the final layer (32), the relative effect of prompts becomes inconsistent across datasets, highlighting the value of analyzing all layers.
  • Figure 3: Illustration of computing layer-wise usable information for an example $(c_i,q_i)$ at a single layer$\ell$.
  • Figure 4: Impact of instruction prompts on layer information in QuAC. (a) $\mathcal{L}$I: scores increase systematically as prompts become more explicit (no prompt $\rightarrow$ open-ended $\rightarrow$ binary). Within each prompt type, correct answers have higher scores than incorrect ones (answerable-correct $>$ answerable-incorrect; unanswerable-correct $>$ unanswerable-incorrect). (b) Final-layer $\mathcal{V}$I: scores show no consistent progression and correct–incorrect separation.
  • Figure 5: Performance of (un)answerability detection across datasets, comparing $\mathcal{L}$I with other baselines. $\mathcal{L}$I(10%), $\mathcal{L}$I(20%), and $\mathcal{L}$I(30%) shows the rejection rate based on low scores.
  • ...and 2 more figures

Theorems & Definitions (1)

  • Definition 2.1: Predictive $\mathcal{V}$-information, XuZSSE20