atlas

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

HYSYNTH: Context-Free LLM Approximation for Guiding Program Synthesis

NeurIPS 2024 · Large language models › Agents, code and math · approach: Execution-based code verification · 5 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.

Learns a task-specific PCFG from LLM samples (including ungrammatical ones in non-strict mode) and uses it to weight bottom-up program synthesis across ARC, tensor, and string PBE domains.

Problem

LLMs fail to produce fully correct programs in unfamiliar DSLs, while combinatorial program synthesis scales poorly; LLMs cannot easily guide bottom-up search because bottom-up search relies on context-free factorization.

Approach

Approximate an LLM's conditional distribution over programs for a given task with a context-free PCFG learned by maximum likelihood from LLM completions (including ungrammatical ones via operator-terminal counting), and use its weights to guide bottom-up search.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
guide bottom-up synthesis with a task-specific PCFG learned from GPT-4o completionsHySynth · 299 PBE tasks (Arc, String, Tensor)tasks solved: 40% -> 58%Helped
guide synthesis with a PCFG and search rather than use LLM samples directlyHySynth · 299 PBE tasks (Arc, String, Tensor)tasks solved: 6% -> 58%Helped
use LLM samples directly without search (ablation)HySynth · Tensortasks solvedHurt
replace the weighted PCFG with a binary PCFG that excludes components absent from the LLM samples (ablation)HySynth · Arc and Tensortasks solvedHurt
use 10 instead of 100 GPT-4o samples to learn the PCFG (ablation)HySynth · Stringtasks solved: 9 fewer problemsHurt
vary the number of GPT-4o samples used to learn the PCFG (ablation)HySynth · Arc and Tensortasks solved: 2 problems eachMixed
use strict mode, discarding syntactically invalid completions, rather than non-strict mode (ablation)HySynth-Arc · Arctasks solved: 58 tasks in either modeNo clear effect
use a context-free LLM surrogate to guide synthesisHySynth-Tensor · Tensorbenchmark solved: 96%Helped
use the custom bottom-up divide-and-conquer synthesizer instead of ArgaHySynth-Arc · Object-Arctasks solvedHelped
use LLM-derived weights to guide search rather than uniform weightsHySynth · Arc motivating exampleprograms enumerated: 450K -> 220KHelped
use LLM-derived weights to guide search rather than uniform weightsHySynth · Arc motivating examplespeedup: 4x speedupHelped
use non-strict mode to incorporate syntactically invalid completionsHySynth · Arc and Stringcompletions available for PCFG learning: 78.4%; 37.5%Helped

Surprising findings

Limitations

Experimental setup

Datasets: Object-Arc (Arga test set) TFCoder tensor tasks SyGuS/Probe string tasks

Benchmarks: Object-Arc (160 tasks) TFCoder tensor tasks (69 tasks) SyGuS/Probe string tasks (70 tasks)

Metrics: number of tasks solved time to solution percentage of syntactically valid completions

Baselines: Arga TFCoder Probe unguided search binary surrogate direct LLM sampling

Builds on: bottom-up search TFCoder Probe Arga divide-and-conquer synthesis

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