arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.15742cs.PLcs.AIcs.LG
收藏

支持可编程变分推断的概率编程

Probabilistic Programming with Programmable Variational Inference

MIT(麻省理工学院)

McCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami, Mathieu Huot, Martin C. Rinard, Vikash K. Mansinghka

AI总结:

针对概率编程语言变分推断支持薄弱的问题,提出基于组合式程序变换的模块化方法,提升表达能力并在Gen扩展中实现,验证了低开销与竞争力。

摘要:

与现代概率编程语言(PPL)支持的各类先进蒙特卡洛方法相比,PPL对变分推断(VI)的支持较为薄弱:用户通常只能选用预定义的变分目标和梯度估计器,这些组件以单体式实现于PPL后端,且缺乏形式化正确性论证。本文提出一种更具模块化的PPL变分推断支持方法,其核心是组合式程序变换。在该方法中,变分目标被表示为程序,可借助一等构造来计算用户定义模型与变分族下的密度和期望值。随后我们将这些程序系统地变换为无偏梯度估计器,用于优化其定义的目标。该设计支持对自动微分、密度累积、追踪、无偏梯度估计策略应用等多个相互关联的问题进行模块化推理。此外,相较于现有PPL的变分推断支持,本设计在三个维度提升了表达能力:(1)支持开放式的用户自定义变分目标,而非固定选项菜单;(2)支持组合空间的梯度估计策略,其中许多策略未被当前PPL自动化实现;(3)支持更广泛的模型和变分族类别,因为它支持近似边缘化与归一化构造(此前仅用于蒙特卡洛推断)。我们在Gen概率编程系统的扩展(基于JAX实现的genjax.vi)中实现了该方法,并在多个深度生成建模任务上进行评估,结果显示其相较于手工编码实现的性能开销极小,且性能与成熟的开源PPL相当。

英文摘要:

Compared to the wide array of advanced Monte Carlo methods supported by modern probabilistic programming languages (PPLs), PPL support for variational inference (VI) is less developed: users are typically limited to a predefined selection of variational objectives and gradient estimators, which are implemented monolithically (and without formal correctness arguments) in PPL backends. In this paper, we propose a more modular approach to supporting variational inference in PPLs, based on compositional program transformation. In our approach, variational objectives are expressed as programs, that may employ first-class constructs for computing densities of and expected values under user-defined models and variational families. We then transform these programs systematically into unbiased gradient estimators for optimizing the objectives they define. Our design enables modular reasoning about many interacting concerns, including automatic differentiation, density accumulation, tracing, and the application of unbiased gradient estimation strategies. Additionally, relative to existing support for VI in PPLs, our design increases expressiveness along three axes: (1) it supports an open-ended set of user-defined variational objectives, rather than a fixed menu of options; (2) it supports a combinatorial space of gradient estimation strategies, many not automated by today's PPLs; and (3) it supports a broader class of models and variational families, because it supports constructs for approximate marginalization and normalization (previously introduced only for Monte Carlo inference). We implement our approach in an extension to the Gen probabilistic programming system (genjax.vi, implemented in JAX), and evaluate on several deep generative modeling tasks, showing minimal performance overhead vs. hand-coded implementations and performance competitive with well-established open-source PPLs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