Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks

10/23/2020
by   David Bieber, et al.
8

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.

READ FULL TEXT

page 9

page 14

research
07/13/2020

Beyond Graph Neural Networks with Lifted Relational Neural Networks

We demonstrate a declarative differentiable programming framework based ...
research
02/20/2021

Spotting Silent Buffer Overflows in Execution Trace through Graph Neural Network Assisted Data Flow Analysis

A software vulnerability could be exploited without any visible symptoms...
research
08/25/2022

TEP-GNN: Accurate Execution Time Prediction of Functional Tests using Graph Neural Networks

Predicting the performance of production code prior to actually executin...
research
02/16/2021

ReGraphX: NoC-enabled 3D Heterogeneous ReRAM Architecture for Training Graph Neural Networks

Graph Neural Network (GNN) is a variant of Deep Neural Networks (DNNs) o...
research
10/23/2019

Neural Execution of Graph Algorithms

Graph Neural Networks (GNNs) are a powerful representational tool for so...
research
01/27/2022

Algorithm Selection for Software Verification using Graph Attention Networks

The field of software verification has produced a wide array of algorith...
research
05/26/2022

Reinforcement Learning Approach for Mapping Applications to Dataflow-Based Coarse-Grained Reconfigurable Array

The Streaming Engine (SE) is a Coarse-Grained Reconfigurable Array which...

Please sign up or login with your details

Forgot password? Click here to reset