Interactive Program Induction with Language Model Priors
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 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 informative oracle queries, and returns the target program 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.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG
- Comments
- Preprint. 28 pages, 5 figures, 9 tables
Related papers
Self-WSP: Can Language Models Improve Themselves Through Weight-Space Programming?
Shared title terminologycs.CLGuoming Ling, Shanshan Zhong, Kaixuan Zhang et al.
Exploring Multi-Player Social Games as Verifiable Training Grounds for Large Language Models
Shared title terminologycs.CLKeyu He, Michael Li, Jiarui Liu et al.
Right Destination, Wrong Journey: Synthetic Counseling Dialogues Miss Human Interactional Dynamics
Shared title terminologycs.CLZiwei Gong, Yuchen Huang, Nicholas Deas et al.
PazaBench: Large-Scale ASR Benchmark for Low-Resource Languages in Africa
Shared title terminologycs.CLMercy Muchai, Nick Mumero Mwangi, Kevin Chege et al.
DKnown-Jev-2: Article-Level Answer-Evidence Classification and Efficient Inference with a Pre-trained Language Model
Shared title terminologycs.CLQi Li, Jianjun Xu, Jiu Li et al.
LimeTree: Linear-Memory Graph Neural Networks over Tree-Graphs for Resource-Efficient Language Modeling and Context Extrapolation
Shared title terminologycs.CLElisabeth Fink