Towards an Analytic Framework for System Resilience Based on Reaction Networks

Reaction network is a promising framework for representing complex systems of diverse and even interdisciplinary types. In this approach, complex systems appear as self-maintaining structures emerging from a multitude of interactions, similar to proposed scenarios for the origin of life out of autocatalytic networks. The formalism of chemical organization theory (COT) mathe-matically speciﬁes under which conditions a reaction network is stable enough to be observed as a whole complex system. Such conditions specify the notion of organization, crucial in COT. In this paper, we show that the structure and operation of organizations can be advanced towards a formal framework of resilience in complex systems. That is, we show that there exist three fundamental types of change (state, process


Introduction
An important challenge of our century is to understand the structural conditions under which systems become sustainable and resilient. Complex system literature seeks for conditions that can provide an answer independent of the nature of the system in question. Sustainable systems are conceived as being capable of sustaining indefinitely, making efficient use of critical resources and recycling whatever is possible. When a system not only self-maintains but also grows in a mutually constructive relationship with its milieu, it fulfills the ideal of sustainable development [1,2]. Ecosystems normally develop in a sustainable way with an approximately constant level of resource income [3]. Economic systems, on the other hand, although they self-maintain and grow, are often unsustainable: they consume more of certain resources than they produce. erefore, they are likely to collapse when the resource reserve is eventually exhausted. For example, the Middle East and North Africa's (MENA) economy is largely relying for its energy on oil and other fossil fuels that are in limited supply and cannot be renewed [4]. On the other hand, when an unsustainable economic system persists and is deemed too big to fail irrespective of the imbalance it brings about, it becomes destructive. Creating a sustainable economy means shifting to resources that are renewable, either through a dependable external input (e.g., wind energy) or through recycling within the network (e.g., biofuel derived from plants grown and harvested by the system) [5]. While it is best known for physical resources, the challenge of sustainability applies to all systems, including social and informational. Each human organization, large or small, in instituting a boundary between itself and its respective milieu engages with this very question: can it develop in a simultaneously self-constructive and non-exploitative manner?
Complex systems should not just be able to maintain themselves in ideal circumstances; they should also be able to return to self-maintenance when pushed away from this desired state by external challenges. Such capacity for a system to recover efficiently from stressful circumstances is called resilience [6][7][8]. Resilient systems should be able to return to their preferred configuration even when confronted with serious perturbations that destroy or change some of their components, thus making them deviate from this configuration. us, dependably resilient systems can be seen as goal-directed in the cybernetic sense, with maintenance of their essential organization as the implicit goal that they will defend against internal and external perturbations [9,10]. at is necessary to make them impervious to dangers such as the error catastrophe and the lack of critical resources that threaten the survival of autocatalytic networks in common scenarios for the origin of life. As the range of circumstances with which the system has to deal expands, its strategies will need to become more complex. us, as it evolves and learns to cope with increasingly diverse and complex perturbations, its behavior will appear increasingly intelligent [11] and directed at increasingly more difficult to reach goals. To understand how such resilient systems could have evolved out of non-directed causal processes, we need to analyze, first, the precise features that determine resilience and, then, the steps by which these features could have been acquired. e sustainability and resilience of a complex system should be seen as two sides of the same coin, since both are necessary for the system to thrive. However, conceptual and mathematical modeling of both aspects simultaneously remains difficult because of lack of integration between various theoretical constructs and available formalisms. Reaction networks (RNs) have been proposed as a general language for modeling complex systems [12][13][14][15]. In particular, by applying an analytical framework for reaction networks called chemical organization theory (COT), it is possible to compute the set of possible observable systems within a reaction network universe, i.e., systems that persist sufficiently long so that they can be identified and observed. ese sufficiently stable systems are called organizations. ey correspond to structurally closed and self-maintaining sub-networks of the reaction network [16,17]. Such operational closures maintained by the otherwise interconnected and interdependent systems are captured by the concept of autopoiesis. Autopoiesis ("self-production") refers to selfmaintaining dynamics that can be observed in systems as diverse as individual organisms, populations, ecosystems, economies, cities, cultures, institutions, legal frameworks, information systems, and so on. Since the sustainability of a complex system depends on the interplay between such formations operating at different levels or scales, a formal language capable of modeling sustainability must be applicable to each of their respective heterogeneous dynamics, as well as their mutual dependencies.
While the COT formalism elegantly describes what makes a reaction network sustainable, it does not yet explain what would make it resilient, i.e., able to cope with perturbations. In this paper, we first elaborate on a deeper view of what a perturbation means by reviewing the different kinds of perturbations that exist, next we review structural results on COT which allow to link the different kinds of perturbations to the structure and stability of the reaction network, and then we elaborate a qualitative dynamical analysis based on computational simulations of the perturbations and the dynamical responses of a toy-model reaction network. Namely, we show that the resilience of a reaction network do not only depends on its structure but also on how it is operated. is operation is described by the processes applied to the reaction network, and that certain non-intuitive behaviors can happen.
is last aspect opens important questions towards the development of a formal framework for resilience in complex systems. Regarding the deeper understanding of perturbations, we show that reaction networks can be subjected to three fundamentally different types of environmental perturbations: change of state, meaning variation in the values of the defining variables (quantity of the different "species"); change of process, meaning variation in the way the network operates; and change of structure, meaning addition or elimination of reactions and species. Regarding the review of structural results, we review the decomposition theorem for reaction networks and explain how it helps to identify the impact of, and the potential responses to, perturbations of the different kinds. Regarding the qualitative analysis, we develop a toy-example reaction network that models the productive processes of a farm involving use of resources such as grass and water, production of goods such as milk and eggs, and operative actions such as selling goods or investing in infrastructure that can sustainably operate in different ways, for example, either seeking for optimizing profit or optimizing sustainable growth. We then study the effects of the different kinds of perturbations on the farm depending on the way it operates. is leads us to a formal framework for developing and assessing the success of potential mitigation strategies, represented as state, process, or structural counterperturbations.
In Holling's approach, resilience is intricately linked to "external shocks" that provoke changes within the "internal ecosystem" of the system of interest. e latter reflects an important characteristic about the nature and complexity of homeostatic processes in an ecosystem. In this version of resilience, homeostatic processes are considered to be an umbrella term for Holling's "changes of state variables, driving variables, and parameters." Resilience according to Holling has two distinct end points: (a) persistence as a function of "ability to absorb changes of state variables, driving variables, and parameters," and (b) probability of extinction (i.e., which opens space for alternative methods that have "persistence intention" or "transformative intentions" at heart). One important feature to reach these resilient conditions is anticipating a system's recovery response by sole measurement of its ability to throw off the impact of shocks on its growth path or by its potential to throw it off its growth [19].
In [6], resilience is defined as "the capacity of a system to absorb shocks and reorganise while undergoing change so as to still retain essentially the same function, structure, identity, and feedback." In this classic paper, resilience as a collective variable is characterized by four different dimensions, namely, latitude, resistance, precariousness, and cross-scale dynamics. ese aspects have been modeled from the perspective of dynamical systems by elaborating on the notion of attractor and its surrounding basin of attraction [20]. Latitude measures the room that perturbations have to push the system away from its present attractor but without leaving the basin. As long as it stays within the basin, the dynamics will anyway bring the system back to the attractor, thus automatically absorbing the perturbation. For example, the presence of high biodiversity in an ecosystem makes it possible for the replacement of lost species if and when perturbations occur, providing more latitude for manoeuvring in the overall system.
Resistance represents the effort needed or difficulty for a perturbation to change the state of the system. In contrast to latitude, resistance is mostly related to the kinds of negative feedback mechanisms that a system has developed in the course of its history in order to suppress perturbation. Precariousness refers to the closeness of the current system's state to a limit or threshold (typically the boundary separating the present basin from one leading to a different attractor) beyond which it would no longer be able to operate. For example, the human body is precarious in the sense that if its internal temperature would be increased with just a few degrees, it would not be able to survive. Yet, it is a highly resistant system because it has evolved a very effective mechanism of temperature regulation to suppress such temperature changes. Finally, cross-scale dynamics refer to a system's dependence at a particular focal scale on the influences of states at scales above and below. Cross-scale relations also refer to the ways latitude, resistance, and precariousness are influenced by the states and dynamics of the (sub) systems at scales above and below the scale of interest [6].
Resilience has also been measured and defined as a measure of complementary stress [21], as the pull strength of a basin of attraction in behavioral development literature [22], and as the width of a basin of attraction [23]. Scheffer in [23] elaborates on the latter form as follows: "the width of the basin of attractor indicates resilience of a system and is the magnitude of change that can be accommodated before the system undergoes a quantitative change marked by a critical transition to a different and undesirable state." To avoid a presumably common mistake of equating resilience with robustness/resistance and to encourage adaptive management of resources versus common command and control methods, a further distinction is made between ecological resilience and engineering resilience.
Engineering resilience is focused on the near-equilibrium steady states, where "resistance to disturbance" and "speed of return" to the equilibrium are measures of resilience. While the engineering resilience definition is highly focused on constancy and structural robustness of the system, ecological resilience is focused on the magnitude of disturbances that can be absorbed before the system changes its structure by changing the variables and processes that control its behavior [24,25].
While most literature makes a sharp distinction between these two forms of resilience, one can see that both definitions are concerned with the system's continuity in a time of change. Studying a four-case scenario, including highrisk/low-resilience, high-risk/high-resilience, low-risk/lowresilience, and low-risk/high-resilience profiles, it has been shown that there is a significant difference between risk management and resilience management: "risk management helps the system prepare and plan for adverse events, whereas resilience management goes further by integrating the temporal capacity of a system to absorb and recover from adverse events and then adapt" [26].
Further, attempts to create an offshoot of the resilience concept such as "adaptive resilience," "static resilience," "specific resilience," and "general resilience," have been proposed [8].
As discussed by Scheffer in [23], attention to the memory of a system shifts the discourse of resilience towards adaptability, which is the capacity of people in a socialecological system to manage resilience through collective action, transformability, which refers to a fundamental alteration of the nature of a system once the current ecological, social, or economic condition becomes untenable or undesirable [6], and probability of extinction [18]. Transformability means the ability to create and define a new attractor that directs the development of the system by introducing new components and ways of making a living, thereby changing the state variables and often the scales of key cycles that define the system.
In conclusion, the literature on resilience proposes a wide range of notions that can help us to better understand what resilience is and how it can be formalized but does not as yet propose an integrated theory. Our work intends to advance towards such a theory by providing novel formalizations of the state, process and structure of self-sustaining systems, the corresponding types of perturbations, the effect of these perturbations on the system's self-maintenance, and the potential responses to safeguard that self-maintenance.

Chemical Organization Theory
Chemical organization theory (COT) was developed in the mid-2000s in order to model complex dynamical production systems (such as chemical systems) where new components, so called "species," can appear and disappear [16]. e central element of COT is a structure called "organization," which is defined as a closed and self-maintaining sub-network of reactions that consume and produce species. COT leverages from the fact that there are three increasingly precise, but complex, ways to represent a reaction network. In the simplest relational description of a reaction network, reactions only describe which species are transformed by which reactions.
is level focuses on the connectivity properties of the reaction network using set-theoretical structures, while ignoring the quantitative aspects. In the stoichiometric description of a reaction network, the quantity of each species consumed and produced by a reaction is included. At this level, properties about the dynamical operation of the reaction network within a fixed time span, described by linear-algebraic structures, are of interest. However, there is no information about general time evolution. In the kinetic description of a reaction network, the state of the reaction network is specified by the concentration of each species and is subject to rules to update both the state of the reaction network and the occurrence of reactions over time. is allows determining the time evolution of the system. However, this requires solving a potentially large system of differential or difference equations, implying heavy numerical computation. erefore, COT aims to derive the most important dynamic properties of a reaction network, such as stationary states, attractors, and responses to perturbations, from the description at the stoichiometric and relational levels, where properties can be computed in terms of simpler mathematical structures at a much lower computational cost than in the kinetic level where the actual dynamics occur. For a comprehensive introduction to COT, we refer the readers to [14,16].

Reaction Networks.
Let M � s 1 , . . . , s m be a finite set of m species reacting with each other according to a finite set R � r 1 , . . . , r n of n reactions. e set of species and reactions is called the reaction network (M, R). A reaction r i is represented by with a ij , b ij ∈ N 0 , for i � 1, . . . , n.
Reactions describe which collections of species transform into which new collections. For a given reaction r i ∈ R, the species s j to be transformed, i.e., such that a ij > 0, are called reactants of r, and the species to be created, such that b ij > 0, are called products.
In COT, we focus on the properties of subsets of species X ⊆ M. Note that for all X, there is a unique maximal set of reactions R X ⊆ R defined as the set of all reactions whose reactants are in X. us, each set X induces a sub-network (X, R X ).
As an example of how reaction networks can be used to model non-biochemical systems, consider a farm where farmers have different productive processes based on the available resources, which can be obtained from the environment (water) or grown withing the farm (cows and grass) or obtained as a result of the functioning of the farm (milk and dung) and infrastructure (infrstr), and that the farm acquires money by selling products of such functional processes (milk) to grow more infrastructure. erefore, we might model the latter narrative as a reaction network with the set of species water, grass, cows, infrstr, farmer, milk, dung} and the following reactions (see Table 1).

