Table of Contents
Fetching ...

Bayesian Program Learning by Decompiling Amortized Knowledge

Alessandro B. Palmarini, Christopher G. Lucas, N. Siddharth

TL;DR

This work addresses the challenge of combinatorial search in inductive program synthesis by introducing dream decompiling, a method that uses the neural recognition model's amortized knowledge to guide library chunking and reduce search depth. By formalizing a probabilistic criterion $p(c|f; \bm{\beta}_\text{D})$ and a caching measure $ ext{C}(q, \rho, f)$, the authors derive two variants (DreamDecompiler-Avg and DreamDecompiler-PC) that restructure the search space to complement the learned search policy. Empirical evaluation across six domains shows that dream decompiling improves held-out generalization and, in many cases, decreases search time, with notable gains when training data are limited. The approach offers a principled path to stronger bootstrapping in domain-general program synthesis by extracting high-value library components from amortized inference.

Abstract

DreamCoder is an inductive program synthesis system that, whilst solving problems, learns to simplify search in an iterative wake-sleep procedure. The cost of search is amortized by training a neural search policy, reducing search breadth and effectively "compiling" useful information to compose program solutions across tasks. Additionally, a library of program components is learnt to compress and express discovered solutions in fewer components, reducing search depth. We present a novel approach for library learning that directly leverages the neural search policy, effectively "decompiling" its amortized knowledge to extract relevant program components. This provides stronger amortized inference: the amortized knowledge learnt to reduce search breadth is now also used to reduce search depth. We integrate our approach with DreamCoder and demonstrate faster domain proficiency with improved generalization on a range of domains, particularly when fewer example solutions are available.

Bayesian Program Learning by Decompiling Amortized Knowledge

TL;DR

This work addresses the challenge of combinatorial search in inductive program synthesis by introducing dream decompiling, a method that uses the neural recognition model's amortized knowledge to guide library chunking and reduce search depth. By formalizing a probabilistic criterion and a caching measure , the authors derive two variants (DreamDecompiler-Avg and DreamDecompiler-PC) that restructure the search space to complement the learned search policy. Empirical evaluation across six domains shows that dream decompiling improves held-out generalization and, in many cases, decreases search time, with notable gains when training data are limited. The approach offers a principled path to stronger bootstrapping in domain-general program synthesis by extracting high-value library components from amortized inference.

Abstract

DreamCoder is an inductive program synthesis system that, whilst solving problems, learns to simplify search in an iterative wake-sleep procedure. The cost of search is amortized by training a neural search policy, reducing search breadth and effectively "compiling" useful information to compose program solutions across tasks. Additionally, a library of program components is learnt to compress and express discovered solutions in fewer components, reducing search depth. We present a novel approach for library learning that directly leverages the neural search policy, effectively "decompiling" its amortized knowledge to extract relevant program components. This provides stronger amortized inference: the amortized knowledge learnt to reduce search breadth is now also used to reduce search depth. We integrate our approach with DreamCoder and demonstrate faster domain proficiency with improved generalization on a range of domains, particularly when fewer example solutions are available.
Paper Structure (14 sections, 9 equations, 6 figures, 2 tables)

This paper contains 14 sections, 9 equations, 6 figures, 2 tables.

Figures (6)

  • Figure 1: (A) Program search space for a simple library containing two primitives: a function $f : \mathbb{N} \rightarrow \mathbb{N}$ and a variable $n : \mathbb{N}$. Red path highlights the program $f(f(n))$. (B) Restructured search space after $f \circ f$ is chunked into a new primitive $g$, illustrating the breadth-depth trade off.
  • Figure 2: Positive feedback loop between searching for program solutions and learning to simplify search in DreamCoder (black arrows). In dream decompiling (orange arrow) the knowledge learnt to reduce search breath directly influences the knowledge learnt to reduce search depth.
  • Figure 3: Program trees with functions (red subtrees) considered for caching. The probability of being generated by $q$ decreases with an increase in nodes. Arrows indicate changes where caching becomes more beneficial. Caching the function in the first program is unhelpful, as the program remains difficult to generate. Caching the same function in the second program is more helpful, transitioning the program from relatively unlikely to likely. Caching the function in the third program is even more helpful: although post-cache sample probability is equal to the second, generating the third program was initially much more unlikely.
  • Figure 4: Example tasks from each domain tested as part of the evaluation. Figures taken from ellis2021dreamcoder.
  • Figure 5: (A) Performance in deterministic program domains using the learnt library and recognition model of each wake-sleep cycle. Row 1 displays test set accuracy. Row 2 shows the average search time for test set solutions: solid lines represent the time averaged across all tasks, while dotted lines display the time averaged over solved tasks only. (B) Performance with probabilistic programs. The left graph shows the marginal likelihood of strings in each task, given the learnt library. The right graph shows the posterior predictive probability of held-out strings, given the programs inferred from the task's observed strings. (C) Percentage of test tasks solved using the top 1 or top 2 functions chunked during the first 3 or 5 cycles (C) respectively. All results are based on three random seeds with ±1 standard deviation.
  • ...and 1 more figures