- Introduced by
- Fujisawa & Eguchi (2008); Futami, Sato & Sugiyama (2018)
- Year
- 2008-2018
- Type
- Robust approximate Bayesian inference
- Family
- Bayesian / computational
What does it do?
Robust variational inference (RVI) modifies standard variational inference so that the fitted approximation is less sensitive to outliers and model misspecification.
The likelihood term is replaced by a robustified version built from a density power (beta-) divergence, while the KL term against the prior is retained. The aim is a posterior approximation that stays stable when part of the data departs from the assumed model.
The intuition behind the method
Standard variational inference has a likelihood term that can be dominated by a few observations the model finds very unlikely, pulling the approximation toward those points. Divergences of the density power type, used in the robust statistics literature, are designed so that such observations have limited influence on the estimate. The approximation then tracks the bulk of the data more closely. The cost is a tuning parameter that sets how much robustness is traded against efficiency under the assumed model.
History
Fujisawa and Eguchi (2008) are generally credited with divergence-based approaches to robust estimation, and the density power divergence has a longer lineage in the robust statistics literature. Ghosh and Basu (2016) applied the density power divergence to robust Bayesian estimation, the divergence family used in the surrogate step. Futami, Sato and Sugiyama (2018) proposed variational inference based on robust divergences, presented at AISTATS 2018.
When to use it
Choose robust variational inference when the data are likely to include outliers, recording errors, or observations that violate the model's core assumptions, and when a full MCMC sampler is too slow for the data size or model complexity. It is most relevant to large or hierarchical models where misspecification is expected and refitting is costly. Do not use it when the data are clean and well described by the assumed likelihood, because the robustness parameter then adds bias without a corresponding benefit. It is also the wrong tool when exact posterior uncertainty is the goal, since variational approximations of this kind generally understate posterior variance and the robust objective does not change that. For small samples, a heavy-tailed likelihood fitted by MCMC may be the more transparent option.
Limitations and considerations
- Choosing the tuning parameter needs cross-validation or other diagnostics: too little robustness leaves outliers influential, while too much discards information from the bulk of the data.
- The robust objective is not a true lower bound on the log marginal likelihood under every divergence choice, so its value cannot be used directly for model comparison.
- Software support is thinner than for standard KL-based variational inference, so a custom implementation is often needed.
- Robustness to outliers does not repair structural misspecification, such as a wrong functional form, which requires revising the model itself.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Keeps the stochastic-gradient optimisation of standard variational inference, so the approach can be applied to data sets where MCMC is impractical.
- Robustness is governed by one tuning parameter, and the standard KL-based objective is recovered as beta approaches zero, so the ordinary analysis serves as a direct comparison.
- Under density power divergence formulations, the influence of a poorly fitting observation is bounded for beta > 0, so a small number of outliers cannot dominate the fit as they can under KL.
- Can be applied to complex hierarchical or deep probabilistic models in which MCMC is computationally prohibitive, with the variational family chosen as in standard VI.
Applications
- Bayesian deep learning where some training labels may be wrong.
- Probabilistic time-series models in which sensor faults produce occasional extreme values.
- Medical or genomic analyses in which a small fraction of samples may carry measurement errors.
- Clustering and mixture models fitted to contaminated samples.
- Variational autoencoders trained on scraped data that may contain corrupted examples.
How it works
How it works
The robust objective is built on a density power (beta-) divergence with tuning parameter beta > 0, in the form used by Basu and co-authors and by Ghosh and Basu (2016) for robust Bayesian estimation. In that standard form, the model density enters the first two terms through powers and the data density enters the cross term linearly: D_beta(g || f) = ∫ f^(1+beta) − (1 + 1/beta) ∫ f^beta g + (1/beta) ∫ g^(1+beta), where g is the data density and f is the model density. Under this formulation, observations that the model fits poorly have bounded influence on the estimating equations, which is the source of the robustness. As beta tends to 0 the divergence approaches the KL divergence, so the standard objective is recovered in the limit.
Formula
D_{\beta}(g \| f) = \int f^{1+\beta} - \left(1+\frac{1}{\beta}\right)\int f^{\beta} g + \frac{1}{\beta}\int g^{1+\beta}The likelihood term of the standard ELBO is replaced by the expected value, under q, of a robustified log-likelihood, written p_beta(x | theta) in the robust ELBO step. The prior term KL(q(theta) || p(theta)) is unchanged, so robustness acts only through the data term. The exact definition of p_beta, including its normalising term, depends on the chosen divergence and should be taken from Ghosh and Basu (2016) and Futami, Sato and Sugiyama (2018) before implementation. The bounded-influence property applies once the robust likelihood is defined through such a divergence.
Formula
\mathcal{L}_{\text{rob}}(q) = \mathbb{E}_{q}[\log p_{\beta}(x\mid\theta)] - \mathrm{KL}(q(\theta)\|p(\theta))A tractable variational family, most commonly mean-field Gaussian, normalising flows, or structured covariance families, is chosen to approximate the posterior. The choice is the same as in standard VI; robustness comes from the objective, not from the family.
The robust ELBO is maximised over the variational parameters with stochastic gradient ascent, using reparameterisation or score-function gradient estimators. Mini-batch sampling is what allows the method to scale to large data sets.
At convergence the optimised variational distribution serves as the robust posterior approximation. Posterior means, credible intervals, and predictive distributions are read from this approximation and are interpreted in the same way as standard VI outputs.
Common pitfalls
- A large robustness parameter introduces bias and under-uses informative observations.
- Outlier robustness is not robustness to misspecification in general: the method handles isolated anomalous points better than a systematically wrong model.
- The robust objective can have several local optima, so fits from multiple random initialisations should be compared and convergence checked before results are interpreted.
- The robust ELBO should not be reported as a model-comparison score as if it were the log marginal likelihood.
- Down-weighting extreme points is not automatically correct; some apparent outliers carry real signal and should be investigated before their influence is reduced.
Frequently asked questions
How does robust VI differ from standard variational inference?
Standard VI is built on the KL divergence, whose likelihood term can be dominated by a small number of outlying observations. Robust VI replaces it with a density power (beta-) divergence-based objective that limits the influence of any single observation, so the posterior approximation reflects the majority of the data rather than its extremes.
How do I choose the robustness tuning parameter beta?
Refit the model over a grid of beta values, starting at a small value close to standard VI. For each fit, compute held-out predictive log density (for example by cross-validation) and record the posterior means and intervals of key parameters. Choose the smallest beta beyond which predictive performance stops improving, and report how much the conclusions change across the grid. Large shifts in posterior means as beta increases indicate that a few observations are driving the fit and should be inspected. The appropriate level depends on how contaminated the data are, so no fixed value is universal.
Can I use robust VI with probabilistic programming languages like Stan or Pyro?
Stan's built-in variational routine is KL-based and does not natively support custom divergences. Frameworks that allow a user-defined ELBO, such as Pyro or NumPyro, let you replace the log-likelihood term directly, so robust VI can be implemented there. A custom implementation in a general automatic-differentiation framework is also possible.
Is robust VI suitable for small samples?
With small samples the prior is already influential, which provides some inherent robustness. Robust VI adds a second layer of protection but at the cost of additional tuning, and beta is hard to select with little data. For very small n, robust Bayesian inference via MCMC with heavy-tailed likelihoods may be more interpretable.
Does robust VI guarantee better predictions than standard VI?
No. It helps when the data are genuinely contaminated. On clean data, robust VI with beta > 0 introduces a small bias that can hurt predictive accuracy. Always compare robust and standard VI on a held-out set before committing to the robust objective.
Related methods
Sources
Futami, F., Sato, I. & Sugiyama, M. (2018). Variational inference based on robust divergences. Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS), PMLR 84:813-822.
Open publication referenceGhosh, S. & Basu, A. (2016). Robust Bayes estimation using the density power divergence. Annals of the Institute of Statistical Mathematics, 68(2), 413-437.
Open publication reference