Probabilistic programming languages aim to describe and automate Bayesian modeling and inference. Modern languages support programmable inference, which allows users to customize inference algorithms by incorporating guide programs to improve inference performance. For Bayesian inference to be sound, guide programs must be compatible with model programs. One pervasive but challenging condition for model-guide compatibility is absolute continuity, which requires that the model and guide programs define probability distributions with the same support.
This paper presents a new probabilistic programming language that guarantees absolute continuity, and features general programming constructs, such as branching and recursion. Model and guide programs are implemented as coroutines that communicate with each other to synchronize the set of random variables they sample during their execution. Novel guide types describe and enforce communication protocols between coroutines. If the model and guide are well-typed using the same protocol, then they are guaranteed to enjoy absolute continuity. An efficient algorithm infers guide types from code so that users do not have to specify the types. The new programming language is evaluated with an implementation that includes the type-inference algorithm and a prototype compiler that targets Pyro. Experiments show that our language is capable of expressing a variety of probabilistic models with nontrivial control flow and recursion, and that the coroutine-based computation does not introduce significant overhead in actual Bayesian inference.
Modular Verification for Almost-Sure Termination of Probabilistic Programs
在这项工作中,我们考虑几乎肯定终止问题的概率程序,询问是否一个给定的概率程序终止概率为1。可伸缩的程序分析方法通常依赖于模块化作为其理论基础。在非概率程序中,Floyd-霍尔逻辑的经典变式规则(V-规则)为模块化分析提供了基础。将该规则扩展到概率程序的几乎确定终止是相当棘手的,并且在[Fioriti and Hermanns 2015]中提出了一个概率变体。虽然所提出的概率变量谨慎地解决了可积性的关键问题,我们表明,所提出的模块化规则仍然是不健全的几乎肯定终止的概率程序。除了建立以前的规则的不健全,我们的贡献如下:首先,我们提出了一个健全的模块规则几乎确定终止的概率程序。我们的方法是基于一个新的概念下降上鞅。其次,对于算法方法,我们考虑下降上鞅是线性的,并表明它们可以在多项式时间合成。最后,我们提出了各种基准测试和几个自然的例子,模拟各种类型的嵌套而循环的概率程序的实验结果,并证明我们的方法是能够有效地证明其几乎肯定的终止属性。
GradInf: Gradient Estimation as Probabilistic Inference
Carnegie Mellon University Pittsburgh USA;Massachusetts Institute of Technology Cambridge USA;Chalmers University of Technology \& University of Gothenburg Gothenburg Sweden;Yale University New Haven USA;Carnegie Mellon University;Massachusetts Institute of Technology;Chalmers University of Technology \& University of Gothenburg;Yale University