Bayes' rule tells us how to invert a causal process in order to update our beliefs in light of new evidence. If the process is believed to have a complex compositional structure, we may observe that the inversion of the whole can be computed piecewise in terms of the component processes. We study the structure of this compositional rule, noting that it relates to the lens pattern in functional programming. Working in a suitably general axiomatic presentation of a category of Markov kernels, we see how we can think of Bayesian inversion as a particular instance of a state-dependent morphism in a fibred category. We discuss the compositional nature of this, formulated as a functor on the underlying category and explore how this can used for a more type-driven approach to statistical inference.
翻译:贝叶斯规则告诉我们如何逆转因果过程,以便根据新证据更新我们的信念。若该过程被认为具有复杂的组合结构,我们或许注意到整体的逆运算可以通过各个子过程分段计算。我们研究这一组合规则的结构,指出它与函数式编程中的透镜模式相关联。在马尔可夫核范畴的适当广义公理化表述中,我们揭示了如何将贝叶斯逆运算视为纤维范畴中状态依赖态射的一个特定实例。我们探讨了其组合性质,将其表述为底层范畴上的函子,并研究了这如何用于一种更具类型驱动性的统计推理方法。