Closure, Connectivity
, and Semi-Self-Maintenance. In order to trace the formation, persistence, and dissolution of a sustainable reaction network, we first need a formal indication of what is the extent at which it can operate. We introduce the notion of closed set of species to encode the reaction sub-networks (X, R X ) that do not produce species outside X. Definition 1. X is closed iff the products of every reaction in R X are in X [14].
Another interesting property for reaction networks is connectivity. Connected species in X can be seen as potentially co-dependent species in the reaction network because the consumption of one of them might affect the production of all the species connected to it. In general, X can be decomposed into connected modules whose reactions are independent. Definition 2. Two species s j , s k ∈ X are directly connected in X if and only if there exists a reaction r i ∈ R X such that both species are active in the reaction, i.e., s j and s k are reactants or products of r i . We say s j and s k are connected in X if and only if there exists a sequence of species s 0 , . . . , s p ∈ X such that s 0 � s j , s p � s k and for all l � 0, . . . , p − 1, we have that s l and s l+1 are directly connected in X.
It is worth to notice that a closed set might be composed by various disconnected smaller closed sets. In that case, the dynamic operation of the complete reaction network can be understood as the dynamics of independent smaller systems.
{ } and c, d { }. Indeed, identifying independent behavioral modules of a reaction network is useful from both computational and mathematical perspectives because it provides resources for an algorithmic divide-and-conquer strategy and also can deepen the understanding of the structure of the reaction network.
While the notion of closure in Definition 1 corresponds to the notion of a closed system in general system theory, there is another form of operational closure, meaning that the system can self-maintain while also accepting environmental inputs and releasing outputs. Such operational 4 Complexity closure, native to the autopoietic system literature [27], can be represented as semi-self-maintenance.
Definition 3. X is semi-self-maintaining if and only if for each reactant s ∈ X of a reaction r ∈ R X , there is a reaction r ∈ R X such that s is a product of r.
A set of species that is semi-self-maintaining can produce all the species consumed by its associated set of reactions. However, such recreation might not be quantitatively balanced. As an example, consider the reac- In the example, the set a, b { } is semi-self-maintaining but cannot self-maintain quantitatively because every time b is produced from a, 2b are required to compensate such production. In order to clarify how balanced production can occur in a reaction network, we need to formalize how it operates.

