A compositional account of motifs, mechanisms, and dynamics in biochemical regulatory networks

Regulatory networks depict promoting or inhibiting interactions between molecules in a biochemical system. We introduce a category-theoretic formalism for regulatory networks, using signed graphs to model the networks and signed functors to describe occurrences of one network in another, especially occurrences of network motifs. With this foundation, we establish functorial mappings between regulatory networks and other mathematical models in biochemistry. We construct a functor from reaction networks, modeled as Petri nets with signed links, to regulatory networks, enabling us to precisely define when a reaction network could be a physical mechanism underlying a regulatory network. Turning to quantitative models, we associate a regulatory network with a Lotka-Volterra system of differential equations, defining a functor from the category of signed graphs to a category of parameterized dynamical systems. We extend this result from closed to open systems, demonstrating that Lotka-Volterra dynamics respects not only inclusions and collapsings of regulatory networks, but also the process of building up complex regulatory networks by gluing together simpler pieces. Formally, we use the theory of structured cospans to produce a lax double functor from the double category of open signed graphs to that of open parameterized dynamical systems. Throughout the paper, we ground the categorical formalism in examples inspired by systems biology.


Introduction
The genes, proteins, and RNA molecules that comprise living cells interact in complex, varied ways to sustain the cell throughout its lifecycle and respond to changes in its environment.Intensive experimental study of these interactions is distilled in an idealized form as regulatory networks, a kind of directed graph in which vertices represent molecules and edges represent interactions between molecules (Figure 1).The edges are labeled with a positive or negative sign according to whether the interaction is activating or inhibiting.Regulatory networks are the subject of a large body of experimental and theoretical work, notably reviewed by Alon [Alo07; Alo19] and Tyson et al. [TN10;TLK19] among others.Particular attention has been paid to network motifs [Alo07; TN10], the simple but functionally meaningful patterns that recur frequently in regulatory networks, and to various quantitative dynamics [TLK19] that can be assigned to the networks.

Ash1
Cdk1/ClbS Sld2 Although regulatory networks are simple enough to define mathematically-we shall define them to be directed graphs, possibly with multiple edges and loops, whose edges are assigned a positive or negative sign-important scientific concepts involving them, such as occurrences of motifs in networks and biochemical mechanisms generating networks, are often treated imprecisely.Likewise for relationships between regulatory networks and other mathematical models in biochemistry, particularly dynamical models based on ordinary or stochastic differential equations.Hence a first aim of this paper is to put certain concepts and relations concerning regulatory networks on a firm mathematical footing.To do so, we will use methods from category theory.
Category theory, in both the small and the large, is a natural tool for this study.In saying that a motif occurs in a network, one should allow for the possibility that the occurrence is indirect, involving a sequence of appropriately signed interactions.For example, positive autoregulation can occur directly but also indirectly through a double-negative feedback loop.Since a small category is nothing other than a graph in which consecutive edges can be composed, subject to certain laws, regulatory networks should be viewed not only as signed graphs (Section 2.1) but also as signed categories freely generated by those (Section 2.2).Sign-preserving functors, unlike sign-preserving graph homomorphisms, can express indirect occurrences and are in this sense a better notion of morphism for regulatory networks.Here we are doing category theory in the small, using categories as algebraic structures comparable to familiar ones like graphs, groups, and monoids.
Having laid these foundations for regulatory networks, we turn to category theory in the large, a mathematical theory of structure well suited to describe the passages between regulatory networks and other mathematical models of biochemical systems.Formally speaking, these passages are functors into or out of the category of regulatory networks.Making a functor is significantly stronger than making an objects-only mapping, as is typically done in the literature, since if morphisms of signed graphs formalize relationships between different regulatory networks, then functorality requires that these relationships be transported to or from other models of interest.By contrast, an objects-only mapping is, abstractly speaking, entirely unconstrained and so is capable of acting highly irregularly across different models of a given class.Functorality thus serves as a kind of safeguard for model transformation: it does not, on its own, ensure that a transformation makes good scientific sense but it does impose nontrivial logical constraints and coherences.
A first illustration of this principle is the connection between regulatory networks and biochemical reaction networks (Section 2.3).When modeling the complex biochemical systems that constitute a living cell, it is often practically necessary to abstract away certain details of the underlying chemical processes.Regulatory networks generally do not capture all the species or reactions involved in a given system; nor can they capture multispecies reactions faithfully because they describe only pairwise interactions.Given that regulatory networks are, to some degree, phenomenological models, it is natural to ask whether a given network could arise as a summary of a specific chemical process.The latter are described by biochemical reaction networks, graph-like structures allowing reactions or transitions with multiple inputs and outputs.Inspired by graphical syntax from systems biology [Voi00; Voi13], we formalize reaction networks as "Petri nets with links," and we construct a functor from the category of Petri nets with signed links to the category of signed graphs.This functor enables us to propose a formal definition for when a reaction network could be a mechanism for a regulatory network, a concept that is rarely if ever treated in a precise way.
This concludes the content of Section 2. In Section 3, we turn from qualitative to quantitative analysis, seeking a functorial assignment of continuous dynamics to regulatory networks.Although rarely made explicitly functorial, systematic ways to formulate a model belonging to a mathematically homogeneous class of models are ubiquitous in science.Voit calls these "canonical representations" or "canonical models," 1 and identifies Lotka-Volterra models and BST models/S-systems as two prominent examples in biology [Voi13,§3].Reflecting their phenomenological status, regulatory networks do not admit a single, obvious dynamical interpretation, and so a wide variety of dynamical models have been considered, spanning the discrete and continuous, deterministic and stochastic [TLK19].We consider Lotka-Volterra systems of ordinary differential equations.While not necessarily the most biologically plausible, Lotka-Volterra systems are among the simplest possible continuous models and so are a natural place to begin a functorial study.
A Lotka-Volterra system of equations has the form or equivalently, has logarithmic derivatives that are affine functions of the state variables: The coefficients ρ i specify baseline rates of growth or decay, according to their sign, and the coefficients β i,j rates of activation or inhibition, according to their sign.We construct a functor that sends a signed graph (regulatory network) to a Lotka-Volterra model that constrains the signs of the rate coefficients (Section 3.2).As a prerequisite, we define a category of parameterized dynamical systems (Section 3.1), a construction of intrinsic interest that is by no means restricted to Lotka-Volterra dynamics.By working with signed graphs, rather than merely graphs, we ensure that scientific knowledge about whether interactions are promoting or inhibiting is reflected in both the syntax and the quantitative semantics.
In order to comprehend complex biological systems, we must decompose them into small, readily understandable pieces and then compose them back together to reproduce the behavior of the original system.This is the mantra of systems biology, which stresses that compositionality is no less important than reductionism in biology.With this motivation, a secondary aim of this paper is to extend the above constructions from closed systems to open ones, which can be composed together by gluing them along their interfaces.Mathematically, we pass from categories to double categories 2 [Gra19], two-dimensional categorical structures in which the usual morphisms of systems compose along one direction (by convention, the "vertical" one) and open systems compose along the other direction (the "horizontal" one).The double categories of open systems are further equipped with monoidal products, enabling systems to be composed not just in sequence but also in parallel.Among other results, we show that the Lotka-Volterra dynamics functor extends to a monoidal lax double functor from the monoidal double category of open signed graphs to that of open parameterized dynamical systems (Section 3.3).
The mathematics developed here is motivated by biochemistry but need not be restricted to it.Famously, Lotka-Volterra systems originated in ecology to model predator-prey dynamics [Lot25].Regulatory networks and Lotka-Volterra systems can be used as generic models of entities that "regulate" each other in some manner, be it at the scale of individual cells or animal ecosystems.Regulatory networks are highly reminiscent of the causal loop diagrams in system dynamics [Ste00, Chapter 5], where the latter explicitly label feedback loops and their polarities.
The language of category theory is indispensable to this work but the level of knowledge assumed of the reader is not constant.We assume throughout that the reader is familiar with the basic notions of category theory, such as categories, functors, and natural transformations.Our main reference for facts about category theory is Riehl's text [Rie16], although there are many others.In the definitions and theorem statements, we have tried to minimize the technical level and explicate the ideas in concrete terms.In the proofs, we have aimed for efficiency and freely use concepts and results from the literature that do not appear in the main text.The reader can omit the proofs without disrupting the continuity of the paper.
Acknowledgments.The authors thank the American Mathematical Society (AMS) for hosting the 2022 Mathematical Research Community (MRC) on Applied Category Theory, where this research project began.The AMS MRC was supported by NSF grant 1916439.We thank John Baez, our group's mentor at the MRC, for suggesting this project and for much helpful advice along the way.Authors Fairbanks, Patterson, and Shapiro acknowledge subsequent support from the DARPA ASKEM and Young Faculty Award programs through grants HR00112220038 and W911NF2110323.Author Ocal acknowledges subsequent support from an AMS-Simons Travel Grant and from the Hausdorff Research Institute for Mathematics funded by the German Research Foundation (DFG) under Germany's Excellence Strategy -EXC-2047/1 -390685813.
2 Qualitative analysis: motifs and mechanisms

