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.
翻译:贝叶斯规则告诉我们如何逆转因果过程,以便根据新证据更新我们的信念。若该过程被认为具有复杂的组合结构,我们可能观察到整体的反转可以通过各组成部分的逐段计算来实现。我们研究这一组合规则的结构,注意到它与函数式编程中的透镜模式相关。在适当普遍的马尔可夫核范畴的公理化表述中,我们看到如何将贝叶斯反演视为纤维范畴中依赖于态射的一个特例。我们讨论其组合性质,将其表述为基础范畴上的函子,并探索如何利用这一点建立更加类型驱动的统计推断方法。