Learning to Compile Programs to Neural Networks
Logan Weber, Jesse Michel, Alex Renda, Michael Carbin
Abstract
A is a neural network that mimics the behavior of a program. Researchers have used these neural surrogates to automatically tune program inputs, adapt programs to new settings, and accelerate computations. Researchers traditionally develop neural surrogates by training on input-output examples from a single program. Alternatively, language models trained on a large dataset including many programs can consume program text, to act as a neural surrogate. Using a language model to both generate a surrogate and act as a surrogate, however, leading to a trade-off between resource consumption and accuracy. We present , a technique for producing neural surrogates directly from program text without coupling neural surrogate generation and execution. We implement neural surrogate compilers using hypernetworks trained on a dataset of C programs and find that they produce neural surrogates that are - as data-efficient, produce visual results that are - more similar to ground truth, and train in - fewer epochs than neural surrogates trained from scratch.
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 6b6b4ad9-4e13-4e4f-83b7-4e77ba551f88Builds on3
- CRUXEval: A Benchmark for Code Reasoning, Understanding and ExecutionAlex Gu, Baptiste Rozière, Hugh James Leather, Armando Solar-Lezama et al.ICML 2024 · 270 citations
- Looped Transformers as Programmable ComputersAngeliki Giannou, Shashank Rajput, Jy-yong Sohn, Kangwook Lee et al.ICML 2023 · 175 citations
- Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 51 citations
Related papers
- Turaco: Complexity-Guided Data Sampling for Training Neural Surrogates of ProgramsAlex Renda, Yi Ding, Michael CarbinOOPSLA 2023
- Surge: On the Potential of Large Language Models as General-Purpose Surrogate Code ExecutorsBohan Lyu, Siqiao Huang, Zichen Liang, Qian Sun et al.EMNLP 2025
- Auto-HPCnet: An Automatic Framework to Build Neural Network-based Surrogate for High-Performance Computing ApplicationsWenqian Dong, Gokcen Kestor, Dong LiHPDC 2023 · 6 citations
- HYSYNTH: Context-Free LLM Approximation for Guiding Program SynthesisShraddha Barke, Emmanuel Anaya Gonzalez, Saketh Ram Kasibatla, Taylor Berg-Kirkpatrick et al.NeurIPS 2024 · 34 citations
- SysCaps: Language Interfaces for Simulation Surrogates of Complex SystemsPatrick Emami, Zhaonan Li, Saumya Sinha, Truc NguyenICLR 2025 · 2 citations
