# Active Inference in String Diagrams: A Categorical Account of Predictive Processing and Free Energy

arXiv: https://arxiv.org/abs/2308.00861 · HTML: https://mlsanity.com/paper/2308.00861/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 16 of its 41 references that are in the map.
- First posted on arXiv 1 Aug 2023.

## Builds on (most cited first, 16 of 16)

- [A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics](https://mlsanity.com/paper/1908.07021/) (2019)
- [Reinforcement Learning through Active Inference](https://mlsanity.com/paper/2002.12636/) (2020)
- [Backprop as Functor: A compositional perspective on supervised learning](https://mlsanity.com/paper/1711.10455/) (2017)
- [Category Theory in Machine Learning](https://mlsanity.com/paper/2106.07032/) (2021)
- [Disintegration and Bayesian Inversion via String Diagrams](https://mlsanity.com/paper/1709.00322/) (2017)
- [Causal Inference by String Diagram Surgery](https://mlsanity.com/paper/1811.08338/) (2018)
- [Causal models in string diagrams](https://mlsanity.com/paper/2304.07638/) (2023)
- [Compositional game theory](https://mlsanity.com/paper/1603.04641/) (2016)
- [The d-separation criterion in Categorical Probability](https://mlsanity.com/paper/2207.05740/) (2022)
- [An Introduction to String Diagrams for Computer Scientists](https://mlsanity.com/paper/2305.08768/) (2023)
- [Markov Categories and Entropy](https://mlsanity.com/paper/2212.11719/) (2022)
- [Integrated Information in Process Theories](https://mlsanity.com/paper/2002.07654/) (2020)
- [The Mathematical Structure of Integrated Information Theory](https://mlsanity.com/paper/2002.07655/) (2020)
- [Cyber Kittens, or Some First Steps Towards Categorical Cybernetics](https://mlsanity.com/paper/2101.10483/) (2021)
- [Compositional Active Inference II: Polynomial Dynamics. Approximate Inference Doctrines](https://mlsanity.com/paper/2208.12173/) (2022)
- [Evidential Decision Theory via Partial Markov Categories](https://mlsanity.com/paper/2301.12989/) (2023)

## Built on by (most cited first, 3 of 3)

- [Towards Compositional Interpretability for XAI](https://mlsanity.com/paper/2406.17583/) (2024)
- [From Mechanistic to Compositional Interpretability](https://mlsanity.com/paper/2605.08934/) (2026)
- [Bayesian Networks, Markov Networks, Moralisation, Triangulation: a Categorical Perspective](https://mlsanity.com/paper/2512.09908/) (2025)

## Abstract (arXiv)

We present a categorical formulation of the cognitive frameworks of Predictive Processing and Active Inference, expressed in terms of string diagrams interpreted in a monoidal category with copying and discarding. This includes diagrammatic accounts of generative models, Bayesian updating, perception, planning, active inference, and free energy. In particular we present a diagrammatic derivation of the formula for active inference via free energy minimisation, and establish a compositionality property for free energy, allowing free energy to be applied at all levels of an agent's generative model. Aside from aiming to provide a helpful graphical language for those familiar with active inference, we conversely hope that this article may provide a concise formulation and introduction to the framework.