Operational Processes.
e dynamics of the reaction network in a given time interval are determined by how much each reaction occurs in the time frame. Indeed, the more a reaction happens, the more their reactants and products will be consumed and produced, respectively. us, the relative frequencies among reactions determine the productive features of the reaction network. A particular specification of the occurrence of reactions within a time interval is called operational process, or simply process, and we denote it by v. In traditional reaction network modeling, v is directly determined by the state of the system and known as flux vector [12]. e notion of process is more general than that of flux vector. Since reactions in our framework are not only of chemical nature, the processes determining the state changes of the reaction network could be not only determined by the state of the system but also driven by decisions of agents or by other external influences such as control systems. Moreover, the time unit at which the process occurs is not necessarily fixed as in traditional reaction network modeling. us, a process corresponds to a non-negative vector v � (v [1], . . . , v[n]), where v[i] specifies the extent at which reaction r i is happening in the time interval in consideration, i � 1, . . . , n.
We say a process v can be applied to X if all the reactions in the process can be triggered by the species in the set X. Hence, v can be applied to X only if v[i] > 0 implies r i ∈ R X , for i � 1, . . . , n.
In order to represent how species are globally transformed in the reaction network by the application of a process, let us represent the state of a reaction network by a vector x of non-negative coordinates such that x[j] corresponds to the number (or concentration) of species of type s j in the reaction network, j � 1, . . . , m. In addition, note that the numbers a ij and b ij in (1) can be used to encode the way in which species are consumed and produced by the reactions. us, we can build a stoichiometric matrix S ∈ N m×n From here, we can compute the new state x v of the reaction network associated to a state x and a process v by the following equation: In the case of discrete dynamics, Sv represents the variation in amount of species over the time interval at which the process occurred. For continuous dynamics, Sv represents the derivative of x with respect to time.

Process Space and Self-Maintenance.
Note that when a process v assigns a non-negative rate to reactions contained in R X only, it can be applied to X. However, v might not be feasible for the dynamical constraints that rule the reaction network. For example, it might be that the current state x does not have enough species to trigger the particular amount of times that a certain reaction is required by the process (lack of reactants) or that some dynamical constrains lead some processes unfeasible [28].
As a simple example, suppose we have a system with two reactions that require the same reactant and produce different products: r 1 � money ⟶ food and r 2 � money ⟶ clothes, that the state of the system is only one unit of the species money, thus x � (1, 0, 0), and that reactions can only occur in discrete numbers. us, the process (1, 1) is unfeasible. Indeed, the only feasible processes under the constrains that rule the dynamics of this situation are v � (1, 0) and (0, 1).
In order to formalize what processes can be successfully applied to the reaction network, we introduce a set of feasible processes Π(R X ) that can be applied to X and call it the process space. Notably, the process space in most chemical systems is determined by the mass-action kinetic law, which states that the rate λ(r) i of reaction r i is given by where k i is the intrinsic reaction rate of r i , x[j](t) is the concentration of species s j at time t, and a ij is the amount of reactants of type s j required to trigger r i (as defined in (1)).
To illustrate this concept, consider the reaction r � 2s 1 + s 2 ⟶ s 3 . e rate of this reaction is given by λ(r, x) � kx [1](t) 2 x[2](t), where k is the intrinsic rate of r.
Note that for the case of mass-action kinetics, the process space is a function of x and defined by Table 1: Examples of reactions and their meaning according to the simple narrative of how a milk-based farm works.

Reaction
Meaning ∅ ⟶ water Access to water grass + cows + infrstr + water ⟶ milk + cows + dung + infrstr Producing milk milk + farmer ⟶ money + farmer Selling milk infrstr ⟶ ∅ Infrstr degrades money + farmer + infrstr ⟶ farmer + 2infrstr Reinvesting Complexity 5 with λ(r i , x) as in (3). us, the notion of process space generalizes the notion of kinetic law because Π(R X ) allows for specifications of what processes are feasible that might or might not depend on the state of the system, time, control systems, external agents, etc.
is formulation of the process space can be used to formalize the notion of operational closure, in the sense of autopoietic systems [27], leading to the concept of selfmaintaining processes for reaction networks.
A set of species that is self-maintaining encounters processes in its process space such that all the reactions of a reaction network into consideration have a positive rate and, when applied, all the consumed species of the set are produced in equal or larger amount. is implies that a selfmaintaining set of species is able to operate activating all the reactions in R X without decreasing and possibly increasing their concentration.

Organizations and Autopoietic Systems.
With both the structural and processual dimensions of sustainability represented in the formalism by closure and self-maintenance, respectively, we can see how the language of the COT allows us to identify complex systems at different stages of their formation with variable degrees of closure towards the status of a full organization. Definition 5. Let X⊆M, and X is an organization if and only if X is structurally closed and self-maintaining.
Because organizations are closed, meaning they do not generate novel species, and self-maintaining, meaning they can fully operate without decreasing the species concentration, they represent an abstraction of the persistent dynamical behaviors such as fixed points, periodic orbits, and limit cycles of a reaction network [16,17]. erefore, the ability to unambiguously identify stable systems as organizations is one of the core features of this framework. Indeed, an organization can be attributed an identity and associated to an emergent behavioral unit because it is stable enough in time to be observed as such, and this stability is the consequence of a self-maintaining process available in its process space repertoire (also known as cognitive domain as introduced by Varela [29]). e latter idea establishes a formal equivalency between the organizations understood as stable unities and autopoietic systems [30,31]. e representability of the persistence of identity in time makes the reaction network formalism suitable as a language for modeling systems, as the set of organizations of a reaction network can be said to capture all systems observable in the reaction network universe [14].
Most interestingly, the reaction network formalism allows us not only to identify all complete organizations that co-exist at the particular moment in time but also to asynchronously trace their emergence at all stages of development towards self-maintenance and structural closure, as well as their subsequent decomposition into functional units. erefore, systems modeling in the reaction network framework does not require that we begin with a preexisting, pre-defined system. Instead, we begin from a collection of reactions playing the role of fundamental processes, whose reactants and products can be of any nature (chemical, biological, cognitive, semiotic, and so on). Hence, a reaction network can represent a universe whose evolution is driven by the ways in which combinations of entities transform into other combinations. Notably, (i) systems are thought to be stable enough in time so they can be observed and (ii) systems hold certain properties that define their qualitative identity. us, in the reaction network framework, we define a system as a sub-network (X, R X ) of (M, R) such that X is an organization. e latter entails a dynamic notion of qualitative identity: a system is continuously changing its inner components and sub-processes, but the identity and unity persist as long as the reaction network is structurally closed and its processes are self-maintaining. erefore, the reaction network (M, R) plays the role of the universe of interactions, while the organizations play the role of potentially observable systems in this universe.
is feature of the COT modeling language is crucial for the simultaneous study of resilience and sustainability. By modeling systems as temporary, perishable formations within a much wider "primordial" universe, we can, first, simulate and test the durability of our pre-existing systems of interest in their response to various configurations of stressors and, second, gauge the environmental impact of our systems' functioning. is includes the formative processes that will be mobilized in the environment as a result.
It is important to mention that the approach to autopoiesis and stability in reaction networks given by COT provides a complementary framework to several other approaches that aim at linking the structure and dynamics of reaction networks. For example, deficiency theory [32,33] incorporates the idea of complex dynamics as collections of reacting species and derives structural conditions for the existence of equilibrium states. e relation between COT and deficiency theory has been discussed in [34]. Similarly, the relation between COT and MR systems and RAF sets has been discussed in [35]. e relation between COT and Petri net analysis [36,37] has been discussed in [38]. erefore, COT can be integrated with these other formal analysis methods in biochemistry [39] in order to formalize the more intuitive notions of resilience existing in the literature.

