## Information Processing and Biology

7 November, 2016

The Santa Fe Institute, in New Mexico, is a place for studying complex systems. I’ve never been there! Next week I’ll go there to give a colloquium on network theory, and also to participate in this workshop:

Statistical Mechanics, Information Processing and Biology, November 16–18, Santa Fe Institute. Organized by David Krakauer, Michael Lachmann, Manfred Laubichler, Peter Stadler, and David Wolpert.

Abstract. This workshop will address a fundamental question in theoretical biology: Does the relationship between statistical physics and the need of biological systems to process information underpin some of their deepest features? It recognizes that a core feature of biological systems is that they acquire, store and process information (i.e., perform computation). However to manipulate information in this way they require a steady flux of free energy from their environments. These two, inter-related attributes of biological systems are often taken for granted; they are not part of standard analyses of either the homeostasis or the evolution of biological systems. In this workshop we aim to fill in this major gap in our understanding of biological systems, by gaining deeper insight in the relation between the need for biological systems to process information and the free energy they need to pay for that processing.

The goal of this workshop is to address these issues by focusing on a set three specific questions: 1) How has the fraction of free energy flux on earth that is used by biological computation changed with time? 2) What is the free energy cost of biological computation or functioning? 3) What is the free energy cost of the evolution of biological computation or functioning? In all of these cases we are interested in the fundamental limits that the laws of physics impose on various aspects of living systems as expressed by these three questions.

I think it’s not open to the public, but I will try to blog about it. The speakers include a lot of experts on information theory, statistical mechanics, and biology. Here they are:

Wednesday November 16: Chris Jarzynski, Seth Lloyd, Artemy Kolchinski, John Baez, Manfred Laubichler, Harold de Vladar, Sonja Prohaska, Chris Kempes.

Thursday November 17: Phil Ball, Matina C. Donaldson-Matasci, Sebastian Deffner, David Wolpert, Daniel Polani, Christoph Flamm, Massimiliano Esposito, Hildegard Meyer-Ortmanns, Blake Pollard, Mikhail Prokopenko, Peter Stadler, Ben Machta.

Friday November 18: Jim Crutchfield, Sara Walker, Hyunju Kim, Takahiro Sagawa, Michael Lachmann, Wojciech Zurek, Christian Van den Broeck, Susanne Still, Chris Stephens.

## Wind Energy in Texas

6 November, 2016

Here’s an interesting story about the rise of wind energy in Texas:

• Richard Martin, The one and only Texas wind boom, Technology Review, 3 October 2016.

I’ll quote the start:

Rolan Petty stabbed at the dirt with a boot toe and looked up at the broiling west Texas sun. “I call it farming on faith,” he said of his unirrigated cotton farm. “You just have faith that the rain is gonna come.”

If it doesn’t come, Petty has a backup income stream: leasing fees. All around us, towering 150 feet over Petty’s combine and the scrubby-looking cotton plants in neat rows, stood a forest of wind turbines that stretched to the horizon. Petty’s land on the arid plain of west Texas lies on the edge of the vast Horse Hollow wind farm, with 430 turbines spread over 73 square miles. It was the largest wind farm in the world when it was completed, in 2006. Petty’s family leases land to Horse Hollow and another wind farm in the area, making about $7,500 a year on each of the several dozen turbines on their property. Wind power has become a big windfall for the Pettys, as it has for many landowners in Texas—allowing Rolan and his parents and three brothers to make hundreds of thousands of dollars every year whether the rains come or not. And the Petty farm is just a small player in the largest renewable-energy boom the United States has ever seen. With nearly 18,000 megawatts of capacity, Texas, if it were a country, would be the sixth-largest generator of wind power in the world, right behind Spain. Now Texas is preparing to add several thousand megawatts more—roughly equal to the wind capacity that can be found in all of California. Most of these turbines are in west Texas, one of the most desolate and windy regions in the continental United States. Fifteen years ago, when the groundwork for this boom was being set, this area had little but cotton and grain farms, oil fields, scrub and dry riverbeds, and small towns that were mostly withering. Today it’s a land of spindly white turbines that line the highways—and the pockets of landowners. At night, when the wind blows strongest and steadiest, if you stand out in one of the fields you can hear the great blades make a ghostly shoop-shoop sound as they turn. Wind power has brought prosperity to towns that were literally drying up less than a generation ago. “In the 2011 drought a lot of people around here would have filed for bankruptcy if not for the turbines,” said Russ Petty, one of Rolan’s brothers, who was giving me a driving tour of the property. “What it’s done is helped keep this land in the family.” It has also shown that a big state can get a substantial amount of its power from renewable sources without significant disruptions, given the right policies and the right infrastructure investments. The U.S. Department of Energy’s 2015 report Wind Vision set a goal of getting 35 percent of all electricity in the country from wind in 2050, up from 4.5 percent today. In Texas, at times, that number has already been exceeded: on several windy days last winter, wind power briefly supplied more than 40 percent of the state’s electricity. For wind power advocates, Texas is a model for the rest of the country. But it also reveals what wind power can’t achieve. Overall, wind still represents less than 20 percent of the state’s generation capacity—a number that dips into the low single digits on calm, hot summer days. And even with the wind power boom, the state’s total estimated carbon emissions were the highest in the nation in 2013, the most recent year for which data is available—up 5 percent from the previous year. What’s more, the conditions that have spurred Texas’s boom may not be easily duplicated. Not only is Texas scoured by usually steady winds, but it has something most other places lack: a gigantic transmission system that was built to bring electricity from the desolate western and northern parts of the state to the big cities of the south and east, including Dallas, Austin, San Antonio, and Houston. Under a program known as Competitive Renewable Energy Zones, or CREZ, the power lines were approved in 2007 and cost nearly$7 billion to build. They have added a few dollars a month to residential electricity bills, but they now look like a far-sighted infrastructure investment that other states are unwilling or unable to make.

