Papers
Topics
Authors
Recent
Search
2000 character limit reached

How LLMs Detect and Correct Their Own Errors: The Role of Internal Confidence Signals

Published 24 Apr 2026 in cs.LG | (2604.22271v1)

Abstract: LLMs can detect their own errors and sometimes correct them without external feedback, but the underlying mechanisms remain unknown. We investigate this through the lens of second-order models of confidence from decision neuroscience. In a first-order system, confidence derives from the generation signal itself and is therefore maximal for the chosen response, precluding error detection. Second-order models posit a partially independent evaluative signal that can disagree with the committed response, providing the basis for error detection. Kumaran et al. (2026) showed that LLMs cache a confidence representation at a token immediately following the answer (i.e. post-answer newline: PANL) -- that causally drives verbal confidence and dissociates from log-probabilities. Here we test whether this PANL signal extends beyond confidence to support error detection and self-correction. Here we test whether this signal supports error detection and self-correction, deriving predictions from the second-order framework. Using a verify-then-correct paradigm, we show that: (i) verbal confidence predicts error detection far beyond token log-probabilities, ruling out a first-order account; (ii) PANL activations predict error detection beyond verbal confidence itself; and (iii) PANL predicts which errors the model can correct -- where all behavioural signals fail. Causal interventions confirm that PANL signals rescue error detection behavior when answer information is corrupted. All findings replicate across models (Gemma 3 27B and Qwen 2.5 7B) and tasks (TriviaQA and MNLI). These results reveal that LLMs naturally implement a second-order confidence architecture whose internal evaluative signal encodes not only whether an answer is likely wrong but whether the model has the knowledge to fix it.

Summary

  • The paper demonstrates that LLMs utilize distinct second-order confidence signals via PANL activations to detect errors and trigger self-correction.
  • Experimental results reveal that PANL activations outperform traditional metrics like log-probabilities and verbal confidence, achieving higher AUROC scores.
  • Causal interventions confirm that manipulating PANL activations can rescue error detection, offering a robust, generalizable pathway for enhanced model self-evaluation.

Second-Order Confidence Architecture in LLM Error Detection and Self-Correction

Motivation and Theoretical Framework

LLMs exhibit the capacity to detect their own errors and, in certain cases, revise answers absent external feedback. This paper interrogates the computational mechanisms underlying these phenomena, focusing on decision neuroscience's distinction between first-order and second-order models of confidence. First-order models tie confidence directly to the generation signal (e.g., token log-probabilities); under greedy decoding, the chosen response is always maximally confident, precluding error detection. Second-order models posit a distinct evaluative signal, potentially disagreeing with the committed response and thus enabling error detection and self-correction.

Crucially, prior work (Kumaran et al., 18 Mar 2026) identified a post-answer newline (PANL) token as the locus for cached confidence representations in LLMs, which govern verbal confidence but are dissociated from log-probabilities. This study extends the framework, examining whether PANL signals encode more general evaluative information relevant to error monitoring and quality improvement. Figure 1

Figure 1: Verification and self-correction prompt structure and schematic distinction between first-order and second-order confidence architectures in LLMs.

Experimental Methodology

Experiments were conducted primarily on Gemma 3 27B (62-layer, 5376-d residual stream) with replication on Qwen 2.5 7B, using the TriviaQA factual QA benchmark and MNLI for cross-task generalization. Following greedy decoding for initial answer generation (Phase 0), models were prompted to verify their own answers (Phase 1; Y/N), and subsequently perform self-correction (Phase 2). Residual stream activations were extracted at PANL during verification, and linear probes were trained to predict verification and correction outcomes. Behavioral baselines included verbal confidence, answer token log-probabilities, and logistic regression aggregations.

Behavioral and Probing Results

Gemma 3 27B achieved 75.5% accuracy at initial attempt (A1) on TriviaQA, improving to 79.2% post self-correction (A2; Δ=+3.7 pp). Verbal confidence (AUROC=0.74) and log-probabilities (AUROC=0.76) predicted answer correctness, but crucially, verification responses demonstrated robust error-detection (d’=1.67, conservative criterion c=-1.34). Foil experiments established that error detection scales with answer plausibility.

