Manuscript Offprint

arXiv:2608.27165

Prediction of Prediction (PoP): Inter-Layer Activation Fusion for Single-Pass Hallucination Detection in Large Language Models

Himal Badu

Abstract

Autoregressive large language models (LLMs) routinely generate factually incorrect outputs with high decoding confidence, limiting their deployment in high-stakes workflows. Existing output-stage uncertainty metrics can fail when models are overconfident on false assertions, while multi-sample verification pipelines introduce substantial memory and latency overhead. This work evaluates whether internal hidden-state transition dynamics during generation can signal factual errors without auxiliary decoding calls. We introduce Prediction of Prediction (PoP), a mechanism that captures layer-transition uncertainty by fusing intermediate hidden representations across depth during a single forward pass. Evaluated on the TruthfulQA benchmark using autoregressive transformer backbones, PoP achieves an area under the receiver operating characteristic curve (AUROC) of 75.5% for factual-correctness classification. The mechanism operates within the base forward pass, adding less than 1.2% runtime latency and requiring zero additional generation passes. The numerical results are reported from the author-verified experimental implementation and are bounded by the evaluation scope described below.

Keywords: large language models; hallucination detection; hidden states; layer dynamics; uncertainty estimation; reliability; efficient inference

1 Introduction

The integration of large language models (LLMs) into automated reasoning systems, medical synthesis, and legal analysis is constrained by their tendency to produce syntactically plausible yet factually false statements. In enterprise settings, unmonitored hallucinations introduce operational risks and may require human verification that reduces the efficiency of automation. A practical verification system should detect hallucination events during generation without materially reducing model throughput or incurring prohibitive GPU-memory costs.

Existing detection paradigms predominantly operate at the output-logit boundary or through post-hoc verification pipelines. Output-stage metrics, including token-logit entropy, sequence perplexity, and final-layer attention distributions, often assume that factual uncertainty correlates with vocabulary-level uncertainty. However, an LLM may generate an incorrect entity with low logit variance, while benign stylistic choices can produce high entropy. Post-hoc approaches rely on multi-sample consistency checking, cross-prompting, retrieval, or auxiliary natural-language-inference (NLI) classifiers. Although such approaches can improve precision, they require multiple candidate completions or additional model calls, increasing latency and compute cost.

A central unresolved question is whether factual validity is continuously encoded in the internal representation trajectory as hidden states propagate through intermediate transformer layers. Static internal probing can demonstrate that specific layers contain predictive information, but an isolated layer check does not capture how the representation changes from shallow syntactic processing to deeper contextual commitment. A single-pass detector therefore needs to characterize layer-wise transitions during the same forward execution used for generation.

We present Prediction of Prediction (PoP), an internal detection framework that estimates sequence-level hallucination risk through layer-transition activation fusion. The contributions are as follows.

• Layer-transition uncertainty statistic and fusion. We study a mechanism that intercepts intermediate activations ht(l)h_{t}^{(l)} and computes a cross-depth fusion state to track uncertainty propagation during generation.

• Single-pass operational detector. We design a lightweight scoring head Φmeta\Phi_{meta} that evaluates sequence-level risk during autoregressive generation without auxiliary decoding runs or external verifiers.

• Empirical benchmark validation. We report an AUROC of 75.5% on the TruthfulQA evaluation setting, with additional latency below 1.2% relative to unhooked generation.

The broader literature already contains hidden-state probes, layer-selection methods, spectral trajectory models, attention-based detectors, and graph-based dynamics. Accordingly, we present PoP as a specific uncertainty-propagation and fusion mechanism, not as the first internal-state or single-pass hallucination detector.

References (26)