Probabilistic programming is an approach to reasoning under uncertainty by encoding inference problems as programs. In order to solve these inference problems, probabilistic programming languages (PPLs) employ different inference algorithms, such as sequential Monte Carlo (SMC), Markov chain Monte Carlo (MCMC), or variational methods. Existing research on such algorithms mainly concerns their implementation and efficiency, rather than the correctness of the algorithms themselves when applied in the context of expressive PPLs. To remedy this, we give a correctness proof for SMC methods in the context of an expressive PPL calculus, representative of popular PPLs such as WebPPL, Anglican, and Birch. Previous work have studied correctness of MCMC using an operational semantics, and correctness of SMC and MCMC in a denotational setting without term recursion. However, for SMC inference -- one of the most commonly used algorithms in PPLs as of today -- no formal correctness proof exists in an operational setting. In particular, an open question is if the resample locations in a probabilistic program affects the correctness of SMC. We solve this fundamental problem, and make four novel contributions: (i) we extend an untyped PPL lambda calculus and operational semantics to include explicit resample terms, expressing synchronization points in SMC inference; (ii) we prove, for the first time, that subject to mild restrictions, any placement of the explicit resample terms is valid for a generic form of SMC inference; (iii) as a result of (ii), our calculus benefits from classic results from the SMC literature: a law of large numbers and an unbiased estimate of the model evidence; and (iv) we formalize the bootstrap particle filter for the calculus and discuss how our results can be further extended to other SMC algorithms.
翻译:为了解决这些推断问题,概率编程语言(PPLs)采用了不同的推算算法,如连续的Monte Carlo(SMC)、Markov连锁Monte Carlo(MCMC)或变式方法。关于这种算法的现有研究主要涉及其实施和效率,而不是算法本身在表达式 PPLs中应用时的正确性。为了纠正这一点,我们提供了在表达式 PPPL 中最常用的算法的正确性证据。为了解决这些推断问题,我们给出了SMC方法的正确性。为了解决这些推断问题,概率编程语言语言(PPLs)使用了不同的推算算法算法算法算法,例如:波波尔普(SPL)采用了不同的推法算法算法,而SMMC的直线性算法则可以用来解释我们目前最常用的算法(我们目前最常用的算法的算法和更精确的算法证据) 特别是,一个公开的PLPLsalalalalalalalalalalalal Produ Produ Procial Procial Procial (我们现在的Sal salalalalalalalalalal lax) lacument Sal lacument Sal sal sal lacument Sal sal lacis lax lax lax lax lax ro ro ro la la ro ro lax ro ro sal sal ro) ro sal sal sal lacument sal lacument sal sal lacument sal sal lacument sal sal sal sal sal sal sal pal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal sal