Papers › SPPL: Probabilistic Programming with Fast Exact Symbolic Inference

SPPL: Probabilistic Programming with Fast Exact Symbolic Inference

7 Oct 2020arXiv:2010.03485archive 2025-07-28

Feras A. Saad, Martin C. Rinard, Vikash K. Mansinghka

We present the Sum-Product Probabilistic Language (SPPL), a new probabilistic programming language that automatically delivers exact solutions to a broad range of probabilistic inference queries. SPPL translates probabilistic programs into sum-product expressions, a new symbolic representation and associated semantic domain that extends standard sum-product networks to support mixed-type distributions, numeric transformations, logical formulas, and pointwise and set-valued constraints. We formalize SPPL via a novel translation strategy from probabilistic programs to sum-product expressions and give sound exact algorithms for conditioning on and computing probabilities of events. SPPL imposes a collection of restrictions on probabilistic programs to ensure they can be translated into sum-product expressions, which allow the system to leverage new techniques for improving the scalability of translation and inference by automatically exploiting probabilistic structure. We implement a prototype of SPPL with a modular architecture and evaluate it on benchmarks the system targets, showing that it obtains up to 3500x speedups over state-of-the-art symbolic systems on tasks such as verifying the fairness of decision tree classifiers, smoothing hidden Markov models, conditioning transformed random variables, and computing rare event probabilities.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 30 code samples harvested from 1 repository linked to this paper: 10 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 0 where Syntology's instrument failed) · 20 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: official repository: 30 samples from 1 repository, 10 ran (10 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

probcomp/sppl officialmentioned in papermentioned on GitHubApache-2.0Syntology: 30 samples, 10 ran (0 instrument-failed) · 20 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

30 samples harvested: 10 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 0 where Syntology's instrument failed) · 20 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

10ran
20unverified

Licence: 0 of the 30 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from probcomp/sppl. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

probcomp/sppl official repository 30 samples, 10 ran (0 instrument-failed) · 20 unverified
get_intersection src/sym_util.py ran Apache-2.0 (permissive) · 91c2d76dc04929cc · report fixture: signature sets:list/1/set · returned set · level recorded 2026-09-25
get_symbols src/sym_util.py ran Apache-2.0 (permissive) · 9dd736346426c7cd · report fixture: signature expr:Add/0/? · returned list · level recorded 2026-09-25
get_union src/sym_util.py ran Apache-2.0 (permissive) · 72e9099e7c74f264 · report fixture: signature sets:list/1/set · returned set · level recorded 2026-09-25
log1mexp in 11 papers src/math_util.py ran fingerprinted Apache-2.0 (permissive) · 27e10e42bf839bd7 · report fixture: signature x:float/0/float · returned float64 · level recorded 2026-09-25
logdiffexp src/math_util.py ran fingerprinted Apache-2.0 (permissive) · fc9d969f9e98c935 · report fixture: signature a:float/0/float, b:float/0/float · returned float64 · level recorded 2026-09-25
lognorm src/math_util.py ran fingerprinted Apache-2.0 (permissive) · bde1a9f8774489ac · report fixture: signature array:ndarray/1/float · returned list · level recorded 2026-09-25
solve_poly_inequality_symbolically src/poly.py ran Apache-2.0 (permissive) · 64354224227a0e40 · report fixture: signature expr:Add/0/?, b:int/0/int, strict:bool/0/bool · returned Interval · level recorded 2026-09-25
to_numeric src/distributions.py ran fingerprinted Apache-2.0 (permissive) · 0ce4881dcb327b6e · report fixture: signature x:int/0/int · returned int · level recorded 2026-09-25
unroll_if src/compilers/sppl_to_python.py ran Apache-2.0 (permissive) · d208d8d7f2b1fd99 · report fixture: signature node:If/0/?, current:NoneType/0/? · returned list · level recorded 2026-09-25
unroll_ifexp src/compilers/sppl_to_python.py ran Apache-2.0 (permissive) · 19622879d1647b7f · report fixture: signature target:Name/0/?, node:IfExp/0/? · returned If · level recorded 2026-09-25
Range src/sets.py unverified Apache-2.0 (permissive) · baee0e05ad0248df · report
RealsPosLoc src/distributions.py unverified Apache-2.0 (permissive) · 6e0ee20904acfa0f · report
UnitIntervalLocScale src/distributions.py unverified Apache-2.0 (permissive) · 688b62b496fcee46 · report
dnf_factor src/dnf.py unverified Apache-2.0 (permissive) · ee26be05f878892c · report
dnf_non_disjoint_clauses src/dnf.py unverified Apache-2.0 (permissive) · 527f747272f3070d · report
dnf_normalize src/dnf.py unverified Apache-2.0 (permissive) · 42f22ba89a518b3d · report
get_piecewise_domains src/transforms.py unverified Apache-2.0 (permissive) · ab9b4ef49d2c921f · report
get_piecewise_inverse src/transforms.py unverified Apache-2.0 (permissive) · 54d900c269fd0a1f · report
get_piecewise_symbol src/transforms.py unverified Apache-2.0 (permissive) · b91a9c114c711463 · report
get_poly_symbol src/poly.py unverified Apache-2.0 (permissive) · ae73ee797e75376a · report
memoize in 8 papers src/spe.py unverified Apache-2.0 (permissive) · c085361f73a1d372 · report
render_nested_lists src/render.py unverified Apache-2.0 (permissive) · 48560768848f1e6a · report
render_nested_lists_concise src/render.py unverified Apache-2.0 (permissive) · 2182f8250a46727d · report
render_sppl src/compilers/spe_to_sppl.py unverified Apache-2.0 (permissive) · 9c6d19e41ad6893a · report
render_sppl_helper src/compilers/spe_to_sppl.py unverified Apache-2.0 (permissive) · 35b4a90daadad6d0 · report
solve_poly_inequality src/poly.py unverified Apache-2.0 (permissive) · 8ac65d5e54f33db5 · report
spe_simplify_sum src/spe.py unverified Apache-2.0 (permissive) · 09c3217e8f9121da · report
spe_simplify_sum_leaf src/spe.py unverified Apache-2.0 (permissive) · 36e896e20603b0c2 · report
union_intervals src/sets.py unverified Apache-2.0 (permissive) · a783434f7d3fbd30 · report
union_intervals_finite src/sets.py unverified Apache-2.0 (permissive) · 0dc0dfe76884c4bc · report

Tasks

FairnessProbabilistic ProgrammingTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections