mlsanityData to 7 Oct 2026

Modular Arithmetic: Language Models Solve Math Digit by Digit

arXiv 2508.02513 ↗First posted 4 Aug 2025cs.CL cs.AIcited by 6

Not on the map. Why?

Abstract (arXiv)

While recent work has begun to uncover the internal strategies that Large Language Models (LLMs) employ for simple arithmetic tasks, a unified understanding of their underlying mechanisms is still lacking. We extend recent findings showing that LLMs represent numbers in a digit-wise manner and present evidence for the existence of digit-position-specific circuits that LLMs use to perform simple arithmetic tasks, i.e. modular subgroups of MLP neurons that operate independently on different digit positions (units, tens, hundreds). Notably, such circuits exist independently of model size and of tokenization strategy, i.e. both for models that encode longer numbers digit-by-digit and as one token. Using Feature Importance and Causal Interventions, we identify and validate the digit-position-specific circuits, revealing a compositional and interpretable structure underlying the solving of arithmetic problems in LLMs. Our interventions selectively alter the model's prediction at targeted digit positions, demonstrating the causal role of digit-position circuits in solving arithmetic tasks.

Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 14 of its 28 references that are in the map. First posted on arXiv 4 Aug 2025.

Builds on

14 of 28 references.

References · 14

  1. 2024The Llama 3 Herd of Modelscited by 14,192
  2. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  3. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  4. 2024Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristicscited by 94
  5. 2023Successor Heads: Recurring, Interpretable Attention Heads In The Wildcited by 77
  6. 2025Language Models Use Trigonometry to Do Additioncited by 68
  7. 2024pyvene: A Library for Understanding and Improving PyTorch Models via Interventionscited by 53
  8. 2024Interpreting and Improving Large Language Models in Arithmetic Calculationcited by 43
  9. 2024Pre-trained Large Language Models Use Fourier Features to Compute Additioncited by 38
  10. 2024Language Models Encode Numbers Using Digit Representations in Base 10cited by 32
  11. 2024Language Models Encode the Value of Numbers Linearlycited by 19
  12. 2025What is a Number, That a Large Language Model May Know It?cited by 14
2 more
  1. 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMscited by 13
  2. 2024Language Models are Symbolic Learners in Arithmeticcited by 11

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 6.

6 papers.