Skip to main content
QUICK REVIEW

[论文解读] BlackJAX: Composable Bayesian inference in JAX

Alberto Cabezas, Adrien Corenflos|arXiv (Cornell University)|Feb 16, 2024
Bayesian Methods and Mixture ModelsComputer Science被引用 6
一句话总结

BlackJAX 在 JAX 中提供一套功能性、可组合的贝叶斯推断构建模块,用于 MCMC、SMC、SG-MCMC 和 VI,允许用户从低级组件中组合出新算法。它面向 CPU、GPU 与 TPU,并与未归一化对数密度目标集成。

ABSTRACT

BlackJAX is a library implementing sampling and variational inference algorithms commonly used in Bayesian computation. It is designed for ease of use, speed, and modularity by taking a functional approach to the algorithms' implementation. BlackJAX is written in Python, using JAX to compile and run NumpPy-like samplers and variational methods on CPUs, GPUs, and TPUs. The library integrates well with probabilistic programming languages by working directly with the (un-normalized) target log density function. BlackJAX is intended as a collection of low-level, composable implementations of basic statistical 'atoms' that can be combined to perform well-defined Bayesian inference, but also provides high-level routines for ease of use. It is designed for users who need cutting-edge methods, researchers who want to create complex sampling methods, and people who want to learn how these work.

研究动机与目标

  • 在黑箱采样器的同时,阐明需要结构化的贝叶斯推断的动机。
  • 引入一个从基本组件构建推断算法的可组合、函数式 API。
  • 提供一个底层 API,以自定义和扩展超越标准流程的推断方法。
  • 展示与未归一化对数密度目标和现代硬件的集成。

提出的方法

  • 提出一个功能性、状态驱动的 API,使每次迭代更新并返回一个新状态且无副作用。
  • 提供一组基本推断组件(例如 MH 接受/拒绝步骤、HMC/ Langevin 动力学、SMC、VI 工具、调温、重采样)。
  • 使这些组件能够组合形成新算法或现有算法,以 HMC 的窗口/自适应方案为例。
  • 提供一个底层 API 用于定制内核构造,以及对多粒子或内核的并行试验。
  • 所有组件都可与目标对数密度函数协作,并通过 JAX 支持 CPU/GPU/TPU 执行。

实验结果

研究问题

  • RQ1贝叶斯推断方法如何被分解为可重复使用、可组合的组件?
  • RQ2无副作用的函数式设计是否能提升在组装 MCMC/SMC/VI 算法时的并行化与灵活性?
  • RQ3BlackJAX 与未归一化对数密度目标和概率编程工作流的集成能达到多高的效果?
  • RQ4同时暴露高层和底层 API 对算法定制和实验的影响如何?

主要发现

  • 提供一个统一的、纯函数接口用于采样和近似推断,具有状态化、可组合的设计。
  • 包含核心组件的多种变体(例如 MH 接受/拒绝、带多种积分器的 HMC、NUTS、广义 HMC、非可逆切片采样)。
  • 通过作用于未归一化对数密度目标,展示与概率编程语言的互操作性。
  • 提供一个底层 API,用于定制内核并在 SMC 或并行设置中混合基础内核。
  • 指出与基于 JAX 的生态系统的广泛兼容性以及宽松的 Apache License v2.0,具开放源代码治理和全面测试套件(覆盖率 99%)。
  • 在教学和研究方面的影响记录,通过在论文、教程和开源课程中的采用。

阅读本论文

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

在 Nubint 中阅读本论文

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