Neural GPUs Learn Algorithms
Not on the map. Why?
Abstract (arXiv)
Learning an algorithm from examples is a fundamental problem that has been widely studied. Recently it has been addressed using neural networks, in particular by Neural Turing Machines (NTMs). These are fully differentiable computers that use backpropagation to learn their own programming. Despite their appeal NTMs have a weakness that is caused by their sequential nature: they are not parallel and are are hard to train due to their large depth when unfolded. We present a neural network architecture to address this problem: the Neural GPU. It is based on a type of convolutional gated recurrent unit and, like the NTM, is computationally universal. Unlike the NTM, the Neural GPU is highly parallel which makes it easier to train and efficient to run. An essential property of algorithms is their ability to handle inputs of arbitrary size. We show that the Neural GPU can be trained on short instances of an algorithmic task and successfully generalize to long instances. We verified it on a number of tasks including long addition and long multiplication of numbers represented in binary. We train the Neural GPU on numbers with upto 20 bits and observe no errors whatsoever while testing it, even on much longer numbers. To achieve these results we introduce a technique for training deep recurrent networks: parameter sharing relaxation. We also found a small amount of dropout and gradient noise to have a large positive effect on learning and generalization.
Key facts. Cited by 121 papers in the map (data through 14 Oct 2026). First posted on arXiv 25 Nov 2015.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 25; 2022: 22; 2023: 23; 2024: 16; 2025: 11; 2026: 24.
121 papers.
Sort:
By area:
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,167
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2024Diffusion for World Modeling: Visual Details Matter in Ataricited by 300
- 2021Combinatorial optimization and reasoning with graph neural networkscited by 268
- 2022Neural Networks and the Chomsky Hierarchycited by 217
- 2022Exploring Length Generalization in Large Language Modelscited by 206
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 200
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
38 more
- 2025Hierarchical Reasoning Modelcited by 177
- 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 139
- 2021Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networkscited by 117
- 2021The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformerscited by 117
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 112
- 2022The CLRS Algorithmic Reasoning Benchmarkcited by 106
- 2021Neural Algorithmic Reasoningcited by 94
- 2021Gradients are Not All You Needcited by 86
- 2021Sparse is Enough in Scaling Transformerscited by 86
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 67
- 2023Length Generalization in Arithmetic Transformerscited by 66
- 2021Linear algebra with transformerscited by 63
- 2021Learning to Synthesize Programs as Interpretable and Generalizable Policiescited by 59
- 2022Deep Symbolic Regression for Recurrent Sequencescited by 54
- 2021Inductive logic programming at 30cited by 47
- 2022Relational Attention: Generalizing Transformers for Graph-Structured Taskscited by 41
- 2024Learning Iterative Reasoning through Energy Diffusioncited by 36
- 2022Towards Data-and Knowledge-Driven Artificial Intelligence: A Survey on Neuro-Symbolic Computingcited by 35
- 2023Code Execution with Pre-trained Language Modelscited by 34
- 2022End-to-end Algorithm Synthesis with Recurrent Networks: Logical Extrapolation Without Overthinkingcited by 33
- 2023Learning the greatest common divisor: explaining transformer predictionscited by 33
- 2022Learning Iterative Reasoning through Energy Minimizationcited by 32
- 2023Sparse Universal Transformercited by 32
- 2022Towards Better Out-of-Distribution Generalization of Neural Algorithmic Reasoning Taskscited by 30
- 2024Simulation of Graph Algorithms with Looped Transformerscited by 30
- 2022SALSA: Attacking Lattice Cryptography with Transformerscited by 28
- 2026Fixed-Point Reasoners: Stable and Adaptive Deep Looped Transformerscited by 28
- 2024Universal Length Generalization with Turing Programscited by 25
- 2021How to transfer algorithmic reasoning knowledge to learn new algorithms?cited by 22
- 2023Generative learning for nonlinear dynamicscited by 22
- 2021ProTo: Program-Guided Transformer for Program-Guided Taskscited by 21
- 2022HyperNCA: Growing Developmental Networks with Neural Cellular Automatacited by 18
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning modelscited by 18
- 2021Pretrained Language Models are Symbolic Mathematics Solvers too!cited by 17
- 2022Neural Approximation of Graph Topological Featurescited by 17
- 2023Neural Algorithmic Reasoning Without Intermediate Supervisioncited by 17
- 2023Traveling Waves Encode the Recent Past and Enhance Sequence Learningcited by 16
- 2021CLVSA: A Convolutional LSTM Based Variational Sequence-to-Sequence Model with Attention for Predicting Trends of Financial Marketscited by 15
50 most cited of 121 All 121 (JSON)
- 2026AI Models Can Provably Hide Arbitrary Capabilities9 Oct 2026
- 2026Random Recursive Models30 Sep 2026
- 2026LoopVL: Recurrent Visual Intelligence29 Sep 2026
- 2026DART: Distributional Adversarial Recurrent Training for Algorithm Learning5 Sep 2026
- 2026Think Shallow, Solve Deep: Controlling Recurrent Dynamics for Reliable Test-Time Depth18 Aug 2026
- 2026TextNCA: Neural Cellular Automata for Language Modeling via Hierarchical Local Attention3 Aug 2026
- 2026Loop the Loopies!17 Jul 2026
- 2026Energy-guided Recursive Model11 Jul 2026
- 2026A Symbolic Neural CPU for Quantization-Simulated Writeback and Interpretable Program Execution10 Jul 2026
- 2026Reproducing Recurrent Transformers: The CoTFormer7 Jul 2026
- 2026Differentiate the Evaluator, Not the Program: An Efficient Runtime Representation for Neuro-Symbolic Learning3 Jul 2026
- 2026Compressing History into Memory: Distilling Transformers into Recurrent Transformers19 Jun 2026
38 more
- 2026Fixed-Point Reasoners: Stable and Adaptive Deep Looped Transformers16 Jun 2026
- 2026Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter7 Jun 2026
- 2026Convex Compositional Reasoning Models22 May 2026
- 2026Solve the Loop: Attractor Models for Language and Reasoning12 May 2026
- 2026Arithmetic OOD Failure Unfolds in Stages in Minimal GPTs27 Mar 2026
- 2026Tiny Autoregressive Recursive Models9 Mar 2026
- 2026A Small-Scale System for Autoregressive Program Synthesis Enabling Controlled Experimentation9 Feb 2026
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networks2 Feb 2026
- 2026FloydNet: A Learning Paradigm for Global Relational Reasoning27 Jan 2026
- 2026Even GPT-5.2 Can't Count to Five: The Case for Zero-Error Horizons in Trustworthy LLMs22 Jan 2026
- 2026Neural Isomorphic Fields: A Transformer-based Algebraic Numerical Embedding17 Jan 2026
- 2026Universal computation is intrinsic to language model decoding12 Jan 2026
- 2025Exact Learning of Arithmetic with Differentiable Agents27 Nov 2025
- 2025CellARC: Measuring Intelligence with Cellular Automata11 Nov 2025
- 2025Generalizable Reasoning through Compositional Energy Minimization23 Oct 2025
- 2025Kinaema: a recurrent sequence model for memory and pose in motion23 Oct 2025
- 2025To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Models16 Oct 2025
- 2025AI Agents as Universal Task Solvers14 Oct 2025
- 2025Hierarchical Reasoning Model26 Jun 2025
- 2025Primal-Dual Neural Algorithmic Reasoning29 May 2025
- 2025Random Scaling of Emergent Capabilities24 Feb 2025
- 2025Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks24 Feb 2025
- 2025Studying number theory with deep learning: a case study with the M"obius and squarefree indicator functions14 Feb 2025
- 2024Provable Length Generalization in Sequence Prediction via Spectral Filtering1 Nov 2024
- 2024Autoregressive Large Language Models are Computationally Universal4 Oct 2024
- 2024The Extrapolation Power of Implicit Models19 Jul 2024
- 2024Universal Length Generalization with Turing Programs3 Jul 2024
- 2024Learning Iterative Reasoning through Energy Diffusion17 Jun 2024
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithms28 May 2024
- 2024Diffusion for World Modeling: Visual Details Matter in Atari20 May 2024
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention10 Apr 2024
- 2024TCNet: Continuous Sign Language Recognition from Trajectories and Correlated Regions18 Mar 2024
- 2024On the Markov Property of Neural Algorithmic Reasoning: Analyses and Methods7 Mar 2024
- 2024NeuralSolver: Learning Algorithms For Consistent and Efficient Extrapolation Across General Tasks23 Feb 2024
- 2024The Expected Loss of Preconditioned Langevin Dynamics Reveals the Hessian Rank21 Feb 2024
- 2024Discrete Neural Algorithmic Reasoning18 Feb 2024
- 2024Simulation of Graph Algorithms with Looped Transformers2 Feb 2024
- 2024Salsa Fresca: Angular Embeddings and Pre-Training for ML Attacks on Learning With Errors2 Feb 2024
50 newest of 121 All 121 (JSON)
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2025Hierarchical Reasoning Modelcited by 177
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 112
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 67
- 2022End-to-end Algorithm Synthesis with Recurrent Networks: Logical Extrapolation Without Overthinkingcited by 33
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning modelscited by 18
- 2026Solve the Loop: Attractor Models for Language and Reasoningcited by 13
- 2022Transformers discover an elementary calculation system exploiting local attention and grid-like problem representationcited by 7
- 2022Logical Tasks for Measuring Extrapolation and Rule Comprehensioncited by 3
- 2026Energy-guided Recursive Modelcited by 2
- 2026Reproducing Recurrent Transformers: The CoTFormercited by 1
- 2026Convex Compositional Reasoning Modelscited by 0
12 most cited of 13 All 13 (JSON)
- 2026DART: Distributional Adversarial Recurrent Training for Algorithm Learning5 Sep 2026
- 2026Energy-guided Recursive Model11 Jul 2026
- 2026Reproducing Recurrent Transformers: The CoTFormer7 Jul 2026
- 2026Convex Compositional Reasoning Models22 May 2026
- 2026Solve the Loop: Attractor Models for Language and Reasoning12 May 2026
- 2025Hierarchical Reasoning Model26 Jun 2025
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithms28 May 2024
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning models14 Mar 2023
- 2022Teaching Algorithmic Reasoning via In-context Learning15 Nov 2022
- 2022Logical Tasks for Measuring Extrapolation and Rule Comprehension14 Nov 2022
- 2022Transformers discover an elementary calculation system exploiting local attention and grid-like problem representation6 Jul 2022
- 2022End-to-end Algorithm Synthesis with Recurrent Networks: Logical Extrapolation Without Overthinking11 Feb 2022
12 newest of 13 All 13 (JSON)
- 2023Sparse Universal Transformercited by 32
- 2026Loop the Loopies!cited by 8
- 2026Loop the Loopies!17 Jul 2026
- 2023Sparse Universal Transformer11 Oct 2023
- 2024Diffusion for World Modeling: Visual Details Matter in Ataricited by 300
- 2024Diffusion for World Modeling: Visual Details Matter in Atari20 May 2024
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,167
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2021Combinatorial optimization and reasoning with graph neural networkscited by 268
- 2022Neural Networks and the Chomsky Hierarchycited by 217
- 2022Exploring Length Generalization in Large Language Modelscited by 206
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 200
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
- 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 139
- 2021Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networkscited by 117
12 most cited of 104 All 104 (JSON)
- 2026AI Models Can Provably Hide Arbitrary Capabilities9 Oct 2026
- 2026Random Recursive Models30 Sep 2026
- 2026LoopVL: Recurrent Visual Intelligence29 Sep 2026
- 2026Think Shallow, Solve Deep: Controlling Recurrent Dynamics for Reliable Test-Time Depth18 Aug 2026
- 2026TextNCA: Neural Cellular Automata for Language Modeling via Hierarchical Local Attention3 Aug 2026
- 2026A Symbolic Neural CPU for Quantization-Simulated Writeback and Interpretable Program Execution10 Jul 2026
- 2026Differentiate the Evaluator, Not the Program: An Efficient Runtime Representation for Neuro-Symbolic Learning3 Jul 2026
- 2026Compressing History into Memory: Distilling Transformers into Recurrent Transformers19 Jun 2026
- 2026Fixed-Point Reasoners: Stable and Adaptive Deep Looped Transformers16 Jun 2026
- 2026Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter7 Jun 2026
- 2026Arithmetic OOD Failure Unfolds in Stages in Minimal GPTs27 Mar 2026
- 2026Tiny Autoregressive Recursive Models9 Mar 2026
12 newest of 104 All 104 (JSON)