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风格接口来运行算法、操作与可视化其结果。