Regulatory networks as signed graphs
To begin, we clarify the notion of graph to be used throughout in this paper.The following definition is standard among category theorists.In other fields, it might be called a "directed multigraph," but we will call it simply a "graph."Definition 2.1 (Graphs).The schema for graphs is the category Sch(Graph) freely generated by two parallel morphisms: A graph is a functor X : Sch(Graph) → Set, also known as a copresheaf on Sch(Graph). 3 A graph homomorphism from a graph X to another graph Y is a natural transformation ϕ : X → Y .Graphs and graph homomorphisms form the category Graph.
To restate the definition in explicit terms, a graph X consists of • a set X(V ) of vertices; • a set X(E) of edges; and • functions X(src), X(tgt) : X(E) → X(V ), assigning to each edge its source and target.
A graph homomorphism ϕ : X → Y consists of a function ϕ V : X(V ) → Y (V ), the vertex map, and another function ϕ E : X(E) → Y (E), the edge map.These maps must preserve sources and targets, meaning that the following squares commute: We now turn to the main notion of this section, signed graph.Write Sgn for the set of (nonzero) signs, whose two elements may be denoted {1, −1} or {+, −}.The set of signs is an abelian group, isomorphic to the cyclic group Z 2 , under the usual multiplication.Unpacking the definition, a signed graph is seen to be a graph X equipped with a function X(sgn) : X(E) → Sgn that assigns a sign to each edge.Given signed graphs X and Y , a morphism of signed graphs from X to Y is a graph homomorphism ϕ that preserves signs, meaning that the following triangle commutes: Signed graphs are a mathematical description of the regulatory networks studied in systems biology [Alo07;TN10].For the purposes of this paper, we will simply define a regulatory network to be a signed graph.The vertices of the graph represent the components of the network, which could be proteins, genes, or RNA molecules.Signed edges represent interactions between components, where the source has the effect of either activating/promoting the target (positive sign) or inhibiting/repressing it (negative sign).As is customary, we denote activation interactions by arrows with pointed heads (−→) and inhibition interactions by arrows with flat heads (−−⊣).For instance, the two drawings represent the same network, a negative feedback loop in which x activates y, which in turn inhibits x [TN10, Scheme 1, Motif B].
In the literature [TN10], regulatory networks are often represented mathematically as sign-valued matrices.This approach is a special case of ours in that an n-by-n matrix valued in {+1, −1, 0} can be interpreted as a simple signed graph on n vertices, with signed edges defined by the nonzero matrix elements.Unlike the matricial formalism, our formalism allows multiple edges between the same pair of edges, which can model multiple interactions based on different mechanisms.Allowing multiple edges and self-loops also ensures that graphs and signed graphs form well behaved categories, as the following proposition shows.

