mlsanityData to 14 Oct 2026

Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks

arXiv 2502.16763 ↗First posted 24 Feb 2025cs.LGcited by 4

Not on the map. Why?

Abstract (arXiv)

Neural networks are known for their ability to approximate smooth functions, yet they fail to generalize perfectly to unseen inputs when trained on discrete operations. Such operations lie at the heart of algorithmic tasks such as arithmetic, which is often used as a test bed for algorithmic execution in neural networks. In this work, we ask: can neural networks learn to execute binary-encoded algorithmic instructions exactly? We use the Neural Tangent Kernel (NTK) framework to study the training dynamics of two-layer fully connected networks in the infinite-width limit and show how a sufficiently large ensemble of such models can be trained to execute exactly, with high probability, four fundamental tasks: binary permutations, binary addition, binary multiplication, and Subtract and Branch if Negative (SBN) instructions. Since SBN is Turing-complete, our framework extends to computable functions. We show how this can be efficiently achieved using only logarithmically many training data. Our approach relies on two techniques: structuring the training data to isolate bit-level rules, and controlling correlations in the NTK regime to align model predictions with the target algorithmic executions.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 34 of its 46 references that are in the map. First posted on arXiv 24 Feb 2025.

Builds on

34 of 46 references.

References · 34

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2016Simple and Scalable Predictive Uncertainty Estimation using Deep Ensemblescited by 3,926
  3. 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
  4. 2018Averaging Weights Leads to Wider Optima and Better Generalizationcited by 1,209
  5. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
  6. 2019Wide Neural Networks of Any Depth Evolve as Linear Models Under Gradient Descentcited by 738
  7. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
  8. 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
  9. 2023Looped Transformers as Programmable Computerscited by 237
  10. 2024From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Stepcited by 235
  11. 2023Implicit Chain of Thought Reasoning via Knowledge Distillationcited by 176
  12. 2019Neural Tangents: Fast and Easy Infinite Neural Networks in Pythoncited by 149
22 more
  1. 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
  2. 2020Tensor Programs II: Neural Tangent Kernel for Any Architecturecited by 143
  3. 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 139
  4. 2015Neural GPUs Learn Algorithmscited by 121
  5. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
  6. 2014Learning to Executecited by 106
  7. 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 102
  8. 2015Neural Programmer-Interpreterscited by 101
  9. 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
  10. 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
  11. 2018Neural Arithmetic Logic Unitscited by 70
  12. 2023Auto-Regressive Next-Token Predictors are Universal Learnerscited by 67
  13. 2023Length Generalization in Arithmetic Transformerscited by 66
  14. 2021Tensor Programs IIb: Architectural Universality of Neural Tangent Kernel Training Dynamicscited by 57
  15. 2015Neural Programmer: Inducing Latent Programs with Gradient Descentcited by 34
  16. 2024Simulation of Graph Algorithms with Looped Transformerscited by 30
  17. 2020Neural Arithmetic Unitscited by 28
  18. 2023When can transformers reason with abstract symbols?cited by 24
  19. 2024Arithmetic Transformers Can Length-Generalize in Both Operand Length and Countcited by 18
  20. 2020Provably Good Solutions to the Knapsack Problem via Neural Networks of Bounded Sizecited by 16
  21. 2021A Primer for Neural Arithmetic Logic Modulescited by 7
  22. 2024Positional Attention: Expressivity and Learnability of Algorithmic Computationcited by 7

Built on by

Cited by year (2026 to 14 Oct)

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

4 papers.