Open Interpretability Models Contributors Research Posts About

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

Source

Citation. Yaniv Nikankin, Anja Reusch, Aaron Mueller and Yonatan Belinkov, of the Technion. Mueller is also at Northeastern University. "Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics". arXiv:2410.21272, version 2 of 20 May 2025. Version 1 is of 28 October 2024. Preprint, no venue given. The code is at github.com/technion-cs-nlp/llm-arithmetic-heuristics. Funding: the Israel Science Foundation (448/20), the Azrieli Foundation, an Open Philanthropy AI Alignment grant, the ERC (Control-LM 101165402) and fellowships for two authors. The text gives no disclosure of tool use.

Mismatch. The text gives an average faithfulness of 0.96, and Table 1's values average to 0.95. Table 3's "Average" column isn't the mean of its operator columns for any model, and no weighting is described. Section 2.1 allows operands up to 1,000, and the experiments use 0 to 300.

Status. Planned. #5220 names it as background for phase 5(b), a compiled addition module. The fix campaign is the maintainer's, so this page reports evidence and records questions only.

Read. On 2026-11-20 a web-fetch subagent read the abstract page and the HTML of version 2 for this page's author, a model (Claude Opus 5.5). It read the source's own text in full, in three fetches: Sections 1 to 8, the references and Appendices A to J. We didn't see any figure as an image. So the neuron-level faithfulness curves and the ablation results of Figures 7 and 8 appear here only as the text describes them. We didn't read version 1 or the code.

Summary

Claim. Language models don't do arithmetic with an algorithm or by memory. A sparse set of MLP neurons each fires on a simple pattern of the operands, such as a range or a remainder. Each one nudges the logits of matching answers. Together these heuristics produce the answer.

Method.

Findings, as the source reports them.

Setting Result
Llama3-8B circuit faithfulness (Table 1) + 0.97 with 6 heads, − 0.98 with 6, × 0.90 with 20, ÷ 0.96 with 6. All MLPs are in the circuit
Neurons that carry the circuit (Section 3) the top 200 neurons of each layer from 16 on, about 1.5% of MLP neurons
Neurons classified as a heuristic (Section 4.1) 91% of those top neurons
Knockout of a prompt's heuristic neurons (Section 4.2) accuracy falls from about 95% to about 66%, "not ... a complete accuracy drop"
Wrong answers (Section 4.3) wrong prompts have at least as many heuristic neurons as right ones. The authors put errors down to weak promotion of the right logit
Over training, Pythia-6.9B (Section 5) the final heuristics explain 79% of the heuristic contribution at each earlier checkpoint. Ablating 25 heuristic neurons per layer gives near-zero accuracy at every checkpoint
Accuracy (Table 3, "Average" column) Llama3-8B 0.95, Llama3-70B 0.88, Pythia-6.9B 0.43, GPT-J 0.37

Where the claims go beyond the evidence

The authors state limits themselves. The heuristic types are defined by hand. They studied only tokenizers that keep numbers as multi-digit tokens. Some heuristics have low recall.

Use in this repo