English

Leveraging Sparsity to Improve No-U-Turn Sampling Efficiency for Hierarchical Bayesian Models

Computation 2026-03-04 v1 Methodology

Abstract

Analysts routinely use Bayesian hierarchical models to understand natural processes. The no-U-turn sampler (NUTS) is the most widely used algorithm to sample high-dimensional, continuously differentiable models. But NUTS is slowed by high correlations, especially in high dimensions, limiting the complexity of applied analyses. Here we introduce Sparse NUTS (SNUTS), which preconditions (decorrelates and descales) posteriors using a sparse precision matrix (QQ). We use Template Model Builder (TMB) to efficiently compute QQ from the mode of the Laplace approximation to the marginal posterior, then pass the preconditioned posterior to NUTS through the Bayesian software Stan for sampling. We apply SNUTS to seventeen diverse case studies to demonstrate that preconditioning with QQ converges one to two orders of magnitude faster than Stan's industry standard diagonal or dense preconditioners. SNUTS also outperforms preconditioning with the inverse of the covariance estimated with Pathfinder variational inference. SNUTS does not improve sampling efficiency for models with the highly varying curvature found in funnels, wide tails, or multiple modes. SNUTS is most advantageous, and can be scaled beyond 10410^4 parameters, in the presence of high dimensionality, sparseness, and high correlations, all of which are widespread in applied statistics. An open-source implementation of SNUTS is provided in the R package SparseNUTS.

Keywords

Cite

@article{arxiv.2603.02437,
  title  = {Leveraging Sparsity to Improve No-U-Turn Sampling Efficiency for Hierarchical Bayesian Models},
  author = {Cole C. Monnahan and Kasper Kristensen and James T. Thorson and Bob Carpenter},
  journal= {arXiv preprint arXiv:2603.02437},
  year   = {2026}
}

Comments

26 pages, 12 figures including appendices

R2 v1 2026-07-01T11:00:07.716Z