I drove nearly 1,200 miles, from Abilene to Amarillo and many places in between, this summer to explore the wind explosion in Texas. I wanted to understand what was driving this ongoing boom, and what the ultimate limit might be. How much wind power can the Texas grid absorb, economically and physically? And can other states, and other nations, achieve what Texas has, or are there conditions here that will be difficult or impossible to reproduce anywhere else?

## Compositionality Workshop

1 November, 2016

I’m excited! In early December I’m going to a workshop on ‘compositionality’, meaning how big complex things can be built by sticking together smaller, simpler parts:

Compositionality, December 5-9, workshop at the Simons Institute for the Theory of Computing, Berkeley. Organized by Samson Abramsky, Lucien Hardy and Michael Mislove.

In 2007 Jim Simons, the guy who helped invent Chern–Simons theory and then went on to make billions using math to run a hedge fund, founded a research center for geometry and physics on Long Island. More recently he’s also set up this institute for theoretical computer science, in Berkeley. I’ve never been there before.

‘Compositionality’ sounds like an incredibly broad topic, but since it’s part of a semester-long program on Logical structures in computation, this workshop will be aimed at theoretical computer scientists, who have specific ideas about compositionality. And these theoretical computer scientists tend to like category theory. After all, category theory is about morphisms, which you can compose.

Here’s the idea:

The compositional description of complex objects is a fundamental feature of the logical structure of computation. The use of logical languages in database theory and in algorithmic and finite model theory provides a basic level of compositionality, but establishing systematic relationships between compositional descriptions and complexity remains elusive. Compositional models of probabilistic systems and languages have been developed, but inferring probabilistic properties of systems in a compositional fashion is an important challenge. In quantum computation, the phenomenon of entanglement poses a challenge at a fundamental level to the scope of compositional descriptions. At the same time, compositionally has been proposed as a fundamental principle for the development of physical theories. This workshop will focus on the common structures and methods centered on compositionality that run through all these areas.

So, some physics and quantum computation will get into the mix!

A lot of people working on categories and computation will be at this workshop. Here’s what I know about the talks so far. If you click on the talk titles you’ll get abstracts, at least for most of them.

### The program

 9 – 9:20 am Coffee and Check-In 9:20 – 9:30 am Opening Remarks 9:30 – 10:30 am Compositionally, Adequacy, and Full Abstraction Gordon Plotkin, University of Edinburgh 10:30 – 11 am Break 11 – 11:35 am An Operadic Approach to Compositionality David Spivak, MIT 11:40 am – 12:15 pm Data Structures for Quasistrict Higher Categories Jamie Vicary, University of Oxford 12:20 – 2 pm Lunch 2 – 2:35 pm From Linearizability to Eventual Consistency Radha Jagadeesan, DePaul University 2:40 – 3:15 pm Compositionality and Session Types Nobuko Yoshida, Imperial College London 3:30 – 4 pm Break 4 – 5 pm Discussion 5 – 6 pm Reception

 9 – 9:30 am Coffee and Check-In 9:30 – 10:30 am The Mathematics of Networks John Baez, UC Riverside 10:30 – 11 am Break 11 – 11:35 am Composition in Categorical Distributional Models of Natural Language Mehrnoosh Sadrzadeh, Queen Mary University of London 11:40 am – 12 pm Modelling Interconnected Systems with Decorated Corelations Brendan Fong, University of Pennsylvania 12:05 – 12:25 pm Custom Compact Closed Categories via Relations Dan Marsden, University of Oxford 12:30 – 2 pm Lunch 2 – 2:35 pm Some Thoughts on Inferring System Structure Tobias Fritz, Max Planck Institute, Leipzig 2:40 – 3:15 pm TBD Alexandra Silva, University College London 3:30 – 4 pm Break 4 – 5 pm Discussion

 9 – 9:30 am Coffee and Check-In 9:30 – 10:30 am Compositional Thermodynamics Giulio Chiribella, The University of Hong Kong 10:30 – 11 am Break 11 – 11:20 am Composition and Quantum Theory: A Conjecture, and How it Could Fail Markus Mueller, Western University 11:25 – 11:45 am Multipartite Composition of Contextuality Scenarios Ana Belen Sainz, University of Bristol 11:50 am – 12:25 pm Compositionality in Categorical Quantum Computing Ross Duncan, University of Strathclyde 12:30 – 2 pm Lunch

 9 – 9:30 am Coffee and Check-In 9:30 – 10:05 am Canonical Representations of Measurements for Contextuality Analysis Ehtibar Dzhafarov, Purdue University 10:10 – 10:30 am TBD Rui Soares Barbosa, University of Oxford 10:35 – 11 am Break 11 – 11:20 am Modelling Interfaces in Distributed Systems: Some First Steps David Pym, University College London 11 am – 11:45 am Compositionality in Cybersecurity Pasquale Malacaria, Queen Mary University of London 11 am – 12:10 pm A Topological Approach for Exploiting Compositionality in Complex Systems Emanuela Merelli, University of Camerino 12 pm – 2 pm Lunch 2 – 2:35 pm Nominal Games: A Semantics Paradigm for Effectful Languages Nikos Tzevelekos, Queen Mary University of London 2:40 – 3:15 pm Probabilistic Call By Push Value Christine Tasson, Université Paris Diderot 3 pm – 3:50 pm Break 3:50 – 4:25 pm TBD Kohei Kishida, University of Oxford 4:30 – 4:50 pm Linear Logic, Session Types and Deadlock-Freedom Simon Gay, University of Glasgow

 9:30 – 10:05 am Composing Schema Mappings: An Overview 10 am – 10:45 am TBD Val Tannen, University of Pennsylvania 10:50 – 11:20 am Break 11:20 – 11:55 am A Compositional Quantum Programming Language Peter Selinger, Dalhousie University 12 – 12:35 pm Programming Recurrence Relations Pawel Sobocinski, University of Southampton 12:40 – 2 pm Lunch 2 – 3 pm Discussion 3 – 3:40 pm TBD Dana Scott, Carnegie Mellon University

## Open and Interconnected Systems

23 October, 2016

Brendan Fong finished his thesis a while ago, and here it is!

• Brendan Fong, The Algebra of Open and Interconnected Systems, Ph.D. thesis, Department of Computer Science, University of Oxford, 2016.

This material is close to my heart, since I’ve informally served as Brendan’s advisor since 2011, when he came to Singapore to work with me on chemical reaction networks. We’ve been collaborating intensely ever since. I just looked at our correspondence, and I see it consists of 880 emails!

At some point I gave him a project: describe the category whose morphisms are electrical circuits. He took up the challenge much more ambitiously than I’d ever expected, developing powerful general frameworks to solve not only this problem but also many others. He did this in a number of papers, most of which I’ve already discussed:

• Brendan Fong, Decorated cospans, Th. Appl. Cat. 30 (2015), 1096–1120. (Blog article here.)

• Brendan Fong and John Baez, A compositional framework for passive linear circuits. (Blog article here.)

• Brendan Fong, John Baez and Blake Pollard, A compositional framework for Markov processes. (Blog article here.)

• Brendan Fong and Brandon Coya, Corelations are the prop for extraspecial commutative Frobenius monoids. (Blog article here.)

• Brendan Fong, Paolo Rapisarda and Paweł Sobociński,
A categorical approach to open and interconnected dynamical systems.

But Brendan’s thesis is the best place to see a lot of this material in one place, integrated and clearly explained.

I wanted to write a summary of his thesis. But since he did that himself very nicely in the preface, I’m going to be lazy and just quote that! (I’ll leave out the references, which are crucial in scholarly prose but a bit off-putting in a blog.)

### Preface

This is a thesis in the mathematical sciences, with emphasis on the mathematics. But before we get to the category theory, I want to say a few words about the scientific tradition in which this thesis is situated.

Mathematics is the language of science. Twinned so intimately with physics, over the past centuries mathematics has become a superb—indeed, unreasonably effective—language for understanding planets moving in space, particles in a vacuum, the structure of spacetime, and so on. Yet, while Wigner speaks of the unreasonable effectiveness of mathematics in the natural sciences, equally eminent mathematicians, not least Gelfand, speak of the unreasonable ineffectiveness of mathematics in biology and related fields. Why such a difference?

A contrast between physics and biology is that while physical systems can often be studied in isolation—the proverbial particle in a vacuum—biological systems are necessarily situated in their environment. A heart belongs in a body, an ant in a colony. One of the first to draw attention to this contrast was Ludwig von Bertalanffy, biologist and founder of general systems theory, who articulated the difference as one between closed and open systems:

Conventional physics deals only with closed systems, i.e. systems which are considered to be isolated from their environment. […] However, we find systems which by their very nature and definition are not closed systems. Every living organism is essentially an open system. It maintains itself in a continuous inflow and outflow, a building up and breaking down of components, never being, so long as it is alive, in a state of chemical and thermodynamic equilibrium but maintained in a so-called ‘steady state’ which is distinct from the latter.

While the ambitious generality of general systems theory has proved difficult, von Bertalanffy’s philosophy has had great impact in his home field of biology, leading to the modern field of systems biology. Half a century later, Dennis Noble, another great pioneer of systems biology and the originator of the first mathematical model of a working heart, describes the shift as one from reduction to integration.

Systems biology […] is about putting together rather than taking apart, integration rather than reduction. It requires that we develop ways of thinking about integration that are as rigorous as our reductionist programmes, but different. It means changing our philosophy, in the full sense of the term.

In this thesis we develop rigorous ways of thinking about integration or, as we refer to it, interconnection.

Interconnection and openness are tightly related. Indeed, openness implies that a system may be interconnected with its environment. But what is an environment but comprised of other systems? Thus the study of open systems becomes the study of how a system changes under interconnection with other systems.

To model this, we must begin by creating language to describe theinterconnection of systems. While reductionism hopes that phenomena can be explained by reducing them to “elementary units investigable independently of each other” (in the words of von Bertalanffy), this philosophy of integration introduces as an additional and equal priority the investigation of the way these units are interconnected. As such, this thesis is predicated on the hope that the meaning of an expression in our new language is determined by the meanings of its constituent expressions together with the syntactic rules combining them. This is known as the principle of compositionality.

Also commonly known as Frege’s principle, the principle of compositionality both dates back to Ancient Greek and Vedic philosophy, and is still the subject of active research today. More recently, through the work of Montague in natural language semantics and Strachey and Scott in programming language semantics, the principle of compositionality has found formal expression as the dictum that the interpretation of a language should be given by a homomorphism from an algebra of syntactic representations to an algebra of semantic objects. We too shall follow this route.

The question then arises: what do we mean by algebra? This mathematical question leads us back to our scientific objectives: what do we mean by system? Here we must narrow, or at least define, our scope. We give some examples. The investigations of this thesis began with electrical circuits and their diagrams, and we will devote significant time to exploring their compositional formulation. We discussed biological systems above, and our notion of system
includes these, modelled say in the form of chemical reaction networks or Markov processes, or the compartmental models of epidemiology, population biology, and ecology. From computer science, we consider Petri nets, automata, logic circuits, and the like. More abstractly, our notion of system encompasses matrices and systems of differential equations.

Drawing together these notions of system are well-developed diagrammatic representations based on network diagrams— that is, topological graphs. We call these network-style diagrammatic languages. In abstract, by ‘system’ we shall simply mean that which can be represented by a box with a collection of terminals, perhaps of different types, through which it interfaces with the surroundings. Concretely, one might envision a circuit diagram with terminals, such as

or

The algebraic structure of interconnection is then simply the structure that results from the ability to connect terminals of one system with terminals of another. This graphical approach motivates our language of interconnection: indeed, these diagrams will be the expressions of our language.

We claim that the existence of a network-style diagrammatic language to represent a system implies that interconnection is inherently important in understanding the system. Yet, while each of these example notions of system are well-studied in and of themselves, their compositional, or algebraic, structure has received scant attention. In this thesis, we study an algebraic structure called a ‘hypergraph category’, and argue that this is the relevant algebraic structure for modelling interconnection of open systems.

Given these pre-existing diagrammatic formalisms and our visual intuition, constructing algebras of syntactic representations is thus rather straightforward. The semantics and their algebraic structure are more subtle.

In some sense our semantics is already given to us too: in studying these systems as closed systems, scientists have already formalised the meaning of these diagrams. But we have shifted from a closed perspective to an open one, and we need our semantics to also account for points of interconnection.

Taking inspiration from Willems’ behavioural approach and Deutsch’s constructor theory, in this thesis I advocate the following position. First, at each terminal of an open system we may make measurements appropriate to the type of terminal. Given a collection of terminals, the universum is then the set of all possible measurement outcomes. Each open system has a collection of terminals, and hence a universum. The semantics of an open system is the subset of measurement outcomes on the terminals that are permitted by the system. This is known as the behaviour of the system.

For example, consider a resistor of resistance $r.$ This has two terminals—the two ends of the resistor—and at each terminal, we may measure the potential and the current. Thus the universum of this system is the set $\mathbb{R}\oplus\mathbb{R}\oplus\mathbb{R}\oplus\mathbb{R},$ where the summands represent respectively the potentials and currents at each of the two terminals. The resistor is governed by Kirchhoff’s current law, or conservation of charge,
and Ohm’s law. Conservation of charge states that the current flowing into one terminal must equal the current flowing out of the other terminal, while Ohm’s law states that this current will be proportional to the potential difference, with constant of proportionality $1/r.$ Thus the behaviour of the resistor is the set

$\displaystyle{ \big\{\big(\phi_1,\phi_2, -\tfrac1r(\phi_2-\phi_1),\tfrac1r(\phi_2-\phi_1)\big)\,\big\vert\, \phi_1,\phi_2 \in \mathbb{R}\big\} }$

Note that in this perspective a law such as Ohm’s law is a mechanism for partitioning behaviours into possible and impossible behaviours.

Interconnection of terminals then asserts the identification of the variables at the identified terminals. Fixing some notion of open system and subsequently an algebra of syntactic representations for these systems, our approach, based on the principle of compositionality, requires this to define an algebra of semantic objects and a homomorphism from syntax to semantics. The first part of this thesis develops the mathematical tools necessary to pursue this vision for modelling open systems and their interconnection.

The next goal is to demonstrate the efficacy of this philosophy in applications. At core, this work is done in the faith that the right language allows deeper insight into the underlying structure. Indeed, after setting up such a language for open systems there are many questions to be asked: Can we find a sound and complete logic for determining when two syntactic expressions have the same semantics? Suppose we have systems that have some property, for example controllability. In what ways can we interconnect controllable systems so that the combined system is also controllable? Can we compute the semantics of a large system quicker by computing the semantics of subsystems and then composing them? If I want a given system to achieve a specified trajectory, can we interconnect another system to make it do so? How do two different notions of system, such as circuit diagrams and signal flow graphs, relate to each other? Can we find homomorphisms between their syntactic and semantic algebras? In the second part of this thesis we explore some applications in depth, providing answers to questions of the above sort.

### Outline of the thesis

The thesis is divided into two parts. Part I, comprising
Chapters 1 to 4, focuses on mathematical foundations. In it we develop the theory of hypergraph categories and a powerful tool for constructing and manipulating them: decorated corelations. Part II, comprising Chapters 5 to 7, then discusses applications of this theory to examples of open systems.

The central refrain of this thesis is that the syntax and semantics of network-style diagrammatic languages can be modelled by hypergraph categories. These are introduced in Chapter 1. Hypergraph categories are symmetric monoidal categories in which every object is equipped with the structure of a special commutative Frobenius monoid in a way compatible with the monoidal product. As we will rely heavily on properties of monoidal categories, their functors, and their graphical calculus, we begin with a whirlwind review of these ideas. We then provide a definition of hypergraph categories and their functors, a strictification theorem, and an important example: the category of cospans in a category with finite colimits.

A cospan is a pair of morphisms

$X \to N \leftarrow Y$

with a common codomain. In Chapter 2 we introduce the idea of a ‘decorated cospan’, which equips the apex $N$ with extra structure. Our motivating example is cospans of finite sets decorated by graphs, as in this picture:

Here graphs are a proxy for expressions in a network-style diagrammatic language. To give a bit more formal detail, let $\mathcal C$ be a category with finite colimits, writing its as coproduct as $+,$ and let $(\mathcal D, \otimes)$ be a braided monoidal category. Decorated cospans provide a method of producing a hypergraph category from a lax braided monoidal functor

$F\colon (\mathcal C,+) \to (\mathcal D, \otimes)$

The objects of these categories are simply the objects of $\mathcal C,$ while the morphisms are pairs comprising a cospan $X \rightarrow N \leftarrow Y$ in $\mathcal C$ together with an element $I \to FN$ in $\mathcal D$—the so-called decoration. We will also describe how to construct hypergraph functors between decorated cospan categories. In particular, this provides a useful tool for constructing a hypergraph category that captures the syntax of a network-style diagrammatic language.

Having developed a method to construct a category where the morphisms are expressions in a diagrammatic language, we turn our attention to categories of semantics. This leads us to the notion of a corelation, to which we devote Chapter 3. Given a factorisation system $(\mathcal{E},\mathcal{M})$ on a category $\mathcal{C},$ we define a corelation to be a cospan $X \to N \leftarrow Y$ such that the copairing of the two maps, a map $X+Y \to N,$ is a morphism in $\mathcal{E}.$ Factorising maps $X+Y \to N$ using the factorisation system leads to a notion of equivalence on cospans, and this helps us describe when two diagrams are equivalent. Like cospans, corelations form hypergraph categories.

In Chapter 4 we decorate corelations. Like decorated cospans,
decorated corelations are corelations together with some additional structure on the apex. We again use a lax braided monoidal functor to specify the sorts of extra structure allowed. Moreover, decorated corelations too form the morphisms of a hypergraph category. The culmination of our theoretical work is to show that every hypergraph category and every hypergraph functor can be constructe using decorated corelations. This implies that we can use decorated corelations to construct a semantic hypergraph category for any network-style diagrammatic language, as well as a hypergraph functor from its syntactic category that interprets each diagram. We also discuss how the intuitions behind decorated corelations guide construction of these categories and functors.

Having developed these theoretical tools, in the second part we turn to demonstrating that they have useful applications. Chapter 5 uses corelations to formalise signal flow diagrams representing linear time-invariant discrete dynamical systems as morphisms in a category. Our main result gives an intuitive sound and fully complete equational theory for reasoning about these linear time-invariant systems. Using this framework, we derive a novel structural characterisation of controllability, and consequently provide a methodology for analysing controllability of networked and interconnected systems.

Chapter 6 studies passive linear networks. Passive linear
networks are used in a wide variety of engineering applications, but the best studied are electrical circuits made of resistors, inductors and capacitors. The goal is to construct what we call the ‘black box functor’, a hypergraph functor from a category of open circuit diagrams to a category of behaviours of circuits. We construct the former as a decorated cospan category, with each morphism a cospan of finite sets decorated by a circuit diagram on the apex. In this category, composition describes the process of attaching the outputs of one circuit to the inputs of another. The behaviour of a circuit is the relation it imposes between currents and potentials at their terminals. The space of these currents and potentials naturally has the structure of a symplectic vector space, and the relation imposed by a circuit is a Lagrangian linear relation. Thus, the black box functor goes from our category of circuits to the category of symplectic vector spaces and Lagrangian linear relations. Decorated corelations provide a critical tool for constructing these hypergraph categories and the black box functor.

Finally, in Chapter 7 we mention two further research directions. The first is the idea of a ‘bound colimit’, which aims to describe why epi-mono factorisation systems are useful for constructing corelation categories of semantics for open systems. The second research direction pertains to applications of the black box functor for passive linear networks, discussing the work of Jekel on the inverse problem for electric circuits and the work of Baez, Fong, and Pollard on open Markov processes.

## Complex Adaptive System Design (Part 2)

18 October, 2016

Yesterday Blake Pollard and I drove to Metron’s branch in San Diego. For the first time, I met four of the main project participants: John Foley (math), Thy Tran (programming), Tom Mifflin and Chris Boner (two higher-ups involved in the project). Jeff Monroe and Tiffany Change give us a briefing on Metron’s ExAMS software. This lets you design complex systems and view them in various ways.

The most fundamental view is the ‘activity trace’, which consists of a bunch of parallel rows, one for each ‘performer’. Each row has a bunch of boxes which represent ‘activities’ that the performer can do. Two boxes are connected by a wire when one box’s activity causes another to occur. In general, time goes from left to right. Thus, if B can only occur after A, the box for B is drawn to the right of the box for A.

The wires can also merge via logic gates. For example, suppose activity D occurs whenever A and B but not C have occurred. Then wires coming out of the A, B, and C boxes merge in a logic gate and go into the A box. However, these gates are a bit more general than your ordinary Boolean logic gates. They may also involve ‘delays’, e.g. we can say that A occurs 10 minutes after B occurs.

I would like to understand the mathematics of just these logic gates, for starters. Ignoring delays for a minute (get the pun?), they seem to be giving a generalization of Petri nets. In a Petri net we only get to use the logical connective ‘and’. In other words, an activity can occur when all of some other activities have occurred. People have considered various generalizations of Petri nets, and I think some of them allow more general logical connectives, but I’m forgetting where I saw this done. Do you know?

In the full-fledged activity traces, the ‘activity’ boxes also compute functions, whose values flow along the wires and serve as inputs to other box. That is, when an activity occurs, it produces an output, which depends on the inputs entering the box along input wires. The output then appears on the wires coming out of that box.

I forget if each activity box can have multiple inputs and multiple outputs, but that’s certainly a natural thing.

The fun part is that one one can zoom in on any activity trace, seeing more fine-grained descriptions of the activities. In this more fine-grained description each box turns into a number of boxes connected by wires. And perhaps each wire becomes a number of parallel wires? That would be mathematically natural.

Activity traces give the so-called ‘logical’ description of the complex system being described. There is also a much more complicated ‘physical’ description, saying the exact mechanical functioning of all the parts. These parts are described using ‘plugins’ which need to be carefully described ahead of time—but can then simply be used when assembling a complex system.

Our little team is supposed to be designing our own complex systems using operads, but we want to take advantage of the fact that Metron already has this working system, ExAMS. Thus, one thing I’d like to do is understand ExAMS in terms of operads and figure out how to do something exciting and new using this understanding. I was very happy when Tom Mifflin embraced this goal.

Unfortunately there’s no manual for ExAMS: the US government was willing to pay for the creation of this system, but not willing to pay for documentation. Luckily it seems fairly simple, at least the part that I care about. (There are a lot of other views derived from the activity trace, but I don’t need to worry about these.) Also, ExAMS uses some DoDAF standards which I can read about. Furthermore, in some ways it resembles UML and SySML, or more precisely, certain parts of these languages.

In particular, the ‘activity diagrams’ in UML are a lot like the activity traces in ExAMS. There’s an activity diagram at the top of this page, and another below, in which time proceeds down the page.

So, I plan to put some time into understanding the underlying math of these diagrams! If you know people who have studied them using ideas from category theory, please tell me.

## Kosterlitz–Thouless Transition

7 October, 2016

Three days ago, the 2016 Nobel Prize in Physics was awarded to Michael Kosterlitz of Brown University:

David Thouless of the University of Washington:

and Duncan Haldane of Princeton University:

They won it for their “theoretical discovery of topological phase transitions and topological phases of matter”, which was later confirmed by many experiments.

Nobel Prize in Physics Goes to Another Weird Thing Nobody Understands

Journalists worldwide struggled to pronounce ‘topology’, and a member of the Nobel prize committee was reduced to waving around a bagel and a danish to explain what the word means:

That’s fine as far as it goes: I’m all for using food items to explain advanced math! However, it doesn’t explain what Kosterlitz, Thouless and Haldane actually did. I think a 3-minute video with the right animations would make the beauty of their work perfectly clear. I can see it in my head. Alas, I don’t have the skill to make those animations—hence this short article.

I’ll just explain the Kosterlitz–Thouless transition, which is an effect that shows up in thin films of magnetic material. Haldane’s work on magnetic wires is related, but it deserves a separate story.

I’m going to keep this very quick! For more details, try this excellent blog article:

• Brian Skinner, Samuel Beckett’s guide to particles and antiparticles, Ribbonfarm, 24 September 2015.

I’m taking all my pictures from there.

### The idea

Imagine a thin film of stuff where each atom’s spin likes to point in the same direction as its neighbors. Also suppose that each spin must point in the plane of the material.

Your stuff will be happiest when all its spins are lined up, like this:

What does ‘happy’ mean? Physicists often talk this way. It sounds odd, but it means something precise: it means that the energy is low. When your stuff is very cold, its energy will be as low as possible, so the spins will line up.

When you heat up your thin film, it gets a bit more energy, so the spins can do more interesting things.

Here’s one interesting possibility, called a ‘vortex’:

The spins swirl around like the flow of water in a whirlpool. Each spin is fairly close to being lined up to its neighbors, except near the middle where they’re doing a terrible job.

The total energy of a vortex is enormous. The reason is not the problem at the middle, which certainly contributes some energy. The reason is that ‘fairly’ close is not good enough. The spins fail to perfectly line up with their neighbors even far away from the middle of this picture. This problem is bad enough to make the energy huge. (In fact, the energy would be infinite if our thin film of material went on forever.)

So, even if you heat up your substance, there won’t be enough energy to make many vortices. This made people think vortices were irrelevant.

But there’s another possibility, called an ‘antivortex’:

A single antivortex has a huge energy, just like a vortex. So again, it might seem antivortices are irrelevant if you’re wondering what your stuff will do when it has just a little energy.

But here’s what Kosterlitz and Thouless noticed: the combination of a vortex together with an antivortex has much less energy than either one alone! So, when your thin film of stuff is hot enough, the spins will form ‘vortex-antivortex pairs’.

Brian Skinner has made a beautiful animation showing how this happens. A vortex-antivortex pair can appear out of nothing:

… and then disappear again!

Thanks to this process, at low temperatures our thin film will contain a dilute ‘gas’ of vortex-antivortex pairs. Each vortex will stick to an antivortex, since it takes a lot of energy to separate them. These vortex-antivortex pairs act a bit like particles: they move around, bump into each other, and so on. But unlike most ordinary particles, they can appear out of nothing, or disappear, in the process shown above!

As you heat up the thin film, you get more and more vortex-antivortex pairs, since there’s more energy available to create them. But here’s the really surprising thing. Kosterlitz and Thouless showed that as you turn up the heat, there’s a certain temperature at which the vortex-antivortex pairs suddenly ‘unbind’ and break apart!

Why? Because at this point, the density of vortex-antivortex pairs is so high, and they’re bumping into each other so much, that we can’t tell which vortex is the partner of which antivortex. All we’ve got is a thick soup of vortices and antivortices!

What’s interesting is that this happens suddenly at some particular temperature. It’s a bit like how ice suddenly turns into liquid water when it warms above its melting point. A sudden change in behavior like this is called a phase transition.

So, the Kosterlitz–Thouless transition is the sudden unbinding of the vortex-antivortex pairs as you heat up a thin film of stuff where the spins are confined to a plane and they like to line up.

In fact, the pictures above are relevant to many other situations, like thin films of superconductive materials. So, these too can exhibit a Kosterlitz–Thouless transition. Indeed, the work of Kosterlitz and Thouless was the key that unlocked a treasure room full of strange new states of matter, called ‘topological phases’. But this is another story.

### Puzzles

What is the actual definition of a vortex or antivortex? As you march around either one and look at the little arrows, the arrows turn around—one full turn. It’s a vortex if when you walk around it clockwise the little arrows make a full turn clockwise:

It’s an antivortex if when you walk around it clockwise the little arrows make a full turn counterclockwise:

Topologists would say the vortex has ‘winding number’ 1, while the antivortex has winding number -1.

In the physics, the winding number is very important. Any collection of vortex-antivortex pairs has winding number 0, and Kosterlitz and Thouless showed that situations with winding number 0 are the only ones with small enough energy to be important for a large thin film at rather low temperatures.

Now for the puzzles:

Puzzle 1: What’s the mirror image of a vortex? A vortex, or an antivortex?

Puzzle 2: What’s the mirror image of an antivortex?

Here are some clues, drawn by the science fiction writer Greg Egan:

and the mathematician Simon Willerton:

### For more

To dig a bit deeper, try this:

• The Nobel Prize in Physics 2016, Topological phase transitions and topological phases of matter.

It’s a very well-written summary of what Kosterlitz, Thouless and Haldane did.

Also, check out Simon Burton‘s simulation of the system Kosterlitz and Thouless were studying:

In this simulation the spins start out at random and then evolve towards equilibrium at a temperature far below the Kosterlitz–Thouless transition. When equilibrium is reached, we have a gas of vortex-antivortex pairs. Vortices are labeled in blue while antivortices are green (though this is not totally accurate because the lattice is discrete). Burton says that if we raise the temperature to the Kosterlitz–Thouless transition, the movie becomes ‘a big mess’. That’s just what we’d expect as the vortex-antivortex pairs unbind.

I thank Greg Egan, Simon Burton, Brian Skinner, Simon Willerton and Haitao Zhang, whose work made this blog article infinitely better than it otherwise would be.

## Complex Adaptive System Design (Part 1)

2 October, 2016

In January of this year, I was contacted by a company called Metron Scientific Solutions. They asked if I’d like to join them in a project to use category theory to design and evaluate complex, adaptive systems of systems.

What’s a ‘system of systems’?

It’s a system made of many disparate parts, each of which is a complex system in its own right. The biosphere is a system of systems. But so far, people usually use this buzzword for large human-engineered systems where the different components are made by different organizations, perhaps over a long period of time, with changing and/or incompatible standards. This makes it impossible to fine-tune everything in a top-down way and have everything fit together seamlessly.

So, systems of systems are inherently messy. And yet we need them.

Metron was applying for a grant from DARPA, the Defense Advanced Research Projects Agency, which funds a lot of cutting-edge research for the US military. It may seem surprising that DARPA is explicitly interested in using category theory to study systems of systems. But it actually shouldn’t be surprising: their mission is to try many things and find a few that work. They are willing to take risks.

Metron was applying for a grant under a DARPA program run by John S. Paschkewitz, who is interested in

new paradigms and foundational approaches for the design of complex systems and system-of-systems (SoS) architectures.

This program is called CASCADE, short for Complex Adaptive System Composition and Design Environment. Here’s the idea:

Complex interconnected systems are increasingly becoming part of everyday life in both military and civilian environments. In the military domain, air-dominance system-of-systems concepts, such as those being developed under DARPA’s SoSITE effort, envision manned and unmanned aircraft linked by networks that seamlessly share data and resources in real time. In civilian settings such as urban “smart cities”, critical infrastructure systems—water, power, transportation, communications and cyber—are similarly integrated within complex networks. Dynamic systems such as these promise capabilities that are greater than the mere sum of their parts, as well as enhanced resilience when challenged by adversaries or natural disasters. But they are difficult to model and cannot be systematically designed using today’s tools, which are simply not up to the task of assessing and predicting the complex interactions among system structures and behaviors that constantly change across time and space.

To overcome this challenge, DARPA has announced the Complex Adaptive System Composition and Design Environment (CASCADE) program. The goal of CASCADE is to advance and exploit novel mathematical techniques able to provide a deeper understanding of system component interactions and a unified view of system behaviors. The program also aims to develop a formal language for composing and designing complex adaptive systems. A special notice announcing a Proposers Day on Dec. 9, 2015, was released today on FedBizOpps here: http://go.usa.gov/cT7uR.

“CASCADE aims to fundamentally change how we design systems for real-time resilient response within dynamic, unexpected environments,” said John Paschkewitz, DARPA program manager. “Existing modeling and design tools invoke static ‘playbook’ concepts that don’t adequately represent the complexity of, say, an airborne system of systems with its constantly changing variables, such as enemy jamming, bad weather, or loss of one or more aircraft. As another example, this program could inform the design of future forward-deployed military surgical capabilities by making sure the functions, structures, behaviors and constraints of the medical system—such as surgeons, helicopters, communication networks, transportation, time, and blood supply—are accurately modeled and understood.”

CASCADE could also help the Department of Defense fulfill its role of providing humanitarian assistance in response to a devastating earthquake, hurricane or other catastrophe, by developing comprehensive response models that account for the many components and interactions inherent in such missions, whether in urban or austere environs.

“We need new design and representation tools to ensure resilience of buildings, electricity, drinking water supply, healthcare, roads and sanitation when disaster strikes,” Paschkewitz said. “CASCADE could help develop models that would provide civil authorities, first responders and assisting military commanders with the sequence and timing of critical actions they need to take for saving lives and restoring critical infrastructure. In the stress following a major disaster, models that could do that would be invaluable.”

The CASCADE program seeks expertise in the following areas:

• Applied mathematics, especially in category theory, algebraic geometry and topology, and sheaf theory

• Operations research, control theory and planning, especially in stochastic and non-linear control

• Modeling and applications responsive to challenges in battlefield medicine logistics and platforms, adaptive logistics, reliability, and maintenance

• Search and rescue platforms and modeling

• Adaptive and resilient urban infrastructure

Metron already designs systems of systems used in Coast Guard search and rescue missions. Their grant proposal was to use category theory and operads to do this better. They needed an academic mathematician as part of their team: that was one of the program’s requirements. So they asked if I was interested.