paperbot · PL 论文追踪

全部论文 待读 收藏

P0 Static Posterior Inference of Bayesian Probabilistic Programming via Polynomial Solving

通过多项式求解的贝叶斯概率程序静态后验推断
PLDI 8(PLDI)2024匹配度 8/10 · 该论文直接研究贝叶斯概率程序的静态分析,提出基于多项式求解的后验分布边界推断,并覆盖 score 递归程序,正对用户画像中“贝叶斯程序分析”这一核心方向;虽未涉及 LLM/Agent 或浮点分析交叉,但理论和工程实现兼具,且有与 PLDI 2022 方法的 benchmark 对比。引用 17 inbox
Peixin Wang, Tengshun Yang, Hongfei Fu, Guanyan Li, C.-H. Luke Ong
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出用多项式求解静态推断贝叶斯概率程序的归一化后验分布边界,并支持 score 递归程序。

在贝叶斯概率编程中,核心问题是在带 score/observe 条件语句的程序中估计归一化后验分布(NPD)。现有 MCMC 与变分推断无法在有限时间内给出保证结果,而精确推断方法又常受语法限制或不能保证成功。本文提出一种自动静态方法,通过多项式求解为 NPD 推导可保证的上下界。作者首先针对几乎必然终止且仅在程序终止处含单个有界 score 的 score-at-end 程序建立不动点定理;随后提出 Optional Stopping Theorem 的乘法变体,以处理循环内可能含权重大于 1 的 score 语句的 score-recursive 程序,并可表示存在可积性困难的贝叶斯非参数模型。实现上使用多项式求解,并引入截断操作及跨多个程序输入的界综合以提高精度。实验表明,该方法可处理无界 while 循环和无限支撑连续分布;与 Beutner 等(PLDI 2022)基于递归展开的方法相比更省时,得到的 NPD 边界相当甚至更紧,且能处理此前方法无法处理的 score-recursive 程序。

问题
如何对带 score/observe 条件语句的贝叶斯概率程序进行静态后验推断,在有限时间内给出归一化后验分布(NPD)的可保证边界,而非仅依赖无保证的采样或变分近似。
方法
论文建立 score-at-end 程序的不动点定理,并提出 Optional Stopping Theorem 的乘法变体以处理 score-recursive 程序,再用多项式求解(含截断和多输入界综合)实现 NPD 边界的自动推导。
评估
在大量基准上与 Beutner 等(PLDI 2022)的递归展开方法比较,方法更省时且 NPD 边界相当或更紧;还能处理无界 while 循环、无限支撑连续分布以及此前无法处理的 score-recursive 程序。
原文摘要(Abstract)

In Bayesian probabilistic programming, a central problem is to estimate the normalised posterior distribution (NPD) of a probabilistic program with conditioning via score (a.k.a. observe ) statements. Most previous approaches address this problem by Markov Chain Monte Carlo and variational inference, and therefore could not generate guaranteed outcomes within a finite time limit. Moreover, existing methods for exact inference either impose syntactic restrictions or cannot guarantee successful inference in general. In this work, we propose a novel automated approach to derive guaranteed bounds for NPD via polynomial solving. We first establish a fixed-point theorem for the wide class of score-at-end Bayesian probabilistic programs that terminate almost-surely and have a single bounded score statement at program termination. Then, we propose a multiplicative variant of Optional Stopping Theorem (OST) to address score-recursive Bayesian programs where score statements with weights greater than one could appear inside a loop. Bayesian nonparametric models, enjoying a renaissance in statistics and machine learning, can be represented by score-recursive Bayesian programs and are difficult to handle due to an integrability issue. Finally, we use polynomial solving to implement our fixed-point theorem and OST variant. To improve the accuracy of the polynomial solving, we further propose a truncation operation and the synthesis of multiple bounds over various program inputs. Our approach can handle Bayesian probabilistic programs with unbounded while loops and continuous distributions with infinite supports. Experiments over a wide range of benchmarks show that compared with the most relevant approach (Beutner et al. , PLDI 2022) for guaranteed NPD analysis via recursion unrolling, our approach is more time efficient and derives comparable or even tighter NPD bounds. Furthermore, our approach can handle score-recursive programs which previous approaches could not.

链接与引用

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

BibTeX
@article{WangYFLO24,
  title = {Static Posterior Inference of Bayesian Probabilistic Programming via Polynomial Solving},
  author = {Peixin Wang and Tengshun Yang and Hongfei Fu and Guanyan Li and C.-H. Luke Ong},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656432}
}