mlsanityData to 14 Oct 2026

Neural Execution Engines: Learning to Execute Subroutines

arXiv 2006.08084 ↗First posted 15 Jun 2020cs.LG cs.NE cs.PLcited by 36

Not on the map. Why?

Abstract (arXiv)

A significant effort has been made to train neural networks that replicate algorithmic reasoning, but they often fail to learn the abstract concepts underlying these algorithms. This is evidenced by their inability to generalize to data distributions that are outside of their restricted training sets, namely larger inputs and unseen data. We study these generalization issues at the level of numerical subroutines that comprise common algorithms like sorting, shortest paths, and minimum spanning trees. First, we observe that transformer-based sequence-to-sequence models can learn subroutines like sorting a list of numbers, but their performance rapidly degrades as the length of lists grows beyond those found in the training set. We demonstrate that this is due to attention weights that lose fidelity with longer sequences, particularly when the input numbers are numerically similar. To address the issue, we propose a learned conditional masking mechanism, which enables the model to strongly generalize far outside of its training range with near-perfect accuracy on a variety of algorithms. Second, to generalize to unseen data, we show that encoding numbers with a binary representation leads to embeddings with rich structure once trained on downstream tasks like addition or multiplication. This allows the embedding to handle missing data by faithfully interpolating numbers not seen during training.

Key facts. Cited by 36 papers in the map (data through 14 Oct 2026). First posted on arXiv 15 Jun 2020.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2021: 9; 2022: 9; 2023: 7; 2024: 5; 2025: 4; 2026: 2.

36 papers.

Sort:

By area:

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2021Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gaugescited by 1,167
  3. 2021Two Sides of the Same Coin: Heterophily and Oversmoothing in Graph Convolutional Neural Networkscited by 182
  4. 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 129
  5. 2022Teaching Algorithmic Reasoning via In-context Learningcited by 112
  6. 2022The CLRS Algorithmic Reasoning Benchmarkcited by 106
  7. 2021Learning to Synthesize Programs as Interpretable and Generalizable Policiescited by 59
  8. 2024Softmax is not Enough (for Sharp Size Generalisation)cited by 46
  9. 2021Latent Execution for Neural Program Synthesiscited by 35
  10. 2023Code Execution with Pre-trained Language Modelscited by 34
  11. 2022Towards Better Out-of-Distribution Generalization of Neural Algorithmic Reasoning Taskscited by 30
  12. 2024Simulation of Graph Algorithms with Looped Transformerscited by 30
24 more
  1. 2021How to transfer algorithmic reasoning knowledge to learn new algorithms?cited by 22
  2. 2022Neural Approximation of Graph Topological Featurescited by 17
  3. 2022Reducing Collision Checking for Sampling-Based Motion Planning Using Graph Neural Networkscited by 17
  4. 2023Neural Algorithmic Reasoning Without Intermediate Supervisioncited by 17
  5. 2022Neural Set Function Extensions: Learning with Discrete Functions in High Dimensionscited by 14
  6. 2021Persistent Message Passingcited by 13
  7. 2022Learnable Commutative Monoids for Graph Neural Networkscited by 13
  8. 2021Algorithmic Concept-based Explainable Reasoningcited by 12
  9. 2024On the Markov Property of Neural Algorithmic Reasoning: Analyses and Methodscited by 11
  10. 2024Discrete Neural Algorithmic Reasoningcited by 9
  11. 2023Latent Space Representations of Neural Algorithmic Reasonerscited by 7
  12. 2024Enhancing Size Generalization in Graph Neural Networks through Disentangled Representation Learningcited by 7
  13. 2023Parallel Algorithms Align with Neural Executioncited by 6
  14. 2023Infusing Lattice Symmetry Priors in Attention Mechanisms for Sample-Efficient Abstract Geometric Reasoningcited by 4
  15. 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encodingcited by 4
  16. 2025Gradient-Based Program Repair: Fixing Bugs in Continuous Program Spacescited by 4
  17. 2023Tackling Size Generalization of Graph Neural Networks on Biological Data from a Spectral Perspectivecited by 3
  18. 2025SURGE: On the Potential of Large Language Models as General-Purpose Surrogate Code Executorscited by 3
  19. 2025Programming by Backprop: An Instruction is Worth 100 Examples When Finetuning LLMscited by 2
  20. 2021Meta-Learning an Inference Algorithm for Probabilistic Programscited by 1
  21. 2021State-Space Constraints Can Improve the Generalisation of the Differentiable Neural Computer to Input Sequences With Unseen Lengthcited by 1
  22. 2023Neuro-Symbolic Execution of Generic Source Codecited by 1
  23. 2026From Shortcut Learning to Discrete Neural Insertion Sortcited by 1
  24. 2026Is Code Better Than Language for Algorithmic Reasoningcited by 0