Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Interactive Program Induction with Language Model Priors

  • Problem Finite input–output examples fit infinitely many programs that differ on unseen inputs, so recovering a program needs an inductive bias and further queries.
  • Method Treats the target program as a Bayesian unknown, uses a language model as both prior and importance-sampling proposal, and chooses each query by expected information gain over a sampled evaluation set.
  • Results Reached up to 22 percentage points higher accuracy than the CodeARC LM agent, with up to 10.5 fewer input–output examples.

Figure 1: (a) Cumulative accuracy (top) and fraction of runs terminated (bottom) by round, for
Alg. 1 under four query selection strategies, the CodeARC agent…

Figure 1 : (a) Cumulative accuracy (top) and fraction of runs terminated (bottom) by round, for Alg. 1 under four query selection strategies, the CodeARC agent (LM only), and the per-instance bound of Thm. 3.2 aggregated over the EIG runs. The termination panels use the runs whose initial particles contain the target’s class. A run is terminated once it reaches the total query budget. (b) The information the selected query is guaranteed to yield, γt, by round, averaged over the runs still querying and pooled across models. A dashed line marks the last round with at least 200 runs of that strategy still querying, which is where the strategy has typically terminated. 95% CIs over five seeds.

Original paper · CC BY 4.0 · Robin Shing Moon Chan, Ryan Cotterell · Interactive Program Induction with Language Model Priors · Original paper figure · Extracted the figure area from page 9 of the original PDF.

Why finite examples leave the program open

A finite set of input–output examples fits infinitely many programs, and those programs can disagree on inputs the examples never show. Earlier systems avoid this by limiting the search to a hand-designed domain-specific language, which keeps the candidates enumerable but restricts what can be expressed. Language models trained on code describe a distribution over programs in a general-purpose language, yet used as one-shot inductors they give little control over which consistent program is chosen.

The study asks instead how a learner that picks its own inputs and asks an oracle for their outputs can recover a target program in such a language, and how many oracle queries that takes.

Treating the target program as a Bayesian unknown

The learner starts from a prior \(p_0\) over programs, which carries the inductive bias, and an input distribution \(\mu\) that fixes where agreement with the target is measured.

Exact equivalence of computable functions is undecidable, so the paper relaxes it in two steps. The first step calls \(f\) equivalent to \(f^\star\) at tolerance \(\epsilon\) when the error under \(\mu\), \(\Pr_{x\sim\mu}[f(x)\neq f^\star(x)]\), is at most \(\epsilon\). The second step draws \(N\) inputs from \(\mu\) and calls two programs equivalent when they agree on every sampled input, a condition that can be checked on observed data.

Proposition 2.1 bounds the error of each program in the target's class with high probability over the draw of the sample: \[ \mathrm{err}_\mu(f)\le\frac{\ln(1/p_0(f))+\ln(1/\delta)}{N} \] holds for every such program with probability at least \(1-\delta\). A program with more prior mass therefore gets a tighter bound from the same sample.

Because the classes are what the inference tracks, the target is identified through the mass each class collects: \(p_\sim([f]_\sim\mid D_t)\) sums the posterior over the members of a class.

Choosing each query by expected information gain

Queries come only from the evaluation set \(S\), since the classes are defined there: programs in one class agree on every input in \(S\), so an answer never splits a class. The input chosen at each round maximizes the expected drop in entropy of the class distribution: the entropy before the query minus the posterior-predictive-weighted entropy after each possible answer, \[ x^{(t)}=\arg\max_{x\in S}\;H[p_\sim(\cdot\mid D_{t-1})]-\sum_{y}p(y\mid x,D_{t-1})\,H[p_\sim(\cdot\mid D_{t-1}\cup\{(x,y)\})] \]

After the oracle answers, the posterior is updated through its recursive form and the class masses are recomputed. The loop stops at the first round in which one class holds more than half of the pushforward mass, and the returned program is drawn from that class.

Query counts and when the answer is right

Theorem 3.1 averages over targets drawn from the prior: the greedy rule's total guaranteed information over a run is at most the prior class entropy \(H[p_\sim(\cdot\mid D_0)]\), measured in bits. If every query guarantees at least \(\gamma>0\) bits, the expected number of queries is at most \(H[p_\sim(\cdot\mid D_0)]/\gamma\).

Under those conditions the number of rounds is at most \[ \left\lfloor \frac{1}{\gamma}\log_2\frac{1}{2\,p_\sim([f^\star]_\sim\mid D_0)}\right\rfloor+1 \] Theorem 3.2 does not use the greedy rule, so the bound also covers other selection rules over \(S\), each with the guaranteed information of its own queries.

A wrong class is returned only when some class with prior mass strictly above \(p_\sim([f^\star]_\sim\mid D_0)\) stays consistent with every query. So when no class outweighs the target's class under the prior, the algorithm returns the target's class within that bound.

A non-adaptive strategy that labels random inputs needs on the order of \(\log(1/\delta)/\epsilon\) labeled inputs, and that count grows as \(\epsilon\) shrinks. The adaptive bound depends on how plausible the target is under the prior, not on \(\epsilon\).

The paper checks this trade-off empirically in its evaluation set size ablation.

Estimating the posterior with a language model

The posterior sits on a countably infinite support, so neither the posterior nor its entropy can be computed exactly. The method instead draws weighted programs from a language model and computes class masses from those weights. The model is prompted with the observed input–output examples, so the proposal \(q_t(x)=p_{\mathrm{LM}}(x\mid\mathrm{prompt}(D_t))\) is defined over implementations, and the program prior \(p_0\) is the proposal before any query.

