Type-Directed Discretization of Probabilistic Programs (Extended Version)

📅 2026-08-17
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of exact discretization and inference for continuous distributions in recursive higher-order probabilistic programs by proposing the Slice transformation. Through non-local type-directed analysis, this method partitions continuous values into finite regions and rewrites sampling behavior, achieving globally semantics-preserving exact discretization via coupled logical relation proofs. Consequently, programs originally reliant on continuous sampling can now be executed by discrete engines, overcoming limitations of prior systems. The proposed approach delivers inference performance comparable to state-of-the-art methods, establishing a novel paradigm for reasoning about mixed probabilistic programs.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

Probabilistic Programs
Exact Discretization
Continuous Distributions
Exact Inference
Semantics-preserving Transformation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Type-directed discretization
Probabilistic programs
Exact inference
Semantic preservation
Coupling-style logical relations
🔎 Similar Papers
No similar papers found.