Behavioral Mereology
Posted by John Baez
guest post by Toby Smithe and Bruno Gavranović
What do human beings, large corporations, biological cells, and gliders from Conway’s Game of Life have in common?
This week in the Applied Category Theory School, we attempt some first steps towards answering this question. We turn our attention to autopoiesis, the ill-understood phenomenon of self-perpetuation that characterizes life. Our starting point is Behavioral Mereology, a new take on the ancient question of parthood: how should we understand the relationship between a part and a whole? The authors Fong, Myers, and Spivak suggest that we cleave a whole into parts by observing – and grouping together — regularities in its behavior. Parthood entails behavioral constraints, which are mediated by the whole. We describe the corresponding logic of constraint passing, and the associated modalities of compatibility and ensurance. We propose that autopoiesis entails a special kind of parthood — one that ensures its compatibility with its environment — and end with a list of open questions and potential research directions.
Introduction
When we look at the world, we notice that it is full of objects. Some of these objects are immediate to our senses — such as a coffee cup, a bicycle, or your pet rabbit. Other objects we only come to know after reflection, or through the use of tools — such as the atoms of the cup, the ecosystem that led to the evolution of the rabbit, or the cells of the rabbit’s body. These objects are related by a kind of compositionality that we call parthood: the parts of the bicycle include its gears and pedals; the parts of the ecosystem include its population of rabbits; in turn, the rabbits are composed of organs and thence cells. Indeed, all of these objects are tautologically parts of the whole that we call ‘the universe’.
Behavioral Mereology seeks to formalize the intuitions behind these ascriptions of parthood. Its starting point is the observation that parthood captures a kind of behavioral coherence: “when you pull on a part, the rest comes with”. That is to say, being a part entails a restriction on possible behaviors. For instance, consider a cup together with its contents: as long as the two parts can be considered together as a whole, the possible movements of the contents are constrained by the those of the cup. In general, the behavior of a part is not only constrained by its corresponding whole, but also by the parts around it. For instance, the behavior of the rabbit’s brain constrains the behavior of its muscles; and because the muscles change the relation of the rabbit to its environment, and the environment constrains the rabbit’s senses, we can say transitively that the rabbit’s muscle-behavior constrains its sense-behavior. Consequently, we can think of the whole ‘rabbit’ system as providing a context for the passage of constraints between parts of the rabbit, and we will see how this gives rise to a lattice structure on the corresponding category of parts.
These ideas sit at the confluence of two traditions of applied category theory. On one side, following Lawvere, we can conceptualize the aforementioned constraint passing as a formal change of context, via the pullback functor; precisely put, constraint passing is modelled by pulling a predicate back along the epi representing the parthood relation, from which we obtain two new adjoint inter-modalities, called compatibility and ensurance. On the other side of the confluence lies a behavioral approach to the categorical modelling of open and interacting systems. Let’s see how these two parts of applied category theory interact. We’ll start with the behavioral approach, which supplies the objects for the logic of constraint passing.
A behavioral perspective on parts and their interactions
In our everyday lives, we do not need to know the internal workings or detailed structure of objects in order to distinguish them. Instead, we perform a kind of informal ‘black-boxing’, and declare that “if it looks like a duck and quacks like a duck, then it probably is a duck.” This is to say, we distinguish objects by observational equivalence, calling two systems the same when they produce the same observations under our measurements; in the field of coalgebra, this idea gives rise to the concept of bisimulation.
For our purposes, it is this idea that associates parts with epimorphisms. To see how this works, let us make some definitions. First, we identify a system with its behavior type ; you can think of this as like the set of all its possible behaviors. Because we take an abstract observational approach to systems, the internal structure of a behavior type is of secondary importance – but it might help to give a couple of toy examples.
Consider a bicycle. The bicycle pedals and wheels might be moving with real-valued speeds and related by some multiplier via the gears. Then we could give a behavior type as .
Suppose our rabbit came from an ecosystem of foxes and rabbits. Their population sizes at time are given by and accordingly. The populations at time determine those at time according to a recurrence relation, , that models how the two populations interact (rabbits and foxes are born, foxes kill rabbits, and so on). This gives us a behavior type .
We also identify the parts of a system with their behavior types: for us, there is nothing more to a system or part than its behavior. (We will occasionally refer both to and its behavior : this distinction is purely for intuition and has no formal meaning.)
In this context, we can formalize our earlier assertion that “being a part entails a restriction on possible behaviors”, noting that every behavior of a part arises from some behavior of a system . For instance, every behavior of the heart of your pet rabbit must come from some behavior of the entire rabbit, although two different rabbit-behaviors may involve the same heart-behavior (more on this ‘quotienting’ later!).
We emphasize that the part is only a part in the context of the larger system : when severed from the system , might behave in ways unrelated to . For instance, every behavior of a baby rabbit before birth arises from a behavior of its mother; but after it is born, it gains independence.
Let’s make these ideas precise:
Definition 1: The behavior type of a part of a system is a regular epimorphism . therefore corresponds to a quotient of .
The parts of form a category, its category of parts. Let be the subcategory of quotients in our ambient category . Then the category of parts is its coslice by , . Explicitly, it has parts as objects and as morphisms the commuting triangles in .
(Note that really is very ‘ambient’ for us! We have deliberately avoided requiring much structure. You could think of it as a topos, or at least as being locally Cartesian closed.)
Amongst many others, our toy examples have parts such as
the set of possible pedal speeds: ;
the set of possible rabbit population sizes at time : .
Thinking behaviorally, we can consider parts as measurement devices by which we make observations. Every behavior of a part arises from at least one behavior of the whole system , but two -behaviors may be indistinguishable when we look only at : those -behaviors thus form an equivalence class. For example, consider to be one of our rabbits, and its heart. By observing , we may notice that it has a heightened pulse, but this doesn’t disambiguate between the rabbit being in a state of exertion or of anxiety, for instance: those behaviors fall into an equivalence class.
The lattice of parts: behavioral compatibility and determination
We may also ask what a -behavior means for other parts of : for instance, what having a heightened heartbeat means for the legs of the rabbit. For this purpose, Fong, Myers and Spivak introduce the formal concept of compatibility: we say that the rabbit’s exertion or fear behaviors, amongst others, are compatible with its having a heightened heartbeat. Formally, we make the following definition.
Definition 2: Suppose and are parts of , and that and are behaviors of those parts. We say that and are compatible if there is a behavior that restricts to both and . We write this as
The definition extends in the obvious way to compatibility of an -indexed family of behaviors .
We can easily obtain examples of compatible behaviors by restricting behaviors of to its parts. From our toy systems, we find:
a speed of the bicycle’s pedal is compatible with a speed of its wheel iff : ;
two fox and rabbit populations at time are compatible iff there is a history of the ecosystem achieving those population sizes at .
Using compatibility, we can observe that the category of parts of has a lattice structure. Firstly, we write if is a part of . For any two parts and , the behavior type of their meet is given by
making the following diagram a pushout:
Assuming that the ambient category admits it (as would be the case in any topos or, more generally, any regular category), the behavior type of the join of and is given by the image factorization of the map :
Concretely, we have
If every behavior of is compatible with every behavior of , then they are disjoint as parts, with empty meet:
Our toy systems supply some simple illustrations:
the bicycle is just the join of the pedal and wheel: ;
the initial population sizes of foxes and rabbits are disjoint as parts: .
We will see that compatibility has a right adjoint, called ensurance, corresponding to a relation called determination. Informally, we can say that whilst the rabbit’s being still is compatible with its having a rapid heartbeat, strenous exertion would ensure it. So the -behavior “strenuous exertion” is said to determine the -behavior “rapid heartbeat”. Formally, we have:
Definition 3: Suppose and are parts of , and that and are behaviors of those parts. We say that determines if every behavior of the whole system which restricts to also restricts to . That is,
.
If every behavior of a part determines a behavior of , then we say that determines . Indeed, we can say more than this: if determines , then is a part of , . Hence, determination recovers the order of the parts of a system.
The logic of constraint passing
Usually, we do not have enough information to describe a behavior completely. Instead, we pick out sets of behaviors by giving predicates, such as “has a raised pulse”. We can think of these predicates as expressing constraints on the behaviors of parts, and we are interested in how constraints are passed between the parts of a system. For instance, how does running fast constrain the behaviors of the other parts of the rabbit?
There are two principal directions to consider. Suppose we want to obtain a constraint on the whole from a constraint on a part; for instance, we want to move from a heart-constraint “raised pulse” to a body-constraint “behaves such that the heart has a raised pulse”. There is a canonical way to do this: we pull the heart-constraint back along the restriction epi witnessing its parthood.
Let’s formalize this, noting that all the structure we need will exist in any topos. First, constraints are given by predicates: characteristic maps into some ‘classifying object’ of truth values such that those behaviors for which the predicate holds are mapped to . In a Boolean topos — such as Set, the category of our examples — is just the two-element set .
Two predicates (eg., “runs fast”) (eg., “runs”) may be related by entailment, which we write as . This makes the predicates on an object into a poset , whose objects are predicates and whose morphisms represent these entailments. If our ambient category is Cartesian closed, like Set or any topos, then is internalized as the object .
Then, in moving from a part to its parent , given a constraint , we obtain a constraint on -behaviors by restricting -behaviors to those that satisfy on ; that is, by pulling back along the restriction epi . This pullback effects a change of context, and in categorical logic it is also known as base change, inverse image, or substitution. It is given by precomposing with the restriction map , so that P-behaviors are substituted for Q-behaviors:
We can see how this precomposition corresponds to a pullback by noting that maps into correspond to subobjects: if is the powerset functor, then we have a natural isomorphism . The pullback square on the right of the following commutative diagram witnesses this correspondence; the pullback square on the left commutes by definition. By the two-pullbacks lemma, the whole diagram is thus a pullback, and we observe that the composition does therefore correspond to pulling (the monomorphism corresponding to) back along :
If is our rabbit’s heart-constraint “has a raised pulse”, then is the rabbit-constraint “behaves such that the heart has a raised pulse”. What about the other direction, from a part to a subpart ? That is, from a constraint on the rabbit’s behavior (such as “forages for food”), what constraints can we obtain on the behaviors of its heart or legs?
Given a constraint with , we have two canonical choices, the left and right adjoints of the pullback functor :
We will see that these adjoints supply weak (on the left) and strong (on the right) forms of constraint passing. Logically, they correspond to existential and universal quantification. This is easiest to see if we make a brief detour into basic predicate logic, following Awodey (§9.5).
Rather than pulling back along a restriction epi, let us consider pulling back along a projection of a product, writing for the corresponding functor. takes a predicate in one variable to a predicate in that variable alongside a dummy variable , such that is true whenever is true on , for any in the domain. We then observe that we have the adjoint triple given by the following correspondences, as expressed in predicate logic:
and
The (co)units of this adjoint triple encode the familiar introduction and elimination rules for these quantifiers. For instance, the unit of encodes -introduction: . And the counit of encodes -elimination: .
We can now return to our restriction pullback . In light of the preceding discussion, its adjoints have the unsurprising forms
and
.
Where the parent part is obvious, such as in the case of the whole system , then we omit it, writing just , , and .
Compatibility and ensurance
We’ve seen how the familiar logical operators , and model the passage of constraints between a part and its parent or child. For example, the heightened heartbeat of our rabbit is witnessed by a predicate on heart-behaviors. But any heart-behavior satisfying may arise from a number of rabbit-behaviors , such as fear, or exertion. To learn more, we look at other parts of the rabbit, such as its legs. How does having a heightened heartbeat constrain leg behavior? In general, how does the behavior of one part constrain the behavior of another?
It turns out we have already defined all the necessary machinery to answer these questions. We show the hierarchy of the rabbit and its two parts graphically as follows.
These two parts of the rabbit induce two adjoint triples - allowing us to visualize passage of constraints between parts.
This allows us to define two canonical inter-modalities to answer this question, generalizing both the usual modal operators of possibility and necessity as well as the compatibility and determination relations introduced earlier. Accordingly, we call these new operators compatibility and ensurance and denote them by the symbols and , correspondingly:
These inter-modalities are thus obtained by composing the ‘context-change’ functor with its left () and right () adjoints, giving ‘weak’ and ‘strong’ constraint-passing. Let’s unpack this, starting with compatibility.
Given a behavior of , we have
That is, if can be doing while is satisfying , then the Q-behavior is compatible with on : . is thus a predicate on that picks out all the -behaviors compatible with on . Thinking back to our rabbit, this is a constraint on leg-behaviors satisfied by just those which are compatible with having a heightened heartbeat.
Alternatively, ensurance expands as
That is, if doing entails that must satisfy , then we say that ensures the constraint on : . The predicate on thus picks out all those -behaviors that ensure on . For our rabbit, this means a constraint on leg-behaviors satisfied by just those which ensure the rabbit’s heightened heartbeat. Ensurance is thus a much stronger form of constraint-passing than compatibility.
More formally, considering again our rabbit-fox ecosystem example, let’s suppose that we want to choose an initial fox population to ensure the rabbit population stays within some bounds after some deadline . We can write this using the constraint :
It is easy to see that these compatibility and ensurance operators have the compatibility and determination relations as special cases. Let be the ‘Dirac’ predicate satisfied by iff . Then for any and we have
and
.
Because they are defined using the left and right adjoints of the functor , compatibility and ensurance inherit a number of useful properties. For example, if the internal logic of our ambient category satisfies the law of excluded middle, then just as the adjoints and are De Morgan duals, so are compatibility and ensurance: . More generally, and inherit the monotonicity and adjointness of and . Monotonicity means that if a constraint entails a constraint , then compatibility with entails compatibility with and ensuring entails ensuring . And from the adjunctions and , we inherit that .
What does this adjunction mean? An adjunction is a natural family of isomorphisms between hom-sets, which for us represent logical entailment. So means we have . Interpreted in our rabbit example, this means that the implication “rapid leg movement ensures heightened heartbeat” is the same as the implication “if the heart’s behavior is compatible with the legs running fast, then the heart has a raised pulse”.
Alternatively, we can look at the unit and counit of the adjunction. The unit is a map : it witnesses the fact that, whatever the rabbit’s heartbeat, its having that heart behavior ensures that the legs are behaving compatibly. Dually, the counit is a map and we leave its rabbit-interpretation to the reader.
Finally, because right adjoints preserve limits, commutes with and , and commutes with and .
We can use these adjunction properties to simplify the ‘inCheck ensurance’ ecosystem constraint introduced above. Firstly, we can rewrite it as
(This is just the constraint as given above, but with the moved outside of the scope of the , using the commutativity of with limits.)
We then note that can be spelled out as , and that , which together mean we can simplify the example further as
Possibility and necessity
For the final trick with our rabbit, consider the constraint of heightened pulse on its part : the heart. Given any such , we might be interested in describing the two alethic modalities of possibility and necessity given by the predicates: does any heart behavior satisfy and do all heart behaviors satisfy ?
Those modalities are given by the operators and , respectively, where is the system whose behavior type consists of just a single element.
Both cases of possibility and necessity on a constraint of can be thought of as a map that goes through a one-element bottleneck. and both compress all -behaviors by mapping to if there is any behavior of satisfies or if all behaviors of satisfy , respectively. Thus, the modality detects whether is possible, and whether is necessary.
Behavior, mereology, and autopoiesis
Behavioral Mereology supplies a first step towards formalizing a notion of autopoiesis. Informally, a system is autopoietic if its behavior enables it to persist within its environment. In other words: it behaves to ensure compatibility with its environment. Our aim is to unpack this conjecture, and to investigate how it relates to extant accounts of autopoiesis using category theory.
Consider again our rabbit. It is autopoietic within its ecological niche, foraging for food, sheltering from the elements, and fleeing from prey: in particular, it responds to environmental changes (such as the seasons, or the appearance of a fox), and it changes the environment (by building a burrow), to improve its chances of survival. Similar things can be said of the societies of rabbits and foxes. For instance, in our simple example, the foxes collectively must symbiotically ensure that there are at least some rabbits, in order that they do not starve. We can write this behavioral-mereologically as the implication
That is, if there is an initial rabbit population, and the ecosystem bounds the rabbit population independently of time, then the rabbits ensure that there are foxes, and that the foxes ensure there are rabbits.
These ideas extend to numerous familiar examples of adaptive or living systems, from single cells to corporations and political parties. In each case, the distinguishing feature seems to be the same: the autopoietic system can anticipate and respond to external fluctuations (‘perception’), and can act in order to bring about sustainable states of affairs (‘action’). This is evocative of the Good Regulator theorem of Conant and Ashby: if we consider input-output machines, with ‘good regulation’ meaning to minimize surprising outputs, then any good regulator of a machine must be in isomorphism with said machine.
Considering again our ecosystem—the parts of which include rabbits and foxes—we conjecture that an autopoietic part is one which contains an internal model: a subpart that sits in isomorphism with the environment . In order to ensure compatibility between and , must behave to maintain this isomorphism, and this entails the aforementioned perception and action. Because is not omniscient, it can only do so approximately, which suggests we must leave the Boolean world behind, and frame this behavior in terms of approximate Bayesian inference. Likely to be important here is the work of Karl Friston on the free energy principle, which says that perception, action, and the Good Regulator theorem are all consequences of an information-theoretic principle of least action. Categorically, it seems we may need a probabilistic logic, such as that supplied by effectus theory.
There are of course many questions for discussion. To give a few:
How should we draw the boundary between an autopoietic system and its environment? A Bayesian analysis suggests that the concept of Markov blanket will be important. Just as there are innumerable parts in the Boolean logic explored above, we should expect there to be innumerable Markov blankets. Is there a distinguished class?
Can we quantify the degree of autopoiesis exhibited by a system? In a probabilistic setting, we expect to obtain a notion of stochastic constraint passing, and hence graded compatibility and ensurance.
Is our informal notion of persistence connected to ergodicity?
Do coalgebras of a probability monad supply appropriate behavior types for our stochastic interacting processes? Can we use the tools of coalgebraic modal logic to formalize the notions of measurement and interaction introduced above? Can we use (approximate) bisimulation to characterize the ‘good regulator’ isomorphism?
How should we model societies of agents, which pass behavioral constraints between levels? Is said stochastic constraint passing relevant here?
Under what conditions does an autopoietic system reproduce itself? Does this require some kind of resource limitation, or competition?
Autopoietic systems don’t appear in the environment already configured as such, but rather undergo a process in which their internal model becomes more compatible with the environment. Can we characterize the process of becoming a good autopoietic system in categorical terms? Can we substantiate the claim that “a good autopoietic system must be a good learner”?
Autopoiesis seems to be a characteristic of those systems that we might call living or intelligent. By taking a behavioral-mereological approach, by considering the interactions between systems and their parts, and the constraints that these impose, we hope to pin down categorically precisely what this means.
Re: Behavioral Mereology
What’s a “Markov blanket”?