Source-linked AI summary

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

Jacopo Dardini, Roberta Calegari

arXiv:2609.11498v1cs.AI

TL;DR

ActMap addresses the need to estimate whether a specific language-model answer is correct from a single generation. It compresses the full generation-time hidden-state trajectory into a compact fixed-size activation map, and in in-domain evaluations it outperforms non-tensor baselines while matching dense activation-tensor learning with better calibration.

  • Problem

    Answer-level uncertainty quantification must determine whether a specific fluent language-model generation is reliable enough for abstention, fallback, escalation, or review.

  • Method

    ActMap captures every layer and generated token during one decoding pass, compresses the trajectory into a fixed 12 × 32 × 128 tensor, and applies a lightweight classifier to estimate correctness.

  • Results

    ActMap outperforms every evaluated non-tensor baseline across twelve 7–8B model-task pairs and matches dense activation-tensor learning from a 67× smaller representation with better calibration.

  • Takeaways & Limitations

    The resulting score supports single-generation abstention, routing, and selective verification as a practical primitive for scalable oversight.

  • Takeaways & Limitations

    ActMap requires white-box hidden-state access and supervised labels, while its score remains correlational and robustness beyond greedy English in-domain settings is unresolved.

Abstract

from arXiv · show

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 \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 \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

ActMap targets single-generation answer reliability by retaining structured hidden-state dynamics that existing sampling, token-probability, and collapsed white-box methods discard. It provides a fixed, compact representation and supervised score for in-domain abstention, routing, and verification.

  • Representation: ActMap compresses every layer and generated token into a fixed 12 × 32 × 128 activation map, scored by a classifier that uses internal states without text or token probabilities.The representation is captured during one generation, occupies 96 KiB, and has fixed geometry across model depths and hidden sizes.
  • Deployment: ActMap’s intended downstream uses are thresholded abstention, escalation, routing, and selective verification for subsequent answers in the same deployment regime.The primary setting is in-domain deployment with a fixed model and task.
  • Method: Single-pass scoring adds negligible inference cost: capture is not measurably slower than decoding, and the classifier uses one 2.4M-parameter forward pass.The method is intended for operators serving a fixed model and task after labeling a set of generations.
  • Evaluation: The evaluation compares ActMap with eight baselines across four tasks and three open-weight 7–8B models, including a complete ACT-ViT architecture sweep.The comparison uses a shared balanced protocol and includes black-, grey-, and white-box methods.
  • Positioning: ActMap evaluates answer-level reliability from the pre-projection trajectory, unlike sampling methods requiring multiple generations and grey-box methods limited to output-token distributions.Single-vector probes additionally collapse either the token or layer axis, whereas ActMap preserves structured depth and temporal information.

Method

ActMap records generation-time hidden states and converts variable-length trajectories into a fixed tensor of temporal statistics, pooled depth, and standardized coordinates. A lightweight classifier then maps each tensor to an estimated correctness probability.

  • Generation-Time Trajectory: The pipeline records each generated token’s hidden state at every layer while leaving decoding unchanged and reducing each hidden vector online to 128 pooled coordinates.The stored trajectory has shape L × T × 128 and requires no extra samples or decoding pass.
  • Activation-Map Construction: Twelve temporal-statistic channels summarize the token axis with segment means, final states, dispersion, drift, slope, magnitude, and dynamics, making output shape independent of answer length.For one-token answers, dispersion, slope, and dynamics channels are set to zero.
  • Activation-Map Construction: Adaptive layer pooling maps model depths to 32 ordered rows, while per-channel standardization exposes spatial patterns on a common scale and float16 storage yields a 96 KiB map.The representation is designed to preserve where activity differs across depth, pooled hidden coordinates, and answer time rather than interpret individual cells.
  • Correctness Classifier: A compact Vision Transformer maps each standardized tensor to p(correct), and uncertainty is defined as u = 1 − p(correct).The classifier uses 4 × 16 patches, six pre-norm blocks, 192-wide embeddings, six heads, and factorized row/column positional embeddings.
  • Correctness Classifier: The detector is trained with binary cross-entropy on correctness labels, with AdamW, cosine decay, early stopping, three seeds, Gaussian input noise, and mixup.Reported probabilities are raw sigmoid outputs, and prior correction may be needed when deployment prevalence differs from training.

