Actionable Hallucination Detection: Translating Latent Uncertainty into Agentic Critique

Sanidhya Vijayvargiya, Rahul Lokesh

TL;DR

The Latent Critic is a lightweight LoRA adapter that runs concurrently with a frozen base Large Language Model (LLM) to detect and localize "specification-grounding" hallucinations in real-time. By actively restructuring the transformer's residual stream, it translates internal model uncertainty into precise, natural language feedback (e.g., identifying exactly which tool parameter is ungrounded) with under 10ms of latency. This allows AI agents to intercept their own errors pre-execution and successfully self-correct in closed-loop environments.

What Problem Does This Paper Address?

When AI agents encounter ambiguous or incomplete user instructions, the ideal behavior is to stop and ask for clarification. However, because LLMs are heavily optimized for next-token prediction and instruction-following, they suffer from a severe task-completion bias. Instead of flagging missing details, they confidently invent plausible but unrequested parameters to force a resolution—a phenomenon known as a specification-grounding failure.

Existing solutions fall into two flawed camps:

  1. External LLM-as-a-judge evaluators or sampling methods (like semantic entropy): These operate on surface text after generation, introducing massive inference latency that breaks real-time agent workflows.
  2. Passive internal probing: These train classifiers on the model's hidden states to output a scalar confidence score. While fast, a single number doesn't tell the agent where or why it hallucinated, making it useless for targeted self-correction.

The authors bridge this gap by asking: Can we extract and translate internal uncertainty into localized, actionable feedback without adding prohibitive latency?

Figure 1: The closed-loop agentic archi- tecture. When the frozen base model generates a hallucinated parameter, the Latent Critic concurrently extracts the specification-grounding failure, block- ing execution and feeding the localized error back as a zero-shot environmental observation.

Methods

The authors introduce the Latent Critic, a Parameter-Efficient Fine-Tuning (PEFT) architecture designed as a minimal-latency guardrail for tool-calling environments.

  • Concurrent Multi-Adapter Execution: A specialized LoRA adapter is attached to a frozen base LLM. As the base model autoregressively generates a tool call, the adapter processes the exact same hidden states concurrently, learning to amplify latent uncertainty signals within the residual stream.
  • The [POS] Trigger Token: Once the base model finishes generating the tool call, a special trigger token ([POS]) is appended to act as an attention sink. This signals the Critic to aggregate the accumulated uncertainty from the sequence and immediately verbalize a structured classification (e.g., ok, wrong_tool, or ungrounded: [parameter_name]).
  • Masked Loss Objective: To ensure the adapter acts purely as an uncertainty extractor rather than rewriting the model's capabilities, the Supervised Fine-Tuning (SFT) gradient updates are masked. Gradients are computed only on the [POS] token and the subsequent critique label, leaving the base tool-generation phase untouched.
Figure 2: Concurrent extraction architecture. The adapter processes the base model’s hidden states during tool call generation and projects the accumulated uncertainty upon generating [POS] token.

Datasets

To evaluate the architecture, the authors built a pipeline to generate naturalistic, ambiguous multi-turn dialogues:

  • In-Distribution (ID): 5,000 scenarios for training and 500 for evaluation, derived from small language model (SLM) agent literature featuring highly detailed tool schemas.
  • Out-of-Distribution (OOD): 200 scenarios from ToolAlpaca, encompassing real-world APIs across 50 diverse categories to test generalization to unseen tools and schemas.
  • Data Generation Pipeline: Powered by Qwen3.5-122B acting as a simulated user, the environment programmatically tracked a Completed Specifications List (CSL) mask to accurately label exactly when an agent fabricated a parameter not yet provided in the dialogue history. All evaluation sets were human-verified.

Key Insights and Ideas

  • Confidence Does Not Imply Reliability: Surface-level output logits are highly deceptive. LLMs frequently generate hallucinated parameters with over 80% confidence. The Latent Critic bypasses this by reading the hidden states directly, classifying ungrounded trajectories with an average internal confidence of 95.38%.
  • Latent Extraction is Reactive, Not Prescient: By tracking the Critic's confidence across different stages of generation, the authors discovered that the uncertainty signal spikes sharply the exact instant the model formulates the ungrounded parameter key, rather than leaking early during tool selection.
  • Rank-Invariant Geometric Restructuring: Probing the adapter revealed that it actively restructures the model's internal geometry. It takes entangled, non-linear base representations of uncertainty and maps them into a stable, linearly separable subspace starting around Layer 15. This geometric shift is rank-invariant, meaning even highly bottlenecked adapters (e.g., LoRA rank $r=4$) achieve the same separation.
Figure 3: Mechanistic Analysis of the Latent Critic. (a) Surface-level output logits fail to reliably separate grounded parameters from fabrications. (b) Latent extraction is reactive, not prescient. (c) The adapter acts as a geometric amplifier, separating entangled base states. (d) Localized activation patching confirms the adapter relies causally on this underlying latent geometry.

Key Results

The Latent Critic was validated across Qwen and Llama-based models, demonstrating massive improvements over traditional baselines:

  • Detection Performance: On Qwen3-4B, the Critic achieved a peak 0.966 AUROC in-distribution and 0.925 AUROC out-of-distribution, drastically outperforming semantic entropy and passive linear probes.
  • Granular Localization: The model localized the exact faulty parameter with >80% exact match accuracy. At a strict 1% False Positive Rate, it caught 38.7% of hallucinations, compared to just 3.8% for a passive probe.
  • Negligible Latency: In a vLLM deployment environment, the single-pass extraction added <10 ms of latency per tool call, making it uniquely viable for real-time deployment compared to the 884 ms overhead of an external judge.
  • Closed-Loop Self-Correction: When integrated into a ReAct agent loop, providing specific localized feedback (e.g., "You hallucinated the parameter: date") boosted the agent's successful recovery rate to 37.0% (ID) and 29.3% (OOD), while cutting down wasted, repetitive guessing loops.

Limitations and Future Work

  • Upper-Bounded by the Base Model: The Critic can only extract uncertainty if the base model internally registers that it is guessing. If the base model completely breaks down (e.g., during runaway infinite loops), the geometric signal is corrupted, and the Critic fails.
  • Scoped to Structured Tool-Calling: While highly effective for parameter-level tracking where schemas provide rigid boundaries, extending this span-level localization to open-ended text generation remains an open challenge.
  • Model Dependency under Shift: The performance advantage of internal access over fine-tuned external judges under extreme distribution shifts showed some model-dependent variance on Llama-based backbones, indicating a need for broader cross-architecture studies.

Summary updated

BibTeX
@inproceedings{vijayvargiya2026actionable,
  author = {Sanidhya Vijayvargiya and Rahul Lokesh},
  title = {{Actionable Hallucination Detection: Translating Latent Uncertainty into Agentic Critique}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=6CdA8QbHL5},
}
Figure