NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bayesian Workflow

Andrew Gelman, Aki Vehtari, Daniel Simpson, Charles C. Margossian, Bob Carpenter, Yuling Yao, Lauren Kennedy, Jonah Gabry, Paul‐Christian Bürkner, Martin ModrákarXiv 2020 · DOI

Abstract

The Bayesian approach to data analysis provides a powerful way to handle uncertainty in all observations, model parameters, and model structure using probability theory. Probabilistic programming languages make it easier to specify and fit Bayesian models, but this still leaves us with many options regarding constructing, evaluating, and using these models, along with many remaining challenges in computation. Using Bayesian inference to solve real-world problems requires not only statistical skills, subject matter knowledge, and programming, but also awareness of the decisions made in the process of data analysis. All of these aspects can be understood as part of a tangled workflow of applied Bayesian statistics. Beyond inference, the workflow also includes iterative model building, model checking, validation and troubleshooting of computational problems, model understanding, and model comparison. We review all these aspects of workflow in the context of several examples, keeping in mind that in practice we will be fitting many models for any given problem, even if only a subset of them will ultimately be relevant for our conclusions.

Introduction

In many academic settings, Bayesian analysis is taught as a single mathematical step: the calculation of a posterior distribution given a model and a dataset. However, in applied practice, the process is rarely so linear. Practitioners often find themselves navigating a "tangled" path of choosing priors, debugging non-convergent samplers, and refining models that produce physically impossible predictions. This paper formalizes the Bayesian workflow, moving beyond simple inference to provide a rigorous framework for model building, computational troubleshooting, and validation.

The Bayesian Workflow Framework

The authors argue that the lack of a formalized workflow often leads to "cookbook" analysis or the dismissal of critical computational red flags. By treating model building as a disciplined engineering project rather than a one-off calculation, researchers can ensure their statistical results are truly trustworthy. The core of this framework is a series of iterative loops designed to catch errors early and refine model accuracy.

A comprehensive flowchart illustrating the iterative and 'tangled' nature of the Bayesian workflow.

Key Methodological Components

  • Prior Predictive Checking: Before involving real data, researchers simulate data from the model to ensure the chosen priors produce logically plausible outcomes.
  • The "Folk Theorem" of Statistical Computing: This heuristic suggests that computational failures (such as divergent transitions in MCMC) are usually symptoms of a flawed model or poor parameterization, rather than just a "bad" algorithm.
  • Fake-Data Simulation and SBC: By fitting the model to data it generated itself, researchers can verify if the model can recover known parameters. Simulation-Based Calibration (SBC) extends this to check if the entire inference engine is self-consistent.
  • Model Stacking: Rather than searching for a single "true" model, the workflow encourages fitting a series of models and combining their predictive power.

Case Studies in Applied Workflow

The paper illustrates these principles through several diverse examples:

  • Golf Putting: Demonstrates how a simple logistic regression can fail and must be replaced by a mechanistic, geometry-based model that respects physical constraints.
  • Planetary Motion: Uses a simulated mechanistic model to show how to diagnose multimodality in the posterior, distinguishing between physical reality and mathematical artifacts.
  • Election Forecasting: Discusses the challenges of model expansion and the risks of "double-dipping" in high-stakes predictive modeling.

Insights for Practitioners

A central theme of the paper is the concept of "Fit Fast, Fail Fast." Starting with simplified versions of a model allows researchers to catch conceptual errors before committing to days of computation. Furthermore, the authors emphasize that computational problems are data. If a Hamiltonian Monte Carlo (HMC) sampler struggles, it is often revealing deep geometric issues in the model—such as "funnels" or "long tails"—that require reparameterization or more informative priors.

By viewing models as modular components within a network, researchers can move along a "ladder of abstraction," justifying every step of increasing complexity. This mindset transforms troubleshooting from a frustrating hurdle into a diagnostic tool for better science.

Conclusion and Future Directions

While the proposed workflow is comprehensive, it requires significant domain expertise and a healthy degree of statistical skepticism. Future work in this area focuses on automation within software ecosystems like Stan to provide automated SBC or prior predictive alerts. The ultimate goal is to move from individual case studies to a formalized "theory of workflow" that can be integrated into standard statistical education, making robust Bayesian analysis accessible to a wider range of researchers.

Summary updated

BibTeX
@misc{gelman2020bayesian,
  author = {Andrew Gelman and Aki Vehtari and Daniel Simpson and Charles C. Margossian and Bob Carpenter and Yuling Yao and Lauren Kennedy and Jonah Gabry and Paul‐Christian Bürkner and Martin Modrák},
  title = {{Bayesian Workflow}},
  year = {2020},
  eprint = {2011.01808},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.01808},
}
Figure