# Emergence and Growth of Complex Networks in Adaptive Systems

## Abstract

We consider the population dynamics of a set of species whose network of catalytic interactions is described by a directed graph. The relationship between the attractors of this dynamics and the underlying graph theoretic structures like cycles and autocatalytic sets is discussed. It is shown that when the population dynamics is suitably coupled to a slow dynamics of the graph itself, the network evolves towards increasing complexity driven by autocatalytic sets. Some quantitative measures of network complexity are described.   
PACS numbers: 87.10.+e, 05.40.+j, 82.40.Bj, 89.80.+h   
Keywords: evolution, complexity, autocatalytic sets, graph theory

IISc-CTS/10/98

Complex networks of interacting components are a characteristic feature of adaptive systems. Examples include prebiotic chemical evolution which produced complex organizations of molecules culminating in a living cell, biological evolution which produces complex ecologies with networks of interdependent species, and economic and social evolution in which webs of interacting agents appear spontaneously. It is of interest to understand how such webs originate and become more complex.

In this paper we discuss a model  which describes the network in terms of a directed graph, and treats it as a dynamical variable. The dynamics of the graph is determined by an underlying population dynamics on a fast time scale in which certain structures, autocatalytic sets (ACSs) , play an important role. ACSs arise spontaneously in the network and then trigger an increase in its complexity. The main purpose of this paper is to describe the mathematical properties of ACSs and explain why they cause an increase of complexity of the network in this model.

Population dynamics on a fixed artificial chemistry   
The system is described by a directed graph with $`s`$ nodes. Associated with each node $`i`$ is a population $`y_i0`$ which evolves in time according to

$$\dot{y}_i=\underset{j=1}{\overset{s}{}}c_{ij}y_j\varphi y_i,$$
(1)   
where $`\varphi `$ is some function of time and $`C(c_{ij})`$, $`i,j=1,\mathrm{},s`$ is the adjacency matrix of the graph, i.e., $`c_{ij}=1`$ if there is a directed link from $`j`$ to $`i`$ and zero otherwise. Links from a node to itself are disallowed; $`c_{ii}=0`$.

(1) can be interpreted as a set of rate equations in an artificial chemistry similar to the models studied in . The nodes of the graph correspond to molecular species and a directed link from node $`j`$ to node $`i`$ indicates that species $`j`$ catalyses the production of species $`i`$. Let $`i`$ be produced by a reaction of the type $`a+b\stackrel{j}{}i`$, i.e., from the ligation of reactants $`a`$ and $`b`$ catalysed by $`j`$. In the approximation of a well stirred chemical reactor with a constant dilution flux $`\varphi `$, the rate of growth of $`i`$ is given by $`\dot{y}_i=k_f(1+\nu y_j)ab\varphi y_i`$, where $`a`$ and $`b`$ denote reactant populations, $`k_f`$ is the rate constant for the spontaneous reaction, and $`\nu `$ is the catalytic efficiency . Assuming that the spontaneous reaction is much slower than the catalysed reaction, and that the concentrations of the reactants are fixed and large, the first term will be proportional to $`y_j`$: $`\dot{y}_i=ky_j\varphi y_i`$, $`k`$ being a constant. Making the further idealization that all catalytic strengths are equal the rate equations reduce to (1).

We are interested in the attractors of the relative population dynamics which follows from (1), namely

$$\dot{x}_i=\underset{j=1}{\overset{s}{}}c_{ij}x_jx_i\underset{k,j=1}{\overset{s}{}}c_{kj}x_j,$$
(2)   
where $`x_i=y_i/_{j=1}^sy_j`$. By definition, the relative population vector $`𝐱(x_1,\mathrm{},x_s)`$ belongs to the simplex $`J\{𝐱𝐑^s|0x_i1,_{i=1}^sx_i=1\}`$. $`J`$ is invariant under (2) since $`c_{ij}0`$. Let $`𝐗(X_1,\mathrm{},X_s)`$ denote an attractive fixed point of (2), $`𝐲^\lambda (y_1^\lambda ,\mathrm{},y_s^\lambda )`$ (or equivalent column vector) a right eigenvector of $`C`$ with eigenvalue $`\lambda `$, and $`\lambda _1`$ the eigenvalue of $`C`$ which has the largest real part. Then $`𝐱^\lambda =𝐲^\lambda /_{j=1}^sy_j^\lambda `$ is a fixed point of (2). If $`\lambda _1`$ is nondegenerate, $`𝐗=𝐱^{\lambda _1}`$ is the unique asymptotically stable attractor of (2) . If $`\lambda _1`$ is degenerate the attractor configuration is still a fixed point; now $`𝐗`$ is a linear superposition of the $`𝐱^{\lambda _1}`$ that depends on the initial condition $`𝐱(0)`$. The Perron-Frobenius theorem for non-negative matrices ensures that $`\lambda _1`$ is real and $`0`$. Table 1 shows a few simple graphs and their corresponding $`\lambda _1`$ and attractors. Chains and trees have $`\lambda _1=0`$. Simple cycles of any size have $`\lambda _1=1`$ while more complicated structures such as the double loop or the eight structure have higher $`\lambda _1`$.

