Learning to Execute
Not on the map. Why?
Abstract (arXiv)
Recurrent Neural Networks (RNNs) with Long Short-Term Memory units (LSTM) are widely used because they are expressive and are easy to train. Our interest lies in empirically evaluating the expressiveness and the learnability of LSTMs in the sequence-to-sequence regime by training them to evaluate short computer programs, a domain that has traditionally been seen as too complex for neural networks. We consider a simple class of programs that can be evaluated with a single left-to-right pass using constant memory. Our main result is that LSTMs can learn to map the character-level representations of such programs to their correct outputs. Notably, it was necessary to use curriculum learning, and while conventional curriculum learning proved ineffective, we developed a new variant of curriculum learning that improved our networks' performance in all experimental conditions. The improved curriculum had a dramatic impact on an addition problem, making it possible to train an LSTM to add two 9-digit numbers with 99% accuracy.
Key facts. Cited by 105 papers in the map (data through 7 Oct 2026). First posted on arXiv 17 Oct 2014.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2020: 1; 2021: 23; 2022: 16; 2023: 22; 2024: 15; 2025: 17; 2026: 11.
105 papers.
Sort:
By area:
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,131
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2021Combinatorial optimization and reasoning with graph neural networkscited by 267
- 2021Curriculum Learning: A Surveycited by 257
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2022The CLRS Algorithmic Reasoning Benchmarkcited by 103
- 2025Efficient Reinforcement Finetuning via Adaptive Curriculum Learningcited by 88
- 2021Going Beyond Linear Transformers with Recurrent Fast Weight Programmerscited by 84
- 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
38 more
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 64
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 60
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Predictioncited by 54
- 2022Relational Attention: Generalizing Transformers for Graph-Structured Taskscited by 41
- 2025Principled Data Selection for Alignment: The Hidden Risks of Difficult Examplescited by 37
- 2021Latent Execution for Neural Program Synthesiscited by 35
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 35
- 2022Towards Data-and Knowledge-Driven Artificial Intelligence: A Survey on Neuro-Symbolic Computingcited by 34
- 2024LeanAgent: Lifelong Learning for Formal Theorem Provingcited by 34
- 2023Code Execution with Pre-trained Language Modelscited by 33
- 2021Symbolic Brittleness in Sequence Models: on Systematic Generalization in Symbolic Mathematicscited by 27
- 2021How to transfer algorithmic reasoning knowledge to learn new algorithms?cited by 22
- 2023Provable Advantage of Curriculum Learning on Parity Targets with Mixed Inputscited by 22
- 2021Gradual Domain Adaptation in the Wild:When Intermediate Distributions are Absentcited by 21
- 2023A Mathematical Model for Curriculum Learning for Paritiescited by 19
- 2023Proximal Curriculum for Reinforcement Learning Agentscited by 19
- 2021Pretrained Language Models are Symbolic Mathematics Solvers too!cited by 17
- 2023ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesiscited by 17
- 2022Neural Approximation of Graph Topological Featurescited by 16
- 2023Neural Algorithmic Reasoning Without Intermediate Supervisioncited by 16
- 2021MLBiNet: A Cross-Sentence Collective Event Detection Networkcited by 15
- 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11
- 2023Generate, Transform, Answer: Question Specific Tool Synthesis for Tabular Datacited by 11
- 2025What I cannot execute, I do not understand: Training and Evaluating LLMs on Program Execution Tracescited by 11
- 2022Robust Reinforcement Learning via Genetic Curriculumcited by 10
- 2021Curriculum Design for Teaching via Demonstrations: Theory and Applicationscited by 9
- 2021Programming Knowledge Tracing: A Comprehensive Dataset and A New Modelcited by 9
- 2023RecRecNet: Rectangling Rectified Wide-Angle Images by Thin-Plate Spline Model and DoF-based Curriculum Learningcited by 8
- 2024Discrete Neural Algorithmic Reasoningcited by 8
- 2023LExecutor: Learning-Guided Executioncited by 7
- 2023SIP: Injecting a Structural Inductive Bias into a Seq2Seq Model by Simulationcited by 7
- 2022Compositional Generalization and Decomposition in Neural Program Synthesiscited by 6
- 2023Stochastic Re-weighted Gradient Descent via Distributionally Robust Optimizationcited by 6
- 2023End-to-End Reinforcement Learning of Koopman Models for Economic Nonlinear Model Predictive Controlcited by 6
- 2021Neural Sequence-to-grid Module for Learning Symbolic Rulescited by 5
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviorscited by 5
- 2022CRISP: Curriculum based Sequential Neural Decoders for Polar Code Familycited by 5
- 2024Progressive Growing of Patch Size: Resource-Efficient Curriculum Learning for Dense Prediction Taskscited by 5
50 most cited of 105 All 105 (JSON)
- 2026Evaluating Exact Output and Checkpoint-State Prediction in Real Programs8 Oct 2026
- 2026ActiveSaddler: Automated Curriculum Learning for Agent Harness Optimization1 Oct 2026
- 2026Length-Independent State Tracking Under a Parallel Scan26 Sep 2026
- 2026Closed-Loop Graph Algorithm Execution with Small Language Models: Step Accuracy and Rollout Reliability23 Jun 2026
- 2026Training Transformers as a Universal Computer28 Apr 2026
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Models19 Apr 2026
- 2026Arithmetic OOD Failure Unfolds in Stages in Minimal GPTs27 Mar 2026
- 2026Towards a Neural Debugger for Python10 Mar 2026
- 2026A Small-Scale System for Autoregressive Program Synthesis Enabling Controlled Experimentation9 Feb 2026
- 2026FloydNet: A Learning Paradigm for Global Relational Reasoning27 Jan 2026
- 2026Neural Isomorphic Fields: A Transformer-based Algebraic Numerical Embedding17 Jan 2026
- 2025SymMaP: Improving Computational Efficiency in Linear Solvers through Symbolic Preconditioning28 Oct 2025
38 more
- 2025Once Upon an Input: Reasoning via Per-Instance Program Synthesis26 Oct 2025
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Models24 Oct 2025
- 2025Advancing Routing-Awareness in Analog ICs Floorplanning17 Oct 2025
- 2025Layer-Aware Influence for Online Data Valuation Estimation14 Oct 2025
- 2025An empirical study on the limitation of Transformers in program trace generation29 Sep 2025
- 2025Beyond Shallow Heuristics: Leveraging Human Intuition for Curriculum Learning27 Aug 2025
- 2025Teaching LLM to Reason: Reinforcement Learning from Algorithmic Problems without Code10 Jul 2025
- 2025Programming by Backprop: An Instruction is Worth 100 Examples When Finetuning LLMs23 Jun 2025
- 2025Gradient-Based Program Repair: Fixing Bugs in Continuous Program Spaces23 May 2025
- 2025Efficient Reinforcement Finetuning via Adaptive Curriculum Learning7 Apr 2025
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Execution28 Mar 2025
- 2025Learning to Chain Operations by Routing Information Through a Global Workspace28 Feb 2025
- 2025Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks24 Feb 2025
- 2025Principled Data Selection for Alignment: The Hidden Risks of Difficult Examples11 Feb 2025
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Prediction11 Feb 2025
- 2025What I cannot execute, I do not understand: Training and Evaluating LLMs on Program Execution Traces10 Feb 2025
- 2024Effective Analog ICs Floorplanning with Relational Graph Neural Networks and Reinforcement Learning20 Nov 2024
- 2024Chain-of-Sketch: Enabling Global Visual Reasoning10 Oct 2024
- 2024LeanAgent: Lifelong Learning for Formal Theorem Proving8 Oct 2024
- 2024MathDSL: A Domain-Specific Language for Concise Mathematical Solutions Via Program Synthesis26 Sep 2024
- 2024Learning Program Behavioral Models from Synthesized Input-Output Pairs11 Jul 2024
- 2024Progressive Growing of Patch Size: Resource-Efficient Curriculum Learning for Dense Prediction Tasks10 Jul 2024
- 2024Efficacy of Various Large Language Models in Generating Smart Contracts28 Jun 2024
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpad10 Jun 2024
- 2024On the Minimal Degree Bias in Generalization on the Unseen for non-Boolean Functions10 Jun 2024
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithms28 May 2024
- 2024NExT: Teaching Large Language Models to Reason about Code Execution23 Apr 2024
- 2024Task Agnostic Architecture for Algorithm Induction via Implicit Composition3 Apr 2024
- 2024Bidirectional Progressive Neural Networks with Episodic Return Progress for Emergent Task Sequencing and Robotic Skill Transfer6 Mar 2024
- 2024NeuralSolver: Learning Algorithms For Consistent and Efficient Extrapolation Across General Tasks23 Feb 2024
- 2024Discrete Neural Algorithmic Reasoning18 Feb 2024
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation10 Nov 2023
- 2023Optimizing Large Language Models to Expedite the Development of Smart Contracts8 Oct 2023
- 2023SIP: Injecting a Structural Inductive Bias into a Seq2Seq Model by Simulation1 Oct 2023
- 2023End-to-End Reinforcement Learning of Koopman Models for Economic Nonlinear Model Predictive Control3 Aug 2023
- 2023ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesis26 Jul 2023
- 2023Teaching Arithmetic to Small Transformers7 Jul 2023
- 2023Provable Advantage of Curriculum Learning on Parity Targets with Mixed Inputs29 Jun 2023
50 newest of 105 All 105 (JSON)
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2025Efficient Reinforcement Finetuning via Adaptive Curriculum Learningcited by 88
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 64
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 60
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Predictioncited by 54
- 2024LeanAgent: Lifelong Learning for Formal Theorem Provingcited by 34
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Executioncited by 5
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Modelscited by 4
- 2024Chain-of-Sketch: Enabling Global Visual Reasoningcited by 3
- 2025Teaching LLM to Reason: Reinforcement Learning from Algorithmic Problems without Codecited by 3
- 2025Once Upon an Input: Reasoning via Per-Instance Program Synthesiscited by 0
12 most cited of 13 All 13 (JSON)
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Models19 Apr 2026
- 2025Once Upon an Input: Reasoning via Per-Instance Program Synthesis26 Oct 2025
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Models24 Oct 2025
- 2025Teaching LLM to Reason: Reinforcement Learning from Algorithmic Problems without Code10 Jul 2025
- 2025Efficient Reinforcement Finetuning via Adaptive Curriculum Learning7 Apr 2025
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Execution28 Mar 2025
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Prediction11 Feb 2025
- 2024Chain-of-Sketch: Enabling Global Visual Reasoning10 Oct 2024
- 2024LeanAgent: Lifelong Learning for Formal Theorem Proving8 Oct 2024
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithms28 May 2024
- 2024NExT: Teaching Large Language Models to Reason about Code Execution23 Apr 2024
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Models28 Jan 2022
12 newest of 13 All 13 (JSON)
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,131
- 2021Combinatorial optimization and reasoning with graph neural networkscited by 267
- 2021Curriculum Learning: A Surveycited by 257
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2022The CLRS Algorithmic Reasoning Benchmarkcited by 103
- 2021Going Beyond Linear Transformers with Recurrent Fast Weight Programmerscited by 84
- 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
- 2022Relational Attention: Generalizing Transformers for Graph-Structured Taskscited by 41
- 2021Latent Execution for Neural Program Synthesiscited by 35
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 35
12 most cited of 86 All 86 (JSON)
- 2026Evaluating Exact Output and Checkpoint-State Prediction in Real Programs8 Oct 2026
- 2026Length-Independent State Tracking Under a Parallel Scan26 Sep 2026
- 2026Closed-Loop Graph Algorithm Execution with Small Language Models: Step Accuracy and Rollout Reliability23 Jun 2026
- 2026Training Transformers as a Universal Computer28 Apr 2026
- 2026Arithmetic OOD Failure Unfolds in Stages in Minimal GPTs27 Mar 2026
- 2026Towards a Neural Debugger for Python10 Mar 2026
- 2026A Small-Scale System for Autoregressive Program Synthesis Enabling Controlled Experimentation9 Feb 2026
- 2026FloydNet: A Learning Paradigm for Global Relational Reasoning27 Jan 2026
- 2026Neural Isomorphic Fields: A Transformer-based Algebraic Numerical Embedding17 Jan 2026
- 2025SymMaP: Improving Computational Efficiency in Linear Solvers through Symbolic Preconditioning28 Oct 2025
- 2025Advancing Routing-Awareness in Analog ICs Floorplanning17 Oct 2025
- 2025Layer-Aware Influence for Online Data Valuation Estimation14 Oct 2025
12 newest of 86 All 86 (JSON)