[Paper Review] Bayesian Optimization for Probabilistic Programs
This paper introduces BOPP, the first general-purpose framework for marginal maximum a posteriori (MMAP) estimation in probabilistic programs using Bayesian optimization. By leveraging source-code-aware Gaussian processes and problem-independent hyperpriors, BOPP enables efficient optimization of latent variables while marginalizing out others, achieving significant performance gains over existing tools in simulation-based design and parameter tuning tasks.
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.
Motivation & Objective
- To address the lack of general-purpose optimization support in probabilistic programming systems for marginal maximum a posteriori (MMAP) estimation.
- To enable optimization of arbitrary subsets of sampled variables in probabilistic programs while marginalizing out the rest using existing inference engines.
- To develop a Bayesian optimization framework that directly exploits source code structure for improved efficiency and robustness.
- To support unbounded optimization and implicit constraint satisfaction in complex simulation-based models.
- To demonstrate the framework's effectiveness in real-world engineering design and parameter optimization tasks.
Proposed method
- The framework uses code transformations to expose the evidence of any probabilistic program as a differentiable objective for optimization.
- It employs a novel source-code-aware Gaussian process (GP) surrogate model that scales inputs and outputs to ±1 for stability and generalization.
- A problem-independent GP hyperprior is defined over length scales and noise terms using log-normal priors on hyperparameters, enabling robust initialization without domain knowledge.
- The method integrates with existing probabilistic programming systems like Anglican, using ABC likelihoods to condition on simulator outputs and estimate model evidence.
- Optimization proceeds via expected improvement acquisition, with iterative evaluation of the probabilistic program to refine the GP surrogate and locate optimal variable settings.
- Implicit constraints are satisfied through the structure of the probabilistic program and the GP's ability to model complex, non-linear response surfaces.
Experimental results
Research questions
- RQ1Can Bayesian optimization be effectively applied to general probabilistic programs for MMAP estimation without requiring model-specific adaptation?
- RQ2How can a problem-independent hyperprior for Gaussian processes be designed to enable robust, out-of-the-box optimization across diverse probabilistic programs?
- RQ3To what extent can source-code awareness improve the efficiency and convergence of Bayesian optimization in simulation-based inference settings?
- RQ4Can the framework handle unbounded optimization and implicit constraints naturally through probabilistic program structure?
- RQ5How does the proposed method compare in performance to existing optimization packages on real-world engineering and machine learning tasks?
Key findings
- BOPP achieved significant performance improvements over prominent existing optimization packages in simulation-based engineering design tasks.
- The framework successfully optimized radiator power allocation in a house-heating simulation, reducing temperature variance across 8 locations by improving homogeneity of thermal distribution.
- After 100 iterations, BOPP found a configuration that produced a more uniform temperature distribution than random initialization, as confirmed by visual heat maps in Figure 1.
- The evidence convergence plot in Figure 1 shows stable and monotonic improvement in model evidence, with median evidence increasing and interquartile range narrowing over iterations.
- The use of problem-independent hyperpriors enabled effective optimization without manual tuning, demonstrating robustness across different problem scales and structures.
- The integration with ABC likelihoods allowed effective utility evaluation in deterministic simulators by modeling discrepancies from target outcomes, enabling MMAP estimation in stochastic environments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.