Autocatalytic sets and spectral properties of directed graphs   
An autocatalytic set (ACS) is a subset of the species that contains the catalysts for all its members . In the present context, one can define an ACS as a subgraph, each of whose nodes has at least one incoming link from a node belonging to the same subgraph. The simplest ACS is a 2-cycle. Every cycle is an ACS but the converse is not true.

(i) If a graph has no cycle then $`\lambda _1=0`$. If $`C`$ is the adjacency matrix of a graph then $`(C^n)_{ij}`$ counts the number of distinct paths of length $`n`$ from node $`j`$ to node $`i`$. If $`\lambda _i`$ are the eigenvalues of $`C`$ then $`\lambda _i^n`$ are the eigenvalues of $`C^n`$. If a graph has no cycle then let the length of the longest path between any two nodes of the graph be denoted $`r`$. Clearly $`C^m=0`$ for $`m>r`$. Therefore all eigenvalues of $`C^m`$ are zero. Hence, all eigenvalues of $`C`$ are zero which implies $`\lambda _1=0`$.

(ii) If a graph has a cycle then $`\lambda _11`$. If a graph has a cycle then there is some vertex $`i`$ which has at least one path to itself of length $`n`$, i.e. $`(C^n)_{ii}1`$, for infinitely many values of $`n`$. Since the sum of the diagonal entries of a matrix equals the sum of the eigenvalues of the matrix, $`_{i=1}^s(C^n)_{ii}`$ is equal to the sum of the $`n^{th}`$ powers of the eigenvalues of $`C`$. Thus the sum of the $`n^{th}`$ powers of the eigenvalues is at least 1, for infinitely many values of $`n`$. Therefore, there exists an eigenvalue with modulus $`1`$. By the Perron-Frobenius theorem, $`\lambda _1`$ is the eigenvalue with the largest modulus, hence $`\lambda _11`$ .

An ACS is not in general an irreducible subgraph, because there need not be a path from every node of an ACS to another. Thus the Perron-Frobenius theorem for irreducible non-negative matrices  does not apply to ACSs. Nevertheless, ACSs share some important properties with cycles (which are irreducible):

(iii) An ACS must contain a cycle. Let $`C`$ be the adjacency matrix of a graph which is itself an ACS. Then by definition, every row of $`C`$ has at least one non-zero entry. Construct $`C^{}`$ by removing all non-zero entries in each row of $`C`$ except one which can be chosen arbitrarily. Thus $`C^{}`$ has exactly one non-zero entry in each row. Clearly the column vector $`𝐱=(1,1,\mathrm{},1)`$ is a right eigenvector of $`C^{}`$ with eigenvalue 1. This implies that the graph for which $`C^{}`$ is the adjacency matrix contains a cycle. Since the construction of $`C^{}`$ from $`C`$ involved only removal of some links, it follows that the original graph must also contain a cycle.

(iv) If a graph has no ACS then $`\lambda _1=0`$. This follows from (i) and (iii).

(v) If a graph has an ACS then $`\lambda _11`$. This follows from (ii) and (iii).

The reason why an ACS is a useful concept in the present context is the following property, not true of cycles in general:

(vi) If a graph has $`\lambda _11`$, then the subgraph corresponding to the set of nodes $`i`$ for which $`x_i^{\lambda _1}>0`$ is an ACS. Renumber the nodes of the graph so that $`x_i^{\lambda _1}>0`$ only for $`i=1,\mathrm{},k`$. Let $`C`$ be the adjacency matrix of this graph. Since $`𝐱^{\lambda _1}`$ is an eigenvector of the matrix $`C`$ we have $`_{j=1}^sc_{ij}x_j^{\lambda _1}=\lambda _1x_i^{\lambda _1}_{j=1}^kc_{ij}x_j^{\lambda _1}=\lambda _1x_i^{\lambda _1}`$. Since $`x_i^{\lambda _1}>0`$ only for $`i=1,\mathrm{},k`$ it follows that for each $`i\{1,\mathrm{},k\}`$ there exists a $`j`$ such that $`c_{ij}>0`$. Hence the $`k\times k`$ submatrix $`C^{}(c_{ij})`$, $`i,j=1,\mathrm{},k`$ has at least one non-zero entry in each row. Thus each node of the subgraph corresponding to this submatrix has an incoming link from one of the other nodes in the subgraph. Hence the subgraph is an ACS. We call this subgraph the ‘dominant ACS’ of the graph.

