English

Automatic Variational Inference in Stan

Machine Learning 2015-06-15 v2

Abstract

Variational inference is a scalable technique for approximate Bayesian inference. Deriving variational inference algorithms requires tedious model-specific calculations; this makes it difficult to automate. We propose an automatic variational inference algorithm, automatic differentiation variational inference (ADVI). The user only provides a Bayesian model and a dataset; nothing else. We make no conjugacy assumptions and support a broad class of models. The algorithm automatically determines an appropriate variational family and optimizes the variational objective. We implement ADVI in Stan (code available now), a probabilistic programming framework. We compare ADVI to MCMC sampling across hierarchical generalized linear models, nonconjugate matrix factorization, and a mixture model. We train the mixture model on a quarter million images. With ADVI we can use variational inference on any model we write in Stan.

Keywords

Cite

@article{arxiv.1506.03431,
  title  = {Automatic Variational Inference in Stan},
  author = {Alp Kucukelbir and Rajesh Ranganath and Andrew Gelman and David M. Blei},
  journal= {arXiv preprint arXiv:1506.03431},
  year   = {2015}
}
R2 v1 2026-06-22T09:51:18.362Z