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

基于引导类型的声音概率推理

Sound Probabilistic Inference via Guide Types

Di Wang, Jan Hoffmann, Thomas Reps

摘要:

概率程序设计语言旨在描述和自动化贝叶斯建模和推理。现代语言支持可编程推理,这允许用户通过结合指导程序来定制推理算法,以提高推理性能。为了使贝叶斯推理合理,引导程序必须与模型程序兼容。模型-指南兼容性的一个普遍但具有挑战性的条件是绝对连续性,这要求模型和指南程序定义具有相同支持的概率分布。本文提出了一种新的概率程序设计语言,保证绝对连续性,并具有一般的编程结构,如分支和递归。模型和向导程序被实现为协同程序,它们相互通信以同步它们在执行期间采样的随机变量集。新的指南类型描述和执行协程之间的通信协议。如果模型和指南使用相同的协议进行了良好的类型化,那么就可以保证它们具有绝对的连续性。一个有效的算法从代码中推断出指南类型,这样用户就不必指定类型。新的程序设计语言的评估与实现,其中包括类型推理算法和原型编译器的目标Pyro。实验表明,我们的语言是能够表达各种概率模型与非平凡的控制流和递归,并且基于协程的计算不会引入显着的开销在实际的贝叶斯推理。

英文摘要:

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.

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

↑