Top-Down Synthesis for Library Learning

Matthew Bowers, Theo X. Olausson, Lionel Wong, Gabriel Grand, Joshua B. Tenenbaum +2 more
11/29/2022
cs.PLcs.AI

Official code: mlb2251/stitch (112 stars, Rust, MIT, Rust, last commit 2026-09-08).

Abstract

This paper introduces corpus-guided top-down synthesis as a mechanism for synthesizing library functions that capture common functionality from a corpus of programs in a domain specific language (DSL). The algorithm builds abstractions directly from initial DSL primitives, using syntactic pattern matching of intermediate abstractions to intelligently prune the search space and guide the algorithm towards abstractions that maximally capture shared structures in the corpus.

Show full abstract

We present an implementation of the approach in a tool called Stitch and evaluate it against the state-of-the-art deductive library learning algorithm from DreamCoder. Our evaluation shows that Stitch is 3-4 orders of magnitude faster and uses 2 orders of magnitude less memory while maintaining comparable or better library quality (as measured by compressivity). We also demonstrate Stitch's scalability on corpora containing hundreds of complex programs that are intractable with prior deductive approaches and show empirically that it is robust to terminating the search procedure early -- further allowing it to scale to challenging datasets by means of early stopping.

View on arXivView PDF

Code Implementations(1)

mlb2251/stitchOfficial100%
RustMIT

A scalable abstraction learning library

11213Rust, PythonOct 30, 20212 months agoMIT

Similar Papers

Cite this paper

@article{bowers2022topdown,
  title  = {Top-Down Synthesis for Library Learning},
  author = {Matthew Bowers and Theo X. Olausson and Lionel Wong and Gabriel Grand and Joshua B. Tenenbaum and Kevin Ellis and Armando Solar-Lezama},
  year   = {2022},
  eprint = {2211.16605},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.16605}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.16605.svg)](https://codeofpaper.com/paper/2211.16605)

Discussion