Type-Directed Discretization of Probabilistic Programs
Katherine Wu, Jules Jacobs, Kevin Batz, Alexandra Silva
Key points
From the paper's conclusion- We study exact discretization as a semantics-preserving transformation for recursive, higher-order probabilistic programs with continuous distributions.
Abstract
We study exact discretization as a semantics-preserving transformation for recursive, higher-order probabilistic programs with continuous distributions. We target programs where continuous values are compared against finitely many constants, so exact inference reduces to a discrete problem. Our central technical contribution is a non-local, type-directed analysis that infers where continuous values can be partitioned into finitely many observationally relevant regions, then rewrites sampling and comparison behavior over those regions. We call this transformation Slice. Because this construction is global and type-directed, correctness requires reasoning beyond the local syntax: we formalize the transformation and prove soundness for boolean queries using a coupling-style logical relations argument over operational semantics. As an application, transformed programs can be executed by discrete engines such as Dice, Roulette, and Storm. Our empirical evaluation shows two complementary strengths of Slice when paired with discrete backends: it enables exact inference for challenging continuous programs that lie beyond the reach of previous exact systems, and, on benchmarks where direct comparison is possible, it is competitive with state-of-the-art exact inference systems for continuous programs.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Bayes Rule for Conditioning Probabilistic ProgramsarXiv · 2026
- Sheaf Semantics of Probabilistic ProgramsarXiv · 2026
- noDice: Inference for Discrete Probabilistic Programs with Nondeterminism and ConditioningProceedings of the ACM on Programming Languages · 2026
- A Nonlinear Abstract Domain for Bayesian Neural NetworksarXiv · 2026
- A Hoare Logic for Continuous-Time Stochastic ProcessesarXiv · 2026
- Denotational Semantics for Probabilistic and Concurrent ProgramsACM Transactions on Programming Languages and Systems · 2026