paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Programmable MCMC with Soundly Composed Guide Programs

可编程 MCMC 与可靠组合的引导程序
OOPSLA 8(OOPSLA2)2024匹配度 7/10 · 该论文属于概率编程/贝叶斯推理中的静态分析与类型系统工作,直接对应用户画像中的“贝叶斯程序分析”方向,且兼具类型理论与实现评测;但未涉及 LLM/Agent 或浮点程序分析,不是最核心的交叉方向。引用 2 inbox
Long Pham, Di Wang, Feras A. Saad, Jan Hoffmann
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出基于协程和类型系统的框架,验证可编程 MCMC 中用户引导程序的正确性与可组合性。

概率编程语言的可编程推理允许用户用 guide 程序定制 MCMC 推断,但 guide 错误会破坏统计可靠性。本文提出基于协程的验证框架与新型类型系统,描述模型和一系列 guide 间的通信协议,每个 guide 只更新部分随机变量。作者证明可将 guide 类型翻译为有限范数上下文无关进程,在多项式时间内检查模型与 guide 的结构类型等式,并给出支持通用递归与分支的类型推断算法。还提出覆盖检查算法,验证顺序组合 guide 的支持与模型一致,这是多 guide MCMC 的关键可靠性条件。基准评估显示,算法能高效推断类型并检测现有静态分析无法处理的 sound/unsound guide。

问题
可编程 MCMC 中用户编写的 guide 程序一旦有误会破坏推断的统计可靠性,而现有静态分析难以处理通用递归、分支和多个 guide 的组合。
方法
提出基于协程的框架和刻画模型-guide 通信协议的 guide 类型系统,将类型翻译为有限范数上下文无关进程以支持多项式时间结构类型等式检查和类型推断,并设计覆盖检查算法。
评估
在多个基准上评估类型推断与覆盖检查,显示其能高效推断类型并检测现有静态分析无法处理的可靠与不可靠 guide。
原文摘要(Abstract)

Probabilistic programming languages (PPLs) provide language support for expressing flexible probabilistic models and solving Bayesian inference problems. PPLs with programmable inference make it possible for users to obtain improved results by customizing inference engines using guide programs that are tailored to a corresponding model program. However, errors in guide programs can compromise the statistical soundness of the inference. This article introduces a novel coroutine-based framework for verifying the correctness of user-written guide programs for a broad class of Markov chain Monte Carlo (MCMC) inference algorithms. Our approach rests on a novel type system for describing communication protocols between a model program and a sequence of guides that each update only a subset of random variables. We prove that, by translating guide types to context-free processes with finite norms, it is possible to check structural type equality between models and guides in polynomial time. This connection gives rise to an efficient type-inference algorithm for probabilistic programs with flexible constructs such as general recursion and branching. We also contribute a coverage-checking algorithm that verifies the support of sequentially composed guide programs agrees with that of the model program, which is a key soundness condition for MCMC inference with multiple guides. Evaluations on diverse benchmarks show that our type-inference and coverage-checking algorithms efficiently infer types and detect sound and unsound guides for programs that existing static analyses cannot handle.

链接与引用

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

BibTeX
@article{Pham0S024,
  title = {Programmable MCMC with Soundly Composed Guide Programs},
  author = {Long Pham and Di Wang and Feras A. Saad and Jan Hoffmann},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689748}
}