# Causal models in string diagrams

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

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- Placed in Causal reasoning in LLMs, one of 17 directions in LLM reasoning.
- Builds on 32 of its 115 references that are in the map.
- First posted on arXiv 15 Apr 2023.

## Placed in

- LLM reasoning / [Causal reasoning in LLMs](https://mlsanity.com/lr/causal-reasoning-in-llms/)

## Builds on (most cited first, 30 of 32)

- [Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations](https://mlsanity.com/paper/1811.12359/) (2018)
- [Causality for Machine Learning](https://mlsanity.com/paper/1911.10500/) (2019)
- [Weakly-Supervised Disentanglement Without Compromises](https://mlsanity.com/paper/2002.02886/) (2020)
- [Representation Learning via Invariant Causal Mechanisms](https://mlsanity.com/paper/2010.07922/) (2020)
- [A Meta-Transfer Objective for Learning to Disentangle Causal Mechanisms](https://mlsanity.com/paper/1901.10912/) (2019)
- [Weakly supervised causal representation learning](https://mlsanity.com/paper/2203.16437/) (2022)
- [CITRIS: Causal Identifiability from Temporal Intervened Sequences](https://mlsanity.com/paper/2202.03169/) (2022)
- [Desiderata for Representation Learning: A Causal Perspective](https://mlsanity.com/paper/2109.03795/) (2021)
- [Weakly Supervised Disentangled Generative Causal Representation Learning](https://mlsanity.com/paper/2010.02637/) (2020)
- [Causal Networks: Semantics and Expressiveness](https://mlsanity.com/paper/1304.2379/) (2013)
- [Theoretical Impediments to Machine Learning With Seven Sparks from the Causal Revolution](https://mlsanity.com/paper/1801.04016/) (2018)
- [Visual Causal Feature Learning](https://mlsanity.com/paper/1412.2309/) (2014)
- [Causal Reasoning from Meta-reinforcement Learning](https://mlsanity.com/paper/1901.08162/) (2019)
- [From Statistical to Causal Learning](https://mlsanity.com/paper/2204.00607/) (2022)
- [Nested Counterfactual Identification from Arbitrary Surrogate Experiments](https://mlsanity.com/paper/2107.03190/) (2021)
- [Category Theory in Machine Learning](https://mlsanity.com/paper/2106.07032/) (2021)
- [Compositional Abstraction Error and a Category of Causal Models](https://mlsanity.com/paper/2103.15758/) (2021)
- [Markov Properties for Graphical Models with Cycles and Latent Variables](https://mlsanity.com/paper/1710.08775/) (2017)
- [Multi-Level Cause-Effect Systems](https://mlsanity.com/paper/1512.07942/) (2015)
- [D'ARTAGNAN: Counterfactual Video Generation](https://mlsanity.com/paper/2206.01651/) (2022)
- [Unsupervised Discovery of El Nino Using Causal Feature Learning on Microlevel Climate Data](https://mlsanity.com/paper/1605.09370/) (2016)
- [Causal Calculus in the Presence of Cycles, Latent Confounders and Selection Bias](https://mlsanity.com/paper/1901.00433/) (2019)
- [Amortized learning of neural causal representations](https://mlsanity.com/paper/2008.09301/) (2020)
- [The d-separation criterion in Categorical Probability](https://mlsanity.com/paper/2207.05740/) (2022)
- [Independently Controllable Features](https://mlsanity.com/paper/1703.07718/) (2017)
- [Structure by Architecture: Structured Representations without Regularization](https://mlsanity.com/paper/2006.07796/) (2020)
- [Towards a Grounded Theory of Causation for Embodied AI](https://mlsanity.com/paper/2206.13973/) (2022)
- [Phenomenological Causality](https://mlsanity.com/paper/2211.09024/) (2022)
- [Free gs-monoidal categories and free Markov categories](https://mlsanity.com/paper/2204.02284/) (2022)
- [Learning from What's Right and Learning from What's Wrong](https://mlsanity.com/paper/2112.14045/) (2021)

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

- [Towards Compositional Interpretability for XAI](https://mlsanity.com/paper/2406.17583/) (2024)
- [A Pattern Language for Machine Learning Tasks](https://mlsanity.com/paper/2407.02424/) (2024)
- [Active Inference in String Diagrams: A Categorical Account of Predictive Processing and Free Energy](https://mlsanity.com/paper/2308.00861/) (2023)
- [On the Anatomy of Attention](https://mlsanity.com/paper/2407.02423/) (2024)
- [An Algebraic Approach to Moralisation and Triangulation of Probabilistic Graphical Models](https://mlsanity.com/paper/2503.11820/) (2025)
- [Notes on Forr'e's Notion of Conditional Independence and Causal Calculus for Continuous Variables](https://mlsanity.com/paper/2603.24333/) (2026)
- [From Mechanistic to Compositional Interpretability](https://mlsanity.com/paper/2605.08934/) (2026)
- [Everything that can be learned about a causal structure with latent variables by observational and interventional probing schemes](https://mlsanity.com/paper/2407.01686/) (2024)
- [A Quantum-Inspired Analysis of Human Disambiguation Processes](https://mlsanity.com/paper/2408.07402/) (2024)
- [A Diagrammatic Approach to Improve Computational Efficiency in Group Equivariant Neural Networks](https://mlsanity.com/paper/2412.10837/) (2024)
- [Causal Models for Growing Networks](https://mlsanity.com/paper/2504.01012/) (2025)
- [Bayesian Networks, Markov Networks, Moralisation, Triangulation: a Categorical Perspective](https://mlsanity.com/paper/2512.09908/) (2025)
- [Graphical Design of Interpretable Architectures](https://mlsanity.com/paper/2608.18936/) (2026)
- [Towards unsupervised representation learning for quantum data: quantum models with inference and generation](https://mlsanity.com/paper/2609.00372/) (2026)

## Abstract (arXiv)

The framework of causal models provides a principled approach to causal reasoning, applied today across many scientific domains. Here we present this framework in the language of string diagrams, interpreted formally using category theory. A class of string diagrams, called network diagrams, are in 1-to-1 correspondence with directed acyclic graphs. A causal model is given by such a diagram with its components interpreted as stochastic maps, functions, or general channels in a symmetric monoidal category with a 'copy-discard' structure (cd-category), turning a model into a single mathematical object that can be reasoned with intuitively and yet rigorously. Building on prior works by Fong and Jacobs, Kissinger and Zanasi, as well as Fritz and Klingler, we present diagrammatic definitions of causal models and functional causal models in a cd-category, generalising causal Bayesian networks and structural causal models, respectively. We formalise general interventions on a model, including but beyond do-interventions, and present the natural notion of an open causal model with inputs. We also give an approach to conditioning based on a normalisation box, allowing for causal inference calculations to be done fully diagrammatically. We define counterfactuals in this setup, and treat the problems of the identifiability of causal effects and counterfactuals fully diagrammatically. The benefits of such a presentation of causal models lie in foundational questions in causal reasoning and in their clarificatory role and pedagogical value. This work aims to be accessible to different communities, from causal model practitioners to researchers in applied category theory, and discusses many examples from the literature for illustration. Overall, we argue and demonstrate that causal reasoning according to the causal model framework is most naturally and intuitively done as diagrammatic reasoning.