(vii) Consider a graph with no cycles and let there be a chain of $`r`$ links in this graph whose successive nodes are labelled $`i=1,2,\mathrm{},r+1`$. The node 1 (to which there is no incoming link) has a constant population $`y_1`$ since the r.h.s of (1) vanishes for $`i=1`$ when $`\varphi =0`$. For the node 2, we get $`\dot{y_2}=y_1`$, hence $`y_2(t)=y_2(0)+y_1tt`$ for large $`t`$. Similarly it can be seen that $`y_k`$ grows as $`t^{k1}`$. In general, it is clear that for a graph with no cycles, $`y_it^r`$ for large $`t`$ when $`\varphi =0`$, where $`r`$ is the length of the longest path terminating at node $`i`$. Since the dynamics (2) does not depend upon the choice of $`\varphi `$, this proves that for a graph with no cycles $`X_i=0`$ for all $`i`$ except the nodes at which the longest paths in the graph terminate. Similarly if a 2-cycle feeds into another 2-cycle as shown in Table 1, $`X_i=0`$ for the nodes in the first 2-cycle. These are examples of the more general situation where $`X_i=0`$ for nodes of a subgraph which has another subgraph ‘downstream’ from it with an equal or larger $`\lambda _1`$.

Evolution of the network   
On a short timescale the graph remains fixed and the $`x_i`$ evolve according to (2). On a longer timescale at discretely spaced intervals (labelled by $`n=1,2,\mathrm{}`$) the graph itself changes by the elimination of an existing species and the creation of a new one. At the initial time ($`n=0`$) the graph is random: $`c_{ij}=1`$ (for $`ij`$) with probability $`p`$ ($`p`$ is called the ‘catalytic probability’) and zero with probability $`1p`$. $`mp(s1)`$ is referred to as the average connectivity. The graph at $`n+1`$ is obtained from that at $`n`$ by the following procedure: Determine the ‘set of least fit nodes’ at $`n`$, namely, those that have the smallest $`X_i`$ for the graph at $`n`$. Pick a node at random from this set, and reassign links between it and all other nodes randomly with the same probability $`p`$. The idea is that for a fixed graph the relative population stabilizes at $`𝐗`$. One of the least fit species ($`X_i`$ is taken to be a measure of fitness) mutates or is eliminated. This corresponds to an ‘extremal dynamics’ as in the model of Bak and Sneppen . The graph update corresponds to the appearance of the mutant or replacement, which has random connections (but with the same average connectivity $`m`$ as in the initial graph) with other species.

Define $`s_1(n)`$ as the number of species $`i`$ for which $`X_i0`$ at the $`n^{th}`$ time step. For a graph with $`\lambda _11`$, $`s_1`$ is the number of nodes in the dominant ACS. Whenever $`s_1<s`$ it can be shown that the set of least fit nodes, which is the set of nodes with $`X_i=0`$, is unique and independent of the initial condition even if $`\lambda _1`$ is degenerate. When $`s_1=s`$, $`\lambda _1`$ has turned out to be nondegenerate in the runs displayed. Hence there is no ambiguity in the update procedure arising from initial conditions on $`𝐱`$.

Figures 1 and 2 show how $`\lambda _1`$ and $`s_1`$ evolve for a run with $`s=100`$ and $`m=0.25`$. For $`n<n_1=1515`$, $`\lambda _1=0`$ and there is no ACS in the graph. For $`n<n_1`$, $`s_1`$ is below 10 most of the time. At $`n=n_1`$ the graph update forms a 3-cycle which becomes the dominant ACS and $`\lambda _1`$ jumps from zero to one. The nodes outside the dominant ACS by definition have $`x_i^{\lambda _1}=0`$ and constitute the set of least fit nodes. Therefore, as long as the dominant ACS at step $`n`$ (let us denote this subgraph as A($`n`$)) does not include the whole graph, i.e., $`s_1<s`$, the mutating node will be outside it. At step $`n+1`$ the mutant species can either (a) get linked to A($`n`$), or (b) form another ACS with other nodes which were not part of A($`n`$), or (c) be a singleton or part of a non-ACS structure. In all cases $`\lambda _1(n+1)`$ cannot be less than $`\lambda _1(n)`$. (For case (a) this depends upon the fact that the mutating node, being outside A($`n`$), cannot destroy any of its links.) Thus, whenever $`s_1<s`$, $`\lambda _1`$ is a non-decreasing function of $`n`$. It follows that once an ACS is formed by chance, the autocatalytic property of the graph will be preserved until the dominant ACS engulfs the whole graph.

After the appearance of the ACS at $`n=n_1`$, whenever a node gets an incoming link from the dominant ACS it becomes part of the dominant ACS. Most of the time this increases $`s_1`$ and the dominant ACS grows until it spans the entire graph at $`n=n_2=3010`$ when $`s_1=s`$ for the first time. For $`n[n_1,n_2]`$, $`s_1`$ locally averaged in time grows exponentially.

