This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

String Diagrams with Factorized Densities

Eli Sennesh Khoury College of Computer Science
Northeastern University
Boston, Massachusetts, United States of America [email protected] Amsterdam Machine Learning Lab (AMLab)
University of Amsterdam
Amsterdam, the Netherlands
   Jan-Willem van de Meent Amsterdam Machine Learning Lab (AMLab)
University of Amsterdam
Amsterdam, the Netherlands [email protected]
Abstract

A growing body of research on probabilistic programs and causal models has highlighted the need to reason compositionally about model classes that extend directed graphical models. Both probabilistic programs and causal models define a joint probability density over a set of random variables, and exhibit sparse structure that can be used to reason about causation and conditional independence. This work builds on recent work on Markov categories of probabilistic mappings to define a category whose morphisms combine a joint density, factorized over each sample space, with a deterministic mapping from samples to return values. This is a step towards closing the gap between recent category-theoretic descriptions of probability measures, and the operational definitions of factorized densities that are commonly employed in probabilistic programming and causal inference.

1 Introduction

Statisticians and machine learners analyze observed data by synthesizing models of those data. These models take a variety of forms, with several of the most widely used being directed graphical models, probabilistic programs, and structural causal models (SCMs). Applications of these frameworks have included cognitive modeling [8, 21], simulation-based inference [10], and model-based planning [13, 22]. Unfortunately, the richer the model class, the weaker the mathematical tools available to reason rigorously about it: SCMs built on linear equations with Gaussian noise admit easy inference, while graphical models have a clear meaning and a wide array of inference algorithms but encode a limited family of models. Probabilistic programs can encode any computably sampleable distribution, but the definition of their densities commonly relies on operational analogies with directed graphical models.

In recent years, category theorists have developed increasingly sophisticated ways to reason diagrammatically about a variety of complex systems. These include (co)parameterized categories of systems that may modify their parameters [6] and hierarchical string diagrams for rewriting higher-order computations [2]. Recent work on Markov categories of probabilistic mappings has provided denotational semantics to probabilistic programs [33, 19], abstract categorical descriptions of conditioning, disintegration, sufficient statistics, conditional independence [9, 14], and generalized causal models [15, 16].

This paper will take a step towards closing the gap between categorical probability and operational practice in probabilistic programming and applied Bayesian statistics. Denotational semantics for probabilistic programs define a measure over return values of a program given its inputs [33, 19]. To reason about inference methods, practitioners need to consider the joint distribution of internal random variables, as well as its density’s factorization into conditionals. Section 2 will review basic definitions from probability and measure theory necessary to do so. Section 3 will then develop a category whose morphisms express joint (rather than marginal) distributions with factorized joint densities. Section 4 will show that generalized causal models can factorize these densities and admit interventional and counterfactual queries. Section 5 will work through a pair of examples and summarize the paper’s developments.

Appendix A reviews the measure-theoretic concepts employed here; Appendix B reviews parametric and coparametric categories [6]; and Appendix C reviews free copy/delete and Markov categories.

Notation

The notation (𝒞,,I)(\mathcal{C},\otimes,I) will range over strict symmetric monoidal categories (SMC’s for short). We denote composition as gfg\circ f or equivalently as fgf\fatsemi g, write (X,,())(X^{*},\odot,()) for the finite list monoid on XX’s, and overload \otimes and \oplus for direct products and sums. We draw string diagrams from the top (domain) to the bottom (codomain), showing products from left to right. Given a Markov category 𝒞\mathcal{C} we will draw deterministic maps in 𝒞det𝒞\mathcal{C}_{det}\subset\mathcal{C} (which commute with 𝐜𝐨𝐩𝐲\mathbf{copy}) as rectangles and stochastic ones as ellipses/circles. We nest brackets with parentheses ([])([]) equivalently.

2 Background: abstract and concrete categorical probability

This section will review the background on which the rest of the paper builds. Categorical probability begins from an abstract notion of nondeterminism: processes with a notion of “independent copies”. Categorical probability then refines from a setting in which those nondeterministic processes “happen” whether observed or not, to a refined setting in which processes only “happen” when they affect an observed output. Categories of probability kernels, taking into account the details of measure theory (see Appendix A), will form a concrete instance of the abstract setting.

Definition 1 represents nondeterministic processes abstractly. A copy/delete category is an SMC whose morphisms generate information which can be copied or deleted freely.

Definition 1 (Copy/delete category).

A copy-delete or CD-category is an SMC (𝒞,,I)(\mathcal{C},\otimes,I) in which every object XOb(𝒞)X\in Ob(\mathcal{C}) has a commutative comonoid structure 𝐜𝐨𝐩𝐲X:𝒞(X,XX)\mathbf{copy}_{X}:\mathcal{C}(X,X\otimes X) and 𝐝𝐞𝐥X:𝒞(X,I)\mathbf{del}_{X}:\mathcal{C}(X,I) which commutes with the monoidal product structure.

Definition 2 then refines the abstract setting of CD categories to require that deleting the only result of a nondeterministic process is equivalent to deleting the process itself.

Definition 2 (Markov category).

A Markov category is a semicartesian CD-category (𝒞,,I)(\mathcal{C},\otimes,I), so that the comonoidal counit is natural (f:𝒞(Z,X),f𝐝𝐞𝐥X=I\forall f:\mathcal{C}(Z,X),f\fatsemi\mathbf{del}_{X}=I) and makes IOb(𝒞)I\in Ob(\mathcal{C}) a terminal object.

Example 1 gives the canonical Markov category, consisting of measurable spaces and maps.

Example 1 (Measurable spaces and functions form a category [34]).

Measurable spaces and functions form a Cartesian category 𝐌𝐞𝐚𝐬\mathbf{Meas} with objects (X,ΣX)Ob(𝐌𝐞𝐚𝐬)(X,\Sigma_{X})\in Ob(\mathbf{Meas}) consisting of sets XOb(𝐒𝐞𝐭)X\in Ob(\mathbf{Set}) and their σ\sigma-algebras111Collections of “measurable subsets” closed under complements, countable unions, and countable intersections ΣX\Sigma_{X} and morphisms 𝐌𝐞𝐚𝐬((Z,ΣZ),(X,ΣX))={fXZσXΣX,f1(σX)ΣZ}\mathbf{Meas}((Z,\Sigma_{Z}),(X,\Sigma_{X}))=\left\{f\in X^{Z}\mid\forall\sigma_{X}\in\Sigma_{X},f^{-1}(\sigma_{X})\in\Sigma_{Z}\right\} consisting of measurable functions between measurable spaces.

𝐌𝐞𝐚𝐬\mathbf{Meas} acquires its Markov comonoid structure from its Cartesian structure. Definition 3 below provides the canonical Markov category for measure-theoretic probability.

Definition 3 (Category of measurable spaces and Markov kernels).

The category 𝐒𝐭𝐨𝐜𝐡=Kl()(𝐌𝐞𝐚𝐬)\mathbf{Stoch}=Kl(\mathbb{P})(\mathbf{Meas}) of measurable spaces and Markov kernels is the Kleisli category of the Giry monad [18] over 𝐌𝐞𝐚𝐬\mathbf{Meas}, having measurable spaces as objects and Markov kernels (Definition 19) between them as morphisms.

Much of this paper will require a strict Markov category as in Definition 4 below.

Definition 4 (Strict Markov category).

A strict Markov category is one whose underlying SMC (with comonoid structure thrown away) is strict monoidal (its associator and unitors are identity).

Theorem 10.17 in Fritz [14] showed that every Markov category is comonoid equivalent to a strict one, licensing us to work with strictified Markov categories 𝐌𝐞𝐚𝐬\mathbf{Meas} and 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} without further concern.

Unless otherwise mentioned, this paper will work with 𝐌𝐞𝐚𝐬\mathbf{Meas} and 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} as strict, causal Markov categories222The latter property is shown in Example 11.35 of Fritz [14]. When the ambient category and σ\sigma-algebra is clear from context, f:ZXf:Z\leadsto X will abbreviate f:𝐒𝐭𝐨𝐜𝐡((Z,ΣZ),(X,ΣX))f:\mathbf{Stoch}((Z,\Sigma_{Z}),(X,\Sigma_{X})). In the concrete case of 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch}, measurable maps give the deterministic maps 𝐌𝐞𝐚𝐬𝐒𝐭𝐨𝐜𝐡det𝐒𝐭𝐨𝐜𝐡\mathbf{Meas}\simeq\mathbf{Stoch}_{det}\subseteq\mathbf{Stoch}. While Markov categories provide a compositional setting for nondeterministic processes, Markov kernels in these categories only provide probability measures for their outputs given their inputs. By design, they “forget” (i.e. marginalize over) all intermediate randomness in long chains of composition. Section 3 will build up a novel setting that “remembers” (i.e. does not marginalize over) joint distributions over all intermediate random variables through long chains of composition, and will show when there exist probability densities with respect to the joint distributions thus formed.

3 Joint distributions and densities for string diagrams

Statisticians cannot utilize input-output (parameter to distribution) mappings alone, except for maximum likelihood estimation. Instead, these typically appear as conditional probability distributions in a larger probability model. This larger model necessarily encodes a joint distribution over all relevant random variables, both those observed as data and the latent variables that give rise to observations. Practical probabilistic reasoning then consists of applying the laws of probability (product law for conjunctions, sum law for disjunctions, marginalization for unconditional events, Bayesian inversion) to numerical densities representing the joint distribution. This section will model the algebra of joint probability densities in a novel Markov category 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} constructed on the underlying Markov category 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch}.

Section 3.1 will first review an abstraction for categories in which morphisms act by “pushing forward” an internal “parameter space” and then instantiate that abstraction on a Markov category to yield a Markov category 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} of joint distributions. Section 3.2 will give the conditions for a concrete Markov kernel to admit a density. Section 3.3 will use those preliminaries to define a Markov category whose morphisms generate and push forward a joint probability density.

3.1 Accumulating random variables into joint distributions

Structural graphical models and probabilistic programs separate between the functions and variables they allow into deterministic and random ones [25]. Representing deterministic mechanisms categorically requires assuming that each nondeterministic process consists of a deterministic mechanism and a (potentially conditional) distribution over a random variable. This subsection will exploit “cybernetic” constructions (overviewed in Appendix B) for parameterization of deterministic mechanisms by random inputs and “writing out” of internal joint distributions as coparameters.

Proposition 1 will show the concrete category 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} supports those constructions.

Proposition 1 (𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} forms a symmetric monoidal \mathcal{M}-actegory333Definition 24 in Appendix B).

The concrete category 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} forms a symmetric monoidal \mathcal{M}-actegory for =𝐒𝐭𝐨𝐜𝐡\mathcal{M}=\mathbf{Stoch} and 𝒞=𝐒𝐭𝐨𝐜𝐡\mathcal{C}=\mathbf{Stoch}.

Proof.

Any SMC 𝒞\mathcal{C} forms a symmetric monoidal \mathcal{M}-actegory for =𝒞\mathcal{M}=\mathcal{C} with the product functor 𝒞=𝒞×𝒞\mathcal{M}\bullet\mathcal{C}=\mathcal{C}\times\mathcal{C} from the product category. Any Markov category is also an SMC, and so 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} suffices. ∎

In this trivial case, Definition 25 simplifies so that Definition 5 will form an SMC.

Definition 5 (Symmetric monoidal parametric categories).

Given a strict SMC (𝒞,,I)(\mathcal{C},\otimes,I), the symmetric monoidal parametric (bi)category 𝐏𝐚𝐫𝐚(𝒞)\mathbf{Para}_{\otimes}(\mathcal{C}) has as objects those of 𝒞\mathcal{C} and as morphisms the pairs 𝐏𝐚𝐫𝐚(𝒞)(A,B)={(M,k)Ob(𝒞)×𝒞(MA,B)}\mathbf{Para}_{\otimes}(\mathcal{C})(A,B)=\left\{(M,k)\in Ob(\mathcal{C})\times\mathcal{C}(M\otimes A,B)\right\}. Composition for the two parameterized morphisms (M,k):𝐏𝐚𝐫𝐚(𝒞)(A,B)(M,k):\mathbf{Para}_{\otimes}(\mathcal{C})(A,B) and (M,k):𝐏𝐚𝐫𝐚(𝒞)(B,C)(M^{\prime},k^{\prime}):\mathbf{Para}_{\otimes}(\mathcal{C})(B,C) consists of (MM,k(idMk)))(M^{\prime}\otimes M,k^{\prime}\circ(id_{M^{\prime}}\otimes k))); identities on objects AA consist of (I,idA)(I,id_{A}); and (𝐏𝐚𝐫𝐚(𝒞),,I)(\mathbf{Para}_{\otimes}(\mathcal{C}),\otimes,I) inherits its monoidal structure from 𝒞\mathcal{C}444see Proposition 6.

𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)\mathbf{Para}_{\otimes}(\mathbf{Stoch}) will suffice for Definition 6 to model a Markov kernel over a joint distribution. The jointly random residual (M,ΣM)Ob(𝐒𝐭𝐨𝐜𝐡)(M,\Sigma_{M})\in Ob(\mathbf{Stoch}) will parameterize the deterministic map kk.

Definition 6 (Joint Markov kernel).

A joint Markov kernel is a pair of a Markov kernel with a deterministic mapping parameterized by that Markov kernel, up to permutation of residual components

𝐉𝐨𝐢𝐧𝐭(Z,X)\displaystyle\mathbf{Joint}(Z,X) :={(f,[M,k]):𝐒𝐭𝐨𝐜𝐡(Z,M)×𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡det)(Z,X)}.\displaystyle:=\left\{(f,[M,k]):\mathbf{Stoch}(Z,M)\times\mathbf{Para}_{\otimes}(\mathbf{Stoch}_{det})(Z,X)\right\}.

As implied by the hom-set notation above, joint Markov kernels will form a category of nondeterministic processes. Since the residuals of joint distributions only contribute to downstream processes through their local outputs, Theorem 1 will show this to be a copy/delete category.

Theorem 1 (Joint Markov kernels form a copy/delete category).

𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} is a strict copy/delete category having Ob(𝐉𝐨𝐢𝐧𝐭)=Ob(𝐒𝐭𝐨𝐜𝐡)Ob(\mathbf{Joint})=Ob(\mathbf{Stoch}) and joint Markov kernels as morphisms.

Proof.

𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} must admit the typical requirements of a category as well as deterministic, copy-delete symmetric monoidal structure. We can demonstrate the necessary deterministic structure by exhibiting joint kernels (I,k):𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡det)(Z,X)([I,k],𝐝𝐞𝐥Z):𝐉𝐨𝐢𝐧𝐭(Z,X)(I,k):\mathbf{Para}_{\otimes}(\mathbf{Stoch}_{det})(Z,X)\implies([I,k],\mathbf{del}_{Z}):\mathbf{Joint}(Z,X) for any noiseless causal mechanism. Setting k=𝐜𝐨𝐩𝐲Xk=\mathbf{copy}_{X} or k=𝐝𝐞𝐥Zk=\mathbf{del}_{Z} yields the necessary copy and delete maps. Setting k=𝐬𝐰𝐚𝐩ZXk=\mathbf{swap}_{Z\otimes X} gives the necessary symmetry of the monoidal product. It remains to show that 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} has a monoidal product over morphisms and that its hom-sets are closed under composition.

