论文标题

确切的递归概率编程

Exact Recursive Probabilistic Programming

论文作者

Chiang, David, McDonald, Colin, Shan, Chung-chieh

论文摘要

递归数据的递归调用对于生成概率分布非常有用,概率编程允许对这些分布进行计算以模块化和直观的方式表示。精确的推论也很有用,但不幸的是,现有的概率编程语言对递归数据的递归调用没有确切的推论,从而迫使程序员手动编码许多应用程序。我们介绍了一种概率语言,其中可以自然地表达各种递归,并准确地进行推理。例如,概率下降自动机及其概括很容易表达,并且自动得出多项式分析算法。我们使用与已建立和重新调整有关的程序转换消除了递归数据类型。通过线性类型系统确保这些转换是正确的,如果有的话,可以通过一种贪婪算法确保成功的转换选择(如果有的话)。

Recursive calls over recursive data are useful for generating probability distributions, and probabilistic programming allows computations over these distributions to be expressed in a modular and intuitive way. Exact inference is also useful, but unfortunately, existing probabilistic programming languages do not perform exact inference on recursive calls over recursive data, forcing programmers to code many applications manually. We introduce a probabilistic language in which a wide variety of recursion can be expressed naturally, and inference carried out exactly. For instance, probabilistic pushdown automata and their generalizations are easy to express, and polynomial-time parsing algorithms for them are derived automatically. We eliminate recursive data types using program transformations related to defunctionalization and refunctionalization. These transformations are assured correct by a linear type system, and a successful choice of transformations, if there is one, is guaranteed to be found by a greedy algorithm.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源