math.CT — Category Theory
Bayesian Updating with Contextful Arrows
Many formulations of Bayesian updating with Markov categories are known, among them the dagger on probability spaces, Bayesian lenses and their dependent version, the recursion of the Bayes filter and conditional composition. A question common to many of them is how to make updating compositional, so that a posterior becomes the next prior; the author's earlier work also raised it, as the relation between sequential and batch updating. This paper gives one answer by composing contextful arrows. The states of a Markov category form a base , and their lifts, the joint states with a given marginal, form a presheaf on . A foot makes a contextful arrow : the marginal foot recovers the chain rule of Bayesian lenses, and the joint foot makes each joint state the next state. With the joint foot, the lifts to an object give a strong monoidal functor from to the monoidal category of contextful arrows on , whose runs are conditional composites. Through the symmetry of becomes a swap of two lifts, and this swap is a Bayesian inversion. The coherence of then gives the agreement of sequential and batch updating and recovers the recursion of the Bayes filter. These facts are known; here they follow from one strong monoidal functor.