Bayesian Separation Logic: A Logical Foundation and Axiomatic Semantics for Probabilistic Programming
Shing Hin Ho, Nicolas Wu, Azalea Raad
Abstract
Bayesian probabilistic programming languages (BPPLs) let users denote statistical models as code while the interpreter infers the posterior distribution. The semantics of BPPLs are usually mathematically complex and unable to reason about desirable properties such as expected values and independence of random variables. To reason about these properties in a non-Bayesian setting, probabilistic separation logics such as PSL and Lilac interpret separating conjunction as probabilistic independence of random variables. However, no existing separation logic can handle Bayesian updating, which is the key distinguishing feature of BPPLs. To close this gap, we introduce Bayesian separation logic ( BaSL ), a probabilistic separation logic that gives semantics to BPPL. We prove an internal version of Bayes’ theorem using a result in measure theory known as the Rokhlin-Simmons disintegration theorem. Consequently, BaSL can model probabilistic programming concepts such as Bayesian updating, unnormalised distribution, conditional distribution, soft constraint, conjugate prior and improper prior while maintaining modularity via the frame rule. The model of BaSL is based on a novel instantiation of Kripke resource monoid via 𝜎-finite measure spaces over the Hilbert cube, and the semantics of Hoare triple is compatible with an existing denotational semantics of BPPL based on the category of s-finite kernels. Using BaSL , we then prove properties of statistical models such as the expected value of Bayesian coin flip, correlation of random variables in the collider Bayesian network, the posterior distributions of the burglar alarm model, a parameter estimation algorithm, and the Gaussian mixture model.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 31380ae1-2bd5-4cd0-ac5a-0d1da9b75dc9Cited by top-tier papers1
Ask how each one uses itRelated papers
- Lilac: A Modal Separation Logic for Conditional ProbabilityJohn M. Li, Amal Ahmed, Steven HoltzenPLDI 2023 · 22 citations
- A probabilistic separation logicGilles Barthe, Justin Hsu, Kevin LiaoPOPL 2020 · 35 citations
- A Bunched Logic for Conditional IndependenceJialu Bao, Simon Docherty, Justin Hsu, Alexandra SilvaLICS 2021 · 15 citations
- A separation logic for negative dependenceJialu Bao, Marco Gaboardi, Justin Hsu, Joseph TassarottiPOPL 2022 · 17 citations
- Contextual Refinement of Higher-Order Concurrent Probabilistic ProgramsKwing Hei Li, Alejandro Aguirre, Joseph Tassarotti, Lars BirkedalPLDI 2026
