atlas

Research map / Large language models / Agents, code and math

Learning to Compile Programs to Neural Networks

ICML 2024 · Large language models › Agents, code and math · approach: Neural program synthesis and transpilation · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces neural surrogate compilation, where a hypernetwork (CompNet, a BERT-Tiny encoder with a linear parameter head) maps C program text directly to initial weights for a neural surrogate, which is then finetuned.

Problem

Training neural surrogates of programs is data- and epoch-expensive when trained from scratch per program, while universal neural surrogates (LMs that both read program text and execute it) are costly and inaccurate for resource-constrained deployment.

Approach

Use a hypernetwork that consumes program text and outputs parameters for a fixed covering MLP architecture, so the compiled initialization is a good starting point that can be finetuned cheaply; generation and execution are decoupled, unlike universal neural surrogates.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Initialize surrogates from program text using CompNet instead of random initializationNeural surrogates on ExeStackCPN test programs · ExeStackCPN test programsgeometric mean test loss improvement over random initialization: 9.50×Helped
Use MAML initialization instead of random initializationNeural surrogates on ExeStackCPN test programs · ExeStackCPN test programsgeometric mean test loss improvement over random initialization: 1.09×Helped
Use pretrained neural surrogate initialization instead of random initializationNeural surrogates on ExeStackCPN test programs · ExeStackCPN test programsgeometric mean test loss improvement over random initialization: 1.08×Helped
Initialize surrogates from program text using CompNet instead of random initializationNeural surrogates on ParrotBenchCPN · ParrotBenchCPNgeometric mean test loss improvement over random initialization: 1.91×Helped
Use MAML initialization instead of random initializationNeural surrogates on ParrotBenchCPN · ParrotBenchCPNgeometric mean test loss improvement over random initialization: 0.93×Hurt
Use pretrained neural surrogate initialization instead of random initializationNeural surrogates on ParrotBenchCPN · ParrotBenchCPNgeometric mean test loss improvement over random initialization: 1.05×Helped
Initialize the surrogate from program text using CompNet instead of random initializationNeural surrogates for kmeans · ParrotBenchCPN kmeanstest loss improvement over random initialization: 7.85×Helped
Use MAML initialization instead of random initializationNeural surrogates for kmeans · ParrotBenchCPN kmeanstest loss improvement over random initialization: 0.68×Hurt
Use pretrained neural surrogate initialization instead of random initializationNeural surrogates for fft and sobel · ParrotBenchCPN fft and sobeltest loss improvement over random initialization: 0.61×; 0.85×Hurt
Initialize the surrogate from program text using CompNet instead of random initializationNeural surrogates for color quantization · Color quantization (5-color palette)image similarity to exact implementation: 1.0-1.3×Helped
Initialize the surrogate from program text using CompNet instead of random initializationNeural surrogate training · Neural surrogate trainingepochs to target error: 4.3-7.3× fewer epochsHelped

Surprising findings

Limitations

Experimental setup

Datasets: ExeStack ExeStackCPN ParrotBench The Stack

Benchmarks: ExeStackCPN test programs ParrotBenchCPN (fft, invk2j, kmeans, sobel) color quantization (kmeans application)

Metrics: test MSE loss improvement over random initialization (geomet MSE and SSIM for color quantization epochs to target loss

Baselines: random initialization MAML pretrained neural surrogates

Builds on: BERT hypernetworks MAML Parrot transformation

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy