atlas

Research map / Large language models / Language, safety and interpretability

Is Programming by Example Solved by LLMs?

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: LLM unlearning and benchmarks · 3 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.

Shows that pretrained code LLMs are weak at programming-by-example, but fine-tuning on synthetic (program, I/O) data from a seed set, plus a wake-sleep style adaptation loop, gives strong PBE over list, string, and LOGO graphics domains.

Problem

Whether LLMs can solve programming-by-examples (inferring programs from input-output examples alone), which has so far been dominated by domain-specific languages and symbolic search, and how well they generalize out of distribution.

Approach

Generate a large synthetic dataset of (program, inputs, outputs) by prompting an LLM with a small seed set and executing programs to get outputs, fine-tune a code LLM to infer programs from I/O, then adapt to new distributions with a wake-sleep style loop that adds solved unlabeled problems back to the seed set.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Fine-tune DeepSeekCoder on synthetic PBE examplesDeepSeekCoder for text editing · Text editing (holdout problems)generalization accuracy: 33% -> 82%Helped
Fine-tune DeepSeekCoder on synthetic PBE examplesDeepSeekCoder for LOGO graphics · LOGO test setaccuracyHelped
Fine-tune on list-function PBE examplesDeepSeekCoder for list-to-list synthesis · λ² list-to-list benchmarkaccuracyHelped
Use SyGuS rather than PROSE problems for fine-tuningDeepSeekCoder-7B · PROSEaccuracy: 76% -> 59%Hurt
Adapt the fine-tuned model using unlabeled test-distribution examples and accepted solutionsFine-tuned PBE models · Out-of-distribution list, text, and LOGO tasksaccuracy: around 10% or moreHelped
Adapt the fine-tuned model using unlabeled test-distribution examples and accepted solutionsFine-tuned PBE models · Out-of-distribution text and list tasksrelative accuracy increase: about 16%Helped
Adapt the fine-tuned model using unlabeled test-distribution examples and accepted solutionsFine-tuned PBE model · Out-of-distribution LOGO tasksrelative accuracy increase: about 190%Helped

Surprising findings

Limitations

Experimental setup

Datasets: Rule et al. 2024 list functions Shi et al. 2023 LambdaBeam PROSE / FlashFill++ string problems SyGuS string problems Regal/DreamCoder LOGO programs lambda^2 list benchmark

Benchmarks: list functions (Rule et al. 2024) LambdaBeam (Shi et al. 2023) PROSE string benchmark SyGuS LOGO graphics test set lambda^2 list problems

Metrics: generalization accuracy oracle accuracy fraction of problems solved

Baselines: GPT-4 GPT-4o FlashFill FlashFill++ DreamCoder LILO Regal Metagol RobustFill Fleet lambda^2

Builds on: self-instruct wake-sleep DreamCoder FlashFill

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