Experimental Setup

The study evaluates ActMap across short-answer QA, direct-answer mathematics, and summarization factuality using three instruction-tuned 7–8B models under a shared balanced protocol. In-domain results show strong performance against non-tensor baselines and near-parity with dense ACT-ViT representations at much smaller size.

  • Experimental Setup: The evaluation covers TriviaQA, NQ-Open, GSM8K, and CNN/DailyMail with Qwen3-8B, Llama-3.1-8B-Instruct, and Mistral-7B-Instruct under identical balanced test rows.The protocol includes black-box, grey-box, and white-box baselines and reports seed-averaged metrics for trained methods.
  • Main Results: ActMap attains the highest AUROC and AUPRC on all twelve model–dataset pairs against sampling, token-probability, attention, and embedding baselines, with mean AUROC .825 versus .790 for TAD and .741 for MTE.Table 3 reports balanced in-domain test results using AUROC, AUPRC, and ECE.
  • Baseline Comparisons: Grey-box methods are relatively strong on short-answer QA but trail ActMap by .031–.087 in GSM8K AUROC, while sampling-based Semantic Entropy does not match single-pass grey-box statistics on these splits.The reported pattern is attributed to concentrated token distributions for some incorrect numeric answers and to Semantic Entropy reflecting question ambiguity.
  • Task Difficulty: CNN/DailyMail is the hardest regime: all methods score lower, training-free methods are barely above chance, and only supervised methods extract usable signal, with ActMap ahead.Summary factuality is graded, so one unsupported clause can make labels difficult near the boundary.
  • Compression Preserves the Dense-Tensor Signal: ActMap and ACT-ViT have nearly identical ranking quality: mean AUROC is .825 versus .823, with ActMap leading on seven of twelve pairs and ACT-ViT on five.ACT-ViT is evaluated with its complete published 24-configuration sweep for each pair.
  • Compression Preserves the Dense-Tensor Signal: ActMap reaches this parity with 49,152 values per generation versus ACT-ViT’s 3.3M, while using one fixed classifier and achieving lower ECE on ten of twelve pairs.Mean ECE is .063 for ActMap versus .091 for ACT-ViT.

Transfer and Generalization

ActMap transfers strongly within the same task but generalizes poorly across task boundaries, with shared map geometry failing to align decision boundaries. The resulting deployment requirement is target-domain labeling for reliable monitoring under shift.

  • Within-task transfer stays close to matched in-domain training and exceeds frozen TAD on TriviaQA→NQ-Open, although TAD calibrates better.
  • Transfer across task boundaries is weak and model-dependent from pooled QA to GSM8K, while short-answer correctness and summary factuality transfer in both directions near chance.
  • A new deployment requires target-domain labels because monitoring degrades silently under shift, creating an oversight risk.

Ablations

Ablations show that ActMap’s predictive signal depends mainly on preserving cross-layer structure and contiguous hidden-coordinate grouping, while classifier choice and many construction details matter little. The detector’s signal concentrates in midnetwork regions, and modest supervision already outperforms training-free baselines.

  • Representation structure: A single mean-pooled final-layer vector costs .13 AUROC, whereas last-token channels recover nearly all full-map performance; temporal summaries add little on long summaries (.704 vs. .705).These results place the useful information in cross-layer, pooled-coordinate structure rather than any single statistic.
  • Pooling scheme: Permuting hidden coordinates before pooling is the most damaging variant, showing that contiguous coordinate grouping preserves signal beyond dimension reduction alone.Random Gaussian projections of matched size also lose ground.
  • Classifier architecture: Logistic regression, capacity-matched MLPs, and a 4× MLP perform comparably on identical maps, while remaining construction choices shift AUROC by at most .010.The capacity-matched MLP slightly outperforms the Vision Transformer in this ablation setting.
  • Supervision: With about 3,800 balanced examples, 10% of training data reaches .815 AUROC and beats Semantic Entropy and EigenScore, while 25% reaches .855 and beats every evaluated training-free baseline.Permuted-label detectors fall to chance, and answer-length-only predictors remain below the full map.
  • Signal localization: Occlusion drops of .003–.013 and agreement between integrated-gradients and attention-rollout localize ActMap’s signal to midnetwork depth bands.The baseline AUROC is .887, while occluding the entire map reduces it to .500.
  • Selective prediction: At 5% risk on Qwen3-8B TriviaQA, ActMap retains 18.3% coverage versus 14.3% for ACT-ViT and 6.2% for MTE.On CNN/DailyMail, no method provides useful coverage at 5% risk; at 80% coverage, ActMap and ACT-ViT are comparable (.432 and .427) against .476 for MTE.

Computational Cost

ActMap is designed as a compact, auditable uncertainty artifact whose capture adds no measurable decoding overhead. Its deployment scope remains constrained by white-box access, supervised in-domain labeling, calibration under prevalence shift, and the need to use scores for verification rather than replacement.

  • Computational footprint: 96 KiB per-generation maps are captured with no measurable overhead, while the score provides a re-scorable artifact for consequential answers.The map is 67× smaller than ACT-ViT’s dense tensor, and stored maps support audit trails subject to source-text access controls and retention limits.
  • Deployment constraints: ActMap requires access to generation-time hidden states and separate labeled supervision for each deployment regime.This excludes closed APIs and means the detector’s decision boundary is not assumed to transfer without target-domain supervision.
  • Calibration boundary: Under prevalence shift, calibration can degrade substantially: ECE reaches .15–.24 when natural accuracy collapses, and temperature scaling does not repair it.Calibration remains better when natural accuracy is near the balanced regime, but this boundary is task- and model-dependent.
  • Responsible use: The score should guide verification rather than replace it because it is correlational and does not establish truth.Stored maps can support later auditing, but their handling must follow the source text’s access controls and retention limits.

Technical Appendix

The appendix constructs ActMap by pooling hidden coordinates and summarizing token trajectories with hand-designed temporal statistics. These operations preserve layer and coordinate structure while producing a fixed-size representation from variable-length generation trajectories.

  • Appendix scope: The appendix contains implementation details and cost measurements, while the main paper contains the claims and results needed to assess the work.The appendix also specifies the ACT-ViT reproduction protocol and retained artifacts.
  • Representation construction: Hidden states from every transformer block and generated token are reduced to 128 pooled hidden coordinates before temporal statistics are computed.For one answer, the trajectory H has dimensions L×T×D and becomes X with dimensions L×T×128.
  • Temporal statistics: Four segment means summarize when activation patterns occur across consecutive token intervals.Empty segments for very short answers are replaced by the nearest valid one-token interval.
  • Temporal statistics: The channel set also includes final state, temporal standard deviation, temporal maximum, endpoint drift, and layer RMS statistics.These statistics capture endpoint behavior, dispersion, temporal extrema, directional change, and layer-level magnitude.

9. Mean absolute temporal difference. (T −1)−1 PT −1

ActMap keeps ordered depth and pooled-coordinate structure while standardizing each channel to emphasize spatial patterns rather than raw activation scale. Ablations indicate that depth-resolved structure contributes more than removing any single channel family.

  • Ablations: Grouped ablations show that collapsing the depth-resolved map causes a larger AUROC loss than removing any one channel family.The result supports the full structured map but does not establish that any individual channel family is essential.
  • Normalization and structure: Each channel is standardized independently, removing absolute scale differences while retaining relative patterns across layers and pooled coordinates.A global-normalization control tests whether these spatial patterns add information beyond overall activation scale.
  • Map assembly: The representation applies each trajectory statistic independently to pooled hidden coordinates before ordered adaptive pooling maps the layer axis to 32 rows.The stored map therefore preserves ordered depth and coordinate structure in a fixed layout.
  • Computational properties: The stored ActMap has 12 × 32 × 128 values regardless of output length, instead of retaining O(LTD) full hidden-state values.This fixed output shape is independent of layer count, token count, and hidden size when hidden states are capturable.

B Primary Classifier

