Skip to main content
QUICK REVIEW

[论文解读] BayesFlow: Amortized Bayesian Workflows With Neural Networks

Stefan T. Radev, Marvin Schmitt|arXiv (Cornell University)|Jun 28, 2023
Anomaly Detection Techniques and ApplicationsComputer Science被引用 3
一句话总结

BayesFlow 引入了一种基于神经网络的框架,用于近似贝叶斯推断,实现了在各种概率模型中快速、可扩展的后验与似然估计。通过在模拟数据上训练可逆流和变换器,它将推断时间从数小时缩短至毫秒级,显著加速了复杂工作流中的模型验证、校准与比较。

ABSTRACT

Modern Bayesian inference involves a mixture of computational techniques for estimating, validating, and drawing conclusions from probabilistic models as part of principled workflows for data analysis. Typical problems in Bayesian workflows are the approximation of intractable posterior distributions for diverse model types and the comparison of competing models of the same process in terms of their complexity and predictive performance. This manuscript introduces the Python library BayesFlow for simulation-based training of established neural network architectures for amortized data compression and inference. Amortized Bayesian inference, as implemented in BayesFlow, enables users to train custom neural networks on model simulations and re-use these networks for any subsequent application of the models. Since the trained networks can perform inference almost instantaneously, the upfront neural network training is quickly amortized.

研究动机与目标

  • 解决复杂模型后验估计缓慢导致的贝叶斯工作流计算瓶颈。
  • 通过在模拟数据上训练神经网络,实现近似推断,使其能泛化至新的数据与参数配置。
  • 支持端到端的贝叶斯工作流,包括后验估计、似然近似、模型比较与模型设定错误检测。
  • 提供模块化、用户友好的框架,可与深度学习和概率编程工具(如 TensorFlow 和 TensorFlow Probability)集成。
  • 在多样化科学领域中,实现高维与不可计算模型的稳健、可扩展推断。

提出的方法

  • 利用可逆神经网络(归一化流)和变换器,从模拟数据中学习近似后验与似然分布。
  • 采用配置模块对输入进行预处理(例如归一化、类型转换),并将其路由至相应的神经组件。
  • 应用摘要网络将高维数据或参数集压缩为低维嵌入,再输入至后验/似然网络。
  • 通过生成模型和先验,以基于模拟的方式训练神经网络,实现在无需重复 MCMC 或 ABC 采样的情况下进行推断。
  • 通过耦合网络实现联合推断,用于后验与似然估计,支持贝叶斯证据与预测性能的计算。
  • 与 TensorFlow 和 TensorFlow Probability 集成,实现 GPU/TPU 加速,并灵活建模潜在分布与先验。
Figure 1: BayesFlow defines a formal workflow for data generation, neural approximation, and model criticism.
Figure 1: BayesFlow defines a formal workflow for data generation, neural approximation, and model criticism.

实验结果

研究问题

  • RQ1神经网络能否在不重新训练的情况下,对多样化数据类型与模型配置实现快速、泛化的后验推断?
  • RQ2在高维参数空间中,近似似然估计在正向推断中多大程度上能有效模拟复杂模拟模型?
  • RQ3当模拟数据偏离现实时,神经网络是否仍能检测出模型设定错误?
  • RQ4与传统的 MCMC 或 ABC 方法相比,近似推断在多大程度上加速了模型验证、校准与比较?
  • RQ5在真实应用场景中,所学习的神经近似在不同数据集规模与模型复杂度下,其泛化能力如何?

主要发现

  • 即使在需要为模型验证或校准处理数千个后验分布的情况下,BayesFlow 也能在每个数据集不到一秒内完成后验推断。
  • 该框架支持 15 个以上应用领域的端到端近似推断,涵盖流行病学、神经科学、粒子物理与认知建模。
  • 通过归一化流与变换器实现的近似后验与似然估计,其精度与真实后验高度一致,经基于模拟的校准验证。
  • 通过神经网络的不确定性量化实现模型设定错误检测,可识别出模拟数据与现实不符的情况。
  • 与标准 MCMC 或 ABC 方法相比,该软件在重复推断任务中实现了显著提速——最快可达数千倍。
  • 模块化架构可无缝集成外部概率编程工具,并通过 TensorFlow 后端支持 GPU/TPU 加速。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。