Reaction Network Toy Example: A Farm.
We now illustrate the application of COT to a concrete situation. Consider a farm that operates applying a number of processes (reactions). e basic goal of the farm is to survive, i.e., not running out of resources so that it goes bankrupt, and the secondary goal is to grow, i.e., increasing the amount of 6 Complexity resources that it produces, most concretely food and money. e set of species we consider to model the farm is the following: M � water, grass, cows, infrstr, milk, dung, worms, fertilizer, chickens, eggs, grain, straw, money, farmer .
Infrastructure here is everything needed to let the farm run: buildings, milking machines, tractors, laborers, land, etc.
e farmer is the manager of the farm, who invests money from the farm proceeds to keep the infrastructure running and developing.
We now introduce the set of reactions R describing the different basic processes that can possibly happen in our model: R � r 1 : ∅ ⟶ water(external input from rain or river) r 2 : grass + cows + infrstr + water ⟶ milk + cows + dung + infrstr r 3 : dung ⟶ worms + fertilizer r 4 : grass + worms + chickens + infrstr ⟶ chickens + eggs + fertilizer + infrstr r 5 : grain + chickens + infrstr ⟶ chickens + eggs + fertilizer + infrstr r 6 : water + fertilizer + grass ⟶ 2grass r 7 : eggs + grass + worms + infrstr ⟶ chickens + fertilizer + infrstr r 8 : fertilizer + water + grain + infrstr ⟶ 10grain + straw + infrstr r 9 : straw + cows + water + infrstr ⟶ milk + cows + infrstr r 10 : eggs + farmer ⟶ money + farmer(eggs are sold) r 11 : milk + farmer ⟶ money + farmer(milk is sold) r 12 : grain + farmer ⟶ money + farmer(grain is sold) r 13 : straw + farmer ⟶ money + farmer(straw is sold) r 14 : chickens + farmer ⟶ money + farmer(chickens are sold) r 15 : worms ⟶ ∅(worms escape) r 16 : infrstr ⟶ ∅(infrastructure runs out) Note that every subset of species of M can be interpreted as a possible situation of the farm. For example, if we consider the reactants of the reaction r 2 only, i.e., the set grass, cows, infrstr, water , we refer to a situation such as the farmer is operating the farm with cows and infrastructure only, and, for example, no chickens are available. Note that for such set of starting species, the reactions r 1 , r 2 , and r 16 are active. Since the operation of starting a farm will produce milk and dung (products of r 2 ), reactions r 3 and r 11 will activate. In turn, the products of r 3 will activate reactions r 15 and r 6 and the products of r 11 will activate reaction r 17 . At that stage, nothing else can be activated, and thus the operation of the farm starting from the set grass, cows, infrstr, water reaches a closed set representing a grainless and chickenless farm GCL �{grass, cows, milk, dung, fertilizer, worms, water, infrastructure, farmer, money}.
Interestingly, GCL is self-maintaining for a process v holding the following conditions: (money is not depleted).

Complexity (g) v[17] occurs at a larger or equal rate than v[16]
(infrastructure is not depleted).
For example, suppose that v reflects the monthly operation of the farm, and that the units of all species are adapted accordingly. Note that the process where � 1 holds the above conditions and thus proves the selfmaintenance of GCL. However, that very same process with v[3] � 2 is not self-maintaining because dung is consumed more than what is produced. us, GCL requires for being an organization that some processes in Π(R GCL ) hold the above conditions (a)-(g).
Additionally, note that certain closed sets cannot be self-maintaining for any process. For example, {water, infrastructure, worms, dung, fertilizer} cannot be selfmaintaining because infrastructure and dung cannot be produced by any of the reactions that can be activated by such set. Interestingly, this set is compatible with a situation where the farmer left the farm and took his animals and productive resources, leaving the infrastructure with no productive capacity. In COT, we say the set {water, infrastructure, worms, dung, fertilizer} is not semi-selfmaintaining (see Definition 3). erefore, closed sets X⊆M that are not semi-self-maintaining cannot be self-maintaining, independent on how Π(R X ) is defined, because semi-self-maintenance is a necessary condition for selfmaintenance [16].
ese organizations form a partial ordered set as it can be seen in Figure 1. e latter analysis shows that COT is useful to comprehend what are the crucial sets of species in our model that can operate in a closed and self-maintaining way, i.e., as organizations. Moreover, it allows us to identify the kinds of processes that will operate the farm in a sustainable way. e latter is a much more efficient analytical strategy than simulating the reaction network under a variety of circumstances, especially for large reaction networks. Indeed, the number of sub-networks at which a reaction network could converge is exponential with the number of species, while the number of organizations of several reaction networks analyzed in previous research has been shown to grow at a much smaller rate (nearly linear) with respect to the number of species [41,42].
From here, it is important to understand what are the potential impacts in the organization's operation for a given unexpected perturbation.

Perturbations and Structural Changes.
In traditional dynamical systems, perturbations correspond to either a change in the (initial) state of the system or a change in the parameters that rule its evolution. e former case is applied, for example, to perform stability analysis, while the latter is applied to bifurcation and other parametric analyses [20].
When a system is represented by a reaction network, the first type of change corresponds to a change in the state x, exactly in the same way as in traditional dynamical systems. e second type of change corresponds to a change in the process space Π(R X ), i.e., a modification of what reaction rates are allowed for the processes that can be applied to the reaction network. In addition to these two types of change, for complex systems, there is a third type of change which is highly relevant but can hardly be represented using traditional dynamical systems.
is change corresponds to adding or removing entities or interactions. In dynamical systems, this will modify the structure of the dynamical equations before and after perturbation, so measuring change for such types of changes is far from simple. For complex systems represented by means of graphs or agentbased models, this is represented by the addition of a vertex or edge and agent or rule, respectively, but there is no clear way to link the dynamics of the new network to this structural change [43]. For a system represented by a reaction network, the structural change is similar to the one obtained for a graph. us, a structural perturbation corresponds to the addition of a new reaction, which might or might not include new species. However, different to the network and agent-based model approach, the structural change can be tackled by COT.
at is, the addition of a reaction by a structural perturbation changes the process vectors available and eventually the species set as well, implying the emergence of a new organizational structure. Indeed, an added, or eliminated, reaction will add a new dimension to, or set to zero the value of, the process vector, respectively. erefore, structural perturbations of eliminating nature might be equivalent to process perturbations (when a reaction is  8 Complexity eliminated) or to a state perturbation (when a species is eliminated). However, structural perturbations of constructive nature do not have a counterpart as state or process perturbations because they increase the dimension of the state or process vector (respectively).
As an example of the latter concepts, consider the farm model in equation (6) and the entire farm M as our organization. An example of state perturbation is the accidental death of one or more cows. is perturbation will reduce the number of cows, which in turn could reduce the capacity of the farm to produce milk by reactions r 2 and r 9 . If that occurs, some processes where v [2], v [9], or both are too large will not be feasible anymore. us, the state perturbation might be able in some cases to modify the process space Π(R). Indeed, if the perturbation is too large (too many cows die), this could modify the process space so that M can no longer operate in a self-maintaining manner. For an example of a process perturbation, consider climate change affecting the input of water by r 1 represented by the value v [1], so that it remains smaller than a certain critical value w max reflecting the scarcity of water available to run the farm. Under such perturbation, processes that require too much water would not be possible any longer, so the potential ways of operating the farm are modified, again threatening the possibility of M to operate in a self-maintaining way. An example of a structural perturbation is the arrival of mice that eat the grains produced by reaction r 8 in equation (6). Such perturbation would appear as a reaction r mouse � mouse + grain ⟶ 2mouse.
is structural perturbation induces a process space perturbation, as the number of reactions is increased and thus the dimension of the process vector. It is likely that under the new processes, we will observe a reduction of the amount of grain produced by the normal operation of the farm, threatening of course its self-maintenance.
In Table 2, we summarize the types of perturbations that a reaction network can be subjected to.
We now turn to a more detailed description of the inner structure of the operation of a reaction network, which will help us to better understand how perturbations threaten the self-maintenance of organizations.