The primary classifier converts the 32 × 128 ActMap into learned patches, adds spatially factorized positional information, and predicts correctness with a compact transformer. Training uses balanced supervised splits, augmentation, validation-based checkpointing, and multi-seed reporting.

  • Architecture: A compact transformer patches each 32 × 128 map into an 8×8 grid of 64 tokens and preserves both spatial axes with learned row and column embeddings.A learned classification token is prepended before the encoder blocks process the patch sequence.
  • Architecture: The classifier has 2,225,664 parameters across six encoder blocks, and its sigmoid output is the estimated correctness probability.The full parameter accounting includes patch projection, class and position parameters, normalization, and readout components.
  • Training protocol: Each generator–dataset detector is trained independently on balanced splits with binary cross-entropy and positive-class weight 1.0.Validation and test splits are disjoint by source key, and the positive-class weight equals N−/N+ for balanced training data.
  • Optimization and evaluation: Gaussian noise and mixup augment training maps, while checkpoints are selected by validation AUROC with early stopping and test evaluation performed once.Main-table values are arithmetic means over three seeds, and ECE uses ten equal-width probability bins.

C.1 ACT-ViT Reproduction Protocol

The reproduction follows the released ACT-ViT architecture and model-selection protocol, with matched data and supervision across methods. It also compares measured classifier cost and enforces stricter frozen-detector transfer conditions.

  • C.1 ACT-ViT Reproduction Protocol: ACT-ViT uses the authors’ released architecture and preprocessing, including an 8 × 100 dense tensor, output-axis padding or slicing, pooled layers, and a model-specific adapter.The reproduction searches the authors’ full 24-configuration grid.
  • C.1 ACT-ViT Reproduction Protocol: Validation AUROC selects the configuration on seed 42, which is retrained with seeds 123 and 456 and evaluated once on the test split.Checkpoints are replaced only when validation AUROC strictly improves, with ties retaining the earlier epoch.
  • C.1 ACT-ViT Reproduction Protocol: The comparison gives ACT-ViT and other supervised methods identical balanced rows, generators, responses, labels, supervision, splits, and random seeds; only the detector and model-selection protocol differ.The upstream 10,000-example preprocessing cap is not applied.
  • C.1 ACT-ViT Reproduction Protocol: 0.066 ms versus 0.024 ms per answer: the measured ACT-ViT configuration is slower than the ActMap classifier on the stated TriviaQA × Qwen3-8B stack.ACT-ViT uses 5.16M parameters and ActMap uses 2.40M in this measurement.
  • C.1 ACT-ViT Reproduction Protocol: Transfer freezes detectors and uses no target labels or adapter updates, whereas in-domain ACT-ViT training retains its published model-specific adapter.Near-chance transfer therefore measures zero-shot reuse; target adaptation is outside the study.

D Reproduction Environment and Retained Artifacts

The reproduction records pinned software, hardware, seeds, configurations, histories, checkpoints, and per-row outputs to support repeatable analysis. Its latency measurements are stack-specific and include both lightweight and substantially slower detector paths.

  • D Reproduction Environment and Retained Artifacts: Each run records the operating system, CUDA and PyTorch versions, accelerator, configuration, and input-artifact identifiers on NVIDIA L40S hardware.7–8B experiments use one L40S, while Qwen3-32B experiments use two.
  • D Reproduction Environment and Retained Artifacts: Deterministic PyTorch settings and fixed random seeds support repeated runs on the recorded stack, but exact bitwise agreement across stacks is not claimed.This bounds reproducibility to the documented software and hardware environment.
  • D Reproduction Environment and Retained Artifacts: The retained artifacts include configurations, classifier arguments, validation-selected states, per-epoch histories, aggregate metrics, and one score and probability per balanced test row.Split counts, optimizer, augmentation, determinism settings, and source-artifact metadata are also retained.
  • D Reproduction Environment and Retained Artifacts: The classifier ablation keeps maps and splits fixed while varying architecture and parameter budget, isolating classifier capacity from input information.It compares logistic regression, a matched MLP, and a 4×-budget control.
  • D Reproduction Environment and Retained Artifacts: Latency is measured after answer generation on a vLLM, single-L40S stack with Qwen3-8B, TriviaQA, and 32 new tokens; values vary with stack, kernels, batch size, and output length.Figure 4 relates these implementation-specific measurements to mean ranking quality.
  • D Reproduction Environment and Retained Artifacts: 126.25 and 125.6 ms overall: TAD timing averages 110.6 ms for feature extraction and 14.9 ms for readout, with 120.8 ms median latency.The 95th percentile is 158.9 ms across the retained timing archive.
Loading 2609.11498v1…