A Bayesian network is usually drawn as a directed acyclic graph (DAG) annotated with conditional probability tables. Read categorically, the picture is the mathematics. The graph is the wiring of a string-diagram in a markov-category, each node is a channel, and conditional independence is not a side condition but an equation between diagrams.
Let
Definition. The network as a diagram
The joint factors as a copy/compose pattern. Each node’s output wire is
-branched to all of its children, and discarded ( ) where a variable is latent or marginalised. The DAG’s edges are exactly the wires, so there is no data beyond the diagram and the channels labelling its boxes.
Proposition. Conditional independence is a diagram equation
holds in the represented state iff the two diagrams “copy , then run the - and -branches independently” and “run the joint -branch off ” are equal. The graphoid axioms (symmetry, decomposition, weak union, contraction) become derivations by sliding, copying, and discarding wires, so d-separation is a soundness statement about diagram rewriting.
Remark. References
Fong’s thesis casts causal networks as string diagrams in a Markov category and proves a d-separation / factorisation correspondence in this language. Jacobs develops categorical conditional probability (disintegration, Bayesian inversion, and the “channel” calculus of states and effects) that supplies the conditioning these networks need. Both treat the graph as syntax and the Markov category as semantics.
The vector-cone-map reading
The same network collapses to a single linear map between cones, so inference is matrix-vector arithmetic in disguise. Take
The machinery contains nothing beyond (semi-)linear algebra. The Dirac embedding
The empirical distribution is a measure
An observed pair
enters as the measure , rather than as a normalized frequency needing subtraction to update. This works over any measurable space, since the cone needs neither subtraction nor topology, and an empirical distribution is just a finite non-negative combination of such products.