Catalysts, Overproducible, and Fragile Components.
e study of reaction networks has developed several structural notions that help to link structure and dynamics [32,39]. In this section, we will introduce some elements that advance our understanding on the impact that the different kinds of perturbations explained in the previous section might have on an organization [44].
Definition 6. A species s j ∈ X is a catalyst w.r.t X if and only if r i ∈ R X implies a ij � b ij , for i � 1, . . . , n.
Note that the catalysts of a set X are not affected by the choice of the process v ∈ Π(R X ) because they are equally consumed and produced by every reaction. is implies that a state perturbation will only have effect on the concentration of a catalyst if the perturbation is on the catalyst itself. Additionally, we can infer that a process space perturbation will not have an effect on the catalyst concentration. Interestingly, a structural perturbation which eliminates reactions will not modify the defining feature of catalysts, and they will still be produced and consumed at equal amount by all available reactions. However, the addition of new reactions might change the status of catalysts in case one of the new reactions consumes a catalyst in a different amount to what produces it. e maximal set of catalysts w.r.t X is always unique, will be called the catalyst component of X, and will be denoted by E X . For example, in the farm model given by equation (6), we have that E M � farmer, cows { }.

Definition 7.
A species s j ∈ X is overproducible w.r.t X if and only if there exists a process v ∈ Π(R X ) such that for x v in equation (2), we have An overproducible species is such that specific processes are able to produce it without decreasing the amount of any of the species. For this reason, overproducible species can grow indefinitely in principle.
is, on the one hand, is useful to the system as overproducible species can be considered as infinite resources, but it could also be problematic to the system when their growth negatively affects other productive processes, and there is no way to control such indefinite growth. Let us consider, for example, the organization GCL, and let us assume that the process space is such that v[i] can take any non-negative value for r i ∈ R GCL , and zero else.
An example of an overproducible species in the farm model is water. is is trivially shown by a process vector where the only non-zero value is v[1]. Since v[1] can take any positive value, for any choice of the values of v[i] where r i ∈ R GCL , we can increase v[1] to be large enough so there is more water than what is required to trigger the other reactions specified by v.
is in turn can be applied to overproduce other species as the following examples show: e latter shows that a process v � v 1 + v 2 , where v 1 overproduce a species s 1 and v 2 overproduces s 2 , overproduces s 1 , s 2 .
us, the maximal set of overproducible species w.r.t X is always unique, will be called the overproducible component of X, and will be denoted by F X . F X is sensitive to the structure of the process space and thus to process space perturbations. at is, if the process vectors v ∈ Π(R X ) that can overproduce species in F X are no longer possible after the perturbation, some species will not belong to F X and thus F X will become smaller. In such case, X might still be an organization, but constrained to having a maximal production zero for species that were overproduced prior the perturbation.

Complexity
Interestingly, in the absence of process space perturbations, if s is overproducible in X, then s is overproducible in every X ′ X . is means that structural perturbations which add reactions or species will not alter the overproducibility of s. However, structural perturbations which eliminate species or reactions can modify the overproducibility of some species.
Note that having defined E X and F X , we have that X − (E X ∪ F X ) entails the part of X which might be most problematic for self-maintenance.
. We call C X the fragile component of X.
Note that for a species s in C X , we can infer that (i) its maximal overproduction is zero (s ∉ F X ) and (ii) it cannot be equally consumed and produced in all of the reactions, and it participates in (s ∉ E X ). erefore, s must be consumed more than produced by at least one reaction. Hence, if s is not produced more than consumed by another reaction, then X is not semi-self-maintaining, and thus X is not self-maintaining. In Table 3, we summarize the components of the reaction network that can be affected by a perturbation of different kind.

4.3.
e Inner Structure of the Fragile Component. Analyzing the inner structure of the fragile component reveals extremely interesting features about the inner working of an organization. at is, if X is self-maintaining, it can be shown that for any two species s 1 , s 2 ∈ C X , we have that either both species are needed to produce each other, meaning they belong to the same co-dependent productive cycle, or there are two sets of reactions R 1 , R 2 ⊆X, one associated to s 1 and the other associated to s 2 , such that the reactions in R 1 ∩ R 2 do not contain reactants or products in C X , meaning that their self-maintenance depends on independent productive cycles [44].
Definition 9. Two species s and s in X are dynamically connected in X if and only if there exists a sequence of species s 0 , . . . , s p ∈ C X such that s 0 � s, s p � s and for all k � 0, . . . , p − 1, we have that s k and s k+1 are directly connected in X (see Definition 2).
Dynamical connection entails connection through reactions which have reactants in C X . Note that only species in C X can be dynamically connected, and that dynamical connectivity depends both on the reaction network and the process space (because overproducible species depend on the process space).
It is easy to show that dynamical connectivity is an equivalence relation for C X [45].
is implies that every species in C X is dynamically connected to itself (reflexivity), that if s 1 is directly connected to s 2 then s 2 is dynamically connected to s 1 (symmetry), and that if s 1 is connected to s 2 and s 2 is dynamically connected to s 3 , then s 1 is dynamically connected to s 3 (transitivity). e latter implies that C X can be partitioned into equivalence classes C 1 X , . . . , C d X , i.e., e number d of equivalent classes reflects how many parts C X can be partitioned into. e latter result has been used to develop a decomposition theorem for the fragile component. e proof of the theorem requires a number of non-trivial steps. We refer the readers to [44] for details.

Theorem 1.
Let F X and E X be the maximal overproducible and catalyst components of X for a given process space Π(R X ), and let C X � ∪ d j�1 C j X be the partition of the fragile component dynamically decomposed into connected sets.
en, X is self-maintaining if and only if C j X ∪ F X ∪ E X is self-maintaining for j � 1, . . . , d. eorem 1 shows that the self-maintenance of a reaction network can be decomposed into independent components, and such components depend on the structure of the network, which defines the catalysts and the process space, which specifies the species that can be overproduced. at is, the overproducible and catalyst components determine the way in which the fragile component C X is maximally decomposed into d parts, and from there the self-maintenance of each part C j X is independent of the other parts, for j � 1, . . . , d. Interestingly, the self-maintenance of each fragile component part might require the support of F X and E X for its self-maintenance, but since the non-negative production of both F X and E X is ensured in Π(R X ), they can be safely employed as resources for the non-negative production of C j X . Indeed, F X ∪ E X act as a border that separates various parts of the fragile component.

Decomposition of the Reaction Network: Towards Resilience Response Mechanisms.
ere are important consequences that can be obtained from eorem 1 in relation to the response mechanisms that could explain resilience in the context of reaction networks. First, it is important to remember that state perturbations affect the self-maintenance of a reaction network only when they modify the process space Π(R X ). us, since our aim is to understand whether an organization X will remain so after a perturbation, this can be analyzed by looking at process perturbations.
Second, process perturbations that do not affect F X and E X will not modify the decomposition of the fragile component C X . us, in this case, the self-maintenance of X depends on the conservation of the processes which selfmaintain the fragile components C j X in the new process space. e latter implies that a resilient mechanism to counteract this perturbation needs to provide the conditions for the self-maintenance of the fragile components C j X affected by the perturbation.
ird, suppose that a process perturbation changes F X to F X ′ ⊂ F X ; then, there will be a new fragile component and thus a new decomposition. However, the new decomposition might conserve some of the parts of the previous fragile component decomposition. us, if the process perturbation does not change the self-maintaining processes of the parts of the fragile component that remained after the perturbation, the effect of the perturbation, and all mitigation strategies to compensate potential problems, can be targeted specifically to the parts of the fragile component which have been modified by the perturbation. Similarly, a structural perturbation might modify F X or E X , which in turn might change C X , or it might leave F X and E X equal, but modify C X only. Again, by applying eorem 1, we are able to identify the parts of the network whose self-maintenance is going to be affected by the perturbation and perform actions, either to adapt the process space or by incorporating new reactions, to compensate the potential loss of self-maintenance of the affected parts.
An additional, and perhaps the most interesting, implication of eorem 1 is that in case the perturbation cannot be compensated, we have that the organization will evolve to a new organization, where the overproduced species, catalysts, and parts of the fragile component which are not affected by the perturbation will remain selfmaintaining. In this sense, we are not only capable of knowing the required actions to sustain a perturbed organization but also able to elucidate the evolution of an organization after a perturbation that cannot be mitigated.
Notably, perturbations can, depending on the case, be counteracted either by a modification of the process space or by a structural perturbation. A counteraction by modifying the state can only work if it leads to a change in the process space where self-maintenance is feasible. For example, consider a farm which overproduces milk and money while having a water shortage due to climate change. is is a process space perturbation, but it can be compensated by modifying the operation of the farm, for example, not overproducing milk but only money or by reducing investment in infrastructure. Both choices do not perform a structural change on the farm but modify the choice of the process defining the adapted process space. However, it is also possible to include a new reaction, which specifies a more water-efficient way to produce milk. In such case, we compensate the water shortage by a structural perturbation which might still allow the overproduction of milk, not possible for the other mitigation strategies.
It is important to analyze in more detail the interplay between structure and operation of the organization after a perturbation. We will therefore provide some examples of perturbations, effects, and possible responses to compensate the effects in our farm model.

