Efficient synthesis of probabilistic programs
Authors:
Open Access
- 3 June 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 208-217
Abstract
We show how to automatically synthesize probabilistic programs from real-world datasets. Such a synthesis is feasible due to a combination of two techniques: (1) We borrow the idea of ``sketching'' from synthesis of deterministic programs, and allow the programmer to write a skeleton program with ``holes''. Sketches enable the programmer to communicate domain-specific intuition about the structure of the desired program and prune the search space, and (2) we design an efficient Markov Chain Monte Carlo (MCMC) based synthesis algorithm to instantiate the holes in the sketch with program fragments. Our algorithm efficiently synthesizes a probabilistic program that is most consistent with the data. A core difficulty in synthesizing probabilistic programs is computing the likelihood L(P | D) of a candidate program P generating data D. We propose an approximate method to compute likelihoods using mixtures of Gaussian distributions, thereby avoiding expensive computation of integrals. The use of such approximations enables us to speed up evaluation of the likelihood of candidate programs by a factor of 1000, and makes Markov Chain Monte Carlo based search feasible. We have implemented our algorithm in a tool called PSKETCH, and our results are encouraging PSKETCH is able to automatically synthesize 16 non-trivial real-world probabilistic programs.Keywords
This publication has 12 references indexed in Scilit:
- Probabilistic programming2014
- Stochastic superoptimization2013
- Deriving Probability Density Functions from Probabilistic Functional Programs2013
- Dimensions in program synthesis2010
- Programming by sketching for bit-streaming programs2005
- Programming by sketching for bit-streaming programsACM SIGPLAN Notices, 2005
- On approximate approximations using Gaussian kernelsIMA Journal of Numerical Analysis, 1996
- Understanding the Metropolis-Hastings AlgorithmThe American Statistician, 1995
- A Language and Program for Complex Bayesian ModellingJournal of the Royal Statistical Society: Series D (The Statistician), 1994
- Semantics of probabilistic programsJournal of Computer and System Sciences, 1981