atlas

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

Once Upon an Input: Reasoning via Per-Instance Program Synthesis

NeurIPS 2025 · Large language models › Agents, code and math · approach: LLM-guided program synthesis · 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.

Proposes Per-Instance Program Synthesis (PIPS), which generates and iteratively refines programs per instance using structural checks instead of test cases, and uses a self-assessed confidence switch to choose between program synthesis and CoT.

Problem

Instance-level program synthesis (e.g., PoT) often yields undesirable programs (trivial hard-coded answers, type/syntax errors, placeholders, brittle handling of unstructured inputs) and LLMs do not know when program synthesis beats direct CoT reasoning.

Approach

Per-instance synthesis loop guided by structural feedback (non-triviality, syntax, type errors) with no test cases; an LLM first abstracts unstructured input into symbolic JSON, and a self-prompted confidence score over ten criteria decides between CoT and program synthesis per instance.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use PIPS instead of PoTGemini-2.0-Flash, GPT-4.1-mini, and o4-mini · 30 datasetsHMean Accuracy: 8.6%Helped
use PIPS instead of CoTGemini-2.0-Flash, GPT-4.1-mini, and o4-mini · 30 datasetsHMean Accuracy: 9.4%Helped
add the confidence switch (ablation)PIPS · BBEH tasksHMean Accuracy (%): 18.3 -> 20.8Helped
add iterative evaluator feedback (ablation)PIPS without the confidence switch · BBEH tasksHMean Accuracy (%): 12.9 -> 18.3Helped
add structured input symbols (ablation)PIPS[0] without the confidence switch · BBEH tasksHMean Accuracy (%): 4.3 -> 12.9Helped
use PIPS instead of PoTo4-mini · Buggy tablesaccuracy: 0.512 -> 0.594Helped
use PIPS instead of PoTo4-mini · Temporal sequenceaccuracy: 0.306 -> 0.519Helped
use PIPS instead of CoTo4-mini · Dyck languagesaccuracy: 0.650 -> 0.606Hurt
use PIPS instead of PoTo4-mini · Time arithmeticaccuracy: 0.900 -> 0.894Hurt
use PIPS instead of PoTo4-mini · Shuffled objectsaccuracy: 0.150 -> 0.344Helped
use PIPS instead of PoTGemini-2.0-Flash · BBEH algorithmic tasksundesirable program generations: 65.1%Helped
increase synthesis iterations from k=0 (ablation)PIPS · 30 datasetsHMean Accuracy: 5.6%Helped

Surprising findings

Limitations

Experimental setup

Datasets: BBEH (23 tasks) CLEVR Leaf CLUTRR OmniMath (4 tasks)

Benchmarks: BBEH CLEVR Leaf CLUTRR OmniMath

Metrics: harmonic mean accuracy accuracy non-trivial code percentage well-formed program rate calibration

Baselines: Program of Thought Chain of Thought Gemini Code Interpreter PoT-retries CodeAct Buffer-of-Thoughts

Builds on: Program of Thought Chain of Thought Program Aided Language Models CodeAct

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