Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
David Bieber, Charles Sutton, Hugo Larochelle, Daniel Tarlow
摘要
Graph neural networks (GNNs) have emerged as a powerful tool for learning software engineering tasks including code completion, bug finding, and program repair. They benefit from leveraging program structure like control flow graphs, but they are not well-suited to tasks like program execution that require far more sequential reasoning steps than number of GNN propagation steps. Recurrent neural networks (RNNs), on the other hand, are well-suited to long sequential chains of reasoning, but they do not naturally incorporate program structure and generally perform worse on the above tasks. Our aim is to achieve the best of both worlds, and we do so by introducing a novel GNN architecture, the Instruction Pointer Attention Graph Neural Networks (IPA-GNN), which achieves improved systematic generalization on the task of learning to execute programs using control flow graphs. The model arises by considering RNNs operating on program traces with branch decisions as latent variables. The IPA-GNN can be seen either as a continuous relaxation of the RNN model or as a GNN variant more tailored to execution. To test the models, we propose evaluating systematic generalization on learning to execute using control flow graphs, which tests sequential reasoning and use of program structure. More practically, we evaluate these models on the task of learning to execute partial programs, as might arise if using the model as a heuristic function in program synthesis. Results show that the IPA-GNN outperforms a variety of RNN and GNN baselines on both tasks.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 22 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- NExT: Teaching Large Language Models to Reason about Code Execution 引用了 Latent Execution for Neural Program Synthesis Beyond Domain-Specific Languages
- NExT: Teaching Large Language Models to Reason about Code Execution 引用了 Can Large Language Models Reason about Program Invariants?
引用它的顶会 Paper22
- Can Large Language Models Reason about Program Invariants?Kexin Pei, David Bieber, Kensen Shi, Charles Sutton 等ICML 2023 · 128 次引用
- NExT: Teaching Large Language Models to Reason about Code ExecutionAnsong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng 等ICML 2024 · 73 次引用
- Latent Execution for Neural Program Synthesis Beyond Domain-Specific LanguagesXinyun Chen, Dawn Song, Yuandong TianNeurIPS 2021 · 56 次引用
- Learning Semantic Representations to Verify Hardware DesignsShobha Vasudevan, Wenjie Jiang, David Bieber, Rishabh Singh 等NeurIPS 2021 · 38 次引用
- Efficient and Scalable Graph Generation through Iterative Local ExpansionAndreas Bergmeister, Karolis Martinkus, Nathanaël Perraudin, Roger WattenhoferICLR 2024 · 38 次引用
它引用的 Paper4
- Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
- Hoppity: Learning Graph Transformations to Detect and Fix Bugs in ProgramsElizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik 等ICLR 2020 · 212 次引用
- LambdaNet: Probabilistic Type Inference using Graph Neural NetworksJiayi Wei, Maruth Goyal, Greg Durrett, Isil DilligICLR 2020 · 119 次引用
- Learning Execution through Neural Code fusionZhan Shi, Kevin Swersky, Daniel Tarlow, Parthasarathy Ranganathan 等ICLR 2020 · 32 次引用
相关 Paper
- Directed Acyclic Graph Neural NetworksVeronika Thost, Jie ChenICLR 2021 · 134 次引用
- Augmenting Recurrent Graph Neural Networks with a CacheGuixiang Ma, Vy A. Vo, Theodore L. Willke, Nesreen K. AhmedKDD 2023 · 4 次引用
- Pointer Graph NetworksPetar Velickovic, Lars Buesing, Matthew C. Overlan, Razvan Pascanu 等NeurIPS 2020 · 78 次引用
- Deep Equilibrium Algorithmic ReasoningDobrik Georgiev, Joseph Wilson, Davide Buffelli, Pietro LióNeurIPS 2024 · 7 次引用
- Bridging the Gaps between Graph Neural Networks and Data-Flow Analysis: The Closer, the BetterQingchen Yu, Xin Liu, Qingguo Zhou, Chunming WuISSTA 2025
