← back to index

Partial Markov Categories

Elena Di Lavore, Mario RomΓ‘n, PaweΕ‚ SobociΕ„ski Β· 2025 Β· arxiv arXiv:2502.03477

Prereqs: 🍞 Fritz 2020 (Markov categories). 🍞 Staton 2025 (Hoare logic) helps.

Not every computation succeeds. A partial Markov category extends Fritz's Markov categories with restriction β€” morphisms can fail, observations can have zero probability, and Bayes' theorem handles the conditioning. This is where wpPearl's conditioning and wpJeffrey's updating both live.

Restriction β€” morphisms that can fail

A restriction category (nLab) gives each morphism a "domain of definition" β€” a partial identity that says where the morphism is defined. In probabilistic terms: some observations have zero probability, and conditioning on them is undefined.

A B defined undefined P(event) = 0 partial morphism: success or failure
Scheme

Observations β€” conditioning on events

An observation is a partial morphism that "tests" whether an event occurred. If the event has zero probability, the observation is undefined β€” you can't condition on something that can't happen. This is the categorical version of "divide by zero in Bayes' rule."

Scheme

Bayes' theorem in the partial setting

Bayes' theorem becomes a theorem about partial morphisms: the posterior is defined exactly when the marginal likelihood is nonzero. The restriction structure tracks this automatically β€” no ad hoc division-by-zero guards needed.

Scheme

Pearl vs Jeffrey updating

Pearl conditioning sets evidence to a certainty (hard observation). Jeffrey updating sets evidence to a distribution (soft observation). Both are instances of the same categorical structure β€” Jeffrey generalizes Pearl by allowing partial observations.

Scheme

Notation reference

Paper Scheme Meaning
fΜ„ (restriction)(restriction f)Domain where f is defined
obs_E(condition dist event)Observation (condition on event)
f†_Ο€(bayes prior lk ev)Bayesian inverse (partial when P(ev)=0)
Pearl(e)(pearl-update ...)Hard conditioning
Jeffrey(q)(jeffrey-update ...)Soft conditioning
Neighbors

Other paper pages

Foundations (Wikipedia)

Translation notes

The examples use finite distributions with explicit zero-probability checks. The paper works with restriction categories and subdistribution monads, where partiality is built into the categorical structure via restriction idempotents. For example: the conditioning function on this page returns 'undefined when the event has zero probability. In the paper, this is a restriction idempotent β€” a morphism e with e;e = e that acts as a partial identity, and the zero-probability case is where the restriction is the zero morphism. The division-by-zero guard is the same; the categorical abstraction is not.

Every example is Simplified.

Ready for the real thing? arxiv Read the paper. Start at Β§3 for partial Markov categories, Β§5 for observations and Bayes' theorem, Β§7 for Pearl and Jeffrey updates.