Perturbation Response Analysis of the Farm Example
In this section, we will elaborate on some cases that illustrate how different ways of operating the farm lead to different decompositions of the reaction network, and each decomposition responds differently to perturbations, so some ways of operating the farm can be understood as more resilient than others.

Two Different Ways to
Operate the Farm. We will consider two different ways to operate the production of the farm in a self-maintaining way and refer to them as Op 1 (M) and Op 2 (M), such that they overproduce different sets of species, thus implying different decompositions according to eorem 1. For the case of Op 1 (M), the farm is operated in a way that only money is overproduced. is represents the idea of spending the least possible resources and focusing on the production of money only. For Op 2 (M), the farm is operated in a way that overproduces not only money but also {grass, infrastructure, dung, fertilizer, grain}, representing the idea of a farm that seeks to build up a buffer of critical resources, while desiring to increase its productive capacities. at would be an example of sustainable growth. erefore, in operating the farm by Op 1 (M), represented by the process v 1 in equation (8), the two fragile components are C 1,1 �{water, grass, milk, dung, worms, fertilizer, chickens, eggs, grain, straw} and C 2,1 �{ infrastructure} . In the second way of operating the farm, represented by v 2 in equation (8), the fragile components are C 2,1 �{water, milk, straw} and C 2,2 �{worms, chicken, eggs}. Hence, while Op 1 (M) and Op 2 (M) have two fragile components each, these two components are different. e resulting decompositions for Op 1 (M) and Op 2 (M) are shown in Figure 2. In order to have a way to compare the response of two ways of operating the farm under different kinds of perturbations, the initial state of the farm, denoted by x 1 (t) for Op 1 (M) and by x 2 (t) for Op 1 (M) are equal. Additionally, the initial states are defined such that they have enough species to apply the processes required for the respective operation of the farm, and such that they overproduce the same amount of money. e process vectors in each case are obtained using a software which finds a self-maintaining process which additionally overproduces a chosen set of overproduced species.
e initial conditions, initial productions, and decomposition role of the species are shown in Table 4.

e Process Space.
Note that a process vector v specifies a total amount of reactants to be used by the process, which we will denote by T(v). For a species s j , T(v) is calculated by us, a given state x might or might not have enough reactants for a process v to be feasible. us, our process space Π(R)(x) must be such that v holds x[j] ≥ T(v, j) for all j.
Clearly, the two ways of operating the farm, specified by the processes v 1 (0) and v 2 (0), are feasible for x 1 (0) and x 2 (0), respectively. However, it is important to notice that T(v 1 , j) < T(v 2 , j) for certain values of j. For example, for the species cows, with j � 3, we have that . erefore, we need to specify how to update the subsequent processes that are going to be applied to operate the farm.
In order to represent the evolution of the two ways of operating the farm, we define the operation of the farm at time t by the process v i (t) such that it is a function of x i (t), for i � 1, 2. erefore, we specify the process space for operating the farm by establishing a kinetic law [32]. e process vector is built by comparing the state of the system at a given time t with the corresponding default process vector obtained using the COT software (see equation (8)). e update in the process vector attempts to find the most similar process vector to the default process, constrained to the fact that it is feasible and that positive variations in the amounts of resources imply an increase in the coordinates of the process vector. We will use this method to identify the process vector that is applied to the system when a perturbation occurs.
e specification of such process requires introducing the following function: 12 Complexity , for s i reactant of r j , 1, if there are no reactants in r j , where d(x(t), j) identifies the species at the current state x(t) that has decreased the most with respect to the use of resources needed for the default operation of the farm, specified by T(v(0)), and for the case that none of the species have decreased with respect T(v(0)), i.e., all reactants have maintained or grown with respect to the starting state, it identifies the minimal of such growth. e function d(x(t), j) can thus be applied to modulate the variation of the process vector in time from the starting process vector when the process is not feasible or if all the species have increased enough so the process vector, which is defined to be self-maintaining, overproduces the species. us, when a species required to trigger a reaction has decreased, the process vector is going to decrease proportionally to the maximal decrease, and if all reactants have grown, the increase will be proportional to the minimum of such growth. We define the process vector at time t as follows: For example, consider a farm starting at state x(0) and the operation of the farm by a certain process vector v(0) such that it has increased the amount of grass in 3 units, reduced the amount of water in 2 units, and maintained equal the amount of cows and infrastructure. Since this process has only reduced water and all other resources have increased or have been maintained equal, the process to be applied at time 1, for the second coordinate v i [2](1) representing r 2 , will be decreased to a factor 1)), which represents the fact that less water is available. In Figure 3, we show that the dynamics defined in this way leave invariant the dynamic roles in Op 1 (M) and Op 2 (M). Indeed the process vector remains constant over time in both cases.

Simulating Perturbations and Measuring Role Changes.
In order to compare the impact of perturbations, we defined perturbations to the reference initial conditions specified in Table 4 as follows: (i) State perturbation: random change of initial state of 1%, 2%, 4%, 8%, and 16% with respect to the vector's length. (ii) Process perturbation: random change of initial process of 1%, 2%, 4%, 8%, and 16% with respect to the vector's length.
Additionally, we consider a structural perturbation consisting of adding the reaction specified in equation (7) to the reaction network and consider the initial value of the new last coordinate of the state vector, corresponding to the species "mouse," equal to 10 (see Table 4). For estimating the impact of state and process perturbations with and without structural perturbations, we run 1000 state and process perturbations for the two different ways of operating the farm. Each simulation runs for 3000 time steps, which is the time we observed to find dynamical convergence of the state vector.
Since the two ways to operating the farm imply different decompositions, that is, different sets of overproduced Table 4: e initial conditions, initial productions, and decomposition role of the species.
e first column shows the initial state, and the second and fourth columns show the initial production, specified by the production vector at time zero. Positive values in the second and fourth columns represent overproduction. Zero values in the second and fourth columns represent that the species is either a catalyst or belongs to a fragile circuit. e third and fifth columns identify the specific decomposition role in each of the two ways of operating the farm, respectively. e last row represents the initial value without and with structural perturbation, as explained in Section 5.3 species and different fragile circuits, we analyze the impact of the perturbation by measuring the changes in the decomposition roles with respect to the reference dynamics in Table 4. To do so, note first that the perturbed dynamics might reach concentration zero for some species during the simulation. erefore, for each simulation at a given time t, the reaction network has an active part which might not be the entire reaction network, but eventually a smaller one. erefore, at each time t, we consider first an optimal production regime for the active part of the network.
is optimal production regime is identified by computing the maximal number of overproduced species and obtaining the decomposition shown in eorem 1. Such decomposition identifies overproduced species (labelled by o), species in the fragile circuits (labelled by f), catalysts (labelled by cc), and non-active species (labelled by np). Next, we contrast such ideal productivity regime with the actual productivity rate of each species at time t, either positive (labelled by p), zero (labelled by m), or negative (labelled by d). ere is another role which is non-reactive (nr) which is reached when the species is still present, but it cannot react because the species it reacts with are in np role.
us, at each time t, we can identify the possible roles (see Table 5).
We will refer to the roles by pairs of ideal and actual labels. For example, a species with role om is a species which is ideally overproducible, but within the current dynamics (at time t), its production is zero. Similarly, f d is a species whose ideal role is being part of the fragile circuit, but in the current dynamics, its production is smaller than its consumption, so its concentration is decreasing.  A perturbation induces a role change which might affect the ideal and/or actual roles. For example, a perturbation which reduces a certain amount of a particular kind of species might change the role of op to om, as with the current amount of species, it is not possible overproduce the species, but only maintain its value. A structural change enabling the overproduction of a species which belong to a fragile circuit before the perturbation, but where such overproduction reaction pathway is not feasible, might change fm to om.
We will focus on the dynamics of role changes to obtain a qualitative view of the dynamical changes induced by perturbations.

