We present the learned harmonic mean estimator with normalizing flows - a robust, scalable and flexible estimator of the Bayesian evidence for model comparison. Since the estimator is agnostic to sampling strategy and simply requires posterior samples, it can be applied to compute the evidence using any Markov chain Monte Carlo (MCMC) sampling technique, including saved down MCMC chains, or any variational inference approach. The learned harmonic mean estimator was recently introduced, where machine learning techniques were developed to learn a suitable internal importance sampling target distribution to solve the issue of exploding variance of the original harmonic mean estimator. In this article we present the use of normalizing flows as the internal machine learning technique within the learned harmonic mean estimator. Normalizing flows can be elegantly coupled with the learned harmonic mean to provide an approach that is more robust, flexible and scalable than the machine learning models considered previously. We perform a series of numerical experiments, applying our method to benchmark problems and to a cosmological example in up to 21 dimensions. We find the learned harmonic mean estimator is in agreement with ground truth values and nested sampling estimates. The open-source harmonic Python package implementing the learned harmonic mean, now with normalizing flows included, is publicly available.
翻译:我们提出了基于归一化流的学习调和平均估计器——一种用于模型比较的鲁棒、可扩展且灵活的贝叶斯证据估计器。由于该估计器对采样策略具有不可知性,仅需后验样本即可工作,因此可应用于任何马尔可夫链蒙特卡洛(MCMC)采样技术(包括已存储的MCMC链)或任何变分推断方法中计算证据。学习调和平均估计器是近期提出的方法,其通过机器学习技术学习合适的内部重要性采样目标分布,以解决原始调和平均估计器方差爆炸的问题。本文提出在学匀调和平均估计器内部使用归一化流作为机器学习技术。归一化流可与学习调和平均估计器优雅结合,提供比先前考虑的机器学习模型更鲁棒、灵活和可扩展的解决方案。我们进行了一系列数值实验,将本方法应用于基准问题以及维度高达21的宇宙学示例。实验表明学习调和平均估计器与真实值及嵌套抽样估计结果一致。实现学习调和平均估计器的开源harmonic Python软件包(现已包含归一化流模块)已公开发布。