Verbal confidence predicted verification outcomes far beyond log-probabilities (AUROC=0.832 vs 0.668), especially within incorrect trials, where log-probabilities were entirely uninformative (AUROC=0.481; confidence AUROC=0.737). Thus, behavioral second-order signatures rule out strictly first-order accounts. Figure 2

Figure 2: Gemma 3 27B behavioral results on TriviaQA, demonstrating robust error detection and the superiority of verbal confidence over log-probabilities.

Linear probes on PANL activations yielded performance surpassing all behavioral baselines, particularly at mid-to-upper layers. Within incorrect trials, PANL predicted verification with AUROC=0.958 versus baseline 0.715; it also cleanly separated correct rejections from false alarms (AUROC=0.892). Furthermore, PANL predicted answer change decisions (AUROC=0.921 vs 0.901), and—critically—predicted A2 correctness among changed incorrect trials (AUROC=0.614), where behavioral signals were at chance or below (AUROC=0.475). Figure 3

Figure 3: Probing results across layers and token positions; PANL activations outperform behavioral baselines in verification and self-correction prediction.

Figure 4

Figure 4: PANL probe matches or surpasses behavioral predictors across verification and self-correction tasks; uniquely above chance for correctability among changed trials.

Causal Interventions and Redundancy

Activation patching experiments established that PANL is causally sufficient to rescue error detection when answer information is corrupted, recovering d′d' by up to 74% at mid layers. LAT (last answer token) is necessary at early layers but carries both answer representation and evaluative signal. Joint mean ablation of LAT and PANL revealed deficits at mid layers, consistent with distributed, redundant encoding of evaluation. Patch positions with decodable signals yet lacking causal impact (e.g., PANL+1) further distinguished causally relevant loci. Figure 5

Figure 5: Causal experiments on Gemma 3 27B; PANL rescues error detection at mid layers, LAT at early, prompt last token at late layers.

Cross-Model and Cross-Task Generalization

All central findings robustly replicated in Qwen 2.5 7B and on MNLI neutral trials. Despite lower baseline accuracy and model size, Qwen's PANL activations predicted verification (AUROC=0.961) and A2 correctness (AUROC=0.679), far above behavioral baselines. PANL generalizes functionally but the probe directions encoding correctability are largely task specific (cross-task probe transfer AUROC ≤ 0.6; cosine similarity ≤ 0.03). Figure 6

Figure 6: Replication of error detection and self-correction phenomena in Qwen 2.5 7B.

Figure 7

Figure 7: Qwen 2.5 7B linear probe results; PANL and LAT replicate Gemma 3 27B pattern.

Figure 8

Figure 8: Qwen 2.5 7B causal experiments; PANL and LAT rescue performance at distinct layer intervals, showing architectural redundancy for evaluation.

Practical and Theoretical Implications

This study provides compelling evidence that LLMs spontaneously implement a second-order confidence architecture, with PANL serving as a locus for a backward-looking evaluative signal that is partially independent from the answer generation mechanism. This signal not only predicts whether an answer is likely wrong but—beyond what is externalized in overt confidence reports—predicts if a correction attempt will succeed.

Monitoring PANL activations offers a practical avenue for selective self-correction in base LLMs and mirrors mechanisms exploited by reasoning-model backtracking and intermediate reward assignment (Ward et al., 16 Jul 2025, Gandhi et al., 3 Mar 2025, Yang et al., 6 Feb 2025). The redundancy observed between PANL and LAT positions supports robust, distributed evaluation capability, suggesting avenues for leveraging internal representations to trigger selective revision.

Theoretically, these findings elucidate the internal metacognitive apparatus of LLMs, positioning them closer to biological agents in their capacity for self-evaluation and error monitoring. The clear dissociation between generation and evaluation signals supports the extension of decision neuroscience frameworks to large-scale LLMs and opens new pathways for interpretability and algorithmic steering.

Conclusion

LLMs encode a second-order evaluative process that is distinct from generative retrieval, enabling robust error detection and self-correction. PANL activations causally drive both confidence and error monitoring, capturing latent information not available to behavioral outputs. This architecture generalizes across models and tasks, providing a principled substrate for selective revision and metacognitive reasoning. Future work may exploit PANL for enhanced interpretability and reward shaping, further bridging cognitive theories and LLM mechanistics.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 3 tweets with 22 likes about this paper.