Average Role Changes.
As a first analysis of the responses for the two ways of operating the farm under the three different types of perturbations, we measure the aggregate change of role as explained in the previous section. We simply count the proportion of species that have a role change at time t in the dynamics and average over the 1000 simulations run for each kind of perturbation.
In Figures 4 and 5, we see the change of species roles for the case of state and process perturbations. It can be noted first that the state perturbations show an impact that manifests mostly in the beginning of the simulation, while the impact of the process perturbation is incremental with a longterm asymptotic value, and that impact increases with the perturbation size for both kinds of perturbation. Moreover, we observe that the extent of the state process impact is higher on Op 2 (M) than in Op 1 (M), and that the situation reverses for process perturbations. e latter is consistent with the fact that the way the process vector is actualized in equation (10) aims at operating the farm in the most efficiently possible way, and in this case, this favours keeping the structure of Op 1 (M) over the structure of Op 2 (M). Indeed, for case of perturbations that increase species, Op 1 (M) can quickly return from overproduced to fragile (return from fp to fm in Table 5), while a species that becomes overproduced in Op 2 (M) might remain overproduced (staying in fp from fm). For perturbations that decrease species however, both Op 1 (M) and Op 2 (M) can return, for example, from f d to fm or from om to op.
For process perturbations, we observe that the perturbation changes the roles of a significant proportion of species in the beginning of the simulation, and there is a recovery of some species roles shortly after, but later this recovery instead of driving to stabilization triggers a sustained increase of role changes with an asymptotic behavior above the role change observed at the beginning. e initial impact and the asymptotic role change are much higher in Op 1 (M) than in Op 2 (M). e explanation of this phenomena is not trivial as it involves different tendencies for changing roles depending on the role of the species and the effect of the perturbation. For this reason, in the next section, we develop a more detailed analysis of the effects and propagation of the perturbations at each of the decomposition modules.
Regarding structural perturbations, in Figures 6 and 7, we see the change of species roles for the case of state and process perturbations when the structural perturbation in equation (7) is included. Interestingly, we observe that the impact on the two ways of operating the farm qualitatively looks the same as in the case without structural perturbation, but quantitatively the impact is different for Op 1 (M) depending on the type of perturbation considered, while for Op 2 (M), the impact does not change significantly with or without structural perturbation. Indeed, for Op 1 (M), we observe that the state perturbation impact is amplified and the process space impact is reduced. e latter is explained by the fact that the structural perturbation implies the rapid disappearance of various species in Op 1 (M) (for both state and process perturbations, even for the default dynamics), which in turn derive in the convergence of the dynamics into a new and smaller organization, which is indeed stable, even in the presence of the structural perturbation. erefore, since we compare the ideal and actual states for the existing species in the dynamics, we conclude that the structural perturbation changes the structure of the network, but within this new structure, the impact of the state and process perturbations is less strong than in the case of Op 1 (M) without the structural perturbation.
In order to illustrate the impact of the structural perturbation on the two ways of operating the farm, we show the most common structure that remains stable after a structural perturbation for Op 1 (M) and Op 2 (M) considering state perturbations, i.e., multiple initial conditions, in Figure 8. Note that while Op 2 (M) keeps the whole farm active, Op 1 (M) � GCL, indicating that the chicken-based and grain-based productive processes are inactivated by the structural perturbation (see Figure 1).
We now turn to a more detailed analysis to observe the specific changes of roles under different types of perturbations in the specific parts of the organizations' decomposition.

Perturbation Responses within the Decomposition.
e average role change analysis shows that the two organizations have qualitatively different responses to the state and process perturbations, and that the structural perturbation might amplify or reduce the effect of state and process perturbations.
erefore, since the way in which role changes occur is not clear from such aggregated analysis, we now observe in more detail what are the responses to First column indicates the "ideal" dynamical roles that are obtained for each species from the maximal decomposition, the second column indicates the "actual" dynamical role observed in the actual dynamics, and the third column expresses the meaning of the interplay between the two roles from a dynamical perspective.
perturbations within the specific decomposition modules for different ways of operating the farm.

State Perturbation.
In Figures 9 and 10, we observe the specific response of each species to the state perturbations. It becomes clear that the role change is concentrated in the fragile circuits and that the change is more common for species whose ideal role is overproduced and they undergo from om to op, hence going towards their ideal role from their actual zero production role.

Complexity
Moreover, we note that the fragile circuits in Op 2 (M) have a higher tendency to undergo the om to op change than Op 1 (M) because perturbations that decrease the production of species in F (overproduced) will not harm the dynamics, and hence there are more chances that perturbations that increase species in C (fragile circuits) become sustained as overproduction, simply because Op 2 (M) has more overproduced species.
is can be seen, for example, in     (M). Indeed, it is very interesting to notice that the fragile circuit C 2,2 � chicken, eggs, worms in the absence of structural perturbation becomes generally overproduced after state perturbations, and in the presence of the structural perturbation, it remains as a fragile circuit for the majority of state perturbations. is is explained by the fact that since mouse eat grain, then there is not enough grain to overproduce the fragile circuit where chickens are part of. Note that, however, C 2,1 � water, straw, milk { } does not have an impact in its dynamics, as it is dynamically disconnected from the structural perturbation, due to the overproductive dynamics that separate the fragile circuits (which was not the case in Op 1 (M) and thus driven to a much heavier collapse). e conclusion in this section is an example of using decomposition eorem 1 to predict the impact of structural perturbations in the qualitative dynamics by studying changes in the ideal and actual roles of the species. Figures 13 and 14, we observe the responses to process perturbations in each of the decomposition modules for Op 1 (M) and Op 2 (M), respectively. In this case, we note that all role changes are possible, implying that the different types of process perturbations can produce different patterns of role change. Instead of analyzing the specific conditions that drive each kind of change, we keep our analysis at a qualitative level and compare the structural responses of Op 1 (M) and Op 2 (M). e most important change for Op 1 (M) is that the species in the bigger fragile circuit C 1,1 go to npm role, and thus C 1,1 becomes inactive in a large proportion of cases, implying that Op 1 (M) becomes the organization {water, infrstr} together with the species {money, farmer, cows, infrstr} that tend to a non-reactive (nrm) state.

