论文标题

来自带有循环和调节的概率程序的正式验证的采样器

Formally Verified Samplers From Probabilistic Programs With Loops and Conditioning

论文作者

Bagnall, Alexander, Stewart, Gordon, Banerjee, Anindya

论文摘要

我们提出ZAR:从有条件的概率保护命令语言(CPGCL)中的离散概率程序的正式验证的编译器管道,到随机位模型中证明可执行的可执行采样器。我们利用了一个关键思想,即所有离散概率分布都可以简化为无偏见的硬币弹性方案。编译器管道首先将CPGCL程序转换为选择固定树,这是一种适合减少有偏见的概率选择的中间表示。然后将选择固定树转换为共同感应的交互树,以在随机位模型中执行。组成的翻译的正确性建立了采样等级定理:编译的采样器是正确的WRT。有条件的CPGCL源程序的有条件的最弱的预测语义。 ZAR在COQ证明助手中实施并进行了充分验证。我们将经过验证的采样器提取到OCAML和Python,并在许多说明性示例中验证它们。

We present Zar: a formally verified compiler pipeline from discrete probabilistic programs with unbounded loops in the conditional probabilistic guarded command language (cpGCL) to proved-correct executable samplers in the random bit model. We exploit the key idea that all discrete probability distributions can be reduced to unbiased coin-flipping schemes. The compiler pipeline first translates a cpGCL program into choice-fix trees, an intermediate representation suitable for reduction of biased probabilistic choices. Choice-fix trees are then translated to coinductive interaction trees for execution within the random bit model. The correctness of the composed translations establishes the sampling equidistribution theorem: compiled samplers are correct wrt. the conditional weakest pre-expectation semantics of cpGCL source programs. Zar is implemented and fully verified in the Coq proof assistant. We extract verified samplers to OCaml and Python and empirically validate them on a number of illustrative examples.

扫码加入交流群

加入微信交流群

微信交流群二维码

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