-
A Categorical Framework for Modeling with Stock and Flow Diagrams
Authors:
John C. Baez,
Xiaoyan Li,
Sophie Libkind,
Nathaniel D. Osgood,
Eric Redekopp
Abstract:
Stock and flow diagrams are already an important tool in epidemiology, but category theory lets us go further and treat these diagrams as mathematical entities in their own right. In this chapter we use communicable disease models created with our software, StockFlow.jl, to explain the benefits of the categorical approach. We first explain the category of stock-flow diagrams and note the clear sep…
▽ More
Stock and flow diagrams are already an important tool in epidemiology, but category theory lets us go further and treat these diagrams as mathematical entities in their own right. In this chapter we use communicable disease models created with our software, StockFlow.jl, to explain the benefits of the categorical approach. We first explain the category of stock-flow diagrams and note the clear separation between the syntax of these diagrams and their semantics, demonstrating three examples of semantics already implemented in the software: ODEs, causal loop diagrams, and system structure diagrams. We then turn to two methods for building large stock-flow diagrams from smaller ones in a modular fashion: composition and stratification. Finally, we introduce the open-source ModelCollab software for diagram-based collaborative modeling. The graphical user interface of this web-based software lets modelers take advantage of the ideas discussed here without any knowledge of their categorical foundations.
△ Less
Submitted 13 January, 2023; v1 submitted 1 November, 2022;
originally announced November 2022.
-
The Fundamental Theorem of Natural Selection
Authors:
John C. Baez
Abstract:
Suppose we have $n$ different types of self-replicating entity, with the population $P_i$ of the $i$th type changing at a rate equal to $P_i$ times the fitness $f_i$ of that type. Suppose the fitness $f_i$ is any continuous function of all the populations $P_1, \dots, P_n$. Let $p_i$ be the fraction of replicators that are of the $i$th type. Then $p = (p_1, \dots, p_n)$ is a time-dependent probabi…
▽ More
Suppose we have $n$ different types of self-replicating entity, with the population $P_i$ of the $i$th type changing at a rate equal to $P_i$ times the fitness $f_i$ of that type. Suppose the fitness $f_i$ is any continuous function of all the populations $P_1, \dots, P_n$. Let $p_i$ be the fraction of replicators that are of the $i$th type. Then $p = (p_1, \dots, p_n)$ is a time-dependent probability distribution, and we prove that its speed as measured by the Fisher information metric equals the variance in fitness. In rough terms, this says that the speed at which information is updated through natural selection equals the variance in fitness. This result can be seen as a modified version of Fisher's fundamental theorem of natural selection. We compare it to Fisher's original result as interpreted by Price, Ewens and Edwards.
△ Less
Submitted 6 October, 2021; v1 submitted 12 July, 2021;
originally announced July 2021.
-
Categories of Nets
Authors:
John C. Baez,
Fabrizio Genovese,
Jade Master,
Michael Shulman
Abstract:
We present a unified framework for Petri nets and various variants, such as pre-nets and Kock's whole-grain Petri nets. Our framework is based on a less well-studied notion that we call $Σ$-nets, which allow finer control over whether tokens are treated using the collective or individual token philosophy. We describe three forms of execution semantics in which pre-nets generate strict monoidal cat…
▽ More
We present a unified framework for Petri nets and various variants, such as pre-nets and Kock's whole-grain Petri nets. Our framework is based on a less well-studied notion that we call $Σ$-nets, which allow finer control over whether tokens are treated using the collective or individual token philosophy. We describe three forms of execution semantics in which pre-nets generate strict monoidal categories, $Σ$-nets (including whole-grain Petri nets) generate symmetric strict monoidal categories, and Petri nets generate commutative monoidal categories, all by left adjoint functors. We also construct adjunctions relating these categories of nets to each other, in particular showing that all kinds of net can be embedded in the unifying category of $Σ$-nets, in a way that commutes coherently with their execution semantics.
△ Less
Submitted 26 April, 2021; v1 submitted 11 January, 2021;
originally announced January 2021.
-
Operads for Designing Systems of Systems
Authors:
John C. Baez,
John Foley
Abstract:
System of systems engineering seeks to analyze, design and deploy collections of systems that together can flexibly address an array of complex tasks. In the Complex Adaptive System Composition and Design Environment program, we developed "network operads" as a tool for designing and tasking systems of systems, and applied them to domains including maritime search and rescue. The network operad fo…
▽ More
System of systems engineering seeks to analyze, design and deploy collections of systems that together can flexibly address an array of complex tasks. In the Complex Adaptive System Composition and Design Environment program, we developed "network operads" as a tool for designing and tasking systems of systems, and applied them to domains including maritime search and rescue. The network operad formalism offers new ways to handle changing levels of abstraction in system-of-system design and tasking.
△ Less
Submitted 26 September, 2020;
originally announced September 2020.
-
Enriched Lawvere Theories for Operational Semantics
Authors:
John C. Baez,
Christian Williams
Abstract:
Enriched Lawvere theories are a generalization of Lawvere theories that allow us to describe the operational semantics of formal systems. For example, a graph enriched Lawvere theory describes structures that have a graph of operations of each arity, where the vertices are operations and the edges are rewrites between operations. Enriched theories can be used to equip systems with operational sema…
▽ More
Enriched Lawvere theories are a generalization of Lawvere theories that allow us to describe the operational semantics of formal systems. For example, a graph enriched Lawvere theory describes structures that have a graph of operations of each arity, where the vertices are operations and the edges are rewrites between operations. Enriched theories can be used to equip systems with operational semantics, and maps between enriching categories can serve to translate between different forms of operational and denotational semantics. The Grothendieck construction lets us study all models of all enriched theories in all contexts in a single category. We illustrate these ideas with the SKI-combinator calculus, a variable-free version of the lambda calculus.
△ Less
Submitted 14 September, 2020; v1 submitted 14 May, 2019;
originally announced May 2019.
-
Network Models from Petri Nets with Catalysts
Authors:
John C. Baez,
John Foley,
Joe Moeller
Abstract:
Petri networks and network models are two frameworks for the compositional design of systems of interacting entities. Here we show how to combine them using the concept of a "catalyst": an entity that is neither destroyed nor created by any process it engages in. In a Petri net, a place is a catalyst if its in-degree equals its out-degree for every transition. We show how a Petri net with a chosen…
▽ More
Petri networks and network models are two frameworks for the compositional design of systems of interacting entities. Here we show how to combine them using the concept of a "catalyst": an entity that is neither destroyed nor created by any process it engages in. In a Petri net, a place is a catalyst if its in-degree equals its out-degree for every transition. We show how a Petri net with a chosen set of catalysts gives a network model. This network model maps any list of catalysts from the chosen set to the category whose morphisms are all the processes enabled by this list of catalysts. Applying the Grothendieck construction, we obtain a category fibered over the category whose objects are lists of catalysts. This category has as morphisms all processes enabled by some list of catalysts. While this category has a symmetric monoidal structure that describes doing processes in parallel, its fibers also have premonoidal structures that describe doing one process and then another while reusing the catalysts.
△ Less
Submitted 23 December, 2019; v1 submitted 6 April, 2019;
originally announced April 2019.
-
Open Petri Nets
Authors:
John C. Baez,
Jade Master
Abstract:
The reachability semantics for Petri nets can be studied using open Petri nets. For us an "open" Petri net is one with certain places designated as inputs and outputs via a cospan of sets. We can compose open Petri nets by gluing the outputs of one to the inputs of another. Open Petri nets can be treated as morphisms of a category $\mathsf{Open}(\mathsf{Petri})$, which becomes symmetric monoidal u…
▽ More
The reachability semantics for Petri nets can be studied using open Petri nets. For us an "open" Petri net is one with certain places designated as inputs and outputs via a cospan of sets. We can compose open Petri nets by gluing the outputs of one to the inputs of another. Open Petri nets can be treated as morphisms of a category $\mathsf{Open}(\mathsf{Petri})$, which becomes symmetric monoidal under disjoint union. However, since the composite of open Petri nets is defined only up to isomorphism, it is better to treat them as morphisms of a symmetric monoidal double category $\mathbb{O}\mathbf{pen}(\mathsf{Petri})$. We describe two forms of semantics for open Petri nets using symmetric monoidal double functors out of $\mathbb{O}\mathbf{pen}(\mathsf{Petri})$. The first, an operational semantics, gives for each open Petri net a category whose morphisms are the processes that this net can carry out. This is done in a compositional way, so that these categories can be computed on smaller subnets and then glued together. The second, a reachability semantics, simply says which markings of the outputs can be reached from a given marking of the inputs.
△ Less
Submitted 24 July, 2022; v1 submitted 16 August, 2018;
originally announced August 2018.
-
Relative Entropy in Biological Systems
Authors:
John C. Baez,
Blake S. Pollard
Abstract:
In this paper we review various information-theoretic characterizations of the approach to equilibrium in biological systems. The replicator equation, evolutionary game theory, Markov processes and chemical reaction networks all describe the dynamics of a population or probability distribution. Under suitable assumptions, the distribution will approach an equilibrium with the passage of time. Rela…
▽ More
In this paper we review various information-theoretic characterizations of the approach to equilibrium in biological systems. The replicator equation, evolutionary game theory, Markov processes and chemical reaction networks all describe the dynamics of a population or probability distribution. Under suitable assumptions, the distribution will approach an equilibrium with the passage of time. Relative entropy - that is, the Kullback--Leibler divergence, or various generalizations of this - provides a quantitative measure of how far from equilibrium the system is. We explain various theorems that give conditions under which relative entropy is nonincreasing. In biochemical applications these results can be seen as versions of the Second Law of Thermodynamics, stating that free energy can never increase with the passage of time. In ecological applications, they make precise the notion that a population gains information from its environment as it approaches equilibrium.
△ Less
Submitted 12 February, 2016; v1 submitted 8 December, 2015;
originally announced December 2015.
-
A Bayesian Characterization of Relative Entropy
Authors:
John C. Baez,
Tobias Fritz
Abstract:
We give a new characterization of relative entropy, also known as the Kullback-Leibler divergence. We use a number of interesting categories related to probability theory. In particular, we consider a category FinStat where an object is a finite set equipped with a probability distribution, while a morphism is a measure-preserving function $f: X \to Y$ together with a stochastic right inverse…
▽ More
We give a new characterization of relative entropy, also known as the Kullback-Leibler divergence. We use a number of interesting categories related to probability theory. In particular, we consider a category FinStat where an object is a finite set equipped with a probability distribution, while a morphism is a measure-preserving function $f: X \to Y$ together with a stochastic right inverse $s: Y \to X$. The function $f$ can be thought of as a measurement process, while s provides a hypothesis about the state of the measured system given the result of a measurement. Given this data we can define the entropy of the probability distribution on $X$ relative to the "prior" given by pushing the probability distribution on $Y$ forwards along $s$. We say that $s$ is "optimal" if these distributions agree. We show that any convex linear, lower semicontinuous functor from FinStat to the additive monoid $[0,\infty]$ which vanishes when $s$ is optimal must be a scalar multiple of this relative entropy. Our proof is independent of all earlier characterizations, but inspired by the work of Petz.
△ Less
Submitted 11 July, 2014; v1 submitted 13 February, 2014;
originally announced February 2014.
-
A Characterization of Entropy in Terms of Information Loss
Authors:
John C. Baez,
Tobias Fritz,
Tom Leinster
Abstract:
There are numerous characterizations of Shannon entropy and Tsallis entropy as measures of information obeying certain properties. Using work by Faddeev and Furuichi, we derive a very simple characterization. Instead of focusing on the entropy of a probability measure on a finite set, this characterization focuses on the `information loss', or change in entropy, associated with a measure-preservin…
▽ More
There are numerous characterizations of Shannon entropy and Tsallis entropy as measures of information obeying certain properties. Using work by Faddeev and Furuichi, we derive a very simple characterization. Instead of focusing on the entropy of a probability measure on a finite set, this characterization focuses on the `information loss', or change in entropy, associated with a measure-preserving function. Information loss is a special case of conditional entropy: namely, it is the entropy of a random variable conditioned on some function of that variable. We show that Shannon entropy gives the only concept of information loss that is functorial, convex-linear and continuous. This characterization naturally generalizes to Tsallis entropy as well.
△ Less
Submitted 18 November, 2011; v1 submitted 9 June, 2011;
originally announced June 2011.
-
Algorithmic Thermodynamics
Authors:
John C. Baez,
Mike Stay
Abstract:
Algorithmic entropy can be seen as a special case of entropy as studied in statistical mechanics. This viewpoint allows us to apply many techniques developed for use in thermodynamics to the subject of algorithmic information theory. In particular, suppose we fix a universal prefix-free Turing machine and let X be the set of programs that halt for this machine. Then we can regard X as a set of 'mi…
▽ More
Algorithmic entropy can be seen as a special case of entropy as studied in statistical mechanics. This viewpoint allows us to apply many techniques developed for use in thermodynamics to the subject of algorithmic information theory. In particular, suppose we fix a universal prefix-free Turing machine and let X be the set of programs that halt for this machine. Then we can regard X as a set of 'microstates', and treat any function on X as an 'observable'. For any collection of observables, we can study the Gibbs ensemble that maximizes entropy subject to constraints on expected values of these observables. We illustrate this by taking the log runtime, length, and output of a program as observables analogous to the energy E, volume V and number of molecules N in a container of gas. The conjugate variables of these observables allow us to define quantities which we call the 'algorithmic temperature' T, 'algorithmic pressure' P and algorithmic potential' mu, since they are analogous to the temperature, pressure and chemical potential. We derive an analogue of the fundamental thermodynamic relation dE = T dS - P d V + mu dN, and use it to study thermodynamic cycles analogous to those for heat engines. We also investigate the values of T, P and mu for which the partition function converges. At some points on the boundary of this domain of convergence, the partition function becomes uncomputable. Indeed, at these points the partition function itself has nontrivial algorithmic entropy.
△ Less
Submitted 25 February, 2013; v1 submitted 11 October, 2010;
originally announced October 2010.