Distinct implementations can compute the same function, and the equivalence relation collapses those that agree on \(S\) into one class. Each particle gets an importance weight equal to its prior density times the consistency indicator, divided by its proposal density: \[ w_m=\frac{p_0(f_m)\prod_{(x,y)\in D_t}\mathbf{1}\{f_m(x)=y\}}{q_t(f_m)} \]

Class masses are estimated by self-normalized importance sampling as the weighted share of particles in each class, \(\hat p_\sim(c\mid D_t)=\sum_{m:f_m\in c}w_m/\sum_m w_m\). Entropy and the posterior predictive are then plug-in estimates computed from the same weights, and the greedy step maximizes over \(S\) using these estimates. When the effective sample size falls below the threshold \(\tau_{\mathrm{ESS}}\), the particles are redrawn from the current proposal.

CodeARC setup and comparison conditions

The evaluation uses the CodeARC benchmark, whose 1114 Python functions come from HumanEval+, MBPP+ and APPS. The anonymized split replaces function names with a generic identifier, and each task is run with one or with ten seed invocations. Each task has a budget of 30 input–output pairs, and the seed invocations count toward that budget.

The CodeARC agent may also issue 2 equivalence queries, while the proposed algorithm issues none and submits its returned program once.

Six instruction-tuned models are compared: Llama3.2-3B, Llama3.1-8B, Qwen2.5-7B, Qwen2.5-32B, Olmo3-7B and Ministral-8B. Correctness is judged by the differential testing tool MOKAV, whose test-generating model is fixed to Qwen2.5-32B for every model and both methods. The input distribution is conditioned on all 10 seed invocations and kept fixed across settings, independent of which seed invocations are shown.

Accuracy and oracle cost against the CodeARC agent

Table 1 compares the proposed algorithm with the CodeARC LM agent on average input–output examples observed and accuracy, under one and ten seed invocations.

The authors attribute the remaining gap to perfect accuracy to the models' general ceiling in proposing code that matches the shown pairs. Early termination is a recurring problem, which the authors tie to early concentration of the posterior; this is the case the per-instance bound does not cover. Table entries carry 95% confidence intervals over seeds, so differences should be read against those intervals.

Query selection and evaluation set size

Within the proposed algorithm, expected information gain is compared with uncertainty, diversity and random selection.

Figure 1 tracks accuracy and termination by round for each strategy, and the guaranteed information of the selected queries by round. The bound of Theorem 3.2 is attained in .37 of the EIG runs.

The evaluation set size \(N\) was varied from 2 to 256 for three models. As \(N\) grows, convergence on the target's class becomes rarer, while accuracy given convergence rises. The authors read the rising conditional accuracy as the effect of agreeing on more sampled inputs, which leaves fewer disagreements on unseen ones.

Prior majority class calibration

The calibration plot relates the accuracy of the prior majority class to the prior mass of the largest class, with an ECE per model in the legend. The authors also note that CodeARC targets may not match the programs humans would consider plausible, so calibration against human plausibility could differ.

Limits of the guarantees and the evidence

The guarantees are stated for the exact posterior, while the implementation uses a finite particle budget, and with finite particles the set may miss the target's class entirely. A wrong class can also exceed the threshold before enough particles fall in the target's class, which the authors say the prior's miscalibration makes common. The importance weights use LM probabilities of the extracted code, not the completion probabilities of the sampled text, so they approximate the exact weights.

The PAC certificate holds for the returned program only conditional on the algorithm returning the target's class. Experiments use only the CodeARC benchmark and six instruction-tuned models. The CodeARC agent with 2 equivalence queries has strictly more oracle access than the proposed algorithm, so that setting is the stronger baseline. Noisy oracles are named as a direction the framework could extend to, and they were not tested.

Paper info

Authors
Robin Shing Moon Chan, Ryan Cotterell
Venue
arXiv · Preprint
First published
2026-11-13
Added
2026-11-16
Updated
2026-11-13
Version
v1
arXiv
2611.18485
Category
cs.CL · cs.AI · cs.LG
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

Program induction refers to the process in which a learner aims to recover a program from a few given input-output examples. This paradigm broadens programming access by letting users demonstrate the rule-based behavior they want to apply to unseen data, instead of having to implement it themselves. However, recovering a program from finite input-output examples is fundamentally ambiguous, as a finite set of input-output examples is theoretically consistent with infinitely many programs whose output diverges on unseen inputs. We view this problem from a Bayesian perspective, where, given a prior $p^0$ over programs, identifying the target program means concentrating posterior probability mass on it by observing additional input-output examples. In the interactive program induction setting, the learner chooses maximally informative inputs and queries an oracle, such as the user, for their outputs. We derive a greedy query-selection algorithm and show that it terminates after $\mathcal{O}(\frac{1}γ\log 1/p^0(f^\star))$ informative oracle queries, and returns the target program $f^\star$ up to approximate equivalence when no other class outweighs it under the prior. The algorithm uses a language model as the prior under a PAC-style relaxation of program equivalence, where the query-selection objective is estimated using importance sampling. On the CodeARC benchmark, the algorithm improves accuracy over the LM only agent by up to 22 percentage points while observing up to 10.5 fewer input-output examples.

Quote from the paper

Robin Shing Moon Chan, Ryan Cotterell (2026). Interactive Program Induction with Language Model Priors. arXiv:2611.18485v1. https://arxiv.org/abs/2611.18485v1

BibTeX
@misc{chan2026interactive,
  title = {{Interactive Program Induction with Language Model Priors}},
  author = {Robin Shing Moon Chan and Ryan Cotterell},
  year = {2026},
  eprint = {2611.18485},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18485v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up