Abstract
Full Bayesian posteriors are rarely analytically tractable, which is why real-world Bayesian inference heavily relies on approximate techniques. Approximations generally differ from the true posterior and require diagnostic tools to assess whether the inference can still be trusted. We investigate a new approach to diagnosing approximate inference: the approximation mismatch is attributed to a change in the inductive bias by treating the approximations as exact and reverse-engineering the corresponding prior. We show that the problem is more complicated than it appears to be at first glance, because the solution generally depends on the observation. By reframing the problem in terms of incompatible conditional distributions we arrive at a natural solution: the Gibbs prior. The resulting diagnostic is based on pseudo-Gibbs sampling, which is widely applicable and easy to implement. We illustrate how the Gibbs prior can be used to discover the inductive bias in a controlled Gaussian setting and for a variety of Bayesian models and approximations.
Introduction
Bayesian inference is the gold standard for reasoning under uncertainty, but it is often computationally intractable to perform exactly. To circumvent this, researchers rely on approximate inference techniques such as Variational Inference (VI), Laplace approximations, or Markov Chain Monte Carlo (MCMC). However, these approximations are not neutral; they introduce their own "inductive biases"—unintended preferences for certain types of solutions. For example, Mean-Field VI is known to underestimate the variance of the true posterior.
Existing diagnostic tools, such as KL-divergence or Stein discrepancies, can indicate that an approximation is inaccurate, but they rarely explain how it is distorted in a way that relates back to the model's original logic. This paper introduces the Gibbs Prior, a diagnostic tool that "reverse-engineers" the inductive bias of approximate methods by finding the prior that would have made the approximation exact.
Methodology: The Gibbs Prior Framework
The core idea is to treat an approximate posterior $q(\theta|y)$ as if it were the exact result of some "implicit" prior $\tilde{\pi}(\theta)$ combined with the original likelihood $f(y|\theta)$. In a standard Bayesian setup, the posterior is proportional to the product of the likelihood and the prior. The goal is to find a prior that satisfies this relationship for the approximation.
A challenge arises because this "implicit prior" typically depends on the specific observation $y$. To derive a single, representative prior for the entire inference method, the authors utilize pseudo-Gibbs sampling. They define a Markov chain that alternates between the parameter space and the observation space:
- Sample Data: Given a current parameter $\theta_t$, sample a synthetic observation $y$ from the model's likelihood $f(y|\theta_t)$.
- Sample Parameters: Given that $y$, sample a new parameter $\theta_{t+1}$ from the approximation $q(\theta|y)$.
The stationary distribution of this chain is the Gibbs Prior ($\pi_G$). If the approximation is perfect, the Gibbs Prior matches the original prior. Any shift between the two reveals the systematic bias of the inference algorithm.
Key Results and Applications
The Gibbs Prior was evaluated across several scenarios, ranging from controlled toy models to high-dimensional financial time-series.
Recovering Known Biases
In a Gaussian toy model, the Gibbs Prior successfully captured the "compactness" bias of VI (underestimating variance) and the "loss of correlation" bias (ignoring dependencies between variables). This demonstrates that approximation error can be effectively viewed as an unintended change to the model's prior.
Benchmarking Algorithms in Stochastic Volatility
The diagnostic was applied to a 100-dimensional stochastic volatility model using S&P 500 data. The results confirmed the accuracy of the NUTS sampler, whose Gibbs Prior was nearly identical to the original. In contrast, ADVI (Automatic Differentiation Variational Inference) showed a significant discrepancy, revealing that it was substantially over-simplifying the volatility structure of the time series.
Conclusion and Future Directions
The Gibbs Prior provides a versatile and interpretable diagnostic for Bayesian inference. Unlike many existing methods, it only requires the ability to sample from the approximation, making it widely applicable to various MCMC and VI techniques. While the computational cost of running the Gibbs chain can be high for complex models, the insights gained—viewing algorithmic bias as a prior shift—offer a unique path toward understanding and potentially correcting the shortcomings of approximate inference.
Summary updated