Given two joint Markov kernels (f1,[M1,k1]):𝐉𝐨𝐢𝐧𝐭(Z,X)(f_{1},[M_{1},k_{1}]):\mathbf{Joint}(Z,X) and (f2,[M2,k2]):𝐉𝐨𝐢𝐧𝐭(W,Y)(f_{2},[M_{2},k_{2}]):\mathbf{Joint}(W,Y), their monoidal product is formed by pairing their causal mechanisms and noise distributions

(f1,[M1,k1])(f2,[M2,k2])\displaystyle(f_{1},[M_{1},k_{1}])\otimes(f_{2},[M_{2},k_{2}]) :=(f1𝐒𝐭𝐨𝐜𝐡f2,[M1,k1]𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡det)[M2,k2]):𝐉𝐨𝐢𝐧𝐭(ZW,XY).\displaystyle:=(f_{1}\otimes_{\mathbf{Stoch}}f_{2},[M_{1},k_{1}]\otimes_{\mathbf{Para}_{\otimes}(\mathbf{Stoch}_{det})}[M_{2},k_{2}]):\mathbf{Joint}(Z\otimes W,X\otimes Y).

Composing two joint Markov kernels (f1,[M1,k1]):𝐉𝐨𝐢𝐧𝐭(Z,X)(f_{1},[M_{1},k_{1}]):\mathbf{Joint}(Z,X) and (f2,[M2,k2]):𝐉𝐨𝐢𝐧𝐭(X,Y)(f_{2},[M_{2},k_{2}]):\mathbf{Joint}(X,Y) along their intermediate object involves composing their parametric maps and taking a conditional product of their stochastic kernels to form the composite joint distribution