Proposition 2.3. The category of signed graphs is complete (has all limits) and cocomplete (has all colimits).
Proof.Because Graph is a copresheaf category, it is complete and cocomplete [Rie16, Proposition 3.3.9].The slice category SgnGraph = Graph/Sgn is hence also complete and cocomplete [Rie16, Proposition 3.5.5];alternatively, this follows because slices of copresheaf categories are again (equivalent to) copresheaf categories [Str00,Remark p. 303].
A morphism of signed graphs can do two things.Most obviously, it can pick out a signed graph as a subobject of another one, via a sign-preserving subgraph embedding.A signed graph morphism can also collapse multiple vertices onto a single vertex, and multiple edges onto a single edge with the same sign, in the restrictive sense permitted by a graph homomorphism.To illustrate, consider the following morphism inspired by Alon's review [Alo07, Figure 5].(1) The network in the domain is a "single-input module" in the arginine biosynthesis system, in which the regulator argR represses five different enzymes (argCHB, argD, etc.) involved in producing arginine.The morphism above forgets the distinction between these enzymes, collapsing them into a catch-all entity labeled "arg * ".These two functions-embedding and collapsing-are all that a signed graph morphism can do.More precisely, any morphism of signed graphs factors essentially uniquely as an epimorphism (morphism with surjective vertex and edge maps) followed by a monomorphism (morphism with injective vertex and edge maps), using the epi-mono factorization available in any copresheaf category, or more generally in any topos [ morphisms of open signed graphs (X, ℓ 0 , ℓ 1 ) → (Y, m 0 , m 1 ), which consist of a map of signed graphs ϕ : X → Y along with functions f i : A i → B i , i = 0, 1, making the following diagram commute: Vertical composition is by composition in Set and in SgnGraph.Horizontal composition and monoidal products are by pushouts and coproducts in SgnGraph, respectively, viewing the sets in the feet of the cospans as discrete signed graphs.
Proof.To construct this symmetric monoidal double category, we use the method of structured cospans [FS07] in its double-categorical form [BC20].The categories of sets and of signed graphs are related by an adjoint pair of functors Here ev V : SgnGraph → Set is the evaluation at V functor, sending a signed graph X to its set of vertices X(V ) and a morphism of signed graphs ϕ to its vertex map ϕ V , and Disc : Set → SgnGraph is the discrete signed graph functor, sending a set A to the signed graph with vertex set A and no edges.We obtain a symmetric monoidal double category of open signed graphs as the L-structured cospans for the functor L := Disc : Set → SgnGraph [BC20, Theorems 2.3 and 3.9].
To show that this symmetric monoidal double category is the same one in the proposition statement, suppose that L ⊣ R : A → X is an adjoint pair of functors, where in our application L = Disc and R = ev V .By the defining bijection of an adjunction, L-structured cospans, i.e., objects A 0 and A 1 in A together with a cospan L(A 0 ) → X ← L(A 1 ) in X, correspond exactly to "R-decorated cospans," i.e., an object X in X together with a cospan A 0 → R(X) ← A 1 in A. Furthermore, by the naturality of this bijection [Rie16, Lemma 4.1.3],morphisms of L-structured and R-decorated cospans related by the adjunction are equivalent in that one diagram commutes if and only if the other does.We will tacitly reuse this reasoning in future constructions, such as Proposition 2.10 below.
Let us illustrate compositionality as a means of building larger regulatory networks from smaller ones.The following example is adapted from Keurentjes et al.Example 2.5 (Stress response system in plants).When a plant perceives stress factors, it has three main biotic responses, called salicylic acid (SA) signaling, jasmonic acid (JA) signaling, and ethylene (ET) signaling.These processes promote the transcription factors WRKY, MYC2, and ERF, respectively, which in turn activate the genes responsible for responding to SA, JA, and ET.As it appears in [Keu+11, Figure 1] and [Voi18, Figure 1.7], the regulatory network governing these biotic responses SA-responsive genes JA-responsive genes ET-responsive genes (2) has five discernible subsystems: three signaling processes involving SA, JA, and ET, indicated by the dashed boxes, and two interactions between these processes, namely the inhibitions of WRKY and ERF by MYC2 that constitute SA-JA and JA-ET interactions.These subsystems and their functions were identified empirically, and it is known that they interact in the prescribed manner.Following the decomposition identified by the biologists, we build up the overall system from smaller subsystems.Namely, we identify five subsystems and compose them from left to right.We could equally well have identified other subsystems or done the compositions in a different order, yielding an equivalent system.Horizontal associativity in the double category Open(SgnGraph), constructed in Proposition 2.4, ensures that any order of composition yields the same result, up to isomorphism.
We choose to separate out the five subsystems into small, individual regulatory networks: Finally, the inhibition of WRKY by MYC2 will have one input to WRKY and one output from MYC2, whereas the inhibition of ERF by MYC2 will have one output from ERF and one input from MYC2.
The As mentioned at the beginning of the example, although we made a choice of subsystems and a choice in the order of compositions, any other choice will give an isomorphic result by the horizontal associativity of the double category Open(SgnGraph).