Process Perturbation. In
is implies that the farm goes bankrupt because its productive processes cease happening.
For Op 2 (M), we also observe that in a significant proportion of cases, fragile circuits become inactive. In those cases, as for Op 1 (M), we have that Op 2 (M) becomes the organization {water} plus some non-reactive species. However, the fragile circuits can also become overproduced or can be maintained in a relatively similar proportion of cases. Indeed, as the perturbation size grows, the tendency of species to transit to npm role increases, indicating that for processes that start operating the farm in a far-from-sustainable way, it is less likely that the dynamics will stabilize in a fully sustainable way. Indeed, in such cases, the tendency is that fragile circuits become inactive and only overproduced species remain active. It is not clear from this analysis if the two fragile circuits become inactive for the same kind of  When a structural perturbation is added, the effect of process perturbations changes for Op 1 (M) in a non-trivial way. Indeed, the process perturbation analysis in the absence of structural perturbation inactivates the entire fragile circuit C 1,1 , implying that Op 1 (M) becomes inactive. Hence, we would expect the same in the presence of the structural perturbation, as it was shown that structural perturbations    Figure 9: Histogram for different species roles according to Table 5 for tend to inactivate species as seen in the state perturbation analysis ( Figure 11). However, when structural and process perturbations combine, we observe that in a significant proportion of cases, the dynamics evolve from M towards the organization GCL (see Figure 1) and remain stable. is is a consequence that a process perturbation changes the way the farm is operated, and thus the response to the structural perturbation might be similar to the way in which Op 2 (M) is operated in respect to how worms, water { } becomes overproduced, thus helping to sustain the set of species dung, fert., grass, milk . e structural and process perturbation on Op 2 (M) instead is able to inactivate the whole operation of the farm, especially when the perturbation is of a high value.
is is different to the case when no structural perturbation was in place for Op 2 (M) as it was in most cases able to continue operating.
is is because a process perturbation might modify the overproductive capacities  (d) Figure 10: Histogram for different species roles according to Table 5 Figure 11: Histogram for different species roles according to Table 5 for of some species, such as dung, fertilizer, or grass (see Figure 15(a)), leading them for a short time on the o d state to end up in npm state. e lack of those species propagates to the fragile circuits, as seen in Figures 15(b) and 15(c), where the species go from om to o d and then to npm.
Interestingly, for small-sized process perturbations, the operation of the farm in many cases might go to a different change, similar to the perturbation case without structural perturbation where the fragile circuits become overproductive (compare Figures 15 and 16 for small perturbation values). erefore, the structural and process perturbation might drive to overproductive regimes in case of small perturbations, and when the perturbations become larger, it might become harmful, disabling the operation of the fragile circuits.   Figure 12: Histogram for different species roles according to Table 5 Figure 13: Histogram for different species roles according to Table 5 for    Figure 14: Histogram for different species roles according to Table 5 for   Figure 15: Histogram for different species roles according to Table 5 for

Conclusion
Ensuring the sustainability and resilience of complex systems such as ecosystems, organizations, and organisms is a crucial issue for the future of humanity. However, present approaches to this question lack a clear theoretical framework, in part because of the difficulty of formalizing the complex network of interactions that determine whether a system will be able to maintain itself in the face of a wide range of perturbations. We approached this problem by advancing on the representation of systems as reaction networks [14].    Figure 16: Histogram for different species roles according to Table 5 for approach, reactions consume combinations of species while producing new combinations of species. Chemical organization theory (COT) makes possible to identify organizations within such a network. Such organizations are by definition self-maintaining and therefore sustainable systems because every species must be produced at least as much as it is consumed by other reactions in the network.
However, COT does not specify which of these organizations would be resilient, i.e., able to safeguard or recover their self-maintenance when perturbed. To advance on this issue, we reviewed three fundamental types of perturbations that can occur within a reaction network [44]: (1) state perturbations change the quantity of a species as presently available in the system; (2) process perturbations change the rate of reactions that produce or consume species; (3) structural perturbations introduce or remove species or reactions in the network. is last type of qualitative perturbations, which change the state space and its dynamics, is difficult to analyze in traditional dynamic systems models, but we showed how combining structural analysis with simulations allows to represent the dynamical stability at a qualitative level.
To do so, we first explained how organizations can be decomposed into dynamical modules that have different productive roles, and that such modules are dynamically independent, and thus perturbations in many cases will not affect the whole network but only the module where the perturbation is impacting on.
To illustrate and test this analysis of reaction networks, we proposed a toy model representing the operation of a sustainable farm. is farm can produce resources such as milk, eggs, and grains from resources such as water, grass, cows, chickens, and grains. We analyzed this network with the help of the COT software we developed [40]. is allowed us first to distinguish the different self-maintaining organizations possible within the given network of reactions (see Figure 1).
We then considered two different ways of operating the farm, one which only overproduces money and uses the minimum of resources (Op 1 (M)), and another which overproduces most of the basic resources needed for operating the farm, as an example of sustainable growth (Op 2 (M)), and analyzed the responses of the two farm operations by analyzing how it reacts to the three types of perturbation.
at is, we developed a statistical analysis considering multiple perturbations to the initial state and process, and then we introduced a structural perturbation (see equation (7)) which harms the productive capacities associated to the use of grain and repeated such analysis, so we could compare the impact of all types of perturbations on each of the ways of operating the farm.
We demonstrated that the different types of perturbations have completely different kinds of impact depending on how the organization is operating. In the absence of a structural perturbation, we find that Op 1 (M) is more sensitive to state and process perturbations than Op 2 (M), a result which is reasonable considering that Op 2 (M) buffers more resources than Op 1 (M), and thus in the absence of structural perturbations, we can conclude that sustainable growth is more resilient than optimization of profit. is result is also obtained when structural and state perturbations are considered.
However, when structural and process perturbations are taken into consideration, we found that some not intuitive behaviors, such as stabilization of Op 1 (M) in the smaller organization GCL, the overproduction of C 2,1 but not overproduction of C 2,2 , or the very inactivation of the whole network (leading to bankruptcy), can occur when process perturbations are considered. erefore, we conclude that the impact of structural and process perturbations, which in common jargon mean the inclusion of new players and changing the ways the decisions are made, can be in some cases disastrous for the sustainable development of a system. We make a particular remark in this respect because, for example, major political changes regarding global warming such as creating new decision-making structures and new forms of interaction are examples of this kind of combined perturbation.
While inspiring, this particular toy model and its analysis are not yet sufficient to completely understand the notion of resilient organizations. erefore, we conclude that in order to develop a systemic and formal notion of resilience, it is necessary to continue advancing further classifications of how different kinds of perturbations produce different kinds of responses in the operation of a system. Particularly, process and structural perturbations are linked to the productive decomposition of the reaction network, and thus the parts of the reaction network that are affected require a deeper classification of its connectivity structure, and we also consider it highly necessary to develop a taxonomy of structural responses, for example, the response of our farm model to the arrival of mouses (structural perturbation in equation (7)) in our case was only resisted by the very productive capacities of the farm (enough grain is produced to sustain the productive capacities even in the presence of mouses), but also other mechanisms, such as fencing the grain storage, bringing mouse predators such as cats, or installing mouse traps in the farm, are also possible ways to counteract the decrease in grain production. Since each of these solutions in turn activates other interactions (for example, cats might eat chickens or mouse traps might harm cows), it is necessary to extend our analysis to understand the mechanisms by which the different productive roles change, so counteracting structural perturbations can be designed.
To do so, we plan as future research applying the links between the dynamics of the reaction system, not only with the structural decomposition applied here but also with other frameworks that link structure and dynamics such as deficiency theory [32,33], Petri net analysis [36,37], and other frameworks in system biology [39]. We hope to integrate this kind of formal analysis with the more intuitive notions of resilience existing in the literature, with the aim of defining a general and multidimensional measure of resilience for reaction networks. We also hope to extend this analysis to examples in different fields, including metabolic, nuclear, economic, ecological, and political networks and systems [14].

Complexity 27
We further see self-maintenance and resilience as primary characteristics of goal-directed systems, i.e., systems that will systematically counteract perturbations so as to reach or return to their preferred configuration. To understand this better, we will need to analyze under which conditions organizations exhibit a negative feedback that automatically suppresses deviations from their goal configuration (state or process). Overproduction seems to be a dependable way in which an organization can compensate for losses in resources (e.g., cows dying) or reductions in processes (e.g., less rain because of global warming or less production of grain because of mice eating it). On the other hand, overproduction is limited by the requirement of sustainability: not more can be produced than allowed by the overall capacity of the system. erefore, a "judicious allocation" of overproduction over the different components of the process vector may be an effective control mechanism to keep the system on track towards its preferred mode of operation even when confronted with perturbations.
We hypothesize that the evolution of complex systems, such as living organisms, will provide them with such control mechanisms. e reason is that systems lacking such mechanism will not be sufficiently resilient to survive common perturbations and thus will be eliminated by natural selection. We hope that our simulations and further theoretical investigations will elaborate such hypotheses into a general scenario for the emergence of sustainable, resilient, and goal-directed systems.

Data Availability
Simulation data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.