(f1,[M1,k1])(f2,[M2,k2])\displaystyle(f_{1},[M_{1},k_{1}])\fatsemi(f_{2},[M_{2},k_{2}]) :=(Zf1k1f2M1M2,(M1M2,M1M2Zk1k2Y)):𝐉𝐨𝐢𝐧𝐭(Z,Y).\displaystyle:=\left(\leavevmode\hbox to41.03pt{\vbox to103.14pt{\pgfpicture\makeatletter\hbox{\hskip 8.11008pt\lower-101.6858pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{15.1434pt}{-6.6596pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle Z$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-14.22638pt}\pgfsys@lineto{17.78297pt}{-21.33957pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@lineto{7.11319pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@lineto{28.45276pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@moveto{19.91684pt}{-21.33957pt}\pgfsys@curveto{19.91684pt}{-22.51808pt}{18.96149pt}{-23.47343pt}{17.78297pt}{-23.47343pt}\pgfsys@curveto{16.60446pt}{-23.47343pt}{15.64911pt}{-22.51808pt}{15.64911pt}{-21.33957pt}\pgfsys@curveto{15.64911pt}{-20.16106pt}{16.60446pt}{-19.2057pt}{17.78297pt}{-19.2057pt}\pgfsys@curveto{18.96149pt}{-19.2057pt}{19.91684pt}{-20.16106pt}{19.91684pt}{-21.33957pt}\pgfsys@closepath\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-28.45276pt}\pgfsys@lineto{7.11319pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@lineto{7.11319pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@moveto{11.38113pt}{-35.56595pt}\pgfsys@curveto{11.38113pt}{-37.9231pt}{9.47034pt}{-39.8339pt}{7.11319pt}{-39.8339pt}\pgfsys@curveto{4.75604pt}{-39.8339pt}{2.84525pt}{-37.9231pt}{2.84525pt}{-35.56595pt}\pgfsys@curveto{2.84525pt}{-33.2088pt}{4.75604pt}{-31.298pt}{7.11319pt}{-31.298pt}\pgfsys@curveto{9.47034pt}{-31.298pt}{11.38113pt}{-33.2088pt}{11.38113pt}{-35.56595pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{4.0229pt}{-37.31595pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle f_{1}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-28.45276pt}\pgfsys@lineto{28.45276pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-42.67914pt}\pgfsys@lineto{7.11319pt}{-49.79233pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@lineto{0.0pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@lineto{14.22638pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@moveto{9.24706pt}{-49.79233pt}\pgfsys@curveto{9.24706pt}{-50.97084pt}{8.2917pt}{-51.9262pt}{7.11319pt}{-51.9262pt}\pgfsys@curveto{5.93468pt}{-51.9262pt}{4.97932pt}{-50.97084pt}{4.97932pt}{-49.79233pt}\pgfsys@curveto{4.97932pt}{-48.61382pt}{5.93468pt}{-47.65846pt}{7.11319pt}{-47.65846pt}\pgfsys@curveto{8.2917pt}{-47.65846pt}{9.24706pt}{-48.61382pt}{9.24706pt}{-49.79233pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-42.67914pt}\pgfsys@lineto{28.45276pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-56.90552pt}\pgfsys@lineto{0.0pt}{-71.1319pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-56.90552pt}\pgfsys@lineto{14.22638pt}{-59.75075pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-56.90552pt}\pgfsys@lineto{28.45276pt}{-59.75075pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-68.28665pt}\pgfsys@lineto{21.33957pt}{-71.1319pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{10.95842pt}{-59.75075pt}\pgfsys@lineto{31.7207pt}{-59.75075pt}\pgfsys@curveto{32.273pt}{-59.75075pt}{32.7207pt}{-60.19846pt}{32.7207pt}{-60.75075pt}\pgfsys@lineto{32.7207pt}{-67.28665pt}\pgfsys@curveto{32.7207pt}{-67.83894pt}{32.273pt}{-68.28665pt}{31.7207pt}{-68.28665pt}\pgfsys@lineto{10.95842pt}{-68.28665pt}\pgfsys@curveto{10.40613pt}{-68.28665pt}{9.95842pt}{-67.83894pt}{9.95842pt}{-67.28665pt}\pgfsys@lineto{9.95842pt}{-60.75075pt}\pgfsys@curveto{9.95842pt}{-60.19846pt}{10.40613pt}{-59.75075pt}{10.95842pt}{-59.75075pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-64.0187pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{18.40729pt}{-65.80481pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle k_{1}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-71.1319pt}\pgfsys@lineto{0.0pt}{-85.35828pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-71.1319pt}\pgfsys@lineto{21.33957pt}{-78.24509pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-78.24509pt}\pgfsys@lineto{21.33957pt}{-85.35828pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-78.24509pt}\pgfsys@moveto{25.60751pt}{-78.24509pt}\pgfsys@curveto{25.60751pt}{-80.60223pt}{23.69672pt}{-82.51303pt}{21.33957pt}{-82.51303pt}\pgfsys@curveto{18.98242pt}{-82.51303pt}{17.07162pt}{-80.60223pt}{17.07162pt}{-78.24509pt}\pgfsys@curveto{17.07162pt}{-75.88794pt}{18.98242pt}{-73.97714pt}{21.33957pt}{-73.97714pt}\pgfsys@curveto{23.69672pt}{-73.97714pt}{25.60751pt}{-75.88794pt}{25.60751pt}{-78.24509pt}\pgfsys@closepath\pgfsys@moveto{21.33957pt}{-78.24509pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-78.24509pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{18.24928pt}{-79.99509pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle f_{2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-95.3167pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-4.77707pt}{-97.06392pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle M_{1}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-95.3167pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{16.5625pt}{-97.06392pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle M_{2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate,\left(M_{1}\otimes M_{2},\leavevmode\hbox to42.54pt{\vbox to74.69pt{\pgfpicture\makeatletter\hbox{\hskip 8.11008pt\lower-72.58861pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-4.77707pt}{-6.01517pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle M_{1}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{9.44931pt}{-6.01517pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle M_{2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{25.81319pt}{-6.6596pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle Z$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-14.22638pt}\pgfsys@lineto{14.22638pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }\color[rgb]{1,1,1}\definecolor[named]{pgfstrokecolor}{rgb}{1,1,1}\pgfsys@color@gray@stroke{1}\pgfsys@invoke{ }\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@moveto{8.5359pt}{-21.33957pt}\pgfsys@curveto{8.5359pt}{-22.12532pt}{7.89894pt}{-22.76228pt}{7.11319pt}{-22.76228pt}\pgfsys@curveto{6.32744pt}{-22.76228pt}{5.69048pt}{-22.12532pt}{5.69048pt}{-21.33957pt}\pgfsys@curveto{5.69048pt}{-20.55382pt}{6.32744pt}{-19.91685pt}{7.11319pt}{-19.91685pt}\pgfsys@curveto{7.89894pt}{-19.91685pt}{8.5359pt}{-20.55382pt}{8.5359pt}{-21.33957pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-14.22638pt}\pgfsys@lineto{0.0pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-14.22638pt}\pgfsys@lineto{28.45276pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-28.45276pt}\pgfsys@lineto{0.0pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-28.45276pt}\pgfsys@lineto{14.22638pt}{-31.29799pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-28.45276pt}\pgfsys@lineto{28.45276pt}{-31.29799pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-39.8339pt}\pgfsys@lineto{21.33957pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{10.95842pt}{-31.29799pt}\pgfsys@lineto{31.7207pt}{-31.29799pt}\pgfsys@curveto{32.273pt}{-31.29799pt}{32.7207pt}{-31.7457pt}{32.7207pt}{-32.29799pt}\pgfsys@lineto{32.7207pt}{-38.8339pt}\pgfsys@curveto{32.7207pt}{-39.38618pt}{32.273pt}{-39.8339pt}{31.7207pt}{-39.8339pt}\pgfsys@lineto{10.95842pt}{-39.8339pt}\pgfsys@curveto{10.40613pt}{-39.8339pt}{9.95842pt}{-39.38618pt}{9.95842pt}{-38.8339pt}\pgfsys@lineto{9.95842pt}{-32.29799pt}\pgfsys@curveto{9.95842pt}{-31.7457pt}{10.40613pt}{-31.29799pt}{10.95842pt}{-31.29799pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{18.40729pt}{-37.35205pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle k_{1}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-42.67914pt}\pgfsys@lineto{0.0pt}{-45.52437pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-42.67914pt}\pgfsys@lineto{21.33957pt}{-45.52437pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{10.66978pt}{-54.06027pt}\pgfsys@lineto{10.66978pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{-3.26794pt}{-45.52437pt}\pgfsys@lineto{24.60751pt}{-45.52437pt}\pgfsys@curveto{25.1598pt}{-45.52437pt}{25.60751pt}{-45.97208pt}{25.60751pt}{-46.52437pt}\pgfsys@lineto{25.60751pt}{-53.06027pt}\pgfsys@curveto{25.60751pt}{-53.61256pt}{25.1598pt}{-54.06027pt}{24.60751pt}{-54.06027pt}\pgfsys@lineto{-3.26794pt}{-54.06027pt}\pgfsys@curveto{-3.82024pt}{-54.06027pt}{-4.26794pt}{-53.61256pt}{-4.26794pt}{-53.06027pt}\pgfsys@lineto{-4.26794pt}{-46.52437pt}\pgfsys@curveto{-4.26794pt}{-45.97208pt}{-3.82024pt}{-45.52437pt}{-3.26794pt}{-45.52437pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{10.66978pt}{-49.79233pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{7.7375pt}{-51.57843pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle k_{2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{10.66978pt}{-66.86394pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{7.86006pt}{-69.2556pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle Y$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate\right)\right):\mathbf{Joint}(Z,Y). (1)

Anything called a joint Markov kernel ought to expose its internal joint distribution in a structured way. Definition 7 will link the composition of joint distributions to the cybernetics literature.

Definition 7 (Symmetric monoidal coparametric categories555See Definition 26 for the more general case).

Given a strict SMC (𝒞,,I)(\mathcal{C},\otimes,I), the symmetric monoidal coparametric (bi)category 𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)\mathbf{CoPara}_{\otimes}(\mathcal{C}) has as objects those of 𝒞\mathcal{C} and as morphisms the pairs 𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)(A,B)={(M,k)Ob(𝒞)×𝒞(A,MB)}\mathbf{CoPara}_{\otimes}(\mathcal{C})(A,B)=\left\{(M,k)\in Ob(\mathcal{C})\times\mathcal{C}(A,M\otimes B)\right\} of a residual object and a morphism from AA to MBM\otimes B. Composition for the morphisms (M,k):𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)(A,B)(M,k):\mathbf{CoPara}_{\otimes}(\mathcal{C})(A,B) and (M,k):𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)(B,C)(M^{\prime},k^{\prime}):\mathbf{CoPara}_{\otimes}(\mathcal{C})(B,C) consists of (MM,(idMk)k))(M^{\prime}\otimes M,(id_{M}\otimes k^{\prime})\circ k)); identities on objects AA consist of (I,idA)(I,id_{A}); and (𝐂𝐨𝐏𝐚𝐫𝐚(𝒞),,I)(\mathbf{CoPara}_{\otimes}(\mathcal{C}),\otimes,I) inherits its monoidal structure from 𝒞\mathcal{C}666See Proposition 6.

𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} serves to work with joint distributions compositionally rather than marginalizing them out. Theorem 2 will show how mapping from 𝐉𝐨𝐢𝐧𝐭𝐂𝐨𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)\mathbf{Joint}\rightarrow\mathbf{CoPara}_{\otimes}(\mathbf{Stoch}) exposes the full joint distribution.

Theorem 2 (Joint Markov kernels coparameterize joint distributions).

There exists a full, identity-on-objects Markov functor :𝐉𝐨𝐢𝐧𝐭𝐂𝐨𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)\left\llbracket\cdot\right\rrbracket:\mathbf{Joint}\rightarrow\mathbf{CoPara}_{\otimes}(\mathbf{Stoch}) which maps the residual of a joint Markov kernel in 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} onto the residual of its image in 𝐂𝐨𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)\mathbf{CoPara}_{\otimes}(\mathbf{Stoch}).

Proof.

The required functor sends morphisms :𝐉𝐨𝐢𝐧𝐭(Z,X)𝐂𝐨𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)(Z,X)\left\llbracket\cdot\right\rrbracket:\mathbf{Joint}(Z,X)\rightarrow\mathbf{CoPara}_{\otimes}(\mathbf{Stoch})(Z,X) to coparameterized Markov kernels whose codomain is the joint distribution over the residual and the output

(f,[M,k])\displaystyle\left\llbracket(f,[M,k])\right\rrbracket =(M,ZfkMX).\displaystyle=\left(M,\leavevmode\hbox to40.03pt{\vbox to88.27pt{\pgfpicture\makeatletter\hbox{\hskip 7.11008pt\lower-86.81499pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{15.1434pt}{-6.6596pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle Z$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-14.22638pt}\pgfsys@lineto{17.78297pt}{-21.33957pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@lineto{7.11319pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@lineto{28.45276pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@moveto{19.91684pt}{-21.33957pt}\pgfsys@curveto{19.91684pt}{-22.51808pt}{18.96149pt}{-23.47343pt}{17.78297pt}{-23.47343pt}\pgfsys@curveto{16.60446pt}{-23.47343pt}{15.64911pt}{-22.51808pt}{15.64911pt}{-21.33957pt}\pgfsys@curveto{15.64911pt}{-20.16106pt}{16.60446pt}{-19.2057pt}{17.78297pt}{-19.2057pt}\pgfsys@curveto{18.96149pt}{-19.2057pt}{19.91684pt}{-20.16106pt}{19.91684pt}{-21.33957pt}\pgfsys@closepath\pgfsys@moveto{17.78297pt}{-21.33957pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-28.45276pt}\pgfsys@lineto{7.11319pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@lineto{7.11319pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@moveto{11.38113pt}{-35.56595pt}\pgfsys@curveto{11.38113pt}{-37.9231pt}{9.47034pt}{-39.8339pt}{7.11319pt}{-39.8339pt}\pgfsys@curveto{4.75604pt}{-39.8339pt}{2.84525pt}{-37.9231pt}{2.84525pt}{-35.56595pt}\pgfsys@curveto{2.84525pt}{-33.2088pt}{4.75604pt}{-31.298pt}{7.11319pt}{-31.298pt}\pgfsys@curveto{9.47034pt}{-31.298pt}{11.38113pt}{-33.2088pt}{11.38113pt}{-35.56595pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{5.0229pt}{-37.31595pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle f$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-28.45276pt}\pgfsys@lineto{28.45276pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-42.67914pt}\pgfsys@lineto{7.11319pt}{-49.79233pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@lineto{0.0pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@lineto{14.22638pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@moveto{9.24706pt}{-49.79233pt}\pgfsys@curveto{9.24706pt}{-50.97084pt}{8.2917pt}{-51.9262pt}{7.11319pt}{-51.9262pt}\pgfsys@curveto{5.93468pt}{-51.9262pt}{4.97932pt}{-50.97084pt}{4.97932pt}{-49.79233pt}\pgfsys@curveto{4.97932pt}{-48.61382pt}{5.93468pt}{-47.65846pt}{7.11319pt}{-47.65846pt}\pgfsys@curveto{8.2917pt}{-47.65846pt}{9.24706pt}{-48.61382pt}{9.24706pt}{-49.79233pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-49.79233pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-42.67914pt}\pgfsys@lineto{28.45276pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-56.90552pt}\pgfsys@lineto{0.0pt}{-71.1319pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-56.90552pt}\pgfsys@lineto{14.22638pt}{-59.75075pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-56.90552pt}\pgfsys@lineto{28.45276pt}{-59.75075pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-68.28665pt}\pgfsys@lineto{21.33957pt}{-71.1319pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{10.95842pt}{-59.75075pt}\pgfsys@lineto{31.7207pt}{-59.75075pt}\pgfsys@curveto{32.273pt}{-59.75075pt}{32.7207pt}{-60.19846pt}{32.7207pt}{-60.75075pt}\pgfsys@lineto{32.7207pt}{-67.28665pt}\pgfsys@curveto{32.7207pt}{-67.83894pt}{32.273pt}{-68.28665pt}{31.7207pt}{-68.28665pt}\pgfsys@lineto{10.95842pt}{-68.28665pt}\pgfsys@curveto{10.40613pt}{-68.28665pt}{9.95842pt}{-67.83894pt}{9.95842pt}{-67.28665pt}\pgfsys@lineto{9.95842pt}{-60.75075pt}\pgfsys@curveto{9.95842pt}{-60.19846pt}{10.40613pt}{-59.75075pt}{10.95842pt}{-59.75075pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-64.0187pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{19.40729pt}{-66.44925pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle k$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-81.09032pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-3.77707pt}{-83.48198pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle M$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-81.09032pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{18.16527pt}{-83.48198pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle X$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate\right).

This functor is trivially full, since any morphism f:𝐂𝐨𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)(Z,X)f:\mathbf{CoPara}_{\otimes}(\mathbf{Stoch})(Z,X) embeds trivially into 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} by setting the corresponding deterministic k=idMXk=id_{M\otimes X}. It is not faithful: multiple “divisions of labor” between ff and kk can yield the same Markov kernel in 𝐂𝐨𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡)\mathbf{CoPara}_{\otimes}(\mathbf{Stoch}). ∎

Corollary 3 will give the trivial extension of marginalizing over the residual.

Corollary 3 (Marginalizing a joint Markov kernel’s residual yields a Markov kernel).

There exists a full, identity-on-objects functor J:𝐉𝐨𝐢𝐧𝐭𝐒𝐭𝐨𝐜𝐡J:\mathbf{Joint}\rightarrow\mathbf{Stoch}.

Proof.

The required functor JJ just applies \left\llbracket\cdot\right\rrbracket and then forgets the residual by composition with 𝐝𝐞𝐥M\mathbf{del}_{M}: its action on morphisms is J((f,[M,k]))=(f,[M,k])(𝐝𝐞𝐥MidX)J((f,[M,k]))=\left\llbracket(f,[M,k])\right\rrbracket\fatsemi(\mathbf{del}_{M}\otimes id_{X}). ∎

This subsection has considered arbitrary, unstructured joint distributions 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint}. Section 3.2 will examine the special case in which the residual object is a standard Borel space and the conditional distribution into it meets the necessary conditions to admit a probability density.

3.2 Base measures and densities over standard Borel spaces

Applied probability typically works not with probability measures but with probability densities, functions over a finite-dimensional sample space giving the “derivative” of a probability measure at a point. However, probability densities only exist for measures that meet the conditions of the Radon-Nikodym Theorem, and only relative to a specified base measure over the sample space. This section will restrict the residual objects or internal noises of joint Markov kernels to standard Borel sample spaces admitting probability densities, and then show that this restriction still admits a broad class of joint Markov kernels.

Definition 8 provides a suitable ambient category for base measures.

Definition 8 (Category of measure spaces).

The category of measure spaces 𝕄\mathbb{M} has as objects the measure spaces (X,ΣX,μ)(X,\Sigma_{X},\mu) (Definition 22) and as morphisms the measure-preserving maps

𝕄((Z,ΣZ,μZ),(X,ΣX,μX))\displaystyle\mathbb{M}\left((Z,\Sigma_{Z},\mu_{Z}),(X,\Sigma_{X},\mu_{X})\right) ={f:𝐌𝐞𝐚𝐬((Z,ΣZ),(X,ΣX))σXΣX,μZ(f1(σX))=μX(σX)}.\displaystyle=\left\{f:\mathbf{Meas}((Z,\Sigma_{Z}),(X,\Sigma_{X}))\mid\forall\sigma_{X}\in\Sigma_{X},\mu_{Z}(f^{-1}(\sigma_{X}))=\mu_{X}(\sigma_{X})\right\}.

Applications typically deal with probability densities over finite-dimensional Euclidean spaces and countable sets. In 𝐌𝐞𝐚𝐬\mathbf{Meas}, these can be characterized by the standard Borel spaces 𝐒𝐛𝐬𝐌𝐞𝐚𝐬\mathbf{Sbs}\subset\mathbf{Meas}, which are unique for each cardinality up to uncountability. Assigning these their canonical base measures will provide a suitable setting of measure spaces for characterizing densities.

However, the Radon-Nikodym Theorem requires that the sample space admit not only a measure but a σ\sigma-finite (Definition 20) base measure. Proposition 2 and Proposition 3 will therefore characterize the algebraic operations under which σ\sigma-finite measure spaces are closed. Proposition 2 below will characterize the base measures for joint probability densities.

Proposition 2 (σ\sigma-finite measure spaces have finite direct products).

Let IOb(𝐅𝐢𝐧𝐒𝐞𝐭)I\in Ob(\mathbf{FinSet}) be a set and let there be an II-indexed family of σ\sigma-finite measure spaces (Xi,ΣXi,μXi)iIOb(𝕄)(X_{i},\Sigma_{X_{i}},\mu_{X_{i}})_{i\in I}\in Ob(\mathbb{M}). Then there exists a σ\sigma-finite direct product measure space iI(Xi,ΣXi,μXi)=(X,ΣX,μX)\bigotimes_{i\in I}(X_{i},\Sigma_{X_{i}},\mu_{X_{i}})=(X,\Sigma_{X},\mu_{X}).

Proof.

The product iI(Xi,Σi)Ob(𝐌𝐞𝐚𝐬)\bigotimes_{i\in I}(X_{i},\Sigma_{i})\in Ob(\mathbf{Meas}) exists thanks to 𝐌𝐞𝐚𝐬\mathbf{Meas} being Cartesian, so that the resulting set is that of Cartesian products and the σ\sigma-algebra is also that of Cartesian products. Letting πi\pi_{i} be the projection indexed by iIi\in I of a Cartesian product, we write the σ\sigma-finite product measure (which exists and is unique when (Xi,ΣXi,μXi)(X_{i},\Sigma_{X_{i}},\mu_{X_{i}}) are σ\sigma-finite [34]777Definition 1.7.4, page 161) as μX(σX)=iIμXi({πi(x):xσX})\mu_{X}(\sigma_{X})=\prod_{i\in I}\mu_{X_{i}}\left(\left\{\pi_{i}(x):x\in\sigma_{X}\right\}\right), yielding the direct product (iIXi,iIΣXi,μX)Ob(𝕄)\left(\bigotimes_{i\in I}X_{i},\bigotimes_{i\in I}\Sigma_{X_{i}},\mu_{X}\right)\in Ob(\mathbb{M}). ∎

The reader can check that the direct product of measure spaces does not form a categorical product: the pairing required to witness the universal property will not be measure-preserving, with intervals of different lengths in the real line providing a counterexample.

Proposition 3 will then characterize the base measures for mixture probability densities.

Proposition 3 (σ\sigma-finite measure spaces have countable direct sums [12]888214L, page 38).

Let IOb(𝐒𝐞𝐭)I\in Ob(\mathbf{Set}) be a countable set and (Xi,ΣXi,μXi)iIOb(𝕄)(X_{i},\Sigma_{X_{i}},\mu_{X_{i}})_{i\in I}\in Ob(\mathbb{M}) be a family of σ\sigma-finite measure spaces indexed by II. Then there exists a σ\sigma-finite direct sum measure space iI(Xi,ΣXi,μXi)Ob(𝕄)\bigoplus_{i\in I}(X_{i},\Sigma_{X_{i}},\mu_{X_{i}})\in Ob(\mathbb{M}).

Proof.

The direct sum iI(Xi,ΣXi,μXi)=(X,ΣX,μX)Ob(𝕄)\bigoplus_{i\in I}(X_{i},\Sigma_{X_{i}},\mu_{X_{i}})=\left(X,\Sigma_{X},\mu_{X}\right)\in Ob(\mathbb{M}) of the indexed family consists of the set X=iI(Xi×{i})X=\bigcup_{i\in I}\left(X_{i}\times\{i\}\right), the σ\sigma-algebra ΣX={σX:σXX,iI,{x:(x,i)σX}ΣXi}\Sigma_{X}=\left\{\sigma_{X}:\sigma_{X}\subseteq X,\forall i\in I,\{x:(x,i)\in\sigma_{X}\}\in\Sigma_{X_{i}}\right\}, and the sum measure μX(σX)=iIμXi({x:(x,i)σX})\mu_{X}(\sigma_{X})=\sum_{i\in I}\mu_{X_{i}}(\{x:(x,i)\in\sigma_{X}\}). ∎

The reader can check that the direct sum of measure spaces does not form a categorical coproduct: the copairing required to witness the universal property will not be measure-preserving.

The above propositions characterized the algebra of σ\sigma-finite measure spaces, which thus now requires base cases. Restricting our attention to the standard Borel spaces, we can take the singleton set (I,(I),μ#)(I,\mathcal{B}(I),\mu_{\#}) equipped with the counting measure μ#\mu_{\#} and the real line (,(),λ)(\mathbb{R},\mathcal{B}(\mathbb{R}),\lambda) with the Lebesgue measure as those base cases. An nn-fold or countable direct sum of the singleton set gives finite and countable discrete measure spaces, whose counting measure is σ\sigma-finite, while an nn-fold product of the real line gives the Euclidean spaces, whose nn-dimensional Lebesgue measures are σ\sigma-finite. Definition 9 will therefore formally give the class of measure spaces suitable for forming probability densities.

Definition 9 (σ\sigma-finite standard Borel measure space).

The subcategory 𝕄𝕄\mathbb{M}_{\mathcal{B}}\subset\mathbb{M} restricts the category of measure spaces to the σ\sigma-finite standard Borel measure spaces freely generated by finite direct products \otimes (Proposition 2) and countable direct sums \oplus (Proposition 3) of the counting-measured singleton space (𝟙,(𝟙),μ#)(\mathbbm{1},\mathcal{B}(\mathbbm{1}),\mu_{\#}) and the Lebesgue-measured reals (,(),λ)(\mathbb{R},\mathcal{B}(\mathbb{R}),\lambda).

Definition 9 covers the most common sample spaces and their base measures, as instances of a more general construction assigning base measures to finite-dimensional manifolds as sample spaces for probability densities [28]. The above only allows finite products, since the product-of-Lebesgues measure on the Hilbert cube \mathbb{R}^{\mathbb{N}} (via the Borel isomorphism [0,1]\mathbb{R}\simeq[0,1]) fails to be σ\sigma-finite [3]. The rest of the paper will therefore work with measure spaces 𝕄\mathbb{M}_{\mathcal{B}}, whose isomorphisms preserve base measures.

Having a class of measure spaces suitable for stating probability densities with respect to count, length, area, volume, etc., Definition 10 gives the class of Markov kernels which will admit densities.

Definition 10 (Density kernel).

A standard Borel density kernel is a σ\sigma-finite (Definition 20) Markov kernel f:ZXf:Z\leadsto X whose codomain forms a σ\sigma-finite standard Borel measure space (X,ΣX,μX)Ob(𝕄)(X,\Sigma_{X},\mu_{X})\in Ob(\mathbb{M}_{\mathcal{B}}) and which is absolutely continuous z,f(z)μX\forall z,f(z)\ll\mu_{X} with respect to the base measure μX\mu_{X}

𝐃𝐞𝐧𝐬((Z,ΣZ),(X,ΣX))\displaystyle\mathbf{Dens}((Z,\Sigma_{Z}),(X,\Sigma_{X})) :={(f,μX):(ZX)×𝕄(X)(X,ΣX,μX)Ob(𝕄),zZ,f(z)μx}.\displaystyle:=\left\{(f,\mu_{X}):(Z\leadsto X)\times\mathbb{M}\left(X\right)\mid(X,\Sigma_{X},\mu_{X})\in Ob(\mathbb{M}_{\mathcal{B}}),\forall z\in Z,f(z)\ll\mu_{x}\right\}.

Probability (and arbitrary measure) densities p(xz)p(x\mid z) also admit an alternative interpretation as measure kernels Z×X×ΣI[0,]Z\times X\times\Sigma_{I}\rightarrow[0,\infty] whose integration under the base measure yields the normalizing constant. Proposition 4 verifies that density kernels in fact admit probability densities.

Theorem 4 (Density kernels admit densities).

Every density kernel (f,μX):(ZX)×𝕄(X)(f,\mu_{X}):(Z\leadsto X)\times\mathbb{M}\left(X\right) (Definition 10) into a standard Borel measure space admits a density with respect to the base measure μX\mu_{X}.

Proof.

σ\sigma-finiteness of the kernel ff and the base measure μX\mu_{X}, plus absolute continuity, give the necessary conditions for the classical Radon-Nikodym theorem: a Radon-Nikodym derivative therefore exists

df(z)dμX\displaystyle\frac{df(z)}{d\mu_{X}} :𝐌𝐞𝐚𝐬(X,0)\displaystyle:\mathbf{Meas}(X,\mathbb{R}_{\geq 0}) f(z)(σX)\displaystyle f(z)(\sigma_{X}) =xσXdf(z)dμX(x)μX(dx).\displaystyle=\int_{x\in\sigma_{X}}\>\frac{df(z)}{d\mu_{X}}\left(x\right)\>\mu_{X}(dx).

The Radon-Nikodym derivative is the measure-theoretic notion of a probability density function

dfdμX\displaystyle\frac{df}{d\mu_{X}} :𝐌𝐞𝐚𝐬(Z×X,0),\displaystyle:\mathbf{Meas}(Z\times X,\mathbb{R}_{\geq 0}), pf()\displaystyle p_{\scriptsize f}(\cdot\mid\cdot) :𝐌𝐞𝐚𝐬(X×Z,0),\displaystyle:\mathbf{Meas}(X\times Z,\mathbb{R}_{\geq 0}), pf(xz)\displaystyle p_{\scriptsize f}(x\mid z) :=df(z)dμX(x).\displaystyle:=\frac{df(z)}{d\mu_{X}}\left(x\right).

The conditions on density kernels are therefore sufficient to yield probability densities. ∎

Despite the hom-set notation used for convenience, density kernels do not form a category: identity Markov kernels are Dirac delta measures that only admit densities in discrete spaces. They do, however, support all compositional structure under which the resulting base measure still indexes a standard Borel measure space. Definition 11 lays the foundation for this structure.

Definition 11 (Precomposition of a density kernel).

Given a density kernel (f,μX):(ZX)×𝕄(X)(f,\mu_{X}):(Z\leadsto X)\times\mathbb{M}\left(X\right) and a Markov kernel h:WZh:W\leadsto Z, their precomposition is (f,μX)𝐃𝐞𝐧𝐬h=(f𝐒𝐭𝐨𝐜𝐡h,μX)(f,\mu_{X})\circ_{\mathbf{Dens}}h=(f\circ_{\mathbf{Stoch}}h,\mu_{X}).

The above precomposition gives a definition for the composition of two density kernels: given (f,μX)(f,\mu_{X}) and (g,μY)(g,\mu_{Y}) their composite will just be (gf,μY)(g\circ f,\mu_{Y}). The existence of precomposition supports a product and coproduct algebra of density kernels, as expected based on the probability algebra itself.

Theorem 5 (Density kernels admit products and coproducts).

Density kernels have products (f,μX)(g,μY)(f,\mu_{X})\otimes(g,\mu_{Y}) and coproducts (f,μX)(g,μY)(f,\mu_{X})\oplus(g,\mu_{Y}), witnessed by a pairing and copairing.

Proof.

Any two density kernels (f,μX):𝐃𝐞𝐧𝐬((Z,ΣZ),(X,ΣX))(f,\mu_{X}):\mathbf{Dens}((Z,\Sigma_{Z}),(X,\Sigma_{X})) and (g,μY):𝐃𝐞𝐧𝐬((Z,ΣZ),(Y,ΣY))(g,\mu_{Y}):\mathbf{Dens}((Z,\Sigma_{Z}),(Y,\Sigma_{Y})) admit a pairing via precomposition with copying and the product measure space (X,ΣX,μX)(Y,ΣY,μY)=(X×Y,ΣX×ΣY,μXμY)Ob(𝕄)(X,\Sigma_{X},\mu_{X})\otimes(Y,\Sigma_{Y},\mu_{Y})=(X\times Y,\Sigma_{X}\times\Sigma_{Y},\mu_{X}\otimes\mu_{Y})\in Ob(\mathbb{M}_{\mathcal{B}})

(𝐜𝐨𝐩𝐲Z(fg),μxμY)\displaystyle\left(\mathbf{copy}_{Z}\fatsemi(f\otimes g),\mu_{x}\otimes\mu_{Y}\right) :𝐃𝐞𝐧𝐬((Z,ΣZ),(X,ΣX)(Y,ΣY)).\displaystyle:\mathbf{Dens}((Z,\Sigma_{Z}),(X,\Sigma_{X})\otimes(Y,\Sigma_{Y})).

Any two density kernels (f,μY):𝐃𝐞𝐧𝐬((Z,ΣZ),(Y,ΣY))(f,\mu_{Y}):\mathbf{Dens}((Z,\Sigma_{Z}),(Y,\Sigma_{Y})) and (g,μY):𝐃𝐞𝐧𝐬((X,ΣX),(Y,ΣY))(g,\mu_{Y}):\mathbf{Dens}((X,\Sigma_{X}),(Y,\Sigma_{Y})) also admit a copairing ((f,μY)(g,μY))=((fg),μY)\binom{(f,\mu_{Y})}{(g,\mu_{Y})}=\left(\binom{f}{g},\mu_{Y}\right) via the copairing of their Markov kernels in 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch}. ∎

The above theorems demonstrate that density kernels represent probability densities compositionally. However, density kernels do not admit post-composition with arbitrary Markov kernels. Section 3.3 will remedy this issue by applying density kernels to generate the residuals in joint Markov kernels.

3.3 Joint densities over joint distributions

Density kernels are not closed under pushforwards, and they do not form a category. 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} cannot apply directly to them. Definition 12 therefore gives an appropriate definition for joint density kernels.

Definition 12 (Joint density kernel).

A joint density kernel between objects Z,XOb(𝐒𝐭𝐨𝐜𝐡)Z,X\in Ob(\mathbf{Stoch}) is a pair of a density kernel into (M,ΣM,μM)Ob(𝕄)(M,\Sigma_{M},\mu_{M})\in Ob(\mathbb{M}_{\mathcal{B}}) with a deterministic map parameterized by the residual

𝐉𝐨𝐢𝐧𝐭(Z,X)\displaystyle\partial\mathbf{Joint}(Z,X) :={((f,μM),[M,k]):𝐃𝐞𝐧𝐬(Z,M)×𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡det)(Z,X)(M,ΣM,μM)Ob(𝕄)}.\displaystyle:=\left\{((f,\mu_{M}),[M,k]):\mathbf{Dens}(Z,M)\times\mathbf{Para}_{\otimes}(\mathbf{Stoch}_{det})(Z,X)\mid(M,\Sigma_{M},\mu_{M})\in Ob(\mathbb{M}_{\mathcal{B}})\right\}.

Hom-set notation once again implies these kernels form a category, which in fact they will. First, Corollary 6 shows density kernels are closed under the joint distribution construction of Equation 1.

Corollary 6 (Density kernels admit joint distributions as conditional products).

Given a density kernel (f1,μM1):𝐃𝐞𝐧𝐬(Z,M1)(f_{1},\mu_{M_{1}}):\mathbf{Dens}(Z,M_{1}), a measurable map k1:𝐒𝐭𝐨𝐜𝐡det(ZM1,X)k_{1}:\mathbf{Stoch}_{det}(Z\otimes M_{1},X), and a density kernel (f2,μM2):𝐃𝐞𝐧𝐬(X,M2)(f_{2},\mu_{M_{2}}):\mathbf{Dens}(X,M_{2}), composing them according to the diagram in Equation 1 forms a joint density kernel

(𝐜𝐨𝐩𝐲Z((𝐜𝐨𝐩𝐲M1f1)idZ)(idM1(f2k1)),μM1μM2)\displaystyle\left(\mathbf{copy}_{Z}\fatsemi((\mathbf{copy}_{M_{1}}\circ f_{1})\otimes id_{Z})\fatsemi(id_{M_{1}}\otimes(f_{2}\circ k_{1})),\mu_{M_{1}}\otimes\mu_{M_{2}}\right) :𝐃𝐞𝐧𝐬(Z,M1M2).\displaystyle:\mathbf{Dens}(Z,M_{1}\otimes M_{2}).

Theorem 7 will show that joint density kernels form a category, and characterize them as joint Markov kernels with the extra data of a base measure on the residual.

Theorem 7 (Joint density kernels form a category).

Joint density kernels 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} form a wide subcategory of the restriction 𝐉𝐨𝐢𝐧𝐭𝐁𝐨𝐫𝐞𝐥𝐒𝐭𝐨𝐜𝐡\mathbf{Joint}_{\mathbf{BorelStoch}} of 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} to standard Borel Markov kernels in 𝐁𝐨𝐫𝐞𝐥𝐒𝐭𝐨𝐜𝐡\mathbf{BorelStoch}.

Proof.

First we show the joint density kernels form a subcategory, then show that subcategory is wide.

Corollary 6 shows that density kernels are closed under the composition of 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} (Equation 1), and so along with the obvious identity morphisms and associativity law they form a category. Theorem 5 shows that this category inherits the product and coproduct structure of 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint}. The structure morphisms in 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} all have the unit II for their residual, which admits a trivial density as a finite standard Borel space; 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} therefore inherits the copy/delete structure of 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint}. This implies 𝐉𝐨𝐢𝐧𝐭𝐉𝐨𝐢𝐧𝐭𝐁𝐨𝐫𝐞𝐥𝐒𝐭𝐨𝐜𝐡\partial\mathbf{Joint}\subset\mathbf{Joint}_{\mathbf{BorelStoch}}.

Objects and structure morphisms are inherited from 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint}, so the subcategory is wide. ∎

The theorem above gives a copy/delete categorical structure for joint density kernels, whose base and probability measures will be σ\sigma-finite (Definition 20) as conditions for Radon-Nikodym. There is then a precise class of measures formed by pushing forward a σ\sigma-finite measure [35]: the ss-finite measures (Definition 23). Proposition 4 shows that such ss-finite measure kernels form a copy/delete category.

Proposition 4 (ss-finite measure kernels form a CD-category [9]999Example 7.2).

ss-finite measure kernels (Definition 23) between measurable spaces form a CD-category 𝐬𝐟𝐊𝐫𝐧\mathbf{sfKrn} with Ob(𝐬𝐟𝐊𝐫𝐧)=Ob(𝐌𝐞𝐚𝐬)Ob(\mathbf{sfKrn})=Ob(\mathbf{Meas}) and hom-sets given by 𝐬𝐟𝐊𝐫𝐧((Z,ΣZ),(X,ΣX))={f:Z×ΣX[0,]z,f(z)is s-finite}\mathbf{sfKrn}((Z,\Sigma_{Z}),(X,\Sigma_{X}))=\left\{f:Z\times\Sigma_{X}\rightarrow[0,\infty]\mid\forall z,f(z)\>\text{is $s$-finite}\right\}.

𝐬𝐟𝐊𝐫𝐧\mathbf{sfKrn} only forms a copy/delete category, not a Markov category, since different measure kernels may have different normalizing constants, including an infinite normalizing constant. Corollary 8 shows that restricting to probability kernels forms a Markov category.

Corollary 8 (ss-finite probability kernels form a Markov category).

The ss-finite probability kernels f:𝐬𝐟𝐊𝐫𝐧((Z,ΣZ),(X,ΣX))f:\mathbf{sfKrn}((Z,\Sigma_{Z}),(X,\Sigma_{X})), for which zZ,f(z,X)=1\forall z\in Z,f(z,X)=1, form a Markov category 𝐬𝐟𝐒𝐭𝐨𝐜𝐡𝐒𝐭𝐨𝐜𝐡\mathbf{sfStoch}\subset\mathbf{Stoch}.

Proof.

The restriction of all kernels to normalize to measure 1 renders every map 𝐝𝐞𝐥Z\mathbf{del}_{Z} unique, making II a terminal object and the resulting subcategory 𝐬𝐟𝐒𝐭𝐨𝐜𝐡\mathbf{sfStoch} a Markov category. ∎

Having a categorical setting capturing the Markov kernels used in computable applications, the remainder of this paper will interpret morphisms in 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} into ss-finite Markov kernels 𝐬𝐟𝐒𝐭𝐨𝐜𝐡(Z,X)\mathbf{sfStoch}(Z,X) with densities 𝐬𝐟𝐊𝐫𝐧(ZX,I)\mathbf{sfKrn}(Z\otimes X,I). Theorem 9 shows that the joint Markov kernels of 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} are ss-finite and admit densities jointly measurable in the parameter and the residual.

Theorem 9 (Joint density kernels give ss-finite probability kernels and densities).

Joint density kernels (f,[M,k]):𝐉𝐨𝐢𝐧𝐭((Z,ΣZ),(X,ΣX))(f,[M,k]):\partial\mathbf{Joint}((Z,\Sigma_{Z}),(X,\Sigma_{X})) admit probability kernels p:𝐬𝐟𝐒𝐭𝐨𝐜𝐡((Z,ΣZ),(X,ΣX))p:\mathbf{sfStoch}((Z,\Sigma_{Z}),(X,\Sigma_{X})) marginalizing out their randomness and probability densities pf():𝐬𝐟𝐊𝐫𝐧((Z,ΣZ)(M,ΣM),I)p_{\scriptsize f}(\cdot\mid\cdot):\mathbf{sfKrn}((Z,\Sigma_{Z})\otimes(M,\Sigma_{M}),I).

Proof.

Any density kernel f:𝐃𝐞𝐧𝐬((Z,ΣZ),(M,ΣM))f:\mathbf{Dens}((Z,\Sigma_{Z}),(M,\Sigma_{M})) gives a σ\sigma-finite probability measure and any (M,k):𝐏𝐚𝐫𝐚(𝐒𝐭𝐨𝐜𝐡det)(Z,X)(M,k):\mathbf{Para}_{\otimes}(\mathbf{Stoch}_{det})(Z,X) pushes it forward. Every pushforward of a σ\sigma-finite Markov kernel is ss-finite (Proposition 5), so 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} consists entirely of ss-finite joint Markov kernels. Being ss-finite, joint density kernels admit the required probability kernels p:𝐬𝐟𝐒𝐭𝐨𝐜𝐡((Z,ΣZ),(X,ΣX))p:\mathbf{sfStoch}((Z,\Sigma_{Z}),(X,\Sigma_{X})) with p(z,σX)=f(z,k(z)1(σX))p(z,\sigma_{X})=f(z,k(z)^{-1}(\sigma_{X})) and densities pf(z):M×ΣI[0,]p_{\scriptsize f}(\cdot\mid z):M\times\Sigma_{I}\rightarrow[0,\infty] measurable in zz and mm. Proposition 4 defines these as the Radon-Nikodym derivative pf(mz)({})=df(z)dμM(m)p_{\scriptsize f}(m\mid z)(\{*\})=\frac{df(z)}{d\mu_{M}}(m). ∎

Theorem 7 and Theorem 9 finally gives a desirable categorical setting: one which supports composition, products, and coproducts as a copy/delete category should, while decomposing into a deterministic causal mechanism applied to a random variable with a joint density as a structural causal model should. Section 4 will put together the machinery in this section with existing work on factorizing string diagrams syntactically to interpret those factorizations as generalizing directed graphical models.

4 Diagrams as causal factorizations of joint distributions and densities

This section demonstrates that string diagrams with factorized densities support the full “ladder of causation” [26] as probabilistic models: factorized distributions, interventions, and counterfactual queries. Section 3 presented the 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} construction for building up joint densities while still expressing arbitrary pushforward measures over them. Reasoning about directed graphical models or probabilistic programs compositionally requires providing a graphical syntax interpretable into 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint}. Recent work [15, 16] treated a combinatorial syntax of string diagrams as generalized causal models. This section first reviews the definitions of a generalized causal model and its factorization of a Markov kernel, then applies that syntax to this paper’s novel constructions. Doing so will enable show that via generalized causal models, joint density kernels admit factorization of their densities (Theorem 10), interventional distributions (Theorem 11), and counterfactual distributions (Theorem 12).

Generalized causal models [15] provide several advantages over causal Bayesian networks as a representation of causal structure in probability models. They allow for global inputs to and outputs from a causal model, making explicit the interface necessary to reason compositionally about causal structures. It also makes explicit the grouping of “nodes” (in the underlying graph or hypergraph) into Markov kernels, clarifying how the joint distribution decomposes into random variables and causal mechanisms.

Definition 13 will now describe a generalized causal model.

Definition 13 (Generalized causal model [16]).

A generalized causal model φ\varphi over Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp}101010see Appendix C is a string diagram pdom(τ)q:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ(n,m)p\rightarrow\mathrm{dom}(\tau)\leftarrow q:\mathbf{FreeMarkov}_{\Sigma}(n,m) for n,mn,m\in\mathbb{N} with a bijection qq on wires.

Any generalized causal model pdom(τ)qp\rightarrow\mathrm{dom}(\tau)\leftarrow q is equivalent to a morphism [15]

φ\displaystyle\varphi :𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ(i=1nτ(p(i)),j=1mτ(q(j))).\displaystyle:\mathbf{FreeMarkov}_{\Sigma}\left(\bigotimes_{i=1}^{n}\tau(p(i)),\bigotimes_{j=1}^{m}\tau(q(j))\right).

Definition 14 will capture factorization of a Markov kernel by a generalized causal model; Fritz and Klinger [15] called it causal compatibility in their Definition 11.

Definition 14 (Factorization of a Markov kernel by a causal model [15]).

A factorization (f,φ,F)(f,\varphi,F) in 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} consists of a morphism with decomposed domain and codomain f:𝐒𝐭𝐨𝐜𝐡(i=1nDi,j=1mCj)f:\mathbf{Stoch}\left(\bigotimes_{i=1}^{n}D_{i},\bigotimes_{j=1}^{m}C_{j}\right), a causal model φ:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ(n,m)\varphi:\mathbf{FreeMarkov}_{\Sigma}(n,m), and a strict Markov functor F:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ𝐒𝐭𝐨𝐜𝐡F:\mathbf{FreeMarkov}_{\Sigma}\rightarrow\mathbf{Stoch} such that f=F(φ)f=F(\varphi), i[1..n],Di=F(dom(φ)i)\forall i\in[1..n],D_{i}=F(\mathrm{dom}(\varphi)_{i}), and j[1..m],Cj=F(cod(φ)j)\forall j\in[1..m],C_{j}=F(\mathrm{cod}(\varphi)_{j}).

The joint density kernels 𝐉𝐨𝐢𝐧𝐭(Z,X)\partial\mathbf{Joint}(Z,X) have an important difference from the simple Markov kernels factorized by generalized causal models in Definition 14: the density to factorize is not over xXx\in X but over the extra structure of the residual mMm\in M. This subsection will show how to add this extra structure to a factorization, then show how to access that structure to show that generalized causal models over joint density kernels support causal inference as such: interventions and counterfactual reasoning.

Definition 15 will require a factorization to label each box’s residual to apply to joint Markov kernels.

Definition 15 (Joint factorization functor).

A joint factorization functor for a signature Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp} is a labeling of boxes with residual wires r:B(Σ)W(Σ)r:B(\Sigma)\rightarrow W(\Sigma)^{*} and a strict Markov functor F:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ𝐉𝐨𝐢𝐧𝐭F:\mathbf{FreeMarkov}_{\Sigma}\rightarrow\mathbf{Joint} respecting bB(Σ),F(b)=([wr(b)F(w),k],f):𝐉𝐨𝐢𝐧𝐭(F(dom(b)),F(cod(b)))\forall b\in B(\Sigma),F(b)=([\bigotimes_{w\in r(b)}F(w),k],f):\mathbf{Joint}(F(\mathrm{dom}(b)),F(\mathrm{cod}(b))).

Joint factorizations label residuals in the signature and also map to joint density kernels. Theorem 10 shows they factorize the implied joint density of a causal model.

Theorem 10 (Joint density kernels admit factorized densities).

Given a signature Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp}, a strict Markov functor F:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ𝐉𝐨𝐢𝐧𝐭F:\mathbf{FreeMarkov}_{\Sigma}\rightarrow\partial\mathbf{Joint} gives a joint density pf(F(dom(φ)))p_{\scriptsize f}(\cdot\mid\cdot\in F(\mathrm{dom}(\varphi))) for every causal model φ:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ(n,m)\varphi:\mathbf{FreeMarkov}_{\Sigma}(n,m).

Proof.

Definition 15 requires for any sub-diagram φφ\varphi^{\prime}\subseteq\varphi there will be some F(φ)=(f,[M,k])F(\varphi^{\prime})=(f,[M,k]). Theorem 9 then gives a density over the residual, while the functoriality of FF and Corollary 6 together imply that products of individual joint-densities yield the complete joint density. ∎

Theorem 11 then shows that by assigning boxes optional points in their codomains, joint factorizations also admit interventional distributions.

Theorem 11 (Joint factorizations admit interventional distributions).

Consider a joint factorization (f,φ,F)(f,\varphi,F) over a signature Σ\Sigma. Then any intervention 𝐝𝐨:b:B(Σ)I𝒞det(I,F(cod(b))\mathbf{do}:\prod_{b:B(\Sigma)}I\oplus\mathcal{C}_{det}(I,F(\mathrm{cod}(b)) induces a functor Int:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ𝐉𝐨𝐢𝐧𝐭\mathrm{Int}:\mathbf{FreeMarkov}_{\Sigma}\rightarrow\mathbf{Joint} and an interventional distribution Int(φ)\mathrm{Int}(\varphi).

Proof.

Any single-box free string diagram has an image F(b)F(\left<b\right>). We define the required functor Int:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ𝐉𝐨𝐢𝐧𝐭\mathrm{Int}:\mathbf{FreeMarkov}_{\Sigma}\rightarrow\mathbf{Joint} by extension of a hypergraph morphism α:Σhyp(𝐉𝐨𝐢𝐧𝐭)\alpha:\Sigma\rightarrow\mathrm{hyp}(\mathbf{Joint}) following Fritz and Liang [16] (see their Remark 4.3). α\alpha will be identity on wires and intervene on boxes

α(b)\displaystyle\alpha(b) :B(Σ)B(hyp(𝐉𝐨𝐢𝐧𝐭))\displaystyle:B(\Sigma)\rightarrow B(\mathrm{hyp}(\mathbf{Joint}))
α(b)\displaystyle\alpha(b) ={hyp(([I,𝐝𝐞𝐥dom(b)],𝐝𝐞𝐥dom(b)x))𝐝𝐨(b)=𝐢𝐧𝐫(x)hyp(F(b))𝐝𝐨(b)=𝐢𝐧𝐥(I).\displaystyle=\begin{cases}\mathrm{hyp}(([I,\mathbf{del}_{\mathrm{dom}(b)}],\mathbf{del}_{\mathrm{dom}(b)}\fatsemi x))&\mathbf{do}(b)=\mathbf{inr}(x)\\ \mathrm{hyp}(F(\left<b\right>))&\mathbf{do}(b)=\mathbf{inl}(I)\end{cases}.\qed

Finally, Theorem 12 employs similar reasoning to model counterfactual queries over jointly factorized causal models, given fixed values for random variables and an intervention.

Theorem 12 (Joint factorizations give counterfactuals).

Consider a signature Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp} and a joint factorization (f,φ,F)(f,\varphi,F). Then any intervention 𝐝𝐨:b:B(Σ)I𝒞det(I,F(cod(b))\mathbf{do}:\prod_{b:B(\Sigma)}I\oplus\mathcal{C}_{det}(I,F(\mathrm{cod}(b)) and any assignment U:B(Σ)[0,1]U:B(\Sigma)\rightarrow[0,1] of uniform random variates to boxes induces a functor If:𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ𝐉𝐨𝐢𝐧𝐭\mathrm{If}:\mathbf{FreeMarkov}_{\Sigma}\rightarrow\mathbf{Joint} and a counterfactual distribution If(φ)\mathrm{If}(\varphi).

Proof.

We work as above, but this time explicitly consider the structure of the image F(b)=(f,[M,k])F(\left<b\right>)=(f,[M,k]). ff gives a standard Borel probability measure, so the Randomization Lemma [4] demonstrates equality of ff with a pushforward F(b)1=f()=g(,z)(U)(du)F(\left<b\right>)_{1}=f(\cdot)=g(\cdot,z)_{*}(U)(du) of the uniform distribution U(du)U(du) by a deterministic map g(,z)g(\cdot,z). Our hypergraph morphism utilizes that fact

α(b)\displaystyle\alpha(b) ={hyp(([I,𝐝𝐞𝐥dom(b)],𝐝𝐞𝐥dom(b)x))𝐝𝐨(b)=𝐢𝐧𝐫(x)hyp(δU(b)(g(b,)))𝐝𝐨(b)=𝐢𝐧𝐥(I).\displaystyle=\begin{cases}\mathrm{hyp}(([I,\mathbf{del}_{\mathrm{dom}(b)}],\mathbf{del}_{\mathrm{dom}(b)}\fatsemi x))&\mathbf{do}(b)=\mathbf{inr}(x)\\ \mathrm{hyp}(\delta_{U(b)}(g(b,\cdot)))&\mathbf{do}(b)=\mathbf{inl}(I)\end{cases}.\qed

Together, Theorems 10, 11, and 12 demonstrate that joint density kernels, jointly factorized by a generalized causal model, support the properties that have made directed graphical models so widely useful. With these theorems as “sanity checks”, Section 5 will summarize the paper’s overall contributions, give some worked examples applying 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint}, and discuss future work.

5 Discussion

This paper started from the existing work on copy/delete categories, Markov categories, and the factorization of morphisms in those categories by generalized causal models. From there, Section 3 constructed a novel Markov category 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} whose morphisms keep internal track of the joint distribution they denote, defined a subcategory 𝐉𝐨𝐢𝐧𝐭𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint}\subset\mathbf{Joint} whose morphisms support only joint densities over standard Borel spaces as their internal distributions. Section 4 then demonstrated that 𝐉𝐨𝐢𝐧𝐭\mathbf{Joint} supports factorization by generalized causal models, that these factorize joint densities 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint}, and that these support the interventional and counterfactual reasoning necessary for causal inference. This section will discuss some short worked examples of using 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} for real probability models (Section 5.1), and then move on to speculate what future work could spring from the paper’s developments (Section 5.2).

5.1 Worked examples

pΔ\displaystyle\left\llbracket\leavevmode\hbox to12.5pt{\vbox to44.34pt{\pgfpicture\makeatletter\hbox{\hskip 6.24968pt\lower-44.13585pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-11.38113pt}\pgfsys@lineto{0.0pt}{-14.22638pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{-3.26794pt}{-2.84523pt}\pgfsys@lineto{3.26794pt}{-2.84523pt}\pgfsys@curveto{3.82024pt}{-2.84523pt}{4.26794pt}{-3.29294pt}{4.26794pt}{-3.84523pt}\pgfsys@lineto{4.26794pt}{-10.38113pt}\pgfsys@curveto{4.26794pt}{-10.93343pt}{3.82024pt}{-11.38113pt}{3.26794pt}{-11.38113pt}\pgfsys@lineto{-3.26794pt}{-11.38113pt}\pgfsys@curveto{-3.82024pt}{-11.38113pt}{-4.26794pt}{-10.93343pt}{-4.26794pt}{-10.38113pt}\pgfsys@lineto{-4.26794pt}{-3.84523pt}\pgfsys@curveto{-4.26794pt}{-3.29294pt}{-3.82024pt}{-2.84523pt}{-3.26794pt}{-2.84523pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-7.11319pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-1.76094pt}{-7.93959pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle p$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\pgfsys@stroke@opacity{0.}\pgfsys@invoke{ }\pgfsys@fill@opacity{0.}\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{0.0pt}\pgfsys@lineto{0.0pt}{0.0pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-14.22638pt}\pgfsys@lineto{0.0pt}{-17.07161pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-25.60751pt}\pgfsys@lineto{0.0pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{-3.26794pt}{-17.07161pt}\pgfsys@lineto{3.26794pt}{-17.07161pt}\pgfsys@curveto{3.82024pt}{-17.07161pt}{4.26794pt}{-17.51932pt}{4.26794pt}{-18.07161pt}\pgfsys@lineto{4.26794pt}{-24.60751pt}\pgfsys@curveto{4.26794pt}{-25.1598pt}{3.82024pt}{-25.60751pt}{3.26794pt}{-25.60751pt}\pgfsys@lineto{-3.26794pt}{-25.60751pt}\pgfsys@curveto{-3.82024pt}{-25.60751pt}{-4.26794pt}{-25.1598pt}{-4.26794pt}{-24.60751pt}\pgfsys@lineto{-4.26794pt}{-18.07161pt}\pgfsys@curveto{-4.26794pt}{-17.51932pt}{-3.82024pt}{-17.07161pt}{-3.26794pt}{-17.07161pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-21.33957pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-2.91667pt}{-23.73123pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\Delta$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-38.41118pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-2.57639pt}{-40.80284pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate\right\rrbracket =pΔδ0π𝟚\displaystyle=\leavevmode\hbox to33.74pt{\vbox to72.79pt{\pgfpicture\makeatletter\hbox{\hskip 5.08301pt\lower-72.58861pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-7.11319pt}\pgfsys@lineto{7.11319pt}{-14.22638pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-7.11319pt}\pgfsys@moveto{11.38113pt}{-7.11319pt}\pgfsys@curveto{11.38113pt}{-9.47034pt}{9.47034pt}{-11.38113pt}{7.11319pt}{-11.38113pt}\pgfsys@curveto{4.75604pt}{-11.38113pt}{2.84525pt}{-9.47034pt}{2.84525pt}{-7.11319pt}\pgfsys@curveto{2.84525pt}{-4.75604pt}{4.75604pt}{-2.84525pt}{7.11319pt}{-2.84525pt}\pgfsys@curveto{9.47034pt}{-2.84525pt}{11.38113pt}{-4.75604pt}{11.38113pt}{-7.11319pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-7.11319pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-7.11319pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{5.35225pt}{-7.93959pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle p$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\pgfsys@stroke@opacity{0.}\pgfsys@invoke{ }\pgfsys@fill@opacity{0.}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{0.0pt}\pgfsys@lineto{7.11319pt}{0.0pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-14.22638pt}\pgfsys@lineto{7.11319pt}{-21.33957pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@lineto{0.0pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@lineto{14.22638pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@moveto{9.24706pt}{-21.33957pt}\pgfsys@curveto{9.24706pt}{-22.51808pt}{8.2917pt}{-23.47343pt}{7.11319pt}{-23.47343pt}\pgfsys@curveto{5.93468pt}{-23.47343pt}{4.97932pt}{-22.51808pt}{4.97932pt}{-21.33957pt}\pgfsys@curveto{4.97932pt}{-20.16106pt}{5.93468pt}{-19.2057pt}{7.11319pt}{-19.2057pt}\pgfsys@curveto{8.2917pt}{-19.2057pt}{9.24706pt}{-20.16106pt}{9.24706pt}{-21.33957pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-28.45276pt}\pgfsys@lineto{0.0pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-28.45276pt}\pgfsys@lineto{14.22638pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-35.56595pt}\pgfsys@lineto{14.22638pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-35.56595pt}\pgfsys@moveto{28.45276pt}{-35.56595pt}\pgfsys@curveto{28.45276pt}{-37.9231pt}{22.08348pt}{-39.8339pt}{14.22638pt}{-39.8339pt}\pgfsys@curveto{6.36928pt}{-39.8339pt}{0.0pt}{-37.9231pt}{0.0pt}{-35.56595pt}\pgfsys@curveto{0.0pt}{-33.2088pt}{6.36928pt}{-31.298pt}{14.22638pt}{-31.298pt}\pgfsys@curveto{22.08348pt}{-31.298pt}{28.45276pt}{-33.2088pt}{28.45276pt}{-35.56595pt}\pgfsys@closepath\pgfsys@moveto{14.22638pt}{-35.56595pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{3.80977pt}{-37.35205pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\Delta\oplus\delta_{0}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-42.67914pt}\pgfsys@lineto{0.0pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-42.67914pt}\pgfsys@lineto{14.22638pt}{-45.52437pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-54.06027pt}\pgfsys@lineto{14.22638pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{10.95842pt}{-45.52437pt}\pgfsys@lineto{17.49432pt}{-45.52437pt}\pgfsys@curveto{18.04662pt}{-45.52437pt}{18.49432pt}{-45.97208pt}{18.49432pt}{-46.52437pt}\pgfsys@lineto{18.49432pt}{-53.06027pt}\pgfsys@curveto{18.49432pt}{-53.61256pt}{18.04662pt}{-54.06027pt}{17.49432pt}{-54.06027pt}\pgfsys@lineto{10.95842pt}{-54.06027pt}\pgfsys@curveto{10.40613pt}{-54.06027pt}{9.95842pt}{-53.61256pt}{9.95842pt}{-53.06027pt}\pgfsys@lineto{9.95842pt}{-46.52437pt}\pgfsys@curveto{9.95842pt}{-45.97208pt}{10.40613pt}{-45.52437pt}{10.95842pt}{-45.52437pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-49.79233pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{12.2313pt}{-51.29927pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\pi$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-66.86394pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-1.75pt}{-69.11949pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbbm{2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-66.86394pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{11.65pt}{-69.2556pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate
(a) The wiring diagram in 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} of a mixture model between a delta and a Gaussian, and its image in 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} with a coproduct projection
2×2u\displaystyle\left\llbracket\leavevmode\hbox to26.05pt{\vbox to46.24pt{\pgfpicture\makeatletter\hbox{\hskip 5.9094pt\lower-44.13585pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{0.98125pt}{-7.30405pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}^{2\times 2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-14.22638pt}\pgfsys@lineto{7.11319pt}{-17.07161pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-25.60751pt}\pgfsys@lineto{0.0pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-25.60751pt}\pgfsys@lineto{14.22638pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{-3.26794pt}{-17.07161pt}\pgfsys@lineto{17.49432pt}{-17.07161pt}\pgfsys@curveto{18.04662pt}{-17.07161pt}{18.49432pt}{-17.51932pt}{18.49432pt}{-18.07161pt}\pgfsys@lineto{18.49432pt}{-24.60751pt}\pgfsys@curveto{18.49432pt}{-25.1598pt}{18.04662pt}{-25.60751pt}{17.49432pt}{-25.60751pt}\pgfsys@lineto{-3.26794pt}{-25.60751pt}\pgfsys@curveto{-3.82024pt}{-25.60751pt}{-4.26794pt}{-25.1598pt}{-4.26794pt}{-24.60751pt}\pgfsys@lineto{-4.26794pt}{-18.07161pt}\pgfsys@curveto{-4.26794pt}{-17.51932pt}{-3.82024pt}{-17.07161pt}{-3.26794pt}{-17.07161pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{5.10959pt}{-22.84651pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle u$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-38.41118pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-2.57639pt}{-40.80284pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-38.41118pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{11.65pt}{-40.80284pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate\right\rrbracket =2×2Uk[0,2π]\displaystyle=\leavevmode\hbox to50.5pt{\vbox to75.8pt{\pgfpicture\makeatletter\hbox{\hskip 12.57808pt\lower-73.69695pt\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\pgfsys@setlinewidth{0.4pt}\pgfsys@invoke{ }\nullfont\hbox to0.0pt{\pgfsys@beginscope\pgfsys@invoke{ }{{}}{{}} {}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-4.26794pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{22.32082pt}{-7.30405pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}^{2\times 2}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@lineto{7.11319pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@moveto{11.38113pt}{-21.33957pt}\pgfsys@curveto{11.38113pt}{-23.69672pt}{9.47034pt}{-25.60751pt}{7.11319pt}{-25.60751pt}\pgfsys@curveto{4.75604pt}{-25.60751pt}{2.84525pt}{-23.69672pt}{2.84525pt}{-21.33957pt}\pgfsys@curveto{2.84525pt}{-18.98242pt}{4.75604pt}{-17.07162pt}{7.11319pt}{-17.07162pt}\pgfsys@curveto{9.47034pt}{-17.07162pt}{11.38113pt}{-18.98242pt}{11.38113pt}{-21.33957pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-21.33957pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{4.34189pt}{-23.73123pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle U$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\pgfsys@stroke@opacity{0.}\pgfsys@invoke{ }\pgfsys@fill@opacity{0.}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-14.22638pt}\pgfsys@lineto{7.11319pt}{-14.22638pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-14.22638pt}\pgfsys@lineto{28.45276pt}{-28.45276pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-28.45276pt}\pgfsys@lineto{7.11319pt}{-35.56595pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@lineto{0.0pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@lineto{14.22638pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{{}} {}{}{}{}{}{}{}{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{}\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@moveto{9.24706pt}{-35.56595pt}\pgfsys@curveto{9.24706pt}{-36.74446pt}{8.2917pt}{-37.69981pt}{7.11319pt}{-37.69981pt}\pgfsys@curveto{5.93468pt}{-37.69981pt}{4.97932pt}{-36.74446pt}{4.97932pt}{-35.56595pt}\pgfsys@curveto{4.97932pt}{-34.38744pt}{5.93468pt}{-33.43208pt}{7.11319pt}{-33.43208pt}\pgfsys@curveto{8.2917pt}{-33.43208pt}{9.24706pt}{-34.38744pt}{9.24706pt}{-35.56595pt}\pgfsys@closepath\pgfsys@moveto{7.11319pt}{-35.56595pt}\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-28.45276pt}\pgfsys@lineto{28.45276pt}{-42.67914pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-42.67914pt}\pgfsys@lineto{0.0pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-42.67914pt}\pgfsys@lineto{14.22638pt}{-45.52437pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-42.67914pt}\pgfsys@lineto{28.45276pt}{-45.52437pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-54.06027pt}\pgfsys@lineto{14.22638pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{} {}{}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-54.06027pt}\pgfsys@lineto{28.45276pt}{-56.90552pt}\pgfsys@stroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{}{{}}{} {}{} {}{} {}{} {}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }\definecolor[named]{pgffillcolor}{rgb}{1,1,1}\pgfsys@color@gray@fill{1}\pgfsys@invoke{ }{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{{}{}{{}}}{{}{}{{}}}{}{}{}\pgfsys@moveto{10.95842pt}{-45.52437pt}\pgfsys@lineto{31.7207pt}{-45.52437pt}\pgfsys@curveto{32.273pt}{-45.52437pt}{32.7207pt}{-45.97208pt}{32.7207pt}{-46.52437pt}\pgfsys@lineto{32.7207pt}{-53.06027pt}\pgfsys@curveto{32.7207pt}{-53.61256pt}{32.273pt}{-54.06027pt}{31.7207pt}{-54.06027pt}\pgfsys@lineto{10.95842pt}{-54.06027pt}\pgfsys@curveto{10.40613pt}{-54.06027pt}{9.95842pt}{-53.61256pt}{9.95842pt}{-53.06027pt}\pgfsys@lineto{9.95842pt}{-46.52437pt}\pgfsys@curveto{9.95842pt}{-45.97208pt}{10.40613pt}{-45.52437pt}{10.95842pt}{-45.52437pt}\pgfsys@closepath\pgfsys@fillstroke\pgfsys@invoke{ } \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{21.33957pt}{-49.79233pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{19.40729pt}{-52.22287pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle k$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{0.0pt}{-66.86394pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{-9.24507pt}{-68.61394pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle[0,2\pi]$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{14.22638pt}{-66.86394pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{11.65pt}{-69.2556pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{}{{}}{}{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@roundjoin\pgfsys@invoke{ }\pgfsys@roundcap\pgfsys@invoke{ }{}\pgfsys@moveto{28.45276pt}{-66.86394pt}\pgfsys@stroke\pgfsys@invoke{ }\hbox{\hbox{{\pgfsys@beginscope\pgfsys@invoke{ }{{}{}{{ {}{}}}{ {}{}} {{}{{}}}{{}{}}{}{{}{}} { }{{{{}}\pgfsys@beginscope\pgfsys@invoke{ }\pgfsys@transformcm{1.0}{0.0}{0.0}{1.0}{25.87637pt}{-69.2556pt}\pgfsys@invoke{ }\hbox{{\definecolor{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@rgb@stroke{0}{0}{0}\pgfsys@invoke{ }\pgfsys@color@rgb@fill{0}{0}{0}\pgfsys@invoke{ }\hbox{{$\scriptstyle\mathbb{R}$}} }}\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope}}} \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope \pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope{{ {}{}{}{}{}}}{}{}\hss}\pgfsys@discardpath\pgfsys@invoke{\lxSVG@closescope }\pgfsys@endscope\hss}}\lxSVG@closescope\endpgfpicture}}\immediate
(b) A Markov kernel in 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} projecting a sample from the uniform circle through a linear transformation, and its image in 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch}
Figure 1: Example joint density kernels (Definition 12): a mixture model between a constant and a Gaussian distribution depending on a coin flip (left) and a Markov kernel projecting a random angle onto a parametrically skewed ellipse (right). The \left\llbracket\cdot\right\rrbracket functor (Corollary 3) maps into 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch}.

The previous sections have focused on formalism. Section 3 defined a Markov category 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} of joint density kernels in 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} (rather than the typical restriction to 𝐅𝐢𝐧𝐒𝐭𝐨𝐜𝐡\mathbf{FinStoch}) whose residuals (by construction) admit probability densities. Section 4 then established that the generalized causal models recently described in the categorical probability literature can indeed apply to 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} morphisms, factorizing their joint densities and providing for causal reasoning. This subsection will apply the 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} formalism to the models shown in Figure 1, taken from Wu et al [37] and Radul and Alexeev [28].

Figure 1(a) shows a generative model in which we detect fake coins by placing an even number of coins on a well-calibrated balance. The presence of a fake coin, whose weight deviates from the others, will tip the balance away from the neutral position. pp determines whether the a fake coin is present, which in turn determines whether the balance position is distributed according to a Gaussian Δ𝒩(1,0.5)\Delta\sim\mathcal{N}(1,0.5) or according to a Dirac measure Δδ0\Delta\sim\delta_{0}. The joint distribution shown on the right-hand side of the equation admits a density with respect to the standard Borel measure space (𝟚,(𝟚),μ#)((,(),λ)(𝟙,(𝟙),μ#))(\mathbbm{2},\mathcal{B}(\mathbbm{2}),\mu_{\#})\otimes((\mathbb{R},\mathcal{B}(\mathbb{R}),\lambda)\oplus(\mathbbm{1},\mathcal{B}(\mathbbm{1}),\mu_{\#})), whereas the marginal on \mathbb{R} lacks a density for the Lebesgue measure λ\lambda.

Figure 1(b) shows the example from Radul and Alexeev [28] in which a sample from U(0,2π)U(0,2\pi) is projected onto a non-isotropic ellipse. Those authors calculate a probability density on the ellipse via the projection’s Jacobian. Figure 1(b) shows the two components of a 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} morphism: how the uniformly random angle UU and a linear transformation 2×2\mathbb{R}^{2\times 2} parameterize the the geometric projection kk. The equation shows how \left\llbracket\cdot\right\rrbracket maps the single box in 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} (left) to the Markov kernel in 𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch} (right).

The two examples in Figure 1 both show how the 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} construction can compactly encode complex, parameterized joint probability densities linked by deterministic causal mechanisms. Section 5.2 will discuss potential future work extending this paper’s construction and conclude.

5.2 Future work and conclusion

This paper’s mathematical constructions could generalize or be strengthened in a number of ways. It would be desirable to obtain a category in which Markov kernels admit common-sense densities without having to separate into a density over a standard Borel space and a pushforward through a deterministic map; the Lebesgue decomposition of arbitrary measures into mutually singular absolutely-continuous, diffuse, and atomic portions suggests a possible route to that goal. Up to a normalization constant, every reference measure in 𝕄\mathbb{M} is a Hausdorff measure. This suggests densities could be obtained by considering manifolds, standardizing on the Hausdorff measure as Radul and Alexeev [28] suggest, and then defining density kernels on that foundation. Finally, Definition 9 forms an endofunctor in the category of measure spaces whose algebras and coalgebras may prove of interest. For example, recent work by Dash [11] explored defining probability measures on quasi-Borel spaces as pushforwards of a uniform distribution on the Hilbert cube, an element of the endofunctor’s terminal coalgebra.

Future work can go in a number of directions to unify the formalisms of applied probabilistic reasoning. Instantiating this paper’s constructions in a Markov category in which all randomness arises from an independent noise source would transform any causal factorization of a joint (density) kernel into a structural causal model [25], unifying causal Bayes nets with structural equation models. In the application area of probabilistic programming, this paper has only described “first-order” probabilistic programming languages lacking general stochastic recursion [23], corresponding to non-closed Markov categories. A combinatorial syntax for hierarchical string diagrams [2] would extend our reasoning in this paper to the closed Markov categories such as 𝐐𝐁𝐒\mathbf{QBS} [19] that provide denotations for higher-order probabilistic programming languages. We intend to extend this paper’s formalism to categorify Sequential Monte Carlo methods [24] for generalized causal models of unnormalized distributions. We aim to apply the 𝐉𝐨𝐢𝐧𝐭\partial\mathbf{Joint} construction alongside recent work on unique name generation [29] to model heterogeneous tracing in probabilistic programming. Recent work on free string diagrams [36] has also suggested ways to map from free string diagrams to free diagrams of optics; equipping joint density kernels with optic structure would follow up on the work of Smithe [32] and Schauer [30].

Acknowledgements

We would like to thank the anonymous reviewers for their feedback and advice in refining the paper for camera-ready. We would also like to thank the ACT 2023 program chairs for their careful shepherding of the review process. We thank Tobias Fritz, Luke Ong, Sam Staton, and Matthijs Vákár for laying the categorical foundations of ss-finite Markov kernels. Finally, we would like to extensively thank Alex Lew for early discussions and cooperation on preliminary work to this paper. Eli Sennesh was supported by NSF award 2047253.

References

  • [1]
  • [2] Mario Alvarez-picallo, Dan Ghica, David Sprunger & Fabio Zanasi (2022): Rewriting for Monoidal Closed Categories. In: 7th International Conference on Formal Structures for Computation and Deduction (FSCD 2022), 228, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany, pp. 29:1–29:0, 10.4230/LIPIcs.FSCD.2022.29.
  • [3] Richard Baker (1991): “Lebesgue measure” on \mathbb{R}^{\infty}. Proceedings of the American Mathematical Society 113(4), pp. 1023–1029, 10.2307/2048779.
  • [4] V. I. Bogachev (2007): Measure theory. Springer, Berlin; New York, 10.1007/978-3-540-34514-5.
  • [5] Filippo Bonchi, Fabio Gadducci, Aleks Kissinger, Paweł Sobociński & Fabio Zanasi (2016): Rewriting modulo symmetric monoidal structure. In: Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, ACM, New York NY USA, p. 710–719, 10.1145/2933575.2935316. Available at https://dl.acm.org/doi/10.1145/2933575.2935316.
  • [6] Matteo Capucci, Bruno Gavranović, Jules Hedges & Eigil Fjeldgren Rischel (2021): Towards foundations of categorical cybernetics. In: Applied Category Theory Conference (ACT 2021), EPTCS, pp. 235–248. Available at http://arxiv.org/abs/2105.06332.
  • [7] Matteo Capucci & Bruno Gavranović (2022): Actegories for the Working Amthematician.
  • [8] Nick Chater, Joshua B Tenenbaum & Alan Yuille (2006): Probabilistic models of cognition: Conceptual foundations. Trends in cognitive sciences 10(7), pp. 287–291, 10.1016/j.tics.2006.05.008.
  • [9] Kenta Cho & Bart Jacobs (2019): Disintegration and Bayesian inversion via string diagrams. Mathematical Structures in Computer Science 29(7), pp. 938–971, 10.1017/S0960129518000488.
  • [10] Kyle Cranmer, Johann Brehmer & Gilles Louppe (2020): The frontier of simulation-based inference. Proceedings of the National Academy of Sciences 117(48), pp. 30055–30062, 10.1073/pnas.1912789117.
  • [11] Swaraj Dash, Younesse Kaddar, Hugo Paquet & Sam Staton (2023): Affine monads and lazy structures for bayesian programming. Proceedings of the ACM on Programming Languages 7(POPL), pp. 1338–1368, 10.1145/3571239.
  • [12] David H. Fremlin (2010): Measure theory. 2: Broad foundations, 2. ed edition. Torres Fremlin, Colchester.
  • [13] Karl Friston, Thomas FitzGerald, Francesco Rigoli, Philipp Schwartenbeck & Giovanni Pezzulo (2017): Active inference: a process theory. Neural computation 29(1), pp. 1–49, 10.1162/NECO_a_00912.
  • [14] Tobias Fritz (2020): A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics. Advances in Mathematics 370, p. 107239, 10.1016/j.aim.2020.107239.
  • [15] Tobias Fritz & Andreas Klingler (2023): The d-Separation Criterion in Categorical Probability. Journal of Machine Learning Research 24(46), pp. 1–49.
  • [16] Tobias Fritz & Wendong Liang (2023): Free gs-Monoidal Categories and Free Markov Categories. Applied Categorical Structures 31(2), p. 21, 10.1007/s10485-023-09717-0.
  • [17] Giorgio Gallo, Giustino Longo, Stefano Pallottino & Sang Nguyen (1993): Directed hypergraphs and applications. Discrete Applied Mathematics 42(2–3), p. 177–201, 10.1016/0166-218X(93)90045-P.
  • [18] Michèle Giry (1982): A categorical approach to probability theory. In B. Banaschewski, editor: Categorical Aspects of Topology and Analysis, Springer Berlin Heidelberg, Berlin, Heidelberg, p. 68–85, 10.1007/BFb0092872.
  • [19] Chris Heunen, Ohad Kammar, Sam Staton & Hongseok Yang (2017): A convenient category for higher-order probability theory. In: Proceedings - Symposium on Logic in Computer Science, pp. 1–12, 10.1109/LICS.2017.8005137. ArXiv: 1701.02547 Citation Key: Heunen2017 ISSN: 10436871.
  • [20] Kiyosi Itô et al. (1984): An Introduction to Probability Theory. Cambridge University Press, 10.1017/9781139171809.
  • [21] Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum & Samuel J Gershman (2017): Building machines that learn and think like people. Behavioral and brain sciences 40, p. e253, 10.1017/S0140525X16001837.
  • [22] Sergey Levine (2018): Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909.
  • [23] Jan-Willem van de Meent, Brooks Paige, Hongseok Yang & Frank Wood (2018): An introduction to probabilistic programming. arXiv preprint arXiv:1809.10756.
  • [24] Christian A Naesseth, Fredrik Lindsten & Thomas B Schon (2019): Elements of Sequential Monte Carlo. Foundations and Trends in Machine Learning 12(3), pp. 187–306, 10.1561/2200000074.
  • [25] Judea Pearl (2012): The causal foundations of structural equation modeling. Handbook of structural equation modeling, pp. 68–91.
  • [26] Judea Pearl & Dana Mackenzie (2018): The book of why: the new science of cause and effect. Basic books.
  • [27] Paolo Perrone (2019): Notes on Category Theory with examples from basic mathematics. arXiv preprint arXiv:1912.10642.
  • [28] Alexey Radul & Boris Alexeev (2021): The Base Measure Problem and its Solution. In: Proceedings of the 24th International Conference on Artificial Intelligence and Statistics (AISTATS) 2021, 130, Proceedings of Machine Learning Research, San Diego, California, p. 3583–3591.
  • [29] Marcin Sabok, Sam Staton, Dario Stein & Michael Wolman (2021): Probabilistic programming semantics for name generation. Proceedings of the ACM on Programming Languages 5(POPL), pp. 1–29, 10.1145/3434292.
  • [30] Moritz Schauer & Frank van der Meulen (2023): Compositionality in algorithms for smoothing. arXiv preprint arXiv:2303.13865.
  • [31] Adam Ścibior, Ohad Kammar, Matthijs Vákár, Sam Staton, Hongseok Yang, Yufei Cai, Klaus Ostermann, Sean K. Moss, Chris Heunen & Zoubin Ghahramani (2017): Denotational Validation of Higher-Order Bayesian Inference. Proc. ACM Program. Lang. 2(POPL), 10.1145/3158148.
  • [32] Toby St Clere Smithe (2020): Bayesian updates compose optically. arXiv preprint arXiv:2006.01631.
  • [33] Sam Staton (2017): Commutative Semantics for Probabilistic Programming, p. 855–879. Lecture Notes in Computer Science 10201, Springer Berlin Heidelberg, Berlin, Heidelberg, 10.1007/978-3-662-54434-1_32. Available at https://link.springer.com/10.1007/978-3-662-54434-1_32.
  • [34] Terence Tao (2011): An introduction to measure theory. Graduate studies in mathematics 126, American Mathematical Society, Providence, R.I, 10.1090/gsm/126/02.
  • [35] Matthijs Vákár & Luke Ong (2018): On S-Finite Measures and Kernels. Available at http://arxiv.org/abs/1810.01837. ArXiv:1810.01837 [math].
  • [36] Paul Wilson & Fabio Zanasi (2023): Data-Parallel Algorithms for String Diagrams. arXiv:https://arxiv.org/abs/2305.01041.
  • [37] Yi Wu, Siddharth Srivastava, Nicholas Hay, Simon Du & Stuart Russell (2018): Discrete-Continuous Mixtures in Probabilistic Programming: Generalized Semantics and Inference Algorithms. In: Proceedings of the 35th International Conference on Machine Learning, PMLR, p. 5343–5352. Available at https://proceedings.mlr.press/v80/wu18f.html.

Appendix A Measure theory background

Measure theory studies ways of assigning a “size” to a set (beyond its cardinality); these can include count, length, volume, and probability. Definition 16 begins with a nice class of measurable spaces.

Definition 16 (Standard Borel space).

Let (X,TX)Ob(𝐓𝐨𝐩)(X,T_{X})\in Ob(\mathbf{Top}) be a separable complete metric space or homeomorphic to one. Equipping XX with its Borel σ\sigma-algebra (X)\mathcal{B}(X) generated by complements, countable unions, and countable intersections of open subsets UTU\in T yields a standard Borel space (X,(X))Ob(𝐒𝐛𝐬)(X,\mathcal{B}(X))\in Ob(\mathbf{Sbs}), which is also a measurable space since 𝐒𝐛𝐬𝐌𝐞𝐚𝐬\mathbf{Sbs}\subset\mathbf{Meas}.

The paper uses standard Borel spaces as a basis for its category of measure spaces (Definition 9). Example 2 is such a space.

Example 2 (The unit interval).

The closed unit interval [0,1][0,1] with its Borel σ\sigma-algebra of open sets (0,1)\mathcal{B}(0,1) forms a standard Borel space ([0,1],(0,1))([0,1],\mathcal{B}(0,1)).

Having a category of measurable spaces and some nice examples, Definition 17 formally defines what it means to assign a “size” to a measurable set.

Definition 17 (Measure).

A measure μ:𝕄(Z)\mu:\mathbb{M}\left(Z\right) on a measurable space (Z,ΣZ)Ob(𝐌𝐞𝐚𝐬)(Z,\Sigma_{Z})\in Ob(\mathbf{Meas}) is a function μ:ΣZ[0,]\mu:\Sigma_{Z}\rightarrow[0,\infty] that is null on the empty set (μ()=0\mu(\emptyset)=0) and countably additive over pairwise disjoint sets

Reasoning compositionally about measure requires a class of maps between a domain and a codomain that form measures. The Giry monad [18] sends a measurable space (X,ΣX)(X,\Sigma_{X}) to its space of measures 𝕄(X)\mathbb{M}\left(X\right) and probability measures (X)𝕄(X)\mathbb{P}\left(X\right)\subset\mathbb{M}\left(X\right). Definition 18 defines maps into those spaces, treating the domain as a parameter space for a measure over the codomain.

Definition 18 (Measure kernel).

A measure kernel between two measurable spaces (Z,ΣZ),(X,ΣX)Ob(𝐌𝐞𝐚𝐬)(Z,\Sigma_{Z}),(X,\Sigma_{X})\in Ob(\mathbf{Meas}) is a function f:Z×ΣX[0,]f:Z\times\Sigma_{X}\rightarrow[0,\infty] such that zZ,f(z,):𝕄(X)\forall z\in Z,f(z,\cdot):\mathbb{M}\left(X\right) is a measure and σXΣX,f(,σX):𝐌𝐞𝐚𝐬((Z,ΣZ),([0,],Σ[0,]))\forall\sigma_{X}\in\Sigma_{X},f(\cdot,\sigma_{X}):\mathbf{Meas}((Z,\Sigma_{Z}),([0,\infty],\Sigma_{[0,\infty]})) is measurable.

Measure kernels serve both to define Markov kernels below, and to form a broader class of copy/delete categories, which in Theorem 9 are seen to admit probability densities as morphisms. Definition 19 specializes to measure kernels yielding only normalized probability measures.

Definition 19 (Markov kernel).

A Markov kernel is a measure kernel f:Z×ΣX[0,]f:Z\times\Sigma_{X}\rightarrow[0,\infty] whose measure is a probability measure so that zZ,f(z,):(X)\forall z\in Z,f(z,\cdot):\mathbb{P}\left(X\right) and zZ,f(z,X)=1\forall z\in Z,f(z,X)=1.

The Giry monad, restricted to probability spaces, yields Markov kernels as its Kleisli morphisms 𝐌𝐞𝐚𝐬((Z,ΣZ),𝕄(X))\mathbf{Meas}((Z,\Sigma_{Z}),\mathbb{M}\left(X\right)), forming the main category of Markov kernels in this paper (𝐒𝐭𝐨𝐜𝐡\mathbf{Stoch}, Definition 3). Describing densities categorically then requires invoking the Radon-Nikodym Theorem, which determines when probability measures have densities. The next two definitions give the Theorem’s conditions, which must be satisfied for a density to exist.

Definition 20 will formalize the condition that both the base measure and a probability measure consist of sums over countable partitions of the sample space.

Definition 20 (σ\sigma-finite measure kernel).

A σ\sigma-finite measure kernel f:Z×ΣX[0,]f:Z\times\Sigma_{X}\rightarrow[0,\infty] is a measure kernel which at every parameter zZz\in Z splits its codomain into countably many measurable sets X=nXnΣXX=\bigcup_{n\in\mathbb{N}}X_{n}\in\Sigma_{X}, each of which has finite measure f(z)(Xn)<f(z)(X_{n})<\infty.

Definition 21 will now formalize the further requirement that for a probability measure to admit a density function, it must have only the same null-sets as the underlying base measure.

Definition 21 (Absolute continuity).

One σ\sigma-finite measure kernel f:Z×ΣX[0,]f:Z\times\Sigma_{X}\rightarrow[0,\infty] is absolutely continuous (fgf\ll g) with respect to another σ\sigma-finite measure kernel over the same codomain g:Y×ΣX[0,]g:Y\times\Sigma_{X}\rightarrow[0,\infty] when zZ,yY,σXΣX,g(y)(σX)=0f(z)(σX)=0\forall z\in Z,y\in Y,\sigma_{X}\in\Sigma_{X},g(y)(\sigma_{X})=0\implies f(z)(\sigma_{X})=0.

The conditions in Definition 20 and Definition 21 are necessary and sufficient for the existence of a probability density via the Radon-Nikodym Theorem, as used in density kernels in Definition 10. Density kernels use measure spaces as their codomains: these group together the desired topology, dimensionality, and base measure. Definition 22 below formally defines measure spaces, which the paper uses in the specific form of standard Borel measure spaces (Definition 9).

Definition 22 (Measure space).

A measure space is a pair ((X,ΣX),μ)((X,\Sigma_{X}),\mu) of a measurable space (X,ΣX)Ob(𝐌𝐞𝐚𝐬)(X,\Sigma_{X})\in Ob(\mathbf{Meas}) with a measure μ:𝕄(X)\mu:\mathbb{M}\left(X\right) on that space.

The measure spaces just defined form objects in a category which Definition 8 describes. Passing from the category of measurable spaces 𝐌𝐞𝐚𝐬\mathbf{Meas} to the category of measure spaces \mathcal{M} requires the resulting morphisms to respect the chosen measure, so that measurable sets do not “grow” or “shrink”.

Having given the conditions for densities to exist, the paper passes from density kernels to joint density kernels. Definition 23 will give a class of Markov kernels encompassing all those in this paper, particularly joint density kernels.

Definition 23 (ss-finite measure kernel).

An ss-finite measure kernel f:Z×ΣX[0,]f:Z\times\Sigma_{X}\rightarrow[0,\infty] is a measure kernel (as in Definition 18 above) which decomposes into a sum of finite kernels f=nfnf=\sum_{n\in\mathbb{N}}f_{n} such that n,fn:Z×ΣX[0,]\forall n\in\mathbb{N},f_{n}:Z\times\Sigma_{X}\rightarrow[0,\infty] and n,rn0,zZ,fn(z,X)rn\forall n\in\mathbb{N},\exists r_{n}\in\mathbb{R}_{\geq 0},\forall z\in Z,f_{n}(z,X)\leq r_{n}.

Proposition 5 will demonstrate that the class of ss-finite kernels (Definition 23) includes all pushforwards of σ\sigma-finite kernels, and therefore the pushforwards of all measure kernels admitting densities.

Proposition 5 (ss-finite kernels are pushforwards of σ\sigma-finite kernels [35, 33]).

A measure kernel f:Z×ΣX[0,]f:Z\times\Sigma_{X}\rightarrow[0,\infty] is ss-finite if and only if it is a pushforward f=𝐜𝐨𝐩𝐲Z(pidZ)kf=\mathbf{copy}_{Z}\fatsemi(p\otimes id_{Z})\fatsemi k of a σ\sigma-finite measure kernel pp through a deterministic kk.

The above proposition includes trivial pushforwards, so every σ\sigma-finite (Definition 20) measure kernel is ss-finite (Definition 23) but not the other way around.

Appendix B Parametric and coparametric categories

This section will review the definitions of parametric and coparametric (bi)categories, first given in the categorical cybernetics literature [6]. For the sake of rigor, the reader can also see a recent review on actegories [7]. As a starting point, Definition 24 will describe how a symmetric monoidal category (SMC) can “act upon” another category functorially.

Definition 24 (\mathcal{M}-actegory).

Consider a symmetric monoidal category (,J,)(\mathcal{M},J,\odot) and a category 𝒞\mathcal{C}. An \mathcal{M}-actegory is a pair of the two with a functor :×𝒞𝒞\bullet:\mathcal{M}\times\mathcal{C}\rightarrow\mathcal{C} from the product category and natural transformations ε:JXX\varepsilon:J\bullet X\simeq X and δ:(MN)X=M(NX)\delta:(M\bullet N)\bullet X=M\bullet(N\bullet X).

Definition 25 will then apply the actegory concept to define a bicategory whose morphisms accumulate parameters in the course of composition.

Definition 25 (Parametric categories [6]).

Given an \mathcal{M}-actegory 𝒞\mathcal{C}, the parametric (bi)category 𝐏𝐚𝐫𝐚(𝒞)\mathbf{Para}_{\bullet}(\mathcal{C}) has as objects those of 𝒞\mathcal{C} and as morphisms the pairs 𝐏𝐚𝐫𝐚(𝒞)(A,B)={(M,k)Ob()×𝒞(MA,B)}\mathbf{Para}_{\bullet}(\mathcal{C})(A,B)=\left\{(M,k)\in Ob(\mathcal{M})\times\mathcal{C}(M\bullet A,B)\right\}. Composition for morphisms (M,k):𝐏𝐚𝐫𝐚(𝒞)(A,B)(M,k):\mathbf{Para}_{\bullet}(\mathcal{C})(A,B) and (M,k):𝐏𝐚𝐫𝐚(𝒞)(B,C)(M^{\prime},k^{\prime}):\mathbf{Para}_{\bullet}(\mathcal{C})(B,C) consists of (MM,k(idMk)))(M^{\prime}\odot M,k^{\prime}\circ(id_{M^{\prime}}\bullet k))) while identities on objects AA consist of (I,idA)(I,id_{A}).

Parametric (bi)categories of course have a dual, definable as 𝐏𝐚𝐫𝐚(𝒞op)op\mathbf{Para}_{\bullet}(\mathcal{C}^{op})^{op}. Definition 26 will describe this category, whose morphisms admit “coparameters” accumulate extra elements of the codomain.

Definition 26 (Coparametric categories [6]).

Given an \mathcal{M}-actegory 𝒞\mathcal{C}, the coparametric category

𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)\displaystyle\mathbf{CoPara}_{\bullet}(\mathcal{C}) Ob(𝐂𝐚𝐭)\displaystyle\in Ob(\mathbf{Cat})

has as objects those of 𝒞\mathcal{C} and as morphisms 𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)(A,B)\mathbf{CoPara}_{\bullet}(\mathcal{C})(A,B) the pairs (M,f)Ob()×𝒞(A,MB)(M,f)\in Ob(\mathcal{M})\times\mathcal{C}(A,M\bullet B). Composition for (M,f):𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)(A,B)(M,f):\mathbf{CoPara}_{\bullet}(\mathcal{C})(A,B) and (M,g):𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)(B,C)(M^{\prime},g):\mathbf{CoPara}_{\bullet}(\mathcal{C})(B,C) consists of (MM,(idMg)f))(M\odot M^{\prime},(id_{M}\bullet g)\circ f)) while identities on objects AA consist of (I,idA)(I,id_{A}).

The coparametric category construction generalizes the idea of a writer monad to more than one object, and represents morphisms that “log” or “leave behind” a cumulative effect. Definition 27 will describe symmetric monoidality for the \mathcal{M}-actegory on 𝒞\mathcal{C} when (𝒞,I)(\mathcal{C},\otimes I) is symmetric monoidal.

Definition 27 (Symmetric monoidal \mathcal{M}-actegory).

A symmetric monoidal \mathcal{M}-actegory is an \mathcal{M}-actegory 𝒞\mathcal{C} equipped with a symmetric monoidal structure and a natural isomorphism κM,X,Y:M(XY)X(MY)\kappa_{M,X,Y}:M\bullet(X\otimes Y)\simeq X\otimes(M\bullet Y), satisfying coherence laws similar to those of a costrong comonad.

Finally, Proposition 6 will demonstrate that given a symmetric monoidal actegory as in Definition 27, the constructions above admit symmetric monoidal structure themselves.

Proposition 6 (Parametric and coparametric categories admit monoidal structure [7]111111Example 5.1.8).

Given a symmetric monoidal \mathcal{M}-actegory (𝒞,,I)(\mathcal{C},\otimes,I), the parametric bicategory 𝐏𝐚𝐫𝐚(𝒞)\mathbf{Para}_{\bullet}(\mathcal{C}) and coparametric bicategory 𝐂𝐨𝐏𝐚𝐫𝐚(𝒞)\mathbf{CoPara}_{\bullet}(\mathcal{C}) form symmetric monoidal bicategories (𝐏𝐚𝐫𝐚(𝒞),,I)(\mathbf{Para}_{\bullet}(\mathcal{C}),\otimes,I) and (𝐂𝐨𝐏𝐚𝐫𝐚(𝒞),,I)(\mathbf{CoPara}_{\bullet}(\mathcal{C}),\otimes,I).

Appendix C Free copy/delete and Markov categories

Generalized causal models [15] employ hypergraphs, which “flip” the status of nodes and edges relative to ordinary graphs: “hypernodes” are drawn as wires and “hyperedges” connecting them as boxes. These hypergraphs represent string diagrams combinatorially; restricting hypergraphs to conditions matching certain kinds of categories defines “free” categories of those kinds. This subsection will build up free copy/delete and Markov categories with generalized causal models as morphisms.

Definition 28 defines hypergraphs via sets [17]; Bonchi et al [5] provides categorical intuition.

Definition 28 (Hypergraph).

A hypergraph is a 4-tuple (W,B,dom,cod)(W,B,\mathrm{dom},\mathrm{cod}) consisting of a set of vertices, nodes, or “wires” WW; a set of hyperedges or “boxes” BB; a function dom:BW\mathrm{dom}:B\rightarrow W^{*} assigning a domain to each box; and a function cod:BW\mathrm{cod}:B\rightarrow W^{*} assigning a codomain to each box.

We abuse notation and write individual boxes bB:dom(b)cod(b)b\in B:\mathrm{dom}(b)\rightarrow\mathrm{cod}(b).

Definition 29 specifies relabelings of one hypergraph’s wires and boxes with those of another.

Definition 29 (Hypergraph morphism).

Given hypergraphs G,HG,H, a hypergraph morphism α:GH\alpha:G\rightarrow H is a pair of functions assigning wires to wires and boxes to boxes, the latter respecting the former

𝐇𝐲𝐩(G,H)\displaystyle\mathbf{Hyp}(G,H) :={(αW,αB)W(H)W(G)×B(H)B(G)bB(G),αB(b):αW(dom(b))αW(cod(b))}.\displaystyle:=\left\{(\alpha_{W},\alpha_{B})\in W(H)^{W(G)}\times B(H)^{B(G)}\mid\forall b\in B(G),\alpha_{B}(b):\alpha_{W}(\mathrm{dom}(b))\rightarrow\alpha_{W}(\mathrm{cod}(b))\right\}.

As implied by the hom-set notation, hypergraphs and their morphisms form a category 𝐇𝐲𝐩\mathbf{Hyp} [5], and our application will employ the full subcategory 𝐅𝐢𝐧𝐇𝐲𝐩\mathbf{FinHyp} in which WW and BB both have finite cardinality. Finally, a hypergraph HH is discrete when B(H)=B(H)=\emptyset; n¯\underline{n} denotes a discrete hypergraph with nn\in\mathbb{N} wires. Any monoidal category has a (potentially infinite) underlying hypergraph, which we denote hyp():𝐌𝐨𝐧𝐂𝐚𝐭𝐇𝐲𝐩\mathrm{hyp}(\cdot):\mathbf{MonCat}\rightarrow\mathbf{Hyp} following Fritz and Liang [16].

Often a finite hypergraph Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp} denotes the generating objects and morphisms of a free monoidal category, or the primitive types and functions of a domain-specific programming language. We call such a finite hypergraph a monoidal signature. Definition 30 formally defines the copy/delete category freely generated by a signature Σ\Sigma, which Definition 31 will restrict to free Markov categories.

Definition 30 (Free copy/delete category for the signature Σ\Sigma [16]).

The free CD category 𝐅𝐫𝐞𝐞𝐂𝐃Σ\mathbf{FreeCD}_{\Sigma} for Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp} is a subcategory 𝐅𝐫𝐞𝐞𝐂𝐃Σ𝐜𝐨𝐬𝐩𝐚𝐧(𝐅𝐢𝐧𝐇𝐲𝐩/Σ)\mathbf{FreeCD}_{\Sigma}\subseteq\mathbf{cospan}(\mathbf{FinHyp}/\Sigma) where

  • Objects are the pairs (n,σ)×n¯Σ(n,\sigma)\in\mathbb{N}\times\underline{n}\rightarrow\Sigma assigning outer wires of a string diagram to wires in Σ\Sigma;

  • Morphisms are isomorphism classes of cospans, given combinatorially

    𝐅𝐫𝐞𝐞𝐂𝐃Σ((n,σn),(m,σm))={pdom(τ)q𝐅𝐢𝐧𝐇𝐲𝐩(n¯,dom(τ))×Ob(𝐅𝐢𝐧𝐇𝐲𝐩/Σ)×𝐅𝐢𝐧𝐇𝐲𝐩(m¯,dom(τ))},\mathbf{FreeCD}_{\Sigma}((n,\sigma_{n}),(m,\sigma_{m}))=\\ \left\{p\rightarrow\mathrm{dom}(\tau)\leftarrow q\in\mathbf{FinHyp}(\underline{n},\mathrm{dom}(\tau))\times Ob(\mathbf{FinHyp}/\Sigma)\times\mathbf{FinHyp}(\underline{m},\mathrm{dom}(\tau))\right\},

    such that τ:GΣOb(𝐅𝐢𝐧𝐇𝐲𝐩/Σ)\tau:G\rightarrow\Sigma\in Ob(\mathbf{FinHyp}/\Sigma) is a hypergraph morphism from an acyclic GG and every wire wW(G)w\in W(G) has at most one “starting place” as the diagram’s input or a box’s output

    |p1(w)|+bB(G)wcod(b)𝕀[w=w]\displaystyle|p^{-1}(w)|+\sum_{b\in B(G)}\sum_{w^{\prime}\in\mathrm{cod}(b)}\mathbb{I}[w^{\prime}=w] 1.\displaystyle\leq 1.

Intuitively, a morphism in 𝐅𝐫𝐞𝐞𝐂𝐃Σ\mathbf{FreeCD}_{\Sigma} is syntax specifying a string diagram with no looping or merging wires, whose boxes and wires are labeled by Σ\Sigma. Definition 31 passes to the free Markov category 𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ\mathbf{FreeMarkov}_{\Sigma} just by syntactically enforcing the naturality of 𝐝𝐞𝐥Z\mathbf{del}_{Z}.

Definition 31 (Free Markov category for the signature Σ\Sigma).

The free Markov category 𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ\mathbf{FreeMarkov}_{\Sigma} for Σ𝐅𝐢𝐧𝐇𝐲𝐩\Sigma\in\mathbf{FinHyp} is the wide subcategory of 𝐅𝐫𝐞𝐞𝐂𝐃Σ\mathbf{FreeCD}_{\Sigma} restricted to morphisms in which every output from every box connects to somewhere else

connects(w,G,q)\displaystyle\mathrm{connects}(w,G,q) :=𝕀[bB(G):wcod(b)q1(w)bB(G):wdom(b)]\displaystyle:=\mathbb{I}[\exists b\in B(G):w\in\mathrm{cod}(b)\implies q^{-1}(w)\neq\emptyset\vee\exists b^{\prime}\in B(G):w\in\mathrm{dom}(b^{\prime})]
𝐅𝐫𝐞𝐞𝐌𝐚𝐫𝐤𝐨𝐯Σ(n,m):={pdom(τ)q𝐅𝐫𝐞𝐞𝐂𝐃Σ(n,m)wW(dom(τ)),connects(w,dom(τ),q)},\mathbf{FreeMarkov}_{\Sigma}(n,m):=\\ \left\{p\rightarrow\mathrm{dom}(\tau)\leftarrow q\in\mathbf{FreeCD}_{\Sigma}(n,m)\mid\forall w\in W(\mathrm{dom}(\tau)),\mathrm{connects}(w,\mathrm{dom}(\tau),q)\right\},

and with composition redefined to syntactically enforce this by iterating the deletion of discarded boxes to a fixed-point after composition in 𝐅𝐫𝐞𝐞𝐂𝐃Σ\mathbf{FreeCD}_{\Sigma}.