[Paper Review] Learning to select examples for program synthesis
This paper proposes a neural network-based method to select a small, representative subset of input-output examples for program synthesis, improving constraint solver efficiency. By iteratively adding the least probable (least redundant) example based on learned uncertainty, the approach reduces solver overhead while maintaining solution accuracy, as validated in a diagram-drawing synthesis task.
Program synthesis is a class of regression problems where one seeks a solution, in the form of a source-code program, mapping the inputs to their corresponding outputs exactly. Due to its precise and combinatorial nature, it is commonly formulated as a constraint satisfaction problem, where input-output examples are encoded as constraints and solved with a constraint solver. A key challenge of this formulation is scalability: while constraint solvers work well with few well-chosen examples, a large set of examples can incur significant overhead in both time and memory. We address this challenge by constructing a representative subset of examples that is both small and able to constrain the solver sufficiently. We build the subset one example at a time, using a neural network to predict the probability of unchosen input-output examples conditioned on the chosen input-output examples, and adding the least probable example to the subset. Experiment on a diagram drawing domain shows our approach produces subsets of examples that are small and representative for the constraint solver.
Motivation & Objective
- To address the scalability challenge in program synthesis caused by large sets of input-output examples.
- To reduce time and memory overhead in constraint solvers by selecting a minimal yet constraining subset of examples.
- To improve the efficiency of constraint satisfaction-based program synthesis without sacrificing solution accuracy.
- To develop a method that dynamically selects examples based on their informativeness, measured via neural probability estimation.
Proposed method
- A neural network is trained to predict the probability of unselected input-output examples given the already chosen examples.
- The method iteratively selects the example with the lowest predicted probability, assuming it is the least redundant and most informative.
- The selection process is guided by uncertainty: examples with low probability are considered less likely to be redundant and thus more valuable to include.
- The selected subset is then used as constraints in a constraint solver to synthesize the target program.
- The approach is evaluated in a diagram-drawing program synthesis domain, where it learns to prioritize diverse and constraining examples.
Experimental results
Research questions
- RQ1Can a neural model effectively identify the most informative input-output examples for program synthesis?
- RQ2How does iterative example selection based on predicted uncertainty impact solver performance and scalability?
- RQ3To what extent can a small, representative subset of examples maintain solution accuracy compared to using all examples?
- RQ4Does the method reduce time and memory overhead in constraint solvers while preserving correctness?
Key findings
- The proposed method produces significantly smaller example subsets that still constrain the solver effectively, reducing computational overhead.
- The neural model successfully identifies low-probability (least redundant) examples, leading to more diverse and informative subsets.
- The approach maintains high solution accuracy in the diagram-drawing synthesis task, even with a reduced number of examples.
- The iterative selection strategy based on uncertainty improves solver efficiency without compromising the ability to find correct programs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.