The Validation Gap: A Mechanistic Analysis of How Language Models Compute Arithmetic but Fail to Validate It
Leonardo Bertolazzi, Philipp Mondorf, Barbara Plank, Raffaella Bernardi

TL;DR
This paper investigates how large language models perform arithmetic validation internally, revealing that they rely on surface-level consistency checks rather than genuine error detection, which explains their limitations in self-correction.
Contribution
It provides a mechanistic analysis of error detection in LLMs, identifying specific internal components responsible for validation and explaining the structural dissociation between computation and validation.
Findings
Models rely on consistency heads for error detection.
Arithmetic occurs in higher layers, validation in middle layers.
Structural dissociation explains error detection failures.
Abstract
The ability of large language models (LLMs) to validate their output and identify potential errors is crucial for ensuring robustness and reliability. However, current research indicates that LLMs struggle with self-correction, encountering significant challenges in detecting errors. While studies have explored methods to enhance self-correction in LLMs, relatively little attention has been given to understanding the models' internal mechanisms underlying error detection. In this paper, we present a mechanistic analysis of error detection in LLMs, focusing on simple arithmetic problems. Through circuit analysis, we identify the computational subgraphs responsible for detecting arithmetic errors across four smaller-sized LLMs. Our findings reveal that all models heavily rely on --attention heads that assess surface-level alignment of numerical values in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsNatural Language Processing Techniques
MethodsSoftmax · Attention Is All You Need
