NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Quantifying the probable approximation error of probabilistic inference programs

Marco F. Cusumano-Towner, Vikash K. MansinghkaarXiv 2016

Introduction

In probabilistic machine learning, approximate inference techniques such as Markov Chain Monte Carlo (MCMC) and Variational Inference (VI) are essential for estimating posterior distributions. However, a significant "black box" problem remains: how can we verify if these approximations are accurate? Measuring the true error—the Kullback-Leibler (KL) divergence between the approximation and the unknown true target—is typically impossible. Practitioners often rely on predictive performance on held-out data, but this can be misleading; a model might predict well even if the inference has failed to converge.

This paper introduces Subjective Divergence ($D_{SBJ}$), a novel technique to quantify approximation error by treating the inference algorithm itself as a probabilistic model. By using auxiliary "meta-inference" programs, the authors provide a practical bound on the symmetrized KL divergence, enabling researchers to detect implementation bugs and track convergence even when the true posterior is unknown.

Methodology: Estimating Subjective Divergence

The core contribution is a practical bound on the symmetrized KL divergence. This bound is termed "subjective" because its validity relies on the user's confidence in two auxiliary programs:

  1. Reference Inference Program: A trusted, high-quality sampler (e.g., a very long MCMC run) that acts as a proxy for the ground truth.
  2. Meta-Inference Program: An auxiliary program that answers the question: "Given that the inference algorithm produced result $z$, what internal random choices $y$ did it probably make?"
The process for estimating Subjective Divergence using meta-inference and reference programs.

For many algorithms, the output probability density $q(z)$ is intractable. The meta-inference program allows for the construction of marginal density estimators ($\hat{q}_{IS}$ and $\hat{q}_{HM}$) to bypass this intractability. By comparing the log-weights of samples from the reference program against those from the inference program under test, researchers can estimate $D_{SBJ}$ and track convergence. The technique was implemented within the Venture probabilistic programming platform.

Evaluation and Key Results

The authors evaluated $D_{SBJ}$ across several models, including Bayesian Linear Regression, Bayesian Networks, Hidden Markov Models (HMMs), and Dirichlet Process Mixture Models (DPMMs).

Subjective divergence profiles for various inference algorithms, showing error reduction over computation time.

The experiments yielded several key insights:

  • Divergence Profiles: The method successfully generated curves showing how inference error decreases as a function of computation time or resource allocation (e.g., number of particles).
  • Algorithm Comparison: $D_{SBJ}$ clearly distinguished between different variational families and sampling kernels, identifying which methods reached lower error floors and which converged faster.
  • Catching "Invisible" Bugs: A major highlight was the detection of an ergodicity violation in a DPMM experiment. While standard predictive log-likelihood failed to signal any issue, the subjective divergence profile correctly flagged that the buggy sampler was not converging to the true posterior.

Discussion and Limitations

By focusing on symmetrized KL divergence, the authors express error in terms of unnormalized densities, which are computationally accessible. However, the approach has limitations. The tightness of the bound depends heavily on the quality of the meta-inference program; if meta-inference is poor, the bound may be too loose to be useful. Furthermore, the computational overhead of running reference and meta-inference programs adds cost to the development cycle.

Despite these challenges, subjective divergence provides a much-needed diagnostic tool for probabilistic programming, offering a way to "certify" the accuracy of complex, black-box inference algorithms. Future work aims to connect these empirical results to theoretical complexity bounds and apply the technique to a broader range of implementation errors.

Summary updated

BibTeX
@misc{cusumanotowner2016quantifying,
  author = {Marco F. Cusumano-Towner and Vikash K. Mansinghka},
  title = {{Quantifying the probable approximation error of probabilistic inference programs}},
  year = {2016},
  eprint = {1606.00068},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.00068},
}
Figure