mlsanityData to 14 Oct 2026

Why Can't Transformers Learn Multiplication? Reverse-Engineering Reveals Long-Range Dependency Pitfalls

arXiv 2510.00184 ↗First posted 30 Sep 2025cs.LG cs.AIcited by 7

Not on the map. Why?

Abstract (arXiv)

Language models are increasingly capable, yet still fail at a seemingly simple task of multi-digit multiplication. In this work, we study why, by reverse-engineering a model that successfully learns multiplication via implicit chain-of-thought, and report three findings: (1) Evidence of long-range structure: Logit attributions and linear probes indicate that the model encodes the necessary long-range dependencies for multi-digit multiplication. (2) Mechanism: the model encodes long-range dependencies using attention to construct a directed acyclic graph to ``cache'' and ``retrieve'' pairwise partial products. (3) Geometry: the model implements partial products in attention heads by forming Minkowski sums between pairs of digits, and digits are represented using a Fourier basis, both of which are intuitive and efficient representations that the standard fine-tuning model lacks. With these insights, we revisit the learning dynamics of standard fine-tuning and find that the model converges to a local optimum that lacks the required long-range dependencies. We further validate this understanding by introducing an auxiliary loss that predicts the ``running sum'' via a linear regression probe, which provides an inductive bias that enables the model to successfully learn multi-digit multiplication. In summary, by reverse-engineering the mechanisms of an implicit chain-of-thought model we uncover a pitfall for learning long-range dependencies in Transformers and provide an example of how the correct inductive bias can address this issue.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 18 of its 20 references that are in the map. First posted on arXiv 30 Sep 2025.

Builds on

18 of 20 references.

References · 18

  1. 2022Solving math word problems with process- and outcome-based feedbackcited by 901
  2. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
  3. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  4. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
  5. 2022Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskcited by 431
  6. 2023Emergent Linear Representations in World Models of Self-Supervised Sequence Modelscited by 319
  7. 2023Physics of Language Models: Part 3.1, Knowledge Storage and Extractioncited by 270
  8. 2024From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Stepcited by 235
  9. 2023Implicit Chain of Thought Reasoning via Knowledge Distillationcited by 176
  10. 2023Teaching Arithmetic to Small Transformerscited by 123
  11. 2024Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Processcited by 108
  12. 2024Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristicscited by 97
6 more
  1. 2025Language Models Use Trigonometry to Do Additioncited by 70
  2. 2023GPT Can Solve Mathematical Problems Without a Calculatorcited by 68
  3. 2024Competition Dynamics Shape Algorithmic Phases of In-Context Learningcited by 54
  4. 2024ICLR: In-Context Learning of Representationscited by 50
  5. 2024Language Models Do Hard Arithmetic Tasks Easily and Hardly Do Easy Arithmetic Taskscited by 24
  6. 2025Extrapolation by Association: Length Generalization Transfer in Transformerscited by 13

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 6.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Separators Make Carry Propagation Learnable:The Geometry of Latent Carry in a Multiplication Transformer
  2. 2024Unraveling Arithmetic in Large Language Models: The Role of Algebraic Structures
  3. 2024Principled Understanding of Generalization for Generative Transformer Models in Arithmetic Reasoning Tasks
  4. 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Tasks
  5. 2026Algorithmic Scratchpads and Curriculum Staging for Arithmetic Reasoning in Tiny Transformers
  6. 2022Transformers discover an elementary calculation system exploiting local attention and grid-like problem representation
  7. 2025Do Large Language Models Truly Grasp Addition? A Rule-Focused Diagnostic Using Two-Integer Arithmetic
  8. 2025Modular Arithmetic: Language Models Solve Math Digit by Digit