Skip to main content
QUICK REVIEW

[Paper Review] Learning Probabilistic Programs

Yura Perov, Frank Wood|arXiv (Cornell University)|Jul 9, 2014
Bayesian Modeling and Causal InferenceComputer Science30 references6 citations
TL;DR

This paper proposes a method to automatically learn generative probabilistic program text from observed data samples using Bayesian inference in a higher-order probabilistic programming language. By treating program synthesis as probabilistic inference over program text with a hierarchical prior, the approach successfully infers sampler programs for distributions like Bernoulli from data and other known samplers, demonstrating that MCMC inference can generalize to nontrivial distributions with strong empirical results.

ABSTRACT

We develop a technique for generalising from data in which models are samplers represented as program text. We establish encouraging empirical results that suggest that Markov chain Monte Carlo probabilistic programming inference techniques coupled with higher-order probabilistic programming languages are now sufficiently powerful to enable successful inference of this kind in nontrivial domains. We also introduce a new notion of probabilistic program compilation and show how the same machinery might be used in the future to compile probabilistic programs for efficient reusable predictive inference.

Motivation & Objective

  • To investigate whether probabilistic programming languages can automatically infer generative model programs from observed data samples.
  • To explore the feasibility of using Bayesian inference over program text to discover efficient sampling procedures, such as those for the Bernoulli distribution.
  • To develop a framework for probabilistic program compilation—learning program text that directly generates posterior samples—bypassing traditional inference pipelines.
  • To assess whether hierarchical generative priors over program text can enable generalization across different distribution types using only sample data.
  • To lay the foundation for automated discovery of efficient sampling algorithms, akin to hand-crafted methods like Marsaglia or Box-Muller.

Proposed method

  • A hierarchical generative model is defined over program text, encoding prior beliefs about the structure and complexity of probabilistic programs.
  • Markov Chain Monte Carlo (MCMC) inference is used to sample from the posterior distribution over program text, conditioned on observed data samples.
  • The inference process evaluates program text via a runtime interpreter, checking whether the output distribution matches the observed data through summary statistics.
  • The method leverages higher-order features of the probabilistic programming language, including first-class functions and evaluation (eval), to enable recursive and modular program construction.
  • A leave-one-out experimental design is used: known sampler programs for some distributions are used to infer the program text for a left-out distribution, using only observed samples from that distribution.
  • The framework supports probabilistic program compilation by learning a new program that directly generates samples matching the posterior distribution of interest.

Experimental results

Research questions

  • RQ1Can MCMC inference over program text in a higher-order probabilistic programming language successfully infer generative models from observed data samples?
  • RQ2Can a hierarchical prior over program structure enable generalization to new distribution types, such as Bernoulli, using only sample data and known samplers for other distributions?
  • RQ3Is it feasible to automatically discover efficient sampling procedures—akin to hand-crafted algorithms like Marsaglia or Box-Muller—through probabilistic inference over program text?
  • RQ4To what extent can probabilistic program compilation be achieved by learning program text that directly generates posterior samples, bypassing explicit inference?
  • RQ5Does the use of a generative prior over program text regularize inference toward more readable, concise, and reusable sampling procedures?

Key findings

  • The method successfully inferred a sampler program for the Bernoulli distribution in leave-one-out experiments, using only observed samples and known samplers for other distributions.
  • The inferred program text generated samples with summary statistics matching the true data distribution, indicating strong generalization performance.
  • Empirical results show that MCMC inference over program text can effectively explore complex, high-dimensional spaces of probabilistic programs and locate high-posterior-probability programs.
  • The approach demonstrates that higher-order probabilistic programming languages with eval support enable powerful, flexible inference over program structure, enabling automatic discovery of sampling procedures.
  • The inferred compiled samplers were found to be close to the exact posterior distribution, suggesting the feasibility of probabilistic program compilation as a new paradigm.
  • The results suggest that automated discovery of efficient sampling algorithms—previously developed manually over decades—may now be achievable through probabilistic inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.