Efficient inference is often possible in a streaming context using Rao-Blackwellized particle filters (RBPFs), which exactly solve inference problems when possible and fall back on sampling approximations when necessary. While RBPFs can be implemented by hand to provide efficient inference, the goal of streaming probabilistic programming is to automatically generate such efficient inference implementations given input probabilistic programs. In this work, we propose semi-symbolic inference, a technique for executing probabilistic programs using a runtime inference system that automatically implements Rao-Blackwellized particle filtering. To perform exact and approximate inference together, the semi-symbolic inference system manipulates symbolic distributions to perform exact inference when possible and falls back on approximate sampling when necessary. This approach enables the system to implement the same RBPF a developer would write by hand. To ensure this, we identify closed families of distributions -- such as linear-Gaussian and finite discrete models -- on which the inference system guarantees exact inference. We have implemented the runtime inference system in the ProbZelus streaming probabilistic programming language. Despite an average $1.6\times$ slowdown compared to the state of the art on existing benchmarks, our evaluation shows that speedups of $3\times$-$87\times$ are obtainable on a new set of challenging benchmarks we have designed to exploit closed families.
翻译:在使用Rao-Blackwellization 粒子过滤器(RBPFs)的流流环境中,往往可以有效推断,这种过滤系统尽可能地解决推论问题,必要时又退缩到抽样近似点上。虽然RBPFs可以通过手工执行,以便提供有效的推论,但流动概率编程的目标是自动产生这种有效的推论执行,给输入概率程序提供相应的预测性程序。在这项工作中,我们建议采用半共振推论法,一种使用运行时间推论系统执行预测性程序的技术,自动地实施Rao-Blackwewellized 粒子过滤法。为了同时进行精确和大致的推论,半正正感推论推论系统可以操纵象征性分布,以便在可能时进行精确的推论,而必要时又退缩到大约的取样。这种方法使系统能够执行同样的RBPFPFPS的开发器手写。为了确保这一点,我们发现了一种封闭的分布式家庭,例如线-Gassusian-Gassian 和一定的离式分式模型,在这个系统上保证了准确的推算。我们所设计的精确的精确的精确度基准,我们用了比Zreval-lades-lades-lades-lades-lades-lades-lades-lades-lades-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-s-s-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-lad-s-laxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-s-s-s-s-s-s-s-s-s-s-lad-lax-lad-lad-s-s-s-s-s-s-s-lad-s-lad-s-lax-laxxxx-lax-lax-lax-lax-