Conditioning in Probabilistic Programming
Open Access
- 3 January 2018
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 40 (1) , 1-50
Abstract
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.Keywords
All Related Versions
Funding Information
- Excellence Initiative of the German federal and state government, the CDZ project CAP (GZ 1023)
- DFG Research Training Group (2236 UnRAVeL)
This publication has 41 references indexed in Scilit:
- Verifying quantitative reliability for programs that execute on unreliable hardwareACM SIGPLAN Notices, 2013
- Min-entropy as a resourceInformation and Computation, 2013
- Probabilistic Abstract Interpretation2012
- A game-based abstraction-refinement framework for Markov decision processesFormal Methods in System Design, 2010
- Distributing probability over non-determinismMathematical Structures in Computer Science, 2006
- Probabilistic guarded commands mechanized in HOLTheoretical Computer Science, 2005
- VERIFYING PROBABILISTIC PROGRAMS USING A HOARE LIKE LOGICInternational Journal of Foundations of Computer Science, 2002
- Probabilistic predicate transformersACM Transactions on Programming Languages and Systems, 1996
- A probabilistic PDLJournal of Computer and System Sciences, 1985
- Semantics of probabilistic programsJournal of Computer and System Sciences, 1981