Bayesian cross-validation by parallel Markov chain Monte Carlo

Alex Cooper*, Aki Vehtari, Catherine Forbes, Dan Simpson, Lauren Kennedy

*Corresponding author for this work

Research output: Contribution to journalArticleScientificpeer-review

13 Downloads (Pure)


Brute force cross-validation (CV) is a method for predictive assessment and model selection that is general and applicable to a wide range of Bayesian models. Naive or ‘brute force’ CV approaches are often too computationally costly for interactive modeling workflows, especially when inference relies on Markov chain Monte Carlo (MCMC). We propose overcoming this limitation using massively parallel MCMC. Using accelerator hardware such as graphics processor units, our approach can be about as fast (in wall clock time) as a single full-data model fit. Parallel CV is flexible because it can easily exploit a wide range data partitioning schemes, such as those designed for non-exchangeable data. It can also accommodate a range of scoring rules. We propose MCMC diagnostics, including a summary of MCMC mixing based on the popular potential scale reduction factor (R^) and MCMC effective sample size (ESS^) measures. We also describe a method for determining whether an R^ diagnostic indicates approximate stationarity of the chains, that may be of more general interest for applications beyond parallel CV. Finally, we show that parallel CV and its diagnostics can be implemented with online algorithms, allowing parallel CV to scale up to very large blocking designs on memory-constrained computing accelerators.

Original languageEnglish
Article number119
Pages (from-to)1-15
Number of pages15
Issue number4
Publication statusPublished - Aug 2024
MoE publication typeA1 Journal article-refereed


  • Bayesian inference
  • Convergence diagnostics
  • Parallel computation
  • R^ statistic


Dive into the research topics of 'Bayesian cross-validation by parallel Markov chain Monte Carlo'. Together they form a unique fingerprint.

Cite this