# Automatic Variational Inference in Stan

arXiv: https://arxiv.org/abs/1506.03431 · HTML: https://mlsanity.com/paper/1506.03431/

## Key facts

- Cited by 24 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 10 Jun 2015.

## Built on by (most cited first, 24 of 24)

- [Challenges and Opportunities in High-dimensional Variational Inference](https://mlsanity.com/paper/2103.01085/) (2021)
- [Cauchy-Schwarz Regularized Autoencoder](https://mlsanity.com/paper/2101.02149/) (2021)
- [Smoothness Analysis for Probabilistic Programs with Application to Optimised Variational Inference](https://mlsanity.com/paper/2208.10530/) (2022)
- [Evaluating Sensitivity to the Stick-Breaking Prior in Bayesian Nonparametrics](https://mlsanity.com/paper/2107.03584/) (2021)
- [Hierarchical Matrix Completion for the Prediction of Properties of Binary Mixtures](https://mlsanity.com/paper/2410.06060/) (2024)
- [Bayesian Inverse Reinforcement Learning for Collective Animal Movement](https://mlsanity.com/paper/2009.04003/) (2020)
- [Querying Labelled Data with Scenario Programs for Sim-to-Real Validation](https://mlsanity.com/paper/2112.00206/) (2021)
- [Quasi Black-Box Variational Inference with Natural Gradients for Bayesian Learning](https://mlsanity.com/paper/2205.11568/) (2022)
- [Sparse online variational Bayesian regression](https://mlsanity.com/paper/2102.12261/) (2021)
- [Choice functions based multi-objective Bayesian optimisation](https://mlsanity.com/paper/2110.08217/) (2021)
- [Rethinking Variational Inference for Probabilistic Programs with Stochastic Support](https://mlsanity.com/paper/2311.00594/) (2023)
- [Variational Bayes survival analysis for unemployment modelling](https://mlsanity.com/paper/2102.02295/) (2021)
- [Simplifying deflation for non-convex optimization with applications in Bayesian inference and topology optimization](https://mlsanity.com/paper/2201.11926/) (2022)
- [Manifold Gaussian Variational Bayes on the Precision Matrix](https://mlsanity.com/paper/2210.14598/) (2022)
- [Quantification of Uncertainties in Probabilistic Deep Neural Network by Implementing Boosting of Variational Inference](https://mlsanity.com/paper/2503.13909/) (2025)
- [An Image is Worth K Topics: A Visual Structural Topic Model with Pretrained Image Embeddings](https://mlsanity.com/paper/2504.10004/) (2025)
- [Semi-supervised Clustering Through Representation Learning of Large-scale EHR Data](https://mlsanity.com/paper/2505.20731/) (2025)
- [A Multilayer Correlated Topic Model](https://mlsanity.com/paper/2101.02028/) (2021)
- [Modeling and mitigation of occupational safety risks in dynamic industrial environments](https://mlsanity.com/paper/2205.00894/) (2022)
- [Variational Inference for Bayesian Bridge Regression](https://mlsanity.com/paper/2205.09515/) (2022)
- [Push: Concurrent Probabilistic Programming for Bayesian Deep Learning](https://mlsanity.com/paper/2306.06528/) (2023)
- [An Embedded Diachronic Sense Change Model with a Case Study from Ancient Greek](https://mlsanity.com/paper/2311.00541/) (2023)
- [Streaming Bayesian Modeling for predicting Fat-Tailed Customer Lifetime Value](https://mlsanity.com/paper/2312.00373/) (2023)
- [Stepwise Variational Inference with Vine Copulas](https://mlsanity.com/paper/2603.22959/) (2026)

## Abstract (arXiv)

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.
