PyVBMC is a Python implementation of the Variational Bayesian Monte Carlo (VBMC) algorithm for posterior and model inference for black-box computational models (Acerbi, 2018, 2020). VBMC is an approximate inference method designed for efficient parameter estimation and model assessment when model evaluations are mildly-to-very expensive (e.g., a second or more) and/or noisy. Specifically, VBMC computes: - a flexible (non-Gaussian) approximate posterior distribution of the model parameters, from which statistics and posterior samples can be easily extracted; - an approximation of the model evidence or marginal likelihood, a metric used for Bayesian model selection. PyVBMC can be applied to any computational or statistical model with up to roughly 10-15 continuous parameters, with the only requirement that the user can provide a Python function that computes the target log likelihood of the model, or an approximation thereof (e.g., an estimate of the likelihood obtained via simulation or Monte Carlo methods). PyVBMC is particularly effective when the model takes more than about a second per evaluation, with dramatic speed-ups of 1-2 orders of magnitude when compared to traditional approximate inference methods. Extensive benchmarks on both artificial test problems and a large number of real models from the computational sciences, particularly computational and cognitive neuroscience, show that VBMC generally - and often vastly - outperforms alternative methods for sample-efficient Bayesian inference, and is applicable to both exact and simulator-based models (Acerbi, 2018, 2019, 2020). PyVBMC brings this state-of-the-art inference algorithm to Python, along with an easy-to-use Pythonic interface for running the algorithm and manipulating and visualizing its results.
翻译:PyVBMC是变分贝叶斯蒙特卡洛(VBMC)算法的Python实现,用于黑箱计算模型的后验推断与模型评估(Acerbi, 2018, 2020)。VBMC是一种近似推断方法,专为模型评估成本中等至高昂(例如每次评估耗时一秒以上)和/或存在噪声的场景下实现高效参数估计与模型评估而设计。具体而言,VBMC可计算:- 模型参数的灵活(非高斯)近似后验分布,可从中轻松提取统计量和后验样本;- 模型证据或边际似然的近似值,这是用于贝叶斯模型选择的度量指标。PyVBMC适用于参数规模不超过10-15个连续参数的任何计算模型或统计模型,唯一要求是用户能够提供计算目标对数似然(或其近似值,例如通过模拟或蒙特卡洛方法获得的似然估计)的Python函数。当模型每次评估耗时超过一秒时,PyVBMC尤显高效,相比传统近似推断方法可实现1-2个数量级的加速。基于人工测试问题及计算科学领域(特别是计算与认知神经科学)大量真实模型的广泛基准测试表明,VBMC在样本高效贝叶斯推断中普遍(且通常显著)优于替代方法,并适用于精确模型与基于模拟的模型(Acerbi, 2018, 2019, 2020)。PyVBMC将这一先进推断算法引入Python,并提供易于使用的Python风格接口,用于运行算法、操作和可视化其结果。