Variational Inference - Index

Routing Summary

A dedicated treatment of variational inference: the objective (ELBO / reverse KL), the classical mean-field + coordinate-ascent recipe, stochastic and black-box gradients, ADVI as implemented in Stan and PyMC, the reparameterization trick and variational autoencoders, normalizing-flow posteriors, and the PSIS / VSBC diagnostics. Anchored by Blei, Kucukelbir & McAuliffe (2017), Kucukelbir et al. (2017), Kingma & Welling (2013), Yao et al. (2018), Ranganath et al. (2014) and Rezende & Mohamed (2015). Fills Dream gap #33 and explains the ADVI failure recorded in SBC Case Studies.

Concept Map

ConceptNoteTypeDepends OnKey Result
VI as optimization; VI vs MCMCVariational Inference - OverviewoverviewIntroduction to Bayesian Computation; MCMC Basics; fast, scalable, biased uncertainty; must be diagnosed
ELBO and reverse KLThe ELBO and KL Divergence MinimizationconceptOverview; ELBO ; zero-forcing; ELBO value is not a fit measure
Mean-field family and CAVIMean-Field Family and Coordinate Ascent VI (CAVI)methodELBO; Gaussian target gives
SVI and BBVIStochastic and Black-Box Variational InferencemethodELBO; CAVINatural gradient ; score-function gradient; Rao-Blackwellization and control variates
ADVIAutomatic Differentiation Variational Inference (ADVI)methodELBO; CAVI; BBVI; ReparameterizationTransform to + Gaussian + standardization + autodiff; mean-field variances 0.13 vs true 0.28; optimal
Reparameterization trick and VAEReparameterization Trick and Variational AutoencodersmethodELBO; BBVI; Factor Analysis and PPCA makes the MC ELBO differentiable; amortized encoder; VAE = nonlinear PPCA with variational E-step
Normalizing-flow posteriorsNormalizing Flows for Variational InferencemethodELBO; Reparameterization; ADVI; planar/radial flows; MNIST bound 89.9 → 85.1
DiagnosticsDiagnosing Variational Inference (PSIS k-hat and VSBC)methodELBO; ADVI; SBC; Cross Validation Checking good, usable, unreliable; VSBC symmetry test; VI can over- or under-disperse

Notes

  • Variational Inference - Overview — CONTAINS: VI problem definition, VI-vs-MCMC table, intractable-evidence example (GMM), four generations of VI, explanation of the SBC/ADVI slope failure, theory summary, relevance to MMM / geo-hierarchical models / BOED / ABMs, practical decision procedure.
  • The ELBO and KL Divergence Minimization — CONTAINS: reverse KL definition, ELBO definition, evidence decomposition theorem and Jensen derivation, three readings (energy+entropy, fit−complexity, evidence−gap), EM and variational EM, support constraint / zero-forcing / light tails, forward KL and EP, why ELBO is not a fit or model-selection measure, bimodal example, Monte Carlo ELBO code.
  • Mean-Field Family and Coordinate Ascent VI (CAVI) — CONTAINS: mean-field family, optimal coordinate update with proof sketch, CAVI algorithm, Gibbs / message-passing connection, exponential-family and conditionally conjugate updates, local optima and log-sum-exp, accuracy theory (Wang & Titterington), correlated-Gaussian and linear-regression variance derivation, GMM updates with numpy code.
  • Stochastic and Black-Box Variational Inference — CONTAINS: Robbins-Monro conditions, natural gradient of the ELBO, SVI algorithm, score-function gradient theorem, Rao-Blackwellization, control variates, score-vs-reparameterization comparison table, BBVI code, kidney-disease case study.
  • Automatic Differentiation Variational Inference (ADVI) — CONTAINS: differentiable-model class, constraint transforms and Jacobian, mean-field vs full-rank Gaussian, ELBO in unconstrained space, elliptical standardization, gradient formulas, Algorithm 1 with step-size sequence, accuracy experiments (2-D Gaussian, logistic, stochastic volatility), transformation sensitivity and optimal transform, speed benchmarks, PyMC / CmdStanR usage, open issues.
  • Reparameterization Trick and Variational Autoencoders — CONTAINS: per-datapoint bound, reparameterization theorem and the three constructions, SGVB estimators A and B, AEVB algorithm, Gaussian-encoder VAE and closed-form KL, autoencoder interpretation, amortization and the amortization gap, VAE-vs-PPCA table, MNIST / Frey Face results, PyTorch VAE, links to non-centered parameterization.
  • Normalizing Flows for Variational Inference — CONTAINS: change-of-variables flow density, LOTUS, planar and radial flows with determinants, flow free-energy bound, infinitesimal (Langevin / Hamiltonian) flows, NICE and HVI as special cases, 2-D / MNIST / CIFAR results, annealing, planar-flow PyTorch code, caveats.
  • Diagnosing Variational Inference (PSIS k-hat and VSBC) — CONTAINS: two levels of diagnostics, PSIS definition, as Renyi-divergence finiteness, PSIS diagnostic algorithm and thresholds, reparameterization invariance, why marginal misleads, VSBC algorithm and symmetry proposition, four case studies (linear, logistic, eight schools, horseshoe), locality limitation, ArviZ code, applied decision rule.

Sources

  • Blei 2017 - Variational Inference A Review for Statisticians — Blei, D. M., Kucukelbir, A. & McAuliffe, J. D. (2017), “Variational Inference: A Review for Statisticians,” JASA 112(518). arXiv:1601.00670.
  • Kucukelbir 2017 - Automatic Differentiation Variational Inference — Kucukelbir, A., Tran, D., Ranganath, R., Gelman, A. & Blei, D. M. (2017), “Automatic Differentiation Variational Inference,” JMLR 18. arXiv:1603.00788.
  • Kingma 2013 - Auto-Encoding Variational Bayes — Kingma, D. P. & Welling, M. (2013/2014), “Auto-Encoding Variational Bayes,” ICLR. arXiv:1312.6114.
  • Yao 2018 - Yes but Did It Work Evaluating Variational Inference — Yao, Y., Vehtari, A., Simpson, D. & Gelman, A. (2018), “Yes, but Did It Work?: Evaluating Variational Inference,” ICML, PMLR 80. arXiv:1802.02538.
  • Ranganath 2014 - Black Box Variational Inference — Ranganath, R., Gerrish, S. & Blei, D. M. (2014), “Black Box Variational Inference,” AISTATS. arXiv:1401.0118.
  • Rezende 2015 - Variational Inference with Normalizing Flows — Rezende, D. J. & Mohamed, S. (2015), “Variational Inference with Normalizing Flows,” ICML. arXiv:1505.05770.