Abstract
We provide the first convergence guarantee for full black-box variational inference (BBVI), also known as Monte Carlo variational inference. While preliminary investigations worked on simplified versions of BBVI (e.g., bounded domain, bounded support, only optimizing for the scale, and such), our setup does not need any such algorithmic modifications. Our results hold for log-smooth posterior densities with and without strong log-concavity and the location-scale variational family. Also, our analysis reveals that certain algorithm design choices commonly employed in practice, particularly, nonlinear parameterizations of the scale of the variational approximation, can result in suboptimal convergence rates. Fortunately, running BBVI with proximal stochastic gradient descent fixes these limitations, and thus achieves the strongest known convergence rate guarantees. We evaluate this theoretical insight by comparing proximal SGD against other standard implementations of BBVI on large-scale Bayesian inference problems.
Introduction
Bayesian inference is the gold standard for quantifying uncertainty, but calculating the "posterior" (what we believe after seeing data) is often computationally impossible. Black-Box Variational Inference (BBVI) solves this by turning inference into an optimization problem: we pick a simple family of distributions and tweak its parameters to match the complex posterior as closely as possible.
Despite being the engine behind popular probabilistic programming languages like Stan, Pyro, and PyMC, BBVI has lacked a rigorous convergence proof for nearly a decade. Practitioners have been choosing between different ways to parameterize the "scale" (variance) of their distributions—some using linear forms and others using nonlinear functions like softplus—without knowing if these choices would actually lead to the right answer.
The Parameterization Dilemma
The authors analyze BBVI through the lens of stochastic optimization, focusing on the reparameterization gradient and the location-scale variational family. A key technical hurdle is the Evidence Lower Bound (ELBO), the objective function BBVI tries to maximize. The authors investigated two main ways to parameterize the scale matrix:
- Linear: The scale is a Cholesky factor with positive diagonals.
- Nonlinear: The diagonals are passed through a function like
softplus(x)to ensure positivity.
They discovered a fundamental trade-off: nonlinear parameterizations make the objective "smooth" but destroy its "convexity," while linear parameterizations preserve convexity but make the objective "non-smooth" (specifically, the entropy term becomes problematic).
Proximal SGD: The "Silver Bullet"
To solve this, the authors propose using Proximal SGD. By using a proximal operator for the entropy term, they bypass the non-smoothness issue of linear parameterization. This allows them to prove a convergence rate of $O(1/\epsilon)$, which is the fastest known rate for this class of stochastic problems.
Many PPLs use nonlinear conditioners like softplus because they allow for unconstrained optimization. However, the authors prove this makes the ELBO "not strongly convex," even if the target posterior is perfectly log-concave. This leads to a "flat" landscape where optimization crawls to a halt. Linear parameterization, when paired with Proximal SGD, avoids this trap.
Empirical Results
The authors evaluated their findings on a wide range of Bayesian inference problems, including Linear Mixed Effects models, Bradley-Terry skill models, and large-scale linear regressions.
Key findings include:
- First Convergence Guarantee: Formal proof that standard BBVI converges to a stationary point under realistic assumptions.
- Superior Complexity: Proximal BBVI achieves an $\epsilon$-close solution to the global optimum in $O(1/\epsilon)$ iterations for strongly log-concave posteriors.
- Empirical Robustness: Proximal SGD was significantly more robust to poor initializations than standard SGD. While standard SGD with
softplusoften failed to converge or was extremely slow, Proximal SGD with linear parameterization consistently reached the optimum across all tested datasets.
Limitations and Future Work
While a major step forward, the results are currently restricted to the location-scale family. Extending this to more complex families, like Normalizing Flows, remains an open challenge. Additionally, the strongest results (global convergence) require the posterior to be $\mu$-strongly log-concave; it is still unclear how these guarantees extend to multi-modal distributions.
Summary updated