Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics

Yaniv Nikankin, Anja Reusch, Aaron Mueller, Yonatan Belinkov
2/12/2026

No official code found. Best implementation: technion-cs-nlp/llm-arithmetic-heuristics (27 stars, MIT, last commit 2025-05-20).

Abstract

Do large language models (LLMs) solve reasoning tasks by learning robust generalizable algorithms, or do they memorize training data? To investigate this question, we use arithmetic reasoning as a representative task. Using causal analysis, we identify a subset of the model (a circuit) that explains most of the model's behavior for basic arithmetic logic and examine its functionality. By zooming in on the level of individual circuit neurons, we discover a sparse set of important neurons that implement simple heuristics. Each heuristic identifies a numerical input pattern and outputs corresponding answers. We hypothesize that the combination of these heuristic neurons is the mechanism used to produce correct arithmetic answers. To test this, we categorize each neuron into several heuristic types-such as neurons that activate when an operand falls within a certain range-and find that the unordered combination of these heuristic types is the mechanism that explains most of the model's accuracy on arithmetic prompts. Finally, we demonstrate that this mechanism appears as the main source of arithmetic accuracy early in training. Overall, our experimental results across several LLMs show that LLMs perform arithmetic using neither robust algorithms nor memorization; rather, they rely on a"bag of heuristics".

View on arXivView PDF

Code Implementations(1)

MIT
274Python, Jupyter NotebookOct 18, 20241 years agoMIT

Similar Papers

Cite this paper

@article{nikankin2026arithmetic,
  title  = {Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics},
  author = {Yaniv Nikankin and Anja Reusch and Aaron Mueller and Yonatan Belinkov},
  year   = {2026},
  eprint = {2410.21272},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.21272},
  journal = {ICLR 2024 2024}
}

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/2410.21272.svg)](https://codeofpaper.com/paper/2410.21272)

Discussion