Conditioning in Probabilistic Programming

被引:24
作者
Olmedo, Federico [1 ]
Gretz, Friedrich [2 ,6 ]
Jansen, Nils [3 ,7 ]
Kaminski, Benjamin Lucien [4 ]
Katoen, Joost-Pieter [4 ]
Mciver, Annabelle [5 ]
机构
[1] Univ Chile, Dept Comp Sci, Santiago, Chile
[2] Bosch Corp Res, Gerlingen, Germany
[3] Radboud Univ Nijmegen, Nijmegen, Netherlands
[4] Rhein Westfal TH Aachen, Ahornstr 55, D-52074 Aachen, Germany
[5] Macquarie Univ, Dept Comp, Sydney, NSW 2109, Australia
[6] Robert Bosch GmbH, D-70465 Stuttgart, Germany
[7] Univ Nijmegen, Fac Sci, Postbus 9010, NL-6500 GL Nijmegen, Netherlands
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2018年 / 40卷 / 01期
关键词
Probabilistic programming; conditioning; weakest pre-condition semantics; operational semantics; SEMANTICS;
D O I
10.1145/3156018
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This article investigates the semantic intricacies of conditioning, a main feature in probabilistic programming. Our study is based on an extension of the imperative probabilistic guarded command language pGCL with conditioning. We provide a weakest precondition (wp) semantics and an operational semantics. To deal with possibly diverging program behavior, we consider liberal preconditions. We show that diverging program behavior plays a key role when defining conditioning. We establish that weakest preconditions coincide with conditional expected rewards in Markov chains-the operational semantics-and that the wp-semantics conservatively extends the existing semantics of pGCL (without conditioning). An extension of these results with nondeterminism turns out to be problematic: although an operational semantics using Markov decision processes is rather straightforward, we show that providing an inductive wp-semantics in this setting is impossible. Finally, we present two program transformations that eliminate conditioning from any program. The first transformation hoists conditioning while updating the probabilistic choices in the program, while the second transformation replaces conditioning-in the same vein as rejection sampling-by a program with loops. In addition, we present a last program transformation that replaces an independent identically distributed loop with conditioning.
引用
收藏
页数:50
相关论文
共 54 条
  • [1] Noncomputable conditional distributions
    Ackerman, Nathanael L.
    Freer, Cameron E.
    Roy, Daniel M.
    [J]. 26TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE (LICS 2011), 2011, : 107 - 116
  • [2] Andrés ME, 2008, LECT NOTES COMPUT SC, V4963, P157, DOI 10.1007/978-3-540-78800-3_12
  • [3] [Anonymous], 1976, A discipline of programming
  • [4] [Anonymous], PLDI
  • [5] [Anonymous], 2014, PROC FOSE 14, DOI DOI 10.1145/2593882.2593900
  • [6] [Anonymous], 2014, ARCH FORM PROOFS
  • [7] [Anonymous], 2013, ESEC SIGSOFT FSE
  • [8] Proofs of randomized algorithms in COQ
    Audebaud, Philippe
    Paulin-Mohring, Christine
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2009, 74 (08) : 568 - 589
  • [9] Back R.-J., 1998, Refinement Calculus: A Systematic Introduction
  • [10] Baier C, 2008, PRINCIPLES OF MODEL CHECKING, P1