Categorical systems theory

String diagrams, maybe other useful things

2026-02-04 — 2026-03-17

Wherein systems’ interfaces are treated as the sole locus of interaction, composition patterns being prescribed; string diagrams are employed for Bayesian-network computations, with DisCoPy and TikZiT noted.

calculus
dynamical systems
geometry
Hilbert space
how do science
Lévy processes
machine learning
neural nets
PDEs
physics
regression
sciml
SDEs
signal processing
statistics
statmech
stochastic processes
sync
time series
uncertainty
Figure 1

Category theory for systems.

Myers (2023):

Categorical systems theory is an emerging field of mathematics which seeks to apply the methods of category theory to general systems theory. General systems theory is the study of systems — ways things can be and change, and models thereof — in full generality. The difficulty is that there doesn’t seem to be a single core idea of what it means to be a “system”. Different people have, for different purposes, come up with a vast array of different modeling techniques and definitions that could be called “systems”. There is often little the same in the precise content of these definitions, though there are still strong, if informal, analogies to be made accross these different fields. This makes coming up with a mathematical theory of general systems tantalizing but difficult: what, after all, is a system in general?

Category theory has been describe as the mathematics of formal analogy making. It allows us to make analogies between fields by focusing not on content of the objects of those fields, but by the ways that the objects of those fields relate to one another. Categorical systems theory applies this idea to general systems theory, avoiding the issue of not having a contentful definition of system by instead focusing on the ways that systems interact with eachother and their environment.

These are the main ideas of categorical systems theory: 1. Any system interacts with its environment through an interface, which can be described separately from the system itself. 2. All interactions of a system with its environment take place through its interface, so that from the point of view of the environment, all we need to know about a system is what is going on at the interface. 3. Systems interact with other systems through their respective interfaces. So, to understand complex systems in terms of their component subsystems, we need to understand the ways that interfaces can be connected. We call these ways that interfaces can be connected composition patterns. 4. Given a composition pattern describing how some interface are to be connected, and some systems with those interfaces, we should have a composite system which consists of those subsystems interacting according to the composition pattern. The ability to form composite systems of interacting component systems is called modularity, and is a well known boon in the design of complex systems.

In a sense, the definitions of categorical systems theory are all about modularity how can systems be composed of subsystems. On the other hand, the theorems of categorical systems theory often take the form of compositionality results. These say that certain facts and features of composite systems can be understood or calculated in terms of their component systems and the composition pattern.

See also Capucci (2025).

1 String diagrams

Why would we bother with this? I saw Martin Biehl present work (Biehl and Virgo 2023; Virgo, Biehl, and McGregor 2021) that used the “string diagrams” formalism to run computations over Bayesian networks, and he argued it might be simpler to work with complex systems in this style.

Are patchers a special case of string diagrams? A sloppy generalization?

2 Tools

  • DisCoPy, “DisCoPy is a Python toolkit for computing with string diagrams.”
  • TikZiT looks like a reasonably good alternative GUI for tikz with string diagram support.

3 References

Biehl, and Virgo. 2023. Interpreting Systems as Solving POMDPs: A Step Towards a Formal Understanding of Agency.” In.
Capucci. 2025. Notes on Categorical Systems Theory.”
Felice. 2022. Categorical Tools for Natural Language Processing.”
Felice, Toumi, and Coecke. 2021. DisCoPy: Monoidal Categories in Python.”
Myers. 2023. “Categorical Systems Theory.”
Toumi. 2022. Category Theory for Quantum Natural Language Processing.”
Toumi, Felice, and Yeung. 2022. DisCoPy for the Quantum Computer Scientist.”
Toumi, and Koziell-Pipe. 2021. Functorial Language Models.”
Toumi, Yeung, and Felice. 2021. Diagrammatic Differentiation for Quantum Machine Learning.”
Toumi, Yeung, Poór, et al. 2023. DisCoPy: The Hierarchy of Graphical Languages in Python.”
Virgo, Biehl, and McGregor. 2021. Interpreting Dynamical Systems as Bayesian Reasoners.”