Neural Execution Engines: Learning to Execute Subroutines
Yujun Yan, Kevin Swersky, Danai Koutra, Parthasarathy Ranganathan, Milad Hashemi
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 26 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- The CLRS Algorithmic Reasoning Benchmark 引用了 Neural Execution of Graph Algorithms
- Reducing Collision Checking for Sampling-Based Motion Planning Using Graph Neural Networks 引用了 Neural Execution of Graph Algorithms
- Reducing Collision Checking for Sampling-Based Motion Planning Using Graph Neural Networks 引用了 Pointer Graph Networks
- Pointer Graph Networks 引用了 Neural Execution of Graph Algorithms
引用它的顶会 Paper26
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- The CLRS Algorithmic Reasoning BenchmarkPetar Velickovic, Adrià Puigdomènech Badia, David Budden, Razvan Pascanu 等ICML 2022 · 118 次引用
- Learning to Synthesize Programs as Interpretable and Generalizable PoliciesDweep Trivedi, Jesse Zhang, Shao-Hua Sun, Joseph J. LimNeurIPS 2021 · 104 次引用
- Pointer Graph NetworksPetar Velickovic, Lars Buesing, Matthew C. Overlan, Razvan Pascanu 等NeurIPS 2020 · 78 次引用
- Reducing Collision Checking for Sampling-Based Motion Planning Using Graph Neural NetworksChenning Yu, Sicun GaoNeurIPS 2021 · 68 次引用
它引用的 Paper2
相关 Paper
- Transformers Can Do Arithmetic with the Right EmbeddingsSean McLeish, Arpit Bansal, Alex Stein, Neel Jain 等NeurIPS 2024 · 94 次引用
- Algorithmic Capabilities of Random TransformersZiqian Zhong, Jacob AndreasNeurIPS 2024 · 23 次引用
- In-Context AlgebraEric Todd, Jannik Brinkmann, Rohit Gandikota, David BauICLR 2026 · 3 次引用
- Towards Learning High-Precision Least Squares Algorithms with Sequence ModelsJerry Weihong Liu, Jessica Grogan, Owen M. Dugan, Ashish Rao 等ICLR 2025
- Investigating Numeracy Learning Ability of a Text-to-Text Transfer ModelKuntal Kumar Pal, Chitta BaralEMNLP Findings 2021 · 18 次引用
