Lune

ICML2024Top-tier venue

Learning to Compile Programs to Neural Networks

Logan Weber, Jesse Michel, Alex Renda, Michael Carbin

Abstract

A neural surrogate of a program\textit{neural surrogate of a program} 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 neural surrogate compilation\textit{neural surrogate compilation}, 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 1.91.9-9.5×9.5\times as data-efficient, produce visual results that are 1.01.0-1.3×1.3\times more similar to ground truth, and train in 4.34.3-7.3×7.3\times fewer epochs than neural surrogates trained from scratch.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution cites Looped Transformers as Programmable Computers
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on3

  1. 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
  2. Looped Transformers as Programmable ComputersAngeliki Giannou, Shashank Rajput, Jy-yong Sohn, Kangwook Lee et al.ICML 2023 · 175 citations
  3. Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 51 citations

Related papers

  1. Turaco: Complexity-Guided Data Sampling for Training Neural Surrogates of ProgramsAlex Renda, Yi Ding, Michael CarbinOOPSLA 2023
  2. 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
  3. Introducing Compiler Semantics into Large Language Models as Programming Language Translators: A Case Study of C to x86 AssemblyShuoming Zhang, Jiacheng Zhao, Chunwei Xia, Zheng Wang et al.EMNLP Findings 2024 · 1 citation
  4. Auto-HPCnet: An Automatic Framework to Build Neural Network-based Surrogate for High-Performance Computing ApplicationsWenqian Dong, Gokcen Kestor, Dong LiHPDC 2023 · 6 citations
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines