Probing for Arithmetic Errors in Language Models

Yucheng Sun, Alessandro Stolfo, Mrinmaya Sachan
7/16/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

We investigate whether internal activations in language models can be used to detect arithmetic errors. Starting with a controlled setting of 3-digit addition, we show that simple probes can accurately decode both the model's predicted output and the correct answer from hidden states, regardless of whether the model's output is correct. Building on this, we train lightweight error detectors that predict model correctness with over 90% accuracy. We then extend our analysis to structured chain-of-thought traces on addition-only GSM8K problems and find that probes trained on simple arithmetic generalize well to this more complex setting, revealing consistent internal representations. Finally, we demonstrate that these probes can guide selective re-prompting of erroneous reasoning steps, improving task accuracy with minimal disruption to correct outputs. Our findings suggest that arithmetic errors can be anticipated from internal activations alone, and that simple probes offer a viable path toward lightweight model self-correction.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sun2025probing,
  title  = {Probing for Arithmetic Errors in Language Models},
  author = {Yucheng Sun and Alessandro Stolfo and Mrinmaya Sachan},
  year   = {2025},
  eprint = {2507.12379},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.12379v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.12379.svg)](https://codeofpaper.com/paper/2507.12379)

Discussion