Stan: A Probabilistic Programming Language
By Bob Carpenter, Andrew Gelman, Matthew D. Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus A. Brubaker, Jiqiang Guo, Peter Li, Allen B. Riddell. 2017
7,506 citations recorded by the source corpus.
Stan is a probabilistic programming language for specifying statistical models. A Stan program imperatively defines a log probability function over parameters conditioned on specified data and constants. As of version 2.14.0, Stan provides full Bayesian inference for continuous-variable models through Markov chain Monte Carlo methods such as the No-U-Turn sampler, an adaptive form of Hamiltonian Monte Carlo sampling. Penalized maximum likelihood estimates are calculated using optimization methods such as the limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm. Stan is also a platform for computing log densities and their gradients and Hessians, which can be used in alternative algorithms such as variational Bayes, expectation propagation, and marginal inference using approximate integration. To this end, Stan is set up so that the densities, gradients, and Hessians, along with intermediate quantities of the algorithm such as acceptance probabilities, are easily accessible. Stan can be called from the command line using the cmdstan package, through R using the rstan package, and through Python using the pystan package. All three interfaces support sampling and optimization-based inference with diagnostics and posterior analysis. rstan and pystan also provide access to log probabilities, gradients, Hessians, parameter transforms, and specialized plotting.
Subfields: Artificial Intelligence, Statistics and Probability, Probabilistic & Bayesian Methods
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Yoshua Bengio
- Sergey Levine
- Ruslan Salakhutdinov
- Quoc V. Le
- Percy Liang
- Mohit Bansal
- David M. Blei
- Eric P. Xing
In Statistics and Probability
- David M. Blei
- Paul-Christian Burkner
- Zoubin Ghahramani
- Dustin Tran
- Aki Vehtari
- Frank D. Wood
- Andrew Gelman
- Stephan Mandt
In Probabilistic & Bayesian Methods
- David M. Blei
- Zoubin Ghahramani
- Frank D. Wood
- Michalis K. Titsias
- Dustin Tran
- Stephan Mandt
- Hongseok Yang
- Richard E. Turner
Citations in the corpus
- What can the brain teach us about building artificial intelligence? (2016, background): “& Gentner, D. (2007) Nonintentional analogical inference in text comprehension.”
- Foundation Posteriors for Approximate Probabilistic Inference (2022, positive): “To demonstrate the foundation posterior, we meta-amortize inference over a set of standard Stan [12] programs from PosteriorDB [43], a benchmark dataset for evaluating inference algorithms [4, 5, 69, 70, 20].”
- Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyro (2019, methodology): “We compare the performance of NumPyro’s NUTS implementation with that of other frameworks (Stan [18, 19] and Pyro) in both the small and large data regimes.”
- Pyro: Deep Universal Probabilistic Programming (2018, background): “Stan (Carpenter et al. (2017)) is a domain-specific language designed for describing a restricted class of probabilistic programs and performing high-quality automated inference in those models. Church (Goodman et al. (2008)), a probabilistic dialect of Scheme, was an early universal probabilistic p”
- Forecasting at Scale (2018, neutral): “…sum of each of these components, plus noise: When the seasonality and holiday features for each observation are combined into a matrix X and the changepoint indicators a ( t ) in a matrix A , the entire model can be expressed in a few lines of Stan code [Carpenter et al., 2016], given in Listing 1.”
- Automatic differentiation in machine learning: a survey (2015, methodology): “itable here for complementing probabilistic modeling, because it relieves the user from the manual derivation of gradients for each model.24 For instance, the probabilistic programming language Stan (Carpenter et al., 2016) implements automatic Bayesian inference based on HMC and the No-U-Turn sampl”
- Edward: A library for probabilistic modeling, inference, and criticism (2016, neutral): “, 2015), Stan (Carpenter et al., 2016), andWebPPL (Goodman and Stuhlmüller, 2014).”
- Inference Compilation and Universal Probabilistic Programming (2016, methodology): “Probabilistic programming systems such as STAN (Carpenter et al., 2015), BUGS (Lunn et al.”
- The Problem of Infra-marginality in Outcome Tests for Discrimination (2016, methodology): “∗We thank Cheryl Phillips and Vignesh Ramachandran of the Stanford Computational Journalism Lab for helping to compile the North Carolina traffic stop data, and the John S. and James L. Knight Foundation for partial support of this research.”
- Probabilistic programming with programmable inference (2018, methodology): “Prominent examples of language/inference strategy pairs include Stan [3] with Hamiltonian Monte Carlo inference [2]; WebPPL [17] with Single-Variable Metropolis-Hastings inference, Black Box variational inference, and Hamiltonian Monte Carlo inference; and Angli-can [47] with particle Gibbs…”
- Bayesian Workflow (2020, neutral): “Some guidance is given in the Stan User’s Guide (Stan Development Team, 2020), and we are working on a book on Bayesian workflow using Stan to provide such a resource to novice and experienced statisticians alike.”
- Reweighted Data for Robust Probabilistic Models (2016, methodology): “Stan provides MAP estimation through limited-memory Broyden-Fletcher-Goldfarb-Shanno ( L - BFGS ) optimization (Nocedal and Wright, 2006); variational inference through automatic differentiation variational inference ( ADVI ) (Kucukelbir et al., 2015); and Hamiltonian Monte Carlo simulation through ”
- The statistical significance filter leads to overoptimistic expectations of replicability (2018, methodology): “Carpenter, B., German, A., Hoffman, M., Lee, D., Goodrich, B., Betancourt, M., ... Riddell, A. (2016).”
- When to Worry about Sensitivity Bias: A Social Reference Theory and Evidence from 30 Years of List Experiments (2020, methodology): “We conduct Bayesian estimation using Stan (Carpenter et al. 2017), adopting the default improper uniform priors for δ , μ , and τ and restricting τ to be non-negative.”
- Distributed Bayesian Learning with Stochastic Natural Gradient Expectation Propagation and the Posterior Server (2015, methodology): “We also compared the relative difference between the estimated posterior mean and that estimated from a long run of the No-U-Turn sampler (Hoffman and Gelman, 2014) as implemented in Stan (Carpenter et al., 2017) with 4 chains and 50000 iterations.”
- Bayesian Item Response Modeling in R with brms and Stan (2019, methodology): “pt_delta reduces or ideally eliminates the number of \divergent transition" that indicate problems of the sampler exploring the full posterior distribution and thus bias the posterior estimates (Carpenter et al. 2017;Homan and Gelman 2014). From the standard outputs (not shown here), we can see”