论文标题

转换用于模型检查的概率程序

Transforming Probabilistic Programs for Model Checking

论文作者

Bernstein, Ryan, Vákár, Matthijs, Wing, Jeannette

论文摘要

概率编程非常适合可靠且透明的数据科学,因为它允许用户以高级语言指定其模型,而不必担心如何适应模型的复杂性。对概率程序的静态分析通过自动化耗时且容易出错的任务,为实现高级编程风格提供了更多机会。我们将静态分析应用于概率程序,以使两种关键模型检查方法的大部分自动化:先前的预测检查和基于仿真的校准。我们的方法将指定密度函数的概率程序转换为有效的前向采样形式。为了实现此转换,我们使用静态分析从概率程序中提取一个因子图,使用SAT求解器生成一组指向的无环形图,选择一个将可证明的正确采样代码的图形,然后生成一个或多个采样程序。我们允许最小的用户交互,以扩大仅通过静态分析的可能性范围。我们提出了一个针对流行的Stan概率编程语言的实现,为广泛的概率编程用户提供了强大的贝叶斯工作流程的大部分。

Probabilistic programming is perfectly suited to reliable and transparent data science, as it allows the user to specify their models in a high-level language without worrying about the complexities of how to fit the models. Static analysis of probabilistic programs presents even further opportunities for enabling a high-level style of programming, by automating time-consuming and error-prone tasks. We apply static analysis to probabilistic programs to automate large parts of two crucial model checking methods: Prior Predictive Checks and Simulation-Based Calibration. Our method transforms a probabilistic program specifying a density function into an efficient forward-sampling form. To achieve this transformation, we extract a factor graph from a probabilistic program using static analysis, generate a set of proposal directed acyclic graphs using a SAT solver, select a graph which will produce provably correct sampling code, then generate one or more sampling programs. We allow minimal user interaction to broaden the scope of application beyond what is possible with static analysis alone. We present an implementation targeting the popular Stan probabilistic programming language, automating large parts of a robust Bayesian workflow for a wide community of probabilistic programming users.

扫码加入交流群

加入微信交流群

微信交流群二维码

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