Within‐chain parallelization—Giving Stan Jet Fuel for population modeling in pharmacometrics

Casey Davis,Pavan Vaddady
DOI: https://doi.org/10.1002/psp4.13238
2024-10-29
CPT Pharmacometrics & Systems Pharmacology
Abstract:Stan is a powerful probabilistic programming language designed mainly for Bayesian data analysis. Torsten is a collection of Stan functions that handles the events (e.g., dosing events) and solves the ODE systems that are frequently present in pharmacometric models. To perform a Bayesian data analysis, most models in pharmacometrics require Markov Chain Monte Carlo (MCMC) methods to sample from the posterior distribution. However, MCMC is computationally expensive and can be time‐consuming, enough so that people will often forgo Bayesian methods for a more traditional approach. This paper shows how to speed up the sampling process in Stan by within‐chain parallelization through both multi‐threading using Stan's reduce_sum() function and multi‐processing using Torsten's group ODE solver. Both methods show substantial reductions in the time necessary to sufficiently sample from the posterior distribution compared with a basic approach with no within‐chain parallelization.
pharmacology & pharmacy
What problem does this paper attempt to address?