We introduce a novel sampling algorithm for Bayesian inference on imperative probabilistic programs. It features a hierarchical architecture that separates control flows from data: the top-level samples a control flow, and the bottom level samples data values along the control flow picked by the top level. This separation allows us to plug various language-based analysis techniques in probabilistic program sampling; specifically, we use logical backward propagation of observations for sampling efficiency. We implemented our algorithm on top of Anglican. The experimental results demonstrate our algorithm's efficiency, especially for programs with while loops and rare observations.
翻译:我们引入了一种新颖的贝叶斯人对绝对概率程序进行推断的抽样算法。 它具有一种将控制流与数据区分的等级结构: 顶层样本是一种控制流, 以及顶层控制流的底层样本数据值。 这种分离使我们能够在概率方案取样中插入各种基于语言的分析技术; 具体地说, 我们使用逻辑落后的观测方法来提高取样效率。 我们在英国圣公会顶端应用了我们的算法。 实验结果显示了我们的算法效率, 特别是对于带有循环和罕见观测的程序来说。