TL;DR
BUSTLE is a program synthesis technique that combines bottom-up enumerative search with a machine learning model to navigate massive search spaces. By executing intermediate code snippets and using a neural "guide" to prioritize promising sub-programs, it achieves significant speedups and solves complex string transformation tasks that baffle traditional synthesizers.
What Problem Does This Paper Address?
Program synthesis—automatically writing code from a specification like input-output examples—is notoriously difficult because the number of possible programs grows exponentially with program length.
Most existing approaches fall into two camps:
- Symbolic/Enumerative Search: These systems systematically try every possible program. They are guaranteed to find a solution if it exists within their search bounds but are incredibly slow for complex tasks.
- Neural/Top-Down Search: These use models to predict the program directly or guide a top-down search. However, top-down search is hard to guide because partial programs often have "holes" (unfilled parts) that cannot be executed, making it hard to know if the search is on the right track.
The authors identify a gap: human programmers don't just guess a whole program; they write small pieces, check the intermediate results, and then compose them. BUSTLE aims to mimic this "bottom-up" intuition.
Methods
BUSTLE (Bottom-Up program Synthesis Through Learning-guided Exploration) uses a bottom-up enumerative search guided by a binary classifier.
- Bottom-Up Search: The system starts with basic inputs and constants, then applies functions (like
Concat,Left,Find) to create increasingly complex expressions. Because it builds from the bottom up, every intermediate expression is a complete, runnable piece of code. - Execution-Guided Learning: Since every sub-program can be executed, BUSTLE runs them on the provided inputs. The resulting intermediate values are then featurized using Property Signatures. These are vectors of boolean flags (e.g., "is this value a substring of the target output?" or "is this integer equal to the output string's length?").
- The Model: A simple multi-layer perceptron (MLP) takes these property signatures and predicts the probability that an intermediate value is part of the final, correct solution.
- Search Reweighting: The model’s probability is discretized into bins. If the model is confident a sub-program is useful, BUSTLE "promotes" it by reducing its search weight, allowing the synthesizer to explore its compositions much earlier than it otherwise would.
Datasets
The researchers evaluated BUSTLE on two primary sources:
- A New Benchmark Suite: 38 human-written tasks designed to be challenging, involving string manipulations, integer arithmetic, and conditionals (e.g., "Change DDMMYYYY date to MM/DD/YYYY").
- SyGuS Benchmarks: 89 tasks from the standard "Syntax-Guided Synthesis" competition (PBE Strings track).
- Synthetic Training Data: To train the model, they generated 200,000 examples by running random searches on random inputs and extracting sub-expressions from the resulting programs.
Key Insights and Ideas
- Semantic vs. Syntactic Guidance: Most neural synthesizers look at the text of the code. BUSTLE looks at what the code does (its execution results). This semantic information is far more robust for guiding search.
- Learning-in-the-Loop: The paper shows that guiding the search as it happens is much more effective than "premise selection" (predicting which functions to use once at the beginning).
- Property Signatures as a Bridge: Using abstract properties (like
is_substring) instead of raw characters allows a model trained on random, synthetic data to generalize surprisingly well to human-written problems. - Efficiency Matters: Neural network inference is slow compared to simple code execution. BUSTLE succeeds because it uses a very simple model and batches predictions, ensuring that the time saved by searching fewer programs outweighs the "tax" of running the model.
Key Results
- Performance: On the new 38-benchmark set, BUSTLE solved 31 tasks within 30 seconds, significantly outperforming baselines like RobustFill (a pure neural approach) and DeepCoder (a premise-selection approach).
- Speedup: BUSTLE solved many tasks by exploring orders of magnitude fewer expressions than the unguided baseline.
- SyGuS Success: On the SyGuS benchmarks, BUSTLE was highly competitive, solving 80 tasks. It performed best when combined with traditional handwritten heuristics.
- Generalization: Despite being trained only on synthetic, randomly generated programs, the model's predictions were highly accurate on human-written benchmarks, with "true" sub-expressions consistently receiving higher scores.
Limitations and Future Work
- DSL Constraints: The current system is limited to a specific Domain-Specific Language (DSL) for strings and numbers. It does not yet handle loops or more complex data structures like lists or trees.
- Heuristic Dependency: While the model is powerful, the best results still come from combining it with manually designed heuristics. Finding a way for the model to fully replace these heuristics remains an open challenge.
- Scaling to General Purpose Code: Moving from spreadsheet-style transformations to general-purpose programming languages would require handling a much larger set of functions and more complex execution states.
Summary updated