Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks
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
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2016Simple and Scalable Predictive Uncertainty Estimation using Deep Ensemblescited by 3,926
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
- 2018Averaging Weights Leads to Wider Optima and Better Generalizationcited by 1,209
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2019Wide Neural Networks of Any Depth Evolve as Linear Models Under Gradient Descentcited by 738
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
- 2023Looped Transformers as Programmable Computerscited by 237
- 2024From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Stepcited by 235
- 2023Implicit Chain of Thought Reasoning via Knowledge Distillationcited by 176
- 2019Neural Tangents: Fast and Easy Infinite Neural Networks in Pythoncited by 149
22 more
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2020Tensor Programs II: Neural Tangent Kernel for Any Architecturecited by 143
- 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 139
- 2015Neural GPUs Learn Algorithmscited by 121
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
- 2014Learning to Executecited by 106
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 102
- 2015Neural Programmer-Interpreterscited by 101
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
- 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
- 2018Neural Arithmetic Logic Unitscited by 70
- 2023Auto-Regressive Next-Token Predictors are Universal Learnerscited by 67
- 2023Length Generalization in Arithmetic Transformerscited by 66
- 2021Tensor Programs IIb: Architectural Universality of Neural Tangent Kernel Training Dynamicscited by 57
- 2015Neural Programmer: Inducing Latent Programs with Gradient Descentcited by 34
- 2024Simulation of Graph Algorithms with Looped Transformerscited by 30
- 2020Neural Arithmetic Unitscited by 28
- 2023When can transformers reason with abstract symbols?cited by 24
- 2024Arithmetic Transformers Can Length-Generalize in Both Operand Length and Countcited by 18
- 2020Provably Good Solutions to the Knapsack Problem via Neural Networks of Bounded Sizecited by 16
- 2021A Primer for Neural Arithmetic Logic Modulescited by 7
- 2024Positional Attention: Expressivity and Learnability of Algorithmic Computationcited by 7
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2025The Impossibility of Inverse Permutation Learning in Transformer Modelscited by 2
- 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplicationcited by 0
- 2026Loom: A Scalable Analytical Neural Computer Architecturecited by 0
- 2026Certification from Examples is Hard for Circuits and Transformers under Minimal Overparametrizationcited by 0
- 2026Certification from Examples is Hard for Circuits and Transformers under Minimal Overparametrization21 May 2026
- 2026Loom: A Scalable Analytical Neural Computer Architecture9 Apr 2026
- 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplication30 Mar 2026
- 2025The Impossibility of Inverse Permutation Learning in Transformer Models28 Sep 2025