Refining regulatory networks using signed categories and functors
While morphisms of signed graph have their uses, they do not capture the important idea of refining regulatory networks, in which an interaction in one network is realized as a composite of several interactions in another.To express refinement, we must generalize our notion of morphism from graph homomorphisms to functors.This, in turn, requires the concept of a signed category.
Definition 2.6 (Signed categories).The category of signed categories is the slice category where Cat is the category of small categories and the group of signs, Sgn, is regarded as a category with one object and two morphisms.
Unpacking the definition, a signed category is a category C in which every morphism f is assigned a sign sgn(f ) ∈ {1, −1} in a functorial way, meaning that sgn(x 0 for every n ≥ 0 and every sequence of composable morphisms f 1 , . . ., f n .In particular (n = 0), the identity morphisms have positive sign.A morphism of signed categories, or signed functor, is a functor F : C → D between signed categories that preserves the signs, meaning that Since our aim is to have a more flexible notion of morphism between signed graphs, we will mostly restrict ourselves to those signed categories that are freely generated by a signed graph.The free signed category or signed path category functor Path : SgnGraph → SgnCat sends a signed graph X to the signed category Path(X) having • as objects, the vertices of X; • as morphisms from x to y, the paths in X from x to y, whose sign is defined to be the product of the signs of the edges comprising the path.
Composition of paths is by concatenation, which clearly preserves the sign.The identity morphism at x is the empty path at x, which has positive sign.The functor Path on signed graphs is completely analogous to the usual free category functor on graphs, and as such is a left adjoint to the forgetful functor from signed categories to signed graphs.Signed categories are likewise algebras for the corresponding monad on the category SgnGraph.By convention, if X and Y are signed graphs, we say that a signed functor from X to Y is a signed functor F : Path(X) → Path(Y ) between the corresponding signed path categories.Since the morphisms of Path(X) are freely generated by the edges in X, a signed functor from X to Y is uniquely determined by a morphism of signed graphs from X to the underlying signed graph of Path(Y ).This means that each edge in X is sent to an appropriately signed path of edges in Y , which can be regarded as a refinement of the relationship that the edge represents.Definition 2.7 (Category of refinements).The category SgnGraph Path has as objects signed graphs and as morphisms signed functors between them; in other words, it is the Kleisli category for the free signed category monad on SgnGraph.
We now have a precise language with which to classify network motifs and their occurrences.those of type 1, 2, 3, and 4, respectively [Alo07, Figure 2a].Besides having three components, what these motifs have in common is that there exists a signed functor into each of them from the signed graph I ± := • • having two parallel arrows of opposite sign.The network I ± is thus the "generic" incoherent feedforward loop, in the sense that signed functors out of it refine the pattern in specific ways.A similar situation holds for other common network motifs (Table 1), which motivates the following definition.Definition 2.8 (Motif instance).Given a signed graph A, regarded as a motif, an instance or occurrence of the motif A in a network X is a monic signed functor A ↣ X.
Note that a signed functor is a monomorphism exactly when the functor is an embedding of categories, i.e., an injective-on-objects, faithful functor.Requiring the functor in the definition to be monic excludes "degenerate instances" of motifs where vertices or edges are identified.Now, should the incoherent FFL be regarded as a network motif, or is it the more specific types, such as the incoherent FFL of type 1, that are motifs?From our point of view, they are all equally motifs but they have different degrees of specificity, and the functorial language clarifies how motifs are iteratively refined.Specifically, an instance of an incoherent FFL of type 1 in a network X also gives an instance of an incoherent FFL in X (of unspecified type), simply by composing the monomorphisms involved: Similarly, in the notation of Table 1, any instance of double-negative feedback (L −− ) also gives an instance of positive autoregulation (L + ) [CP09], via the monomorphism L + ↣ L −− that sends the positive loop to the double-negative 2-cycle.
For any choice of motif A, the mapping that sends a regulatory network X to the set of occurrences of A in X is a representable functor Vertical composition is by composition in Set and in SgnCat.Horizontal composition and monoidal products are by pushouts and coproducts in SgnCat, respectively, viewing the sets in the feet of cospans as discrete signed categories.Moreover, the signed path category functor extends to a symmetric monoidal double functor Path : Open(SgnGraph) → Open(SgnCat).
Proof.We take Open(SgnCat) to be the symmetric monoidal double category of L ′ -structured cospans for the functor L ′ := Disc : Set → SgnCat involved the composite adjunction .
On the right hand side, the first adjunction was already used in the proof of Proposition 2.4, and the second adjunction is the free-forgetful adjunction between signed graphs and signed categories.
To prove the last statement, we notice that all functors involved in the commutative square Path are left adjoints, hence preserve colimits.We can therefore appeal to [BC20, Theorem 4.3] to obtain a symmetric monoidal double functor

Mechanistic models as Petri nets with links
However challenging they may be to identify through experiments and data analysis, regulatory networks still only summarize how the components of a complex biochemical system interact.Regulatory networks typically include only a subset of the system's components, and they do not model individual reactions and processes, only pairwise promoting or inhibiting interactions between components.In this sense, regulatory networks are not fully mechanistic models, even if they have a stronger causal interpretation than, say, a correlation matrix.By contrast, mechanistic models in biochemistry model individual reactions, which requires a different formalism.Pictures like the following, adapted from Voit's review [Voi13, Figure 4], are common in systems biology.
This diagram possesses two distinctive features.First, directed hyperedges represent reactions having a number of inputs or outputs different than one.There are, for example, hyperedges from B and C to D, from nothing to A (an inflow), and from D to nothing (an outflow).If, in lieu of hyperedges, we introduce a second type of vertex, we obtain a structure similar to a Petri net but with the second distinctive feature of having signed links from the first type of vertices (species) to the second type (transitions), whose signs indicate promotion or inhibition.
In this section, we explain how a Petri net with signed links can provide a mechanism for a regulatory network.This involves constructing a functor from Petri nets with signed links to signed graphs, approximating the former as the latter.As a prerequisite, we need a precise definition of a Petri net with links.
Definition 2.11 (Petri net with links).The schema for Petri nets with links is the category Sch(LPetri) freely generated by these objects and morphisms: A Petri nets with links is a functor P : Sch(LPetri) → Set, and a morphism of these is a natural transformation.A morphism ϕ : P → Q preserves arities if the naturality squares associated with the morphisms I → T and O → T are also pullback squares: Petri nets with links and their morphisms form the category LPetri.
To explicate the definition, a Petri net with links P consists of between the output arcs from t and from ϕ T (t).This property seems appropriate for many purposes, including in biochemistry, but for mathematical convenience we will not always assume it.
Remark 2.12 (Related literature).While not appearing in the literature in precisely this form, our definition of a Petri net with links is closely related to several existing concepts.Kock has described Petri nets as copresheaves on a category with objects S, T, I, O [Koc22], calling them whole-grain Petri nets to distinguish them from classical Petri nets, whose semantics are subtly different [Bae+21].Meanwhile, the concept of a link is essential to stock and flow diagrams, originating in the field of system dynamics [For61; Ste00] and recently given a rigorous categorical account [Bae+22].
The classical literature on Petri nets has also considered Petri nets equipped with positive/context and negative/inhibitory arcs [AF73], called inhibitor nets [Hac76;Bal+04].Roughly speaking, our Petri nets with signed links are related to inhibitor nets ([Bal+04, Definition 1]) in the same way that Kock's whole-grain Petri nets are related to classical Petri nets; in both cases, working with copresheaves has technical advantages.Finally, we note that the Petri nets with catalysts proposed by Baez, Foley, and Moeller [BFM19] differ significantly from Petri nets with links: the former fix a subset of the species to be catalysts throughout the net, whereas the latter uses links to make catalyzation specific to individual reactions.
Remark 2.13 (Petri nets as typed graphs).Like bare Petri nets, Petri nets with links can be described as graphs with two types of vertices.To see this, take the graph with vertices S and T and edges I, O, and L. The category of Petri nets with links and natural transformations is isomorphic to the slice category Graph/T LPetri .Moreover, the schema category Sch(LPetri) is isomorphic to the category of elements of the functor T LPetri : Sch(Graph) → Set, exemplifying a general fact about slices of copresheaf categories [Str00, Remark p. 303].
Petri nets with signed links are defined analogously to signed graphs (Definition 2.2).
Definition 2.14 (Petri nets with signed links).The category of Petri nets with signed links is the slice category SgnPetri := LPetri/P Sgn , where P Sgn is the Petri net with links having one species, one transition, one input arc, one output arc, and two links, namely the elements of Sgn.
Incidentally, the morphism P → P Sgn defining a Petri net with signed links does not preserve arities unless every transition in P has exactly one input and one output.
We now turn to the main construction of this section, a functor that sends a Petri net with signed links to the signed graph of interactions implied by the net.On the example in Equations ( 14) and (15), this functor gives the signed graph In general, the resulting signed graph has the Petri net's species as vertices, and has signed edges of the following four types:  All four cases are visible in the example of Equation ( 16).Each of these cases is detected by a representable functor of the form Hom LPetri (P, −) : LPetri → Set, where P is one of the four Petri nets with links shown in Figure 2.Each net represents a "pattern" whose matches produce edges in the signed graph.
The resulting functor SgnPetri → SgnGraph, which restricts on vertices to the functor picking out the set of species of the Petri net (representable by the Petri net with one species and no transitions) and restricts on edges to the disjoint union of the four representable functors described above, has the form of a familially representable functor between copresheaf categories.This type of functor has been studied extensively within both pure (see, for instance, [Lei04, Appendix C]) and applied category theory (see [Spi21]).To be consistent with our existing notation and to emphasize that such functors have a useful computational interpretation, we adopt Spivak's perspective that they are data migration functors.In this framing, the schema category of a copresheaf category is regarded as the schema for a database, a copresheaf on that category is regarded as a database instance on the schema, and representable functors from the copresheaf category to Set are regarded as conjunctive queries.A data migration functor between copresheaf categories is then one which restricts on each component of the codomain to a disjoint union of conjunctive queries, or duc-query.
In order to apply this theory and precisely define the functor SgnPetri → SgnGraph, we fully schematize the definitions of signed graphs and Petri nets with signed links.The schema for signed graphs is the category Sch(SgnGraph) freely generated by these objects and morphisms: A signed graph as in Definition 2.2 is equivalent to a functor X : Sch(SgnGraph) → Set such that X(A) = Sgn, the set of signs, and X(neg) : Sgn → Sgn is negation (i.e., multiplication by −1).Note that negation is not needed to define the data of a signed graph but is relevant to the data migration.A morphism of signed graphs X → Y is a natural transformation ϕ : X → Y whose component at A is the identity function, ϕ A = 1 Sgn .We thus obtain a category isomorphic to SgnGraph.
Similarly, the schema for Petri nets with signed links is the category Sch(SgnPetri) freely generated by: S A Petri net with signed links, as in Definition 2.14, is equivalent to a functor P : Sch(SgnPetri) → Set such that P (A) = Sgn, the map P (neg) : Sgn → Sgn is negation, and P (one) : P (T ) → Sgn is the constant map at +1.Again, these maps are needed for data migration, not for the data itself.A morphism of Petri nets with signed links is a natural transformation ϕ : P → Q such ϕ A = 1 Sgn , yielding a category isomorphic to SgnPetri.
With these preliminaries, we can construct the "interactions functor," called "Int" for short, from Petri nets with signed links to signed graphs.

Proposition 2.15 (Interactions functor). A functor
Int : SgnPetri → SgnGraph is specified by the following functor from Sch(SgnGraph) to the category of duc-queries on Sch(SgnPetri): According to the theory of data migration [Spi21, Corollary 2.3.6],giving a parametric right adjoint Set D → Set C is equivalent to giving a functor from C to ⨿((Set D ) op ), the free coproduct completion of the free limit completion of D. Our functor C → ⨿((Set D ) op ) is defined by Equation (17).The assignment of E ∈ C can also be described as the sum of the four representables associated with the Petri nets with links in Figure 2.
Finally, the assignments A → A and neg → neg ensure that if P is a copresheaf on D with P (A) = Sgn and P (neg) is negation, then applying this parametric right adjoint functor to P yields a copresheaf X on C where again X(A) = Sgn and X(neg) is negation.Thus, this functor between copresheaf categories restricts to a functor SgnPetri → SgnGraph as claimed.
Using the interactions functor, we can give a formal account of what it means to have a mechanistic model for a regulatory network.

Definition 2.16 (Mechanism).
A mechanistic model for a regulatory network X is a Petri net with signed links P together with an occurrence of X in Int(P ), i.e., a monic signed functor X ↣ Int(P ).
For example, the Petri net with signed links in Equation ( 15) is a mechanistic model for a regulatory network in which A and D participate in a positive feedback loop: The next example is inspired by activation and inhibition of enzymes [Ing13, Chapter 3].Besides being of greater biological interest, it shows why Petri nets with links are better suited than bare Petri nets to describe mechanisms.
Example 2.17 (Enzyme inhibition).Suppose that an enzyme E catalyzes the conversion of a substrate S into a product P , and that an inhibiting agent I transforms the chemical configuration of the reactive enzyme E into the inert compound F .Then the agent I inhibits the product P : As a first attempt to model these interactions, consider the following Petri net without links.3 Quantitative analysis: parameters and dynamics

Parameterized dynamical systems
Pioneering the idea of functorial semantics for scientific models, Baez and Pollard extended the mass-action model of reaction networks to a functor from the category of Petri nets with rates into a category of dynamical systems [BP17].In this picture, the reaction rate coefficients are known constants associated with the reaction network.In practice, however, rate coefficients are often unknown and must be extracted from existing literature or estimated from experimental data.We therefore change our perspective slightly and consider dynamical systems not in isolation but as parameterized families.This shift also turns out to have formal advantages: the category of parameterized dynamical systems is better behaved than the category of dynamical systems, which has too few morphisms.

Lemma 3.1 (Dynamics).
There is a functor Dynam : FinSet → Vect R that sends • a finite set S to the vector space of algebraic vector fields v : R S → R S , where algebraic means that the components of the vector field are polynomials in the state variables; • a function f : S → S ′ between finite sets to the linear transformation where the linear map and the linear map Proof.The functor Dynam : FinSet → Vect R can be constructed as the composite functor where F : FinSet → Vect R , X → R X is the free vector space functor (restricted to finite sets); D : FinSet op → Vect R is the dual vector space functor (restricted to F ), whose underlying set-valued and Poly R (−, −) is the Vect R -valued hom-functor that sends a pair of vector spaces to the vector space of polynomial functions between them.4 The dynamics functor is the same one studied by Baez and Pollard except that we take the vector space, rather than merely the set, of vector fields.That is because we are interested in linearly parameterized dynamical systems.In calling the functor "dynamics," we implictly identify a vector field with the differentiable dynamical system that it generates.This common practice is not entirely innocent since even when a system of differential equations depends linearly on parameters, its solutions rarely do.We also note that the restriction to algebraic vector fields, as opposed to smooth or even just continuous ones, is inessential but suffices for us and agrees with Baez-Pollard.
The dynamics functor is the main building block in constructing a category of parameterized dynamical systems.

Definition 3.2 (Linear parameterizations). The category of linearly parameterized dynamical systems is the comma category
Para(Dynam) := F/ Dynam, where F : FinSet → Vect R , X → R X is the free vector space functor restricted to finite sets.So, by definition, a linearly parameterized dynamical system consists of a finite set P , the parameter variables, and a finite set S, the state variables, together with a linear map v : R P → Dynam(S) sending each choice of parameters θ ∈ R P to an algebraic vector field v(θ).In more conventional notation, we can write v(x; θ) := v(θ)(x) for x ∈ R S and θ ∈ R P .A morphism (P, S, v) → (P ′ , S ′ , v ′ ) of linearly parameterized dynamical systems is a pair of functions q : P → P ′ and f : S → S ′ making the square commute, or equivalently making the equation hold for all x ′ ∈ R S ′ and θ ∈ R P .
While certainly not all dynamical models depend linearly on their parameters, a great many of them do, including several important canonical models in biology and chemistry.The law of mass action defines dynamical systems that depend linearly on the rate coefficients.The generalized Lotka-Volterra equations, studied in the next section, are linear in the rate and affinity parameters.Of course, the mass-action and Lotka-Volterra equations are nonlinear ODEs; linearity of a vector field in state or in parameters are separate matters.Nevertheless, even for nonlinear models such as Lotka-Volterra, linearity in parameters is a useful assumption that aides in the identifiability analysis of the model [SRS14,§5].
To express important physical constraints and to define a semantics for signed graphs, we will restrict the dynamical system and its parameters to be nonnegative.This is straightforward enough but requires a bit of additional formalism.
Write R + := {x ∈ R : x ≥ 0} for the semiring of nonnegative real numbers.A module over R + is called a conical space, and the category of conical spaces and conic-linear (R + -linear) maps is denoted Con := Mod R+ .A conical space is a structure in which one can take linear combinations with nonnegative real coefficients, just as a real vector space (R-module) is a structure in which one can take linear combinations with arbitrary real coefficients.Any convex cone in a real vector space is a conical space.Our main example is the nonnegative orthant of R S for some set S: the function space R S + := {x : S → R + }, with conical combinations taken pointwise.A real vector space can itself be regarded as a conical space; more precisely, the inclusion of semirings R + → R induces a forgetful functor Vect R → Con by restriction of scalars.
Recall that a dynamical system is nonnegative if whenever the initial condition is in the nonnegative orthant, its trajectory always remains in the nonnegative orthant.A dynamical system of form ẋ = v(x) is nonnegative if and only if v i (x) ≥ 0 whenever x ≥ 0 componentwise and x i = 0 [HCH10, Proposition 2.1], in which case the vector field v is called essentially nonnegative [HCH10, Definition 2.1].Using this criterion, it is easy to see that a reaction network with massaction kinetics is nonnegative assuming the rate constants are nonnegative, as is a Lotka-Volterra system for any choice of parameters.Hence both systems satisfy the obvious physical constraint that no species should have negative concentration or population.

Lemma 3.3 (Nonnegative dynamics).
There is a functor Dynam + : FinSet → Con that sends a finite set S to the conical space of essentially nonnegative, algebraic vector fields v : R S → R S and sends a function f : Proof.The proof is similar to that of Lemma 3.1.It is clear that the essentially nonnegative functions are stable under pointwise conical combinations, hence form a conical space.(They are, of course, not stable under arbitrary linear combinations.)We just need to check that if v : R S → R S is essentially nonnegative, then so is the transformed vector field whence the inequality of essential nonnegativity follows: We now define the conical analogue of linearly parameterized dynamical systems.

Definition 3.4 (Conical parameterizations). The category of conically parameterized nonnegative dynamical systems is the comma category
where F + : FinSet → Con, X → R X + is the free conical space functor restricted to finite sets.So, a conically parameterized nonnegative dynamical system consists of finite sets P and S together with a conic-linear map v : R P + → Dynam + (S).Proposition 3.5 (Colimits of parameterized dynamical systems).The categories of linearly and conically parameterized dynamical systems are finitely cocomplete.Moreover, these finite colimits are computed by colimits in FinSet of the parameter variables and of the state variables.To illustrate, we describe the initial object and binary coproducts in Para(Dynam).The initial linearly parameterized dynamical system has no parameter variables, no state variables, and the unique (trivial) vector field on the zero vector space.The coproduct of two linearly parameterized dynamical systems (P 1 , S 1 , v 1 ) and (P 2 , S 2 , v 2 ) has parameter variables P 1 + P 2 , state variables S 1 + S 2 , and parameterized vector field where ι 1 : S 1 → S 1 + S 2 and ι 2 : S 2 → S 1 + S 2 are the canonical inclusions.In conventional notation, the coproduct system has parameterized vector field The proof of Proposition 3.5, as well as of Theorems 3.7 and 3.8 below, depends on the following technical lemma about comma categories, which the reader can omit without loss of continuity.

Lemma 3.6 (Colimits in comma categories
a cospan of categories such that C 0 and C 1 have colimits of shape J and F 0 preserves J-shaped colimits.Then the comma category F 0 /F 1 also has J-shaped colimits, and the projection functors π i : Furthermore, a functor G : X → F 0 /F 1 into the comma category preserves J-shaped colimits whenever the associated functors Proof.Colimits in the comma category F 0 /F 1 are constructed in [RB88, §5.2].To make the rest of the proof self-contained, we recall the construction here.
By the universal property of the comma category, a diagram D : Let (c i , λ i ) be a colimit cocone for the diagram D i in C i , having legs D i (j) so by its universal property, there exists a unique morphism f : F 0 (c 0 ) → F 1 (c 1 ) making the squares commute: Setting λ := (λ 0 j , λ 1 j ) j∈J , the cocone ((c 0 , c 1 , f ), λ) can be shown to be a colimit of the diagram D. To prove the last statement about colimit preservation, let D : J → X be a diagram with colimit cocone (x, λ), having legs Dj λj −→ y for j ∈ J.We must show that its image cocone (G(x), G * λ) is a colimit of the diagram G • D in F 0 /F 1 .By the universal property of the comma category, the functor G : X → F 0 /F 1 is equivalent to the functors G i : X → C i , i = 0, 1, along with a natural transformation ⃗ G : The image cocone (G(x), G * λ) then amounts to cocones (G 0 (x), G 0 * λ) and (G 1 (x), G 1 * λ), which by hypothesis are colimits of the diagrams G 0 • D and G 1 • D in C 0 and C 1 , together with a family of commutative squares in C: But a morphism ⃗ G x making all these squares commute is already uniquely determined by the universal property of the colimit cocone (F 0 (G 0 (x)), F 0 * G 0 * λ) for the diagram F 0 • G 0 • D, using the hypothesis that F 0 preserves J-shaped colimits.Indeed, this is precisely how one constructs the colimit of the diagram G • D in F 0 /F 1 , as shown above.It follows that (G(x), G * λ) is a colimit cocone for G • D.

The Lotka-Volterra dynamical model
A Lotka-Volterra system with n species has, using matrix notation, the vector field v(x; ρ, β) := x ⊙ (ρ + βx) = diag(x)(ρ + βx) with state vector x ∈ R n and arbitrary real-valued parameters ρ ∈ R n and β ∈ R n×n [SMH18, §2.2].In coordinates, the vector field is The parameter ρ i sets the baseline rate of growth (when positive) or decay (when negative) for species i, whereas β i,j defines a promoting (when positive) or inhibiting (when negative) effect of species j on species i.In typical applications the signs of the parameters are fixed and known in advance of any data.For example, in the famous predator-prey Lotka In this section, we define quantitative semantics for graphs and signed graphs using the Lotka-Volterra dynamical model.To illustrate the main ideas, we first construct a functor from finite graphs (Definition 2.1) to linearly parameterized dynamical systems (Definition 3.2), giving a semantics for unlabeled graphs.It is more useful to have a semantics for regulatory networks, which we have defined to be signed graphs.We therefore construct a second functor from finite signed graphs (Definition 2.2) to conically parameterized nonnegative dynamical systems (Definition 3.4).
Recall that a graph is finite if its vertex and edge sets are both finite.Let FinGraph denote the full subcategory of Graph spanned by finite graphs.• a finite graph X to the linearly parameterized dynamical system with parameter variables P := X(V ) + X(E), state variables S := X(V ), and algebraic vector field parameterized by vectors ρ ∈ R X(V ) and β ∈ R X(E) ; • a graph homomorphism ϕ : X → Y to a morphism of systems with parameter variable map Moreover, the functor LV preserves finite colimits.
Proof.By the universal property of the comma category Para(Dynam) = F/ Dynam, to give a functor LV : FinGraph → Para(Dynam) is to give a pair of functors LV 0 , LV 1 : FinGraph → FinSet along with a natural transformation We set LV 0 (X) := X(V ) + X(E) and LV 1 (X) := X(V ).Using the universal property of the coproduct in Vect R , the components of the transformation ⃗ LV themselves decompose into two parts, call them We define these to be β(e) x(X(src)(e)) x(i).
Putting the pieces back together reproduces the first statement of the theorem.We just need to check that the transformation ⃗ LV is, in fact, natural.Given a graph homomorphism ϕ : X → Y , the naturality square for the transformation ⃗ LV is which decomposes into two squares, Let us check that both squares commute.For the first, we have for all y ∈ R Y (V ) , ρ ∈ R X(V ) , and j ∈ Y (V ).For the second, we have β(e) y(ϕ V (X(src)(e))) y(j) β(e) y(Y (src)(ϕ E (e))) y(j) E) , and j ∈ Y (V ).When exchanging the order of the summations we have used the facts that the graph homomorphism ϕ : X → Y preserves sources and targets, the latter in its contravariant form where P(S) denotes the power set of a set S. Finally, we must verify that the functor LV preserves finite colimits.By Lemma 3.6, that happens provided both functors LV 0 , LV 1 : FinGraph → FinSet preserve finite colimits.The functor LV 1 = ev V is an evaluation functor on a copresheaf category, hence preserves colimits [Rie16, Proposition 3.3.9].Since coproducts commute with colimits, the pointwise coproduct of two evaluation functors also preserves colimits.This completes the proof.
A quantitative semantics for signed graphs can be defined similarly, subject to a caveat about the vertex parameters.Our notion of signed graph, designed to capture regulatory networks as studied in the biochemistry literature, attaches signs only to edges.We are thus led to assume that, in the Lotka-Volterra dynamical model, all species have baseline rates of decay rather than growth.This assumption is valid for some, though certainly not all, regulatory networks [TN10, p. 222].It is not suitable for predator-prey models in ecology.
Baseline rates of growth or decay could, if needed, be parameterized more flexibly.Most simply, one could attach signs to vertices as well as edges and use them in the quantitative semantics.Alternatively, at the expense of a more cumbersome formalism, one could define dynamical systems with mixed linear-conical parameterizations, allowing the vertex parameters to be arbitrary real numbers while the edge parameters are constrained to be nonnegative. 6For simplicity and uniformity of presentation, we do not describe these extensions further.
Let FinSgnGraph denote the full subcategory of SgnGraph spanned by finite signed graphs.to the parameterized dynamical system with state variables {R, * } and parameters ρ, β ∈ R {R, * } + , in two different but equivalent ways.The first way sets the latter system's coefficients equal to sums of the former's coefficients, namely The second way substitutes x * for each x i , i ∈ S, in the first system and then takes the vector field v * to be the sum of the v i 's, i ∈ S, with these substitutions.The equivalence of these operations is precisely the condition for LV(p) to be a morphism of parameterized dynamical systems, cf.Equations ( 18) and (19).

Composing Lotka-Volterra models
To complete this part of the story, we extend the Lotka-Volterra dynamics functors between graphs and parameterized dynamical systems, constructed in Theorems 3.
, which consist of a morphism (q, f ) : (P, S, v) → (P ′ , S ′ , v ′ ) between linearly parameterized dynamical systems along with functions f 0 : A 0 → A ′ 0 and f 1 : A 1 → A ′ 1 making the diagram commute: Proof.We do the construction for linearly parameterized dynamical systems.The construction for conically parameterized nonnegative dynamical systems is perfectly analogous, replacing R with R + and vector spaces with conical spaces.

Vertical composition is by composition in
The projection functor π S : Para(Dynam) → FinSet, (P, S, v) → S that sends a linearly parameterized dynamical systems to its set of state variables has a left adjoint Z : FinSet → Para(Dynam) that sends a finite set S to the system (∅, S, 0) with empty set of parameter variables.By linearity, its parameterized vector field 0 ∼ = R ∅ → Dynam(S) is necessarily the zero vector field.This indeed gives an adjunction Z ⊣ π S , because to any function f : S → S ′ and linearly parameterized dynamical system (P ′ , S ′ , v ′ ) there corresponds a unique morphism (0 P ′ , f ) : Z(S) → (P ′ , S ′ , v ′ ), where the compatibility square 0 Dynam(S) commutes trivially, since the zero vector space is initial in Vect R .Therefore, since Para(Dynam) has finite colimits (Proposition 3.5), we can construct a symmetric monoidal double category of Z-structured cospans [BC20, Theorem 3.9], which is isomorphic to Open(Para(Dynam)) by arguments given before.
We can now construct double functors between open graphs and open parameterized dynamical systems, but the vertex parameters under Lotka-Volterra dynamics cause a twist in the story compared to Baez and Pollard's compositionality result for mass-action kinetics of open Petri nets [BP17,Theorem 18].When composing open dynamical systems in the image of the Lotka-Volterra functor, one takes a coproduct of the parameter variables, i.e., a direct sum of the parameter spaces, belonging to identified vertices.However, if one composes the open graphs first, then the identified vertices receive a single copy of the parameters from the Lotka-Volterra functor.Thus this functor does not preserve composition of open systems, not even up to isomorphism.Nevertheless, there is a (noninvertible) comparison between the two: given a pair of vertex parameters in the direct sum, we can reduce them to a single parameter simply by summing them.In mathematical terms, we get a lax double functor: a double functor that strictly preserves vertical composition, as usual, but preserves horizontal composition only up to specified comparison cells.7While this laxness could be seen as a failure of compositionality, it is at most a very mild and well controlled failure.It is better regarded as a bookkeeping device for the vertex parameters.To see that this double functor is the same one in the theorem statement, we once again use the adjunctions to pass between L-structured and R-decorated cospans (recalling terminology introduced in the proof of Proposition 2.4).Notice that the natural transformation α has as its mate [CGR14, §1] the identity transformation ᾱ = 1 ev V :

FinSet FinGraph
FinSet Para(Dynam) Thus the action of the double functor F := LV on L-structured cospans simplifies to the identity when translated to R-decorated cospans.
L(A 0 ) X L(A 1 ) A similar statement holds for the action of the double functor on morphisms of L-structured and R-decorated cospans.

Conclusion
Summary.Regulatory networks are a minimalistic but widely used tool to describe the interactions between molecules in biochemical systems.We have made the first functorial study of regulatory networks, formalized as signed graphs, and their connections with other mathematical models in biochemistry.Among such models, we have studied reaction networks, formalized as Petri nets with signed links, and parameterized dynamical systems, focusing on Lotka-Volterra dynamics.
The major categories of this paper, and the functors between them, are summarized in the following diagram, where "LV" is the Lotka-Volterra dynamics functor ( §3.2).Outlook.Of many possible directions for future work, we mention a few.As noted in the introduction, Lotka-Volterra dynamics are only one of numerous dynamics that could be considered as a canonical model for regulatory networks, and they are not even among the most commonly studied in the biochemistry literature [TLK19].It would be desirable to have dynamics functors for regulatory networks that draw on more flexible or more biologically plausible classes of dynamical systems.In another direction, the two halves of this paper-qualitative and quantitative-are not as tightly as integrated as one might hope.How does the presence of a motif in a regulatory network, such as an incoherent feedforward loop perhaps even of a specific type, manifest in the continuous dynamics of that network?Put in category-theoretic terms, the Lotka-Volterra dynamics functor is defined on signed graphs; how does it relate to the freely generated signed categories in which motifs are expressed?These intriguing questions are suggestive of "feedback loop analysis" in the field of system dynamics [Ric95], to which stronger connections should be made.This project fits into a broader program by applied category theorists and other scientists that aims to systematize, in a completely precise way, the language and methods of describing, comparing, and composing scientific models in different domains.Within biology, the field of systems biology has advocated for a holistic view of complex biological systems that emphasizes composition as much as reduction.We believe that category theory has a role to play in this endeavor by bringing mathematical precision to compositional and structural aspects of modeling that are traditionally thought to be outside the realm of mathematics.

Definition 2. 2 (
Signed graphs).The category of signed graphs is the slice categorySgnGraph := Graph/Sgn, where, by abuse of notation, Sgn is regarded as a graph with one vertex and two loops.
into open regulatory networks, as defined in Proposition 2.10 above, we will regard Compositionality, Volume 6, Issue 2 (2024) the SA signaling subsystem as having no inputs and one output as follows.
only thing left to do is compose (from left to right) these open regulatory nets.Starting with Equation (6), we compose it with the left part of Equation (7) by first putting them side by side and identifying the intermediate sets we then remove, together with its outgoing arrows, while identifying the vertexes they connect.slightly for a better visualization, we obtain the open regulatory network that results from the composition: corresponds to the open regulatory network governing the biotic responses (cf.Equation (2)).
As a first example, Alon identifies four types of incoherent feedforward loop (FFL) involving three components, Hom(A, −) : (SgnGraph Path ) m → Set, where (SgnGraph Path ) m denotes the wide subcategory of monomorphisms in SgnGraph Path .The functorality implies that, for any motif A, a monomorphism between regulatory networks induces a map between instances of A in those networks.We now extend the construction of open signed graphs to open signed categories.Proposition 2.9.The category of signed categories is complete and cocomplete.Proof.Because the category Cat is complete and cocomplete [Rie16, Proposition 3.5.6],its slice SgnCat = Cat/Sgn is also [Rie16, Proposition 3.5.5].

•
a set P (S) of species; • a set P (T ) of transitions; • a set P (I) of input arcs going from species to transitions, via maps P (src I ) : P (I) → P (S) and P (tgt I ) : P (I) → P (T ); • a set P (O) of output arcs going from transitions to species, via maps P (src O ) : P (O) → P (T ) and P (tgt O ) : P (O) → P (S); and finally • a set P (L) of links going from species to transitions, via maps P (src L ) : P (L) → P (S) and P (tgt L ) : P (L) → P (T ).The property of preserving arities, called "etale" by Kock [Koc22, §3.4], means that a morphism ϕ : P → Q of Petri nets with links preserves the input and output arities of all transitions.Namely, for each transition t in the net P the map ϕ I : P (I) → Q(I) restricts to a bijection between the input arcs to t and to ϕ T (t), and similarly the map ϕ O : P (O) → Q(O) restricts to a bijection (a) for every input-output pair to a transition, a positive edge from input to output; (b) for every input to a transition, a negative self loop, representing consumption by the reaction; (c) for every signed link, an edge of opposite sign going from the linked species to each input to the linked transition; (d) for every signed link, an edge of equal sign going from the linked species to each output from the linked transition.

Figure 2 :
Figure2: Four different Petri nets with links.For each of these instances P , evaluating the representable functor Hom LPetri (P, −) : LPetri → Set gives the edges for one case in the case analysis that defines the functor from Petri nets with signed links to signed graphs (Proposition 2.15).
We will define the functor Int : SgnPetri → SgnGraph as the restriction of a functor Set D → Set C between the categories of copresheaves on D := Sch(SgnPetri) and C := Sch(SgnGraph).In fact, the functor Set D → Set C is of the special kind known as a parametric right adjoint [Str00, Definition p. 311] or a familially representable functor [Lei04, Appendix C].

P
One might expect this Petri net to provide a mechanism for the inhibition of P by I, but at least according to our definition, it does not.Applying the functor Int : SgnPetri → SgnGraph yields the regulatory network is no occurrence of the desired inhibition.If instead we allow links, the reaction catalyzed by E should be written as having input S, output P , and a link from E to the transition.A similar change is required for the reaction involving E, F , and I.A better model of the reactions is thus the following Petri net with links.an occurrence of I inhibiting P .

Proof.
The category FinSet has finite colimits and the functors F : FinSet → Vect R and F + : FinSet → Con preserve finite colimits, since they are composites of the inclusion FinSet → Set with the set functors on vector spaces and conical spaces.By Lemma 3.6 below, the comma categories Para(Dynam) = F/ Dynam and Para(Dynam + ) = F + / Dynam + have finite colimits, which are preserved by the projection functors onto FinSet.

Theorem 3. 8 (
Lotka-Volterra model for finite signed graphs).There is a functor LV : FinSgnGraph → Para(Dynam + ) with state variables {R} + S and parameters ρ, β ∈ R {R}+S + 7 and 3.8, to double functors between open graphs and open parameterized dynamical systems.We begin by making parameterized dynamical systems into open systems.By "open systems," we mean dynamical systems that have specified interfaces along which they can share material with other systems.Proposition 3.9 (Open parameterized dynamical systems).There is a symmetric monoidal double category of open linearly parameterized dynamical systems, Open(Para(Dynam)), having • as objects, finite sets A, A ′ , . . .; • as vertical morphisms, functions f : A → A ′ ; • as horizontal morphisms, open linearly parameterized dynamical systems, which consist of a linearly parameterized dynamical system (P, S, v : R P → Dynam(S)) along with a cospan A 0 ℓ0 − → S ℓ1 ← − A 1 whose apex is the set S of state variables; • as cells, morphisms of such open systems (P, S, v, ℓ 0 , ℓ 1 ) → FinSet and in Para(Dynam).Horizontal composition and monoidal products are by pushouts and coproducts in Para(Dynam), respectively, interpreting the finite sets in the feet of the cospans as linearly parameterized dynamical systems with no parameter variables and identically zero vector fields.Similarly, there is a symmetric monoidal double category Open(Para(Dynam + )) of open conically parameterized nonnegative dynamical systems.
Most of the main results extend from closed systems to open systems, which compose by gluing along their boundaries.Of the diagram above, we have extended the following parts to double categories of open systems and double functors between them.The Lotka-Volterra double functor is lax; the others are pseudo.Open(SgnCat) Open(SgnGraph) Open(FinSgnGraph) Open(Para(Dynam + )) ( §3.3) LV Path MM94,  §IV.6].In the next section we will consider a more flexible notion of morphism between signed graphs.Colimits of signed graphs can be used to construct a category, or rather a double category, of open signed graphs.Composition of open signed graphs formalizes the process of building large regulatory networks from smaller pieces, including network motifs.