Manuscript Offprint

arXiv:2609.11498

ActMap: Single-Pass Uncertainty Quantification from Generation-Time Activation Maps

Jacopo Dardini, Roberta Calegari

Abstract

Practical uncertainty quantification (UQ) for large language models must decide, from a single generation, whether a specific answer should be trusted. Existing methods either sample multiple generations, read only output-token probabilities, or reduce the model's internal computation to a single hidden state. We introduce ActMAP, a white-box representation that compresses the generation-time hidden-state trajectory (every layer, every generated token) into a fixed 12×32×12812 \times 32 \times 128 tensor of temporal-statistic channels that preserves structure across transformer depth and pooled hidden coordinates. The map is captured during the generation pass with no measurable overhead, has a fixed shape across model depths and hidden sizes, and occupies 96 KiB: a compact artifact that can be retained for audit-relevant generations and probed directly, with occlusion analysis localizing the classifier's signal to mid-depth regions of the map. A lightweight classifier, instantiated as a compact Vision Transformer, reads an estimated correctness probability from each map in a fraction of a millisecond; capacity-matched MLPs perform comparably, indicating the representation itself carries the result. Trained and evaluated in-domain on short-answer QA, direct-answer math, and summarization factuality with three instruction-tuned 7–8B models, ActMAP consistently outperforms sampling, token-probability, attention, and embedding baselines, and matches ACT-ViT, a detector trained on dense activation tensors 67×67 \times larger, at essentially the same mean AUROC with lower calibration error on ten of twelve pairs. The resulting score supports abstention, routing, and selective verification from a single generation, making it a practical primitive for scalable oversight of deployed models.

Introduction

Large language models answer questions, solve problems, and summarize documents with fluent confidence whether or not they are right. Deployments that act on these outputs need a per-answer reliability signal: a score that says, for this specific generation, how likely it is to be correct. This answer-level uncertainty quantification (UQ) problem, detecting hallucinated or otherwise unreliable answers, is increasingly the gatekeeper for abstention, retrieval fallback, escalation, and human review (Kadavath et al., 2022; Farquhar et al., 2024), and the signal that decides where scarce verification effort goes when human oversight cannot scale to every generation (Bowman et al., 2022).

Existing UQ methods occupy three regimes, each with a structural gap. Sampling-based black-box methods such as semantic entropy measure disagreement across multiple generations (Kuhn et al., 2023; Farquhar et al., 2024); they capture meaning-level ambiguity but require N sampled generations per query, which raises total decoding compute and throughput requirements even when parallel sampling hides latency. Grey-box methods read output-token probabilities (perplexity, mean token entropy, or learned functions of the output distribution (Bar-Shalom et al., 2026)) from a single pass, but see only the final projection of the model's computation. White-box methods look inside the model, yet most reduce the internal state to a single vector: a probe on the last token's hidden state (Azaria and Mitchell, 2023; Marks and Tegmark, 2024), a pooled sentence representation, or aggregated logits at one self-evaluation position (Xiao et al., 2026). Between “one vector” and “ten regenerations” lies almost everything the model computed while producing the answer: how representations differ across depth and across the hidden space, and how they evolve over generated tokens; many existing methods collapse or omit much of this structure.

We propose ActMAP, a representation designed to keep it. During a single generation, ActMAP records the hidden state of every transformer layer at every generated token, then compresses this variable-size L×T×DL \times T \times D trajectory into a fixed 12×32×12812 \times 32 \times 128 tensor: twelve channels of temporal statistics over the token axis, with adaptive pooling mapping the layer and hidden-dimension axes to fixed sizes. The result is compact (96 KiB per generation), fixed in shape across model depths and hidden sizes, and structured: rows index transformer depth, columns index pooled hidden coordinates, and channels are aligned temporal statistics. A learned classifier, in our main experiments a compact Vision Transformer, maps each tensor to an estimated correctness probability. The classifier never sees the generated text or output token probabilities: correctness is predicted from the internal state alone, with no extra model calls.

Our primary setting is in-domain deployment: an operator serves a fixed model on a fixed task, labels a set of generations once, and then assigns every subsequent answer a single correctness score, on which downstream decisions such as abstention, escalation, routing, or selective verification can be thresholded. Our main contributions are as follows:

• Representation. A fixed-size, multi-channel activation-map summary of the full generation trajectory (layers, generated tokens, hidden dimensions, and activation dynamics), computable during one generation pass for any decoder-only transformer; ablations show robustness to the classifier choice.

• Method. A single-pass supervised UQ method with negligible added inference cost: capture is not measurably slower than plain decoding, and scoring is one forward pass of a 2.4M-parameter classifier.

• Evaluation. A unified comparison against eight baselines organized in an explicit black-/grey-/white-box taxonomy, on four tasks and three open-weight 7–8B models under a shared balanced protocol. The comparison includes ACT-ViT, evaluated with its complete published per-pair architecture sweep; ACTMAP reaches essentially the same mean AUROC from a 67×67\times smaller representation with a single fixed classifier configuration.

• Analysis. Ablations and controls that identify cross-layer, pooled-coordinate structure as the primary source of predictive signal; an occlusion analysis of where the classifier draws that signal; transfer experiments across datasets, tasks, generators, and model scale (with clearly reported near-chance results); and calibration, selective-prediction, and cost analyses.

References (27)