A Divide, Align and Conquer Strategy for Program Synthesis
Abstract
A major bottleneck in search-based program synthesis, which learns programs from input/output examples, is the synthesis of large programs. As the size of the target program increases, so does the search depth, which leads to an exponentially growing number of candidate programs. Humans mitigate the combinatorial explosion that arises from deep program search: they build complex programs from smaller parts. We introduce a new strategy for program synthesis called Divide, Align & Conquer (DA&C) that exploits the compositionality of real-world domains to guide the synthesis towards useful subprograms. Divide decomposes each example using a segmentation procedure that is synthesized as part of the learning problem. Align matches the components in the decomposed input/output examples to steer the search toward combinations that lead to the synthesis of useful subprograms, and Conquer then solves a standalone synthesis problem on each pair of aligned input/output components. We show how replacing a deep program search with a linear number of much smaller synthesis tasks leads us to efficiently discover useful subprograms that are then combined into a solution program. Our agent outperforms current Inductive Logic Programming (ILP) methods on string transformation tasks even with minimal knowledge priors. Unlike existing methods, the predictive accuracy of our agent monotonically increases for additional examples. It approximates an average time complexity of O(m) in the size m of subprograms for highly structured and, hence, decomposable domains such as strings. Finally, we demonstrate the scalability of our technique on highdimensional abstract visual reasoning tasks from the Abstract Reasoning Corpus (ARC) for which ILP methods were previously infeasible. We are competitive with state-of-the-art agents outside of ILP, despite generating only 0.2% as many candidate programs from a knowledge prior of only 11 generic geometric primitives.
Cite
Text
Witt et al. "A Divide, Align and Conquer Strategy for Program Synthesis." Journal of Artificial Intelligence Research, 2025. doi:10.1613/JAIR.1.16847Markdown
[Witt et al. "A Divide, Align and Conquer Strategy for Program Synthesis." Journal of Artificial Intelligence Research, 2025.](https://mlanthology.org/jair/2025/witt2025jair-divide/) doi:10.1613/JAIR.1.16847BibTeX
@article{witt2025jair-divide,
title = {{A Divide, Align and Conquer Strategy for Program Synthesis}},
author = {Witt, Jonas and Dumancic, Sebastijan and Guns, Tias and Carbon, Claus-Christian},
journal = {Journal of Artificial Intelligence Research},
year = {2025},
pages = {1961-1997},
doi = {10.1613/JAIR.1.16847},
volume = {82},
url = {https://mlanthology.org/jair/2025/witt2025jair-divide/}
}