# Bayesian Optimization for Probabilistic Programs

arXiv: https://arxiv.org/abs/1707.04314 · HTML: https://mlsanity.com/paper/1707.04314/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 13 Jul 2017.

## Built on by (most cited first, 3 of 3)

- [End-to-End Learning of Deep Kernel Acquisition Functions for Bayesian Optimization](https://mlsanity.com/paper/2111.00639/) (2021)
- [VISA: Variational Inference with Sequential Sample-Average Approximations](https://mlsanity.com/paper/2403.09429/) (2024)
- [Bifidelity Karhunen-Lo`eve Expansion Surrogate with Active Learning for Random Fields](https://mlsanity.com/paper/2511.03756/) (2025)

## Abstract (arXiv)

We present the first general purpose framework for marginal maximum a posteriori estimation of probabilistic program variables. By using a series of code transformations, the evidence of any probabilistic program, and therefore of any graphical model, can be optimized with respect to an arbitrary subset of its sampled variables. To carry out this optimization, we develop the first Bayesian optimization package to directly exploit the source code of its target, leading to innovations in problem-independent hyperpriors, unbounded optimization, and implicit constraint satisfaction; delivering significant performance improvements over prominent existing packages. We present applications of our method to a number of tasks including engineering design and parameter optimization.