In the given run a 2-cycle disconnected from the existing dominant ACS is created $`n=1807`$. Both the cycles coexist and grow together until $`n=2145`$ when the graph update creates a chain from the 3-cycle to the 2-cycle. Thus a situation occured in which a subgraph with $`\lambda _1=1`$, comprising the 3-cycle and the nodes being fed by the 3-cycle, was now feeding into the 2-cycle ‘downstream’ which also had $`\lambda _1=1`$. Hence all the nodes of the first subgraph entered the set of least fit nodes (see remarks under (vii)) and $`s_1`$ decreased from 15 to 10. Later at $`n=2240`$ the chain joining the cycles was broken by the graph update and both cycles became part of the dominant ACS. At $`n=2607`$, $`s_1`$ decreases from 58 to 31. This time also a chain formed between the cycles with the 2-cycle now feeding into the 3-cycle. $`s_1`$ rises back up to $`54`$ at $`n=2611`$ when this chain too was broken by the graph update. There is one more fall in $`s_1`$ at $`n=2780`$. The graph update results in the 3-cycle being converted to a double loop which has $`\lambda _11.17`$ which overshadows the ACS whose core is the 2-cycle.

Even in regions where $`s_1`$ is increasing the ACS structure could be changing quite a lot. Many complicated processes are possible, such as formation of new disconnected ACSs or the reinforcement of an old overshadowed ACS before it was completely broken up. Thus the actual growth of the ACS is usually a very complicated process with the dominant ACS often undergoing drastic changes in structure caused by purely chance events. We wish to emphasize, however, that notwithstanding the historical particularities of a given run, every history respects the rule that $`\lambda _1`$ is a nondecreasing function of time (unless $`s_1=s`$) in this simple model. (In a ‘non-extremal’ dynamics, one can expect a stochastic version of this monotonicity, as long as selection is still sufficiently strong.) Further, the ensemble of runs with the same parameter values $`m`$, $`s`$ has identifiable characteristics like the average time of appearance of an ACS $`\tau _an_1s/m^21/(p^2s)`$, and the exponential growth time scale $`\tau _gs/m1/p`$ (for sufficiently small $`m`$ and large $`s`$) .

At $`n=n_2`$ the whole graph becomes an ACS and for the first time the graph update will alter a node from the dominant ACS. Then $`\lambda _1`$ can decrease. It eventually settles in a statistical steady state with large fluctuations in the run shown. For very low $`m`$, $`\lambda _1`$ can even become zero in a graph update.

In addition to $`\lambda _1`$, $`s_1`$ and the total number of links $`l`$, another measure of the complexity of the graph is ‘interdependency’, denoted $`\overline{d}`$, which we define as follows: $`\overline{d}(1/s)_{i=1}^sd_i`$, where $`d_i`$ is the ‘dependency’ of the $`i^{th}`$ node. $`d_i`$ is the total number of links in all paths that terminate at node $`i`$, each link counted only once. Since $`d_i`$ counts how many links ultimately ‘feed into’ the node $`i`$, it is a measure of how ‘dependent’ species $`i`$ is on other species. Thus $`\overline{d}`$ is a measure of how interdependent the species in the graph are. From Table 1 it is evident that graphs with the same number of links can have different $`\overline{d}`$.

Figure 3 shows $`\overline{d}`$ versus $`n`$ for the same run (the lower curve in the figure corresponds to a ‘random run’ in which the node to be eliminated is picked randomly from the entire set of $`s`$ nodes). The qualitative features are similar to $`l`$ which has been discussed in . A quantitative difference is that from $`n=0`$ to the steady state, $`\overline{d}`$ increases by a factor of approximately 50 which is much more than the increase in $`l`$ (a factor of about 5, see ). The evolution of the system does not seem to lead to maximally dense graphs, $`m^{}s`$, but only $`m^{}O(1)`$ ($`m^{}`$ is the steady state connectivity). Nevertheless the system achieves a high interdependency. A steady state $`\overline{d}`$ value of about 25 means that each species is being fed with an appreciable fraction of the total number of links, suggestive of long range correlations having developed in the system. The fluctuations of $`\overline{d}`$ in the steady state are also more pronounced than for $`l`$. At each graph update the change in the number of links is $`O(1)`$ for fixed $`m`$ but the addition or removal of a few links causes large changes in $`\overline{d}`$, reflecting its nonlocal character.

Acknowledgement: S. J. acknowledges the affiliation and support of the Jawaharlal Nehru Centre for Advanced Scientific Research, Bangalore, as well as Associate membership and hospitality of the Abdus Salam International Centre for Theoretical Physics, Trieste.