Lune

ICLR2025Top-tier venue

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

Yaniv Nikankin, Anja Reusch, Aaron Mueller, Yonatan Belinkov

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". 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

42 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Towards Understanding the Nature of Attention with Low-Rank Sparse Decomposition cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
  • Towards Understanding the Nature of Attention with Low-Rank Sparse Decomposition cites How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model
  • Same Task, Different Circuits: Disentangling Modality-Specific Mechanisms in VLMs cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Same Task, Different Circuits: Disentangling Modality-Specific Mechanisms in VLMs cites Pay Attention to MLPs
  • Finite State Automata Inside Transformers with Chain-of-Thought: A Mechanistic Study on State Tracking cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Mechanistic Detection and Mitigation of Hallucination in Large Reasoning Models cites How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model
  • How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model cites Causal Abstractions of Neural Networks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers42

  1. Same Task, Different Circuits: Disentangling Modality-Specific Mechanisms in VLMsYaniv Nikankin, Dana Arad, Yossi Gandelsman, Yonatan BelinkovNeurIPS 2025 · 37 citations
  2. Mechanistic Detection and Mitigation of Hallucination in Large Reasoning ModelsZhongxiang Sun, Qipeng Wang, Haoyu Wang, Xiao Zhang et al.ICLR 2026 · 30 citations
  3. The Serial Scaling HypothesisYuxi Liu, Konpat Preechakul, Kananart Kuwaranancharoen, Yutong BaiICLR 2026 · 12 citations
  4. Towards Understanding the Nature of Attention with Low-Rank Sparse DecompositionZhengfu He, Junxuan Wang, Rui Lin, Xuyang Ge et al.ICLR 2026 · 11 citations
  5. Finite State Automata Inside Transformers with Chain-of-Thought: A Mechanistic Study on State TrackingYifan Zhang, Wenyu Du, Dongming Jin, Jie Fu et al.ACL 2025 · 11 citations

Builds on23

  1. Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
  2. Pay Attention to MLPsHanxiao Liu, Zihang Dai, David R. So, Quoc V. LeNeurIPS 2021 · 912 citations
  3. Investigating Gender Bias in Language Models Using Causal Mediation AnalysisJesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian et al.NeurIPS 2020 · 851 citations
  4. Causal Abstractions of Neural NetworksAtticus Geiger, Hanson Lu, Thomas Icard, Christopher PottsNeurIPS 2021 · 516 citations
  5. How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelMichael Hanna, Ollie Liu, Alexandre VariengienNeurIPS 2023 · 251 citations

Related papers

  1. Interpreting Arithmetic Reasoning in Large Language Models using Game-Theoretic InteractionsLeilei Wen, Liwei Zheng, Hongda Li, Lijun Sun et al.NeurIPS 2025 · 1 citation
  2. Interpreting and Improving Large Language Models in Arithmetic CalculationWei Zhang, Chaoqun Wan, Yonggang Zhang, Yiu-ming Cheung et al.ICML 2024 · 47 citations
  3. A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation AnalysisAlessandro Stolfo, Yonatan Belinkov, Mrinmaya SachanEMNLP 2023 · 11 citations
  4. Do Large Language Models Truly Grasp Addition? A Rule-Focused Diagnostic Using Two-Integer ArithmeticYang Yan, Yu Lu, Renjun Xu, Zhenzhong LanEMNLP 2025 · 1 citation
  5. The Reasoning-Memorization Interplay in Language Models Is Mediated by a Single DirectionYihuai Hong, Meng Cao, Dian Zhou, Lei Yu et al.ACL Findings 2025
Dusk over the sea between two cliffs drawn in fine vertical lines