paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Probabilistic Programming with Programmable Variational Inference

支持可编程变分推断的概率编程
PLDI 8(PLDI)2024匹配度 5/10 · 论文属于概率编程语言与变分推断,采用组合式程序变换并给出工程实现,与用户关注的贝叶斯程序分析/PL 方向有方法论上的关联。但论文不涉及静态分析、LLM/Agent 或浮点程序分析,也未聚焦用户核心的 PL 与 AI 交叉问题。引用 14 inbox
McCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami, Mathieu Huot, Martin C. Rinard, Vikash K. Mansinghka
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出以组合式程序变换支持可编程变分推断,将变分目标写成程序并自动变换为无偏梯度估计器。

现代概率编程语言(PPL)对蒙特卡洛方法支持丰富,但对变分推断(VI)的支持较为薄弱:用户通常只能从预定义的变分目标与梯度估计器中挑选,且这些实现是后端单体式的,缺乏形式化正确性论证。本文提出一种更模块化的 VI 支持方式,核心是基于组合式程序变换:变分目标被表达为程序,可使用一等的构造来计算用户定义模型与变分族下的密度与期望值;随后系统系统性地将这些程序变换为无偏梯度估计器,用于优化目标。该设计使自动微分、密度累加、trace 与无偏梯度估计策略等多个相互交织的关注点可以模块化推理。相比现有 PPL 的 VI 支持,它在三方面提升表达力:开放式用户自定义变分目标、组合式梯度估计策略空间、以及支持近似边缘化与归一化构造从而覆盖更广的模型与变分族。作者在 Gen 系统上以 JAX 实现扩展 genjax.vi,并在若干深度生成建模任务上评估,性能开销相对手写实现极小,与主流开源 PPL 相比具有竞争力。

问题
现有 PPL 对变分推断的支持通常是后端单体式实现的固定目标与梯度估计器菜单,用户难以自定义,也缺乏正确性论证。
方法
将变分目标表达为程序,借助一等的密度与期望值构造,并通过组合式程序变换把目标程序系统性地转换为无偏梯度估计器,从而模块化地处理自动微分、密度累加、trace 与梯度估计策略。
评估
在 Gen 的 JAX 扩展 genjax.vi 中实现该方法,并在多个深度生成建模任务上评估,结果显示相对手写实现性能开销极小,且与成熟开源 PPL 具有竞争力。
原文摘要(Abstract)

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 inJAX), and evaluate our automation on several deep generative modeling tasks, showing minimal performance overhead vs. hand-coded implementations and performance competitive with well-established open-source PPLs.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{BeckerLWGHRM24,
  title = {Probabilistic Programming with Programmable Variational Inference},
  author = {McCoy R. Becker and Alexander K. Lew and Xiaoyan Wang and Matin Ghavami and Mathieu Huot and Martin C. Rinard and Vikash K. Mansinghka},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656463}
}