[Paper Review] CrossBeam: Learning to Search in Bottom-Up Program Synthesis
CrossBeam proposes a neural search policy for bottom-up program synthesis that learns to guide search by selecting and combining previously explored programs based on full search context and execution results. Trained on-policy using beam-aware training, it achieves 62% higher task success than state-of-the-art methods in string manipulation and near-100% success on hard logic programming tasks where prior methods fail.
Many approaches to program synthesis perform a search within an enormous space of programs to find one that satisfies a given specification. Prior works have used neural models to guide combinatorial search algorithms, but such approaches still explore a huge portion of the search space and quickly become intractable as the size of the desired program increases. To tame the search space blowup, we propose training a neural model to learn a hands-on search policy for bottom-up synthesis, instead of relying on a combinatorial search algorithm. Our approach, called CrossBeam, uses the neural model to choose how to combine previously-explored programs into new programs, taking into account the search history and partial program executions. Motivated by work in structured prediction on learning to search, CrossBeam is trained on-policy using data extracted from its own bottom-up searches on training tasks. We evaluate CrossBeam in two very different domains, string manipulation and logic programming. We observe that CrossBeam learns to search efficiently, exploring much smaller portions of the program space compared to the state-of-the-art.
Motivation & Objective
- To address the exponential blowup in search space during program synthesis by learning an effective search policy.
- To improve upon existing learning-to-search methods that query models infrequently or ignore search context.
- To enable efficient, hands-on neural guidance during search by leveraging execution results and full search history.
- To train the model on-policy using data from its own search process, avoiding distribution shift.
- To demonstrate effectiveness in diverse domains: string manipulation and inductive logic programming.
Proposed method
- CrossBeam uses a bottom-up enumerative search strategy that incrementally builds programs from inputs and constants.
- At each step, a pointer network selects previously explored programs to combine using DSL operations, guided by a neural model.
- The model takes the full search context—past programs and their execution results—as input to make decisions.
- The neural model is trained using beam-aware training, where loss is based on progress toward correct programs during on-policy search.
- Search maintains a set of explored values and generates new ones by applying operations to selected argument lists.
- Execution results of partial programs are used to inform and prune the search space dynamically.
Experimental results
Research questions
- RQ1Can a neural model trained on-policy learn to guide bottom-up program synthesis more effectively than off-policy or infrequent-query methods?
- RQ2Does incorporating full search context and execution results improve search efficiency and success rate in program synthesis?
- RQ3Can a hands-on, continuously queried model reduce the effective branching factor and exponential search blowup?
- RQ4How does CrossBeam compare to state-of-the-art methods in terms of task coverage and success rate on hard synthesis problems?
- RQ5Can the approach generalize across diverse domains such as string manipulation and logic programming?
Key findings
- In the string manipulation domain, CrossBeam solved 62% more tasks than Bustle within 50,000 candidate expressions on the same test set.
- On logic programming tasks with large solution sizes, CrossBeam achieved nearly 100% success rate, while prior state-of-the-art methods had a 0% success rate.
- CrossBeam significantly reduced the portion of the program space explored compared to state-of-the-art methods, indicating improved search efficiency.
- The model’s on-policy training enabled better alignment between training and inference, avoiding distribution shift issues common in off-policy learning.
- Bottom-up search with full context and execution feedback allowed CrossBeam to recover from suboptimal choices and combine subprograms more effectively.
- Even baseline bottom-up enumeration outperformed Metagol and Popper in the ILP setting, suggesting that search strategy matters as much as model design.
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.