Learning Execution through Neural Code fusion
Zhan Shi, Kevin Swersky, Daniel Tarlow, Parthasarathy Ranganathan, Milad Hashemi
Abstract
As the performance of computer systems stagnates due to the end of Moore's Law, there is a need for new models that can understand and optimize the execution of general purpose code. While there is a growing body of work on using Graph Neural Networks (GNNs) to learn representations of source code, these representations do not understand how code dynamically executes. In this work, we propose a new approach to use GNNs to learn fused representations of general source code and its execution. Our approach defines a multi-task GNN over low-level representations of source code and program state (i.e., assembly code and dynamic memory states), converting complex source code constructs and complex data structures into a simpler, more uniform format. We show that this leads to improved performance over similar methods that do not use execution and it opens the door to applying GNN models to new tasks that would not be feasible from static code alone. As an illustration of this, we apply the new model to challenging dynamic tasks (branch prediction and prefetching) from the SPEC CPU benchmark suite, outperforming the state-of-the-art by 26% and 45% respectively. Moreover, we use the learned fused graph embeddings to demonstrate transfer learning with high performance on an indirectly related task (algorithm classification).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f12b2a05-d983-4c97-a113-197c42ffeebfCited by top-tier papers8
- ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler et al.ICML 2021 · 140 citations
- An Imitation Learning Approach for Cache ReplacementEvan Zheran Liu, Milad Hashemi, Kevin Swersky, Parthasarathy Ranganathan et al.ICML 2020 · 108 citations
- Pythia: A Customizable Hardware Prefetching Framework Using Online Reinforcement LearningRahul Bera, Konstantinos Kanellopoulos, Anant Nori, Taha Shahroodi et al.MICRO 2021 · 95 citations
- Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 51 citations
- Neural Execution Engines: Learning to Execute SubroutinesYujun Yan, Kevin Swersky, Danai Koutra, Parthasarathy Ranganathan et al.NeurIPS 2020 · 47 citations
Related papers
- DynamicRTL: RTL Representation Learning for Dynamic Circuit BehaviorRuiyang Ma, Yunhao Zhou, Yipeng Wang, Yi Liu et al.AAAI 2026
- High-level synthesis performance prediction using GNNs: benchmarking, modeling, and advancingNan Wu, Hang Yang, Yuan Xie, Pan Li et al.DAC 2022 · 57 citations
- AutoTransfer: AutoML with Knowledge Transfer - An Application to Graph Neural NetworksKaidi Cao, Jiaxuan You, Jiaju Liu, Jure LeskovecICLR 2023
- Cardinality Estimation over Knowledge Graphs with Embeddings and Graph Neural NetworksTim Schwabe, Maribel AcostaSIGMOD 2024 · 17 citations
- Adaptive Transfer Learning on Graph Neural NetworksXueting Han, Zhenhuan Huang, Bang An, Jing BaiKDD 2021 · 30 citations
