Reference. The Compositional Structure of Bayesian Inference

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.

Cite

Cite as @braithwaite-2023-the (helia, typst) · \cite{braithwaite-2023-the} (LaTeX)
BibTeX
bibtex · 14 lines
@inproceedings{braithwaite-2023-the,
  doi = {10.4230/LIPICS.MFCS.2023.24},
  url = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.MFCS.2023.24},
  author = {Braithwaite, Dylan and Hedges, Jules and St Clere Smithe, Toby},
  keywords = {monoidal categories, probabilistic programming, Bayesian inference, Theory of computation → Categorical semantics, Mathematics of computing → Probabilistic representations, Mathematics of computing → Bayesian computation},
  language = {en},
  title = {The Compositional Structure of Bayesian Inference},
  volume = {272},
  pages = {24:1-24:15},
  publisher = {Schloss Dagstuhl – Leibniz-Zentrum für Informatik},
  year = {2023},
  copyright = {Creative Commons Attribution 4.0 International license},
  booktitle = {48th International Symposium on Mathematical Foundations of Computer Science (MFCS 2023)}
}
hayagriva YAML (typst)
yaml · 17 lines
braithwaite-2023-the:
  type: article
  title: The Compositional Structure of Bayesian Inference
  author:
  - Braithwaite, Dylan
  - Hedges, Jules
  - St Clere Smithe, Toby
  date: 2023
  page-range: 24:1-24:15
  url: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.MFCS.2023.24
  serial-number:
    doi: 10.4230/LIPICS.MFCS.2023.24
  parent:
    type: proceedings
    title: 48th International Symposium on Mathematical Foundations of Computer Science (MFCS 2023)
    publisher: Schloss Dagstuhl – Leibniz-Zentrum für Informatik
    volume: 272
Cited by (2)

Reinforcement Learning in Categorical Cybernetics hedges-2025-reinforcement

DOI · arXiv

Fundamental Components of Deep Learning: A category-theoretic approach gavranovicFundamentalComponentsDeep

Deep learning, despite its remarkable achievements, is still a young field. Like the early stages of many scientific disciplines, it is marked by the discovery of new phenomena, ad-hoc design decisions, and the lack of a uniform and compositional mathematical foundation. From the intricacies of the implementation of backpropagation, through a growing zoo of neural network architectures, to the new and poorly understood phenomena such as double descent, scaling laws or in-context learning, there are few unifying principles in deep learning. This thesis develops a novel mathematical foundation for deep learning based on the language of category theory. We develop a new framework that is a) end-to-end, b) unform, and c) not merely descriptive, but prescriptive, meaning it is amenable to direct implementation in programming languages with sufficient features. We also systematise many existing approaches, placing many existing constructions and concepts from the literature under the same umbrella. In Part I we identify and model two main properties of deep learning systems parametricity and bidirectionality by we expand on the previously defined construction of actegories and Para to study the former, and define weighted optics to study the latter. Combining them yields parametric weighted optics, a categorical model of artificial neural networks, and more. Part II justifies the abstractions from Part I, applying them to model backpropagation, architectures, and supervised learning. We provide a lens-theoretic axiomatisation of differentiation, covering not just smooth spaces, but discrete settings of boolean circuits as well. We survey existing, and develop new categorical models of neural network architectures. We formalise the notion of optimisers and lastly, combine all the existing concepts together, providing a uniform and compositional framework for supervised learning.
DOI
Cites 20 works (5 here)
With notes (5)

Value Iteration is Optic Composition hedges-2023-value

DOI · arXiv

Towards Foundations of Categorical Cybernetics capucci-2022-towards

DOI · arXiv

Dependent Bayesian Lenses: Categories of Bidirectional Markov Kernels with Canonical Bayesian Inversion braithwaite-2022-dependent

We generalise an existing construction of Bayesian Lenses to admit lenses between pairs of objects where the backwards object is dependent on states on the forwards object (interpreted as probability distributions). This gives a natural setting for studying stochastic maps with Bayesian inverses restricted to the points supported by a given prior. In order to state this formally we develop a proposed definition by Fritz of a support object in a Markov category and show that these give rise to a section into the category of dependent Bayesian lenses encoding a more canonical notion of Bayesian inversion.
arXiv

Compositional Game Theory ghani-2018-compositional

DOI · arXiv

Categorical Logic and Type Theory jacobs-1999

This book is an attempt to give a systematic presentation of both logic and type theory from a categorical perspective, using the unifying concept of fibred category. Its intended audience consists of logicians, type theorists, category theorists and (theoretical) computer scientists.

braithwaite-2023-the reference entries/refs/braithwaite-2023-the/braithwaite-2023-the.hel