[1,2]\fnmNaoki \surMasuda
1]\orgdivDepartment of Mathematics, \orgnameUniversity at Buffalo, \orgaddress\streetState University of New York, \cityBuffalo, \postcode14260-2900, \stateNY, \countryUSA
2]\orgdivComputational and Data-Enabled Science and Engineering Program, \orgnameUniversity at Buffalo, \orgaddress\streetState University of New York, \cityBuffalo, \postcode14260-5030, \stateNY, \countryUSA
Perturbation theory for evolution of cooperation on networks
Abstract
Network structure is a mechanism for promoting cooperation in social dilemma games. In the present study, we explore graph surgery, i.e., to slightly perturb the given network, towards a network that better fosters cooperation. To this end, we develop a perturbation theory to assess the change in the propensity of cooperation when we add or remove a single edge to/from the given network. Our perturbation theory is for a previously proposed random-walk-based theory that provides the threshold benefit-to-cost ratio, , which is the value of the benefit-to-cost ratio in the donation game above which the cooperator is more likely to fixate than in a control case, for any finite networks. We find that decreases when we remove a single edge in a majority of cases and that our perturbation theory captures at a reasonable accuracy which edge removal makes small to facilitate cooperation. In contrast, tends to increase when we add an edge, and the perturbation theory is not good at predicting the edge addition that changes by a large amount. Our perturbation theory significantly reduces the computational complexity for calculating the outcome of graph surgery.
keywords:
evolutionary game; prisoner’s dilemma; network reciprocity; fixation; stochastic dynamics1 Introduction
Since Darwin’s time, explaining cooperative behavior in groups of self-interested individuals has been a challenge [1, 2, 3, 4, 5, 6, 7, 8]. Game theory including evolutionary game theory has shown that a population of self-interested individuals playing a social dilemma game of the prisoner’s dilemma type does not sustain cooperation without an additional mechanism. To explain cooperation in social dilemma situations in nature including in biological populations and to promote cooperation in human society, there have been proposed various mathematical mechanisms to support cooperation. Population structure as represented by contact networks of individuals is one such mechanism. The structure of contact networks constrains who can interact with whom and promotes emergence and endurance of clusters of cooperative players in local regions in spatial lattices [2, 9, 10, 11] and adjacent pairs of nodes in general networks [12, 13, 14, 11, 15].
A major indicator of the success of a mutant trait in evolutionary dynamics is the fixation probability. It is defined as the probability that the mutant type will spread and eventually occupy the entire population as a result of evolutionary dynamics, given an initial distribution of mutants [16, 17, 18, 5]. When each individual is in either of the two types (i.e., wild and mutant) at any given time and the population structure is described by a network on nodes, the state of the network is specified by an -dimensional binary vector of which the th entry encodes the type of the th node. In the absence of mutation, the fixation probability of the mutant starting from the state in which all the nodes are of the wild type is equal to . The fixation probability of the mutant is equal to if all the nodes are initially mutant. For general initial conditions, the exact solution of the fixation probability requires solving a linear system of equations [18, 13]. Therefore, it is difficult to exactly compute the fixation probability except for small networks, highly symmetric networks, or networks with other mathematically convenient properties.
We focus on social dilemma situations, in particular the prisoner’s dilemma game, in the present paper. In the prisoner’s dilemma, the wild and mutant types correspond to cooperator and defector, respectively, or vice versa. The calculation of the fixation probability for the prisoner’s dilemma game on networks, potentially with some additional assumptions, is usually more involved than the calculation in the case of the constant selection, in which the fitness of the wild and mutant types is fixed throughout the evolutionary dynamics. In games, the fitness of an individual generally depends on how other individuals behave, which makes setting up the linear system of equations and efficiently solving it, particularly the latter, a difficult task. Under this circumstance, weak selection is an assumption that often facilitates analytical evaluation of the fixation probability of the mutant type including in social dilemma games [16]. Let us write down each individual’s fitness as a sum of a constant term, called the baseline fitness, and the payoff that the individual receives by playing the game. By definition, weak selection means that the payoff is small compared to the baseline fitness. Under weak selection, Ohtsuki et al. developed a pair approximation theory that enables us to analytically derive the conditions under which cooperation fixates with a larger probability than a baseline on random regular graphs, i.e., random graphs in which all nodes have the same number of neighbors [13]. Furthermore, Allen et al. extended this result to the case of arbitrary networks using coalescence times from random walk theory [15]. With these methods, one can avoid dealing with a set of linear equations and calculate the leading term of the fixation probability in polynomial time in terms of .
In Ref. [15], the authors derived a key indicator to quantify the ease of cooperation in networks, i.e., the threshold benefit-to-cost ratio above which selection favors cooperation, denoted by . In fact, substantial changes in may occur when one only slightly perturbs the network structure, which is an operation referred to as graph surgery [15]. A carefully designed graph surgery may enhance cooperation by reducing by a larger amount than by a random graph surgery. For example, a small mean degree (i.e., the number of neighbors that a node has) of the network tends to induce cooperation [13, 15]. Therefore, decreasing the weight of an edge or removing an edge is expected to enhance cooperation. However, this may not be an optimal choice. Which particular edge should we perturb or remove to efficiently enhance cooperation? One can answer this question by removing just one edge from the original network, calculating for the perturbed network, and repeating the same procedure for each different perturbation of the original network. However, this procedure may be computationally costly. Note that the method to calculate the fixation probability for cooperation in arbitrary networks, developed in Ref. [15], is still computationally costly although its computational complexity is polynomial in .
In the current study, we develop a perturbation theory with the aim of predicting the direction and amount of the change in when one slightly perturbs the weight of an arbitrary single edge. We find that, for most networks, the actual change in when we remove an edge and the change predicted by our perturbation theory are strongly correlated, which makes it possible to propose a single edge to be removed for efficiently enhancing cooperation. However, the correlation between the result of direct numerical simulations and the perturbation theory is considerably weaker when one adds a new edge to the existing network. Therefore, our perturbation theory is not practically useful when one adds new edges. Compared to the direct numerical simulations, our perturbation theory is much faster, which allows us to compute the fixation probability under graph surgery in larger networks.
2 Fixation of cooperation on networks under weak selection
We assume that the graph is connected and undirected. We denote the set of nodes by , where is the number of nodes. For each pair of nodes , we denote the edge weight by . If there is no edge between and , we set . We allow self-loops, i.e., positive values of [15]. The weighted degree of node , denoted by , also called the node strength, is the sum of the weight of the edges connected to the node.
A discrete-time random walker is said to be simple if the walker located at node moves to one of its neighbors, denoted by , in a single time step with probability proportional to , i.e., with probability . Let be the weighted adjacency matrix. The transition probability matrix of the simple random walk is given by , where , i.e., the diagonal matrix whose diagonal entries are equal to . Let be the stationary probability vector of the random walk with transition probability matrix , i.e., the solution of . It holds true that [19, 20]
(1) |
We use the donation game, which is a special case of the prisoner’s dilemma game. In the donation game, which is a two-player game, one player, called the donor, decides whether or not to pay a cost . If the donor pays , which we refer to as cooperation, then the other player, called the recipient, receives benefit . If the donor does not pay , which we refer to as defection, then the donor does not lose anything, and the recipient does not gain anything. Therefore, the payoff matrix of the donation game for a pair of players is given by
(2) |
where C and D represent cooperation and defection, respectively, and the payoff values represent those for the row player. We assume that each player on a node participates in the game as donor and recipient half of the times each.
We assign 0 and 1 to the defector and cooperator, respectively. Then, we can represent a state of the entire network by a binary vector . With this notation, the payoff of node averaged over all its neighbors is given by
(3) |
The reproductive rate of node in state is given by
(4) |
where represents the strength of the selection. If , the reproductive rate does not depend on the payoff matrix or the action (i.e., cooperation or defection) of any node. This case is equivalent to the so-called voter model. If , the payoff weakly impacts the selection, and this limit is called the weak selection regime. The idea behind weak selection is that, in reality, many different factors may contribute to the overall fitness of an individual, and the game under consideration is just one such factor [13, 15].
We drive evolutionary dynamics by the death-birth process with selection on birth on an arbitrary network composed of cooperators and defectors [13, 15]. Specifically, we first select a node to be updated, denoted by , uniformly at random. Second, we select one of the ’s neighbors, denoted by , for reproduction with the probability proportional to . Third, the offspring, , inherits the type of . This completes a single round of the evolutionary dynamics, which we schematically show in Fig. 1.

The death-birth process in any finite population without mutation will eventually reach the state in which all individuals are cooperators or defectors and halt. In other words, the cooperation or defection fixates in finite time with probability . Suppose the initial condition in which one node is cooperator and the other nodes are defectors. There are such initial conditions depending on which node is the cooperator. We consider the initial probability distribution over all possible states that assigns probability to each of the states with exactly one cooperator and probability zero to all the other states. We denote by the expectation that the cooperation fixates under this distribution of the initial state. If , natural selection favors cooperation [16, 13, 5, 15]. In Ref. [15], Allen et al. showed that
(5) |
where
(6) |
is the th entry of matrix , which implies that , and
(7) |
Equation (7) implies that is the mean coalescence time of two random walkers when one walker is initially located at node and the other at node . Note that is the -step transition probability of the random walk from node to node . Therefore, is the expected value of when and are the two ends of a -step random walk trajectory on under the stationary distribution [15]. Equation (5) implies that the threshold value of the benefit-to-cost ratio above which the natural selection favors cooperation (i.e., ) is given by
(8) |
Natural selection favors cooperation if .
For example, if the underlying network is regular with degree , we have
(9) | |||
(10) |
and
(11) |
such that
(12) |
as [15]. Note that the right-hand side of Eq. (8) only depends on the adjacency matrix of the network. In other words, the structure of the contact network determines whether and how much natural selection favors cooperation.
3 Perturbation theory for graph surgery
In this section, we develop a perturbation theory to determine the change in when one perturbs the weight of a single edge. To this end, we start by rewriting Eq. (6) in terms of matrices and vectors. Let , where ⊤ represents the transposition. Let be the matrix of the mean coalescence time. Using these notations, we rewrite Eq. (6) as
(13) |
where , and represents the Hadamard product.
If one changes the weight of an edge by , where , including the case in which we create a new edge with weight , the perturbed network remains connected and undirected. Therefore, one can still use Eq. (8) to compute . Equation (8) uses Eq. (6), which requires , , and . We denote these variables after the perturbation by , , and . To distinguish the quantities before and after the perturbation, we denote these variables before the perturbation by , , and .
For writing down , we denote by
(14) |
the sum of the weighted degree of over all the nodes. Under a small perturbation, we carry out Taylor expansion of Eq. (1) to obtain
(15) |
where . We obtain
(16) |
where is the Kronecker delta. We present the derivation of Eq. (16) in Appendix A.
To calculate , we define a symmetric indicator function, denoted by , by
(17) |
We obtain
(18) | ||||
(19) | ||||
(20) |
where , , and are matrices whose entries are given by
(21) |
(22) |
and
(23) |
We show the derivation of Eqs. (21), (22), and (23) in Appendix B.
We next calculate . Matrix satisfies
(24) |
which we obtain by applying to Eq. (7). Note that are known from the network structure and that are unknowns. We stack Eq. (24) for the different and values in lexicographical order of on the left-hand side. In other words, the first equation is , the second equation is , the third equation is , and so on. Denote by the thus obtained vectorization of matrix , i.e.,
(25) |
Equation (25) is a redundant expression because is a symmetric matrix and its diagonal elements are equal to 0. However, we use Eq. (25) in the following text because it makes the theoretical derivations and computational implementation easier than the most compact vector form of , which would be -dimensional. Using Eq. (25), we rewrite Eq. (24) as
(26) |
where is the matrix whose entries are determined by Eq. (24), and is the -dimensional column vector whose th entry is equal to 0 for all , and all the other entries are equal to 1. Because it also holds true that , the calculation of requires , which is the matrix with perturbation, defined similarly to . We obtain the entries of by those of with each (with ) being replaced by . We write the Taylor expansion of as
(27) |
and calculate as follows.
4 Time complexity
To calculate for a network with nodes, the original algorithm requires calculating the mean coalescence time by solving a linear system of variables, i.e., (with and , which has a time complexity of . With the Coppersmith-Winograd algorithm [21], the time complexity is reduced to [15]. To determine the single edge whose removal decreases by the largest amount, for example, one needs to repeat this procedure for each edge. Therefore, the entire procedure with an ordinary algorithm and the Coppersmith-Winograd algorithm requires and time, respectively, where is the number of edges. For a sparse network, for which , the time complexity is and , respectively.
The matrix defined by Eq. (28) is sparse and has a special pattern. If the th row of is a zero row, then the th element of vector is zero, and we do not need to calculate it. Therefore, to calculate , we only need to focus on its th entries, where , th entries, where , and th and th entries, where . All the other entries of are equal to . We show a pseudo algorithm to calculate in Algorithm 1.
/* Compute */
/* Compute */
We now discuss the computational complexity of our perturbation method. Because the inner product of -dimensional vectors has a time complexity of , the first while loop in Algorithm 1 has a complexity of . The second while loop computes . Because the scalar multiplication of an -dimensional vector requires time, the entire while loop has a time complexity of . Therefore, for a single perturbation experiment, one can carry out the entire algorithm in time to obtain the perturbed , and hence . This is considerably smaller than and with the Coppersmith-Winograd algorithm and the standard algorithm, respectively. The entire procedure to determine the single edge to be removed to maximize cooperation with the perturbation theory requires time in general networks and time for sparse networks.
5 Data
We use the following four synthetic networks and seven empirical networks in our numerical analysis in section 6. We show the number of nodes and that of edges for each network in Table 1 and visualize them in Fig. 2. All the networks are connected networks without self-loops.

We use a network generated by the Erdős–Rényi (ER) random graph with nodes. We connect pairs of nodes out of the pairs of nodes selected uniformly at random. The average degree .
With the Barabási–Albert (BA) model, we sequentially add new nodes each with edges that connect to existing nodes according to the linear preferential attachment rule [22]. We start the growth process from the star graph with four nodes. The degree distribution approximately obeys , where is the probability that a node has degree of , and represents “proportional to”, in the limit of . We set and , which yields edges, implying .
The planted -partition model, also called the random partition (RP) graph, partitions the set of nodes into groups, each of which has nodes [23]. Any pair of nodes in the same group is adjacent to each other with probability . Any pair of nodes belonging to different groups are adjacent to each other with probability . If , the intra-cluster edge density exceeds the inter-cluster edge density such that the network has community structure. We set , , , and such that the mean degree in theory. We use a network generated by this model having .
The Lancichinetti–Fortunato–Radicchi (LFR) model generates networks with community structure [24]. The model generates a power-law degree distribution with power-law exponent , and a power-law distribution of the size of the community with power-law exponent . The model also requires the maximal degree and mean degree as input. The mixing parameter specifies the fraction of edges that connect different communities. A small value of leads to strong community structure. We set , , , , , and . A network generated by this model that we use has .
We consider the following seven empirical networks. The karate club network consists of 34 nodes and 78 edges [25]. Each node represents a member of a karate club in a university in the United States, who were observed between 1970 and 1972. The edges represent interaction outside the activities of the club.
The weaver network has 42 nodes and 151 edges [26]. Each node represents a sociable weaver (Philetairus socius) observed in Benfontein Game Farm, Kimberley, South Africa. The observation lasted for 10 months in total: September–December 2010 and 2011, and January–February 2013. Two nodes are adjacent to each other if the two weavers used the same nest chambers either for roosting or nest-building within a series of observations in the same year.
The sparrow network has 52 nodes and 516 edges [27]. A node represents a golden-crowned sparrow (Zonotrichia atricapilla) observed at the University of California, Santa Cruz Arboretum. The data was recorded between January and March 2010 [27]. Although the original network is weighted, we regard this network as an unweighted network.
The lizard network has 60 nodes and 318 edges [28]. Each node represents a lizard (Tiliqua rugosa) observed in a chenopod shrubland near Bundey Bore Station in South Australia. Each lizard was attached to the dorsal surface of the tail a data logger unit, which recorded synchronized GPS locations every 10 minutes. Two lizards were regarded to be adjacent to each other if they were within 2 meters of each other in any GPS record.
The dolphin network has 62 nodes and 159 edges [29]. Each node represents a bottlenose dolphin (Tursiops). An edge represents a frequent association between two dolphins.
The email network has 167 nodes and 3251 edges [30]. Each node represents an employee of a mid-sized manufacturing company in Poland. An edge between two nodes (i.e., employees) indicates that there exists at least one email correspondence between the two individuals. We do not distinguish the senders and the recipients and treat the network as undirected network.
The bird network has 202 nodes and 11900 edges [31]. In the experiment, they placed some nest boxes in Wytham Woods, Oxford, UK, for six days to record individuals that landed on the entrance hole while prospecting for breeding territories. Each node represents a wild bird, which is either great tit (Parus major), blue tit (Cyanistes caeruleus), marsh tit (Poecile palustris), coal tit (Periparus ater), or Eurasian nuthatch (Sitta europaea). An edge represents two birds that overlapped in nest-box exploration patterns on the same day.
6 Numerical results
6.1 Addition or removal of a single edge
We examine the accuracy at which our perturbation theory describes the change in when we add or remove an edge in the given unweighted network. Before the perturbation, if there exists an edge between the th and th nodes, and otherwise. In the case of edge addition, we add an edge with weight between a pair of nodes without an edge in the original network unless we state otherwise, where . Therefore, changes from to , and all the other values remain unchanged. The addition of an unweighted edge corresponds to . In the case of edge removal, we reduce the weight of an edge in the original network by , where . Therefore, changes from to , and all the other values remain unchanged. The complete removal of an unweighted edge corresponds to .
We are interested in whether the linear approximation to given by Eq. (34), i.e., , which we call the slope, predicts the change in in response to the addition of a single edge, i.e., , or the removal of a single edge, i.e., . We start by directly computing the change in , i.e., , in response to adding a new edge of weight or reducing the weight of an existing edge by changing the edge weight to for various values of for relatively small networks. The outcome of our perturbation theory, i.e., is equal to , where and are the values obtained by the direct numerical simulations.
We show the relationship between and when we reduce the weight of a single edge in a BA network with nodes in Fig. 3(a). Each line in the figure corresponds to an edge whose weight is gradually reduced. Note that corresponds to the original network. Figure 3(a) indicates that roughly monotonically decreases as we gradually decrease the edge weight (i.e., decrease from 0 to negative values) except near . For this network, the removal of any single edge (i.e., ) leads to a decrease in , implying that the edge removal promotes cooperation. However, we note that a small decrease in the weight of an edge in the original network (e.g., ) increases for some edges, making cooperation more difficult than in the original network. Figure 3(a) implies that the perturbation theory is not accurate at describing the amount of the change in upon the edge removal because most of the curves shown in the figures, corresponding to the different edges in the original network, are far from being linear. However, we observe that the curves with the largest values of the slope of the curve at tend to yield the smallest values of at . Therefore, the perturbation theory, which produces the slope value, is expected to be efficient at detecting the edges whose removal yields the largest decrease in .
We show in Fig. 3(b) the change in plotted against when we add a new edge with weight . Each line corresponds to a pair of nodes between which there is initially no edge. Note that corresponds to the addition of an unweighted edge. We find that the addition of any unweighted edge increases , making cooperation difficult. However, in contrast to the case of edge removal, the addition of an unweighted edge (i.e., with edge weight ) does not necessarily yield the largest change in among edges of different weights . Specifically, for many node pairs that are initially not adjacent to each other, adding an edge with an intermediate edge weight (e.g., ) maximizes the increase in (see Fig. 3(b)). Another observation is that the slope of the curve at , corresponding to the perturbation theory, is apparently less predictive of the effect of adding an unweighted edge (i.e., ). Specifically, Fig. 3(b) indicates that, even if the slope at is large, at can be relatively small because decreases as increases when is close to 1. Furthermore, the curves with the largest slopes at do not yield the largest changes in the value at , which implies that the perturbation theory is expected to be inefficient at predicting the edge addition that makes the cooperation most difficult.
We find similar results for the planted -partition model for the gradual removal of a single edge (see Fig. 3(c)). A notable difference from the case of the BA model is that there exists one edge whose complete removal increases , making the cooperation difficult. The two nodes forming this edge have degrees and , which are not outstanding. Furthermore, we have confirmed by running a deterministic approximate modularity maximization algorithm [32], using function greedy_modularity_communities in NetworkX, that these two nodes belong to the same community among the four communities detected. Therefore, this particular edge looks like just a normal edge.
We show in Fig. 3(d) the dependence of on when we gradually increase the weight of an edge that is initially absent in the planted -partition network. The slope of the curve at at is apparently not strongly related to the change in at .
We show the results of edge removal in the dolphin network in Fig. 3(e). There are two edges out of the 150 edges of which the removal (i.e., ) increases , making cooperation difficult. These two edges are formed by two nodes with degrees 2 and 5 and two other ones with degrees 2 and 7. These degree values are not outstanding in the entire network. The four nodes belong to the same community among the four communities detected by the same approximate modularity maximization algorithm [32]. These results suggest that the two edges apparently look normal. The removal of any other edge decreases , enhancing cooperation. Similar to the BA model, the curves with the largest slopes at yield the largest decreases in at .
We show in Fig. 3(f) the dependence of on when we gradually increase the weight of an edge that is initially absent in the dolphin network. The results are similar to those for the planted -partition model shown in Fig. 3(d). Many curves yield decrease in at , implying that the edge addition can promote cooperation, whereas the converse is the case for many other curves. The slope of the curve of at is apparently not strongly related to the change in at .
Network | , edge | , edge | , edge | ||
---|---|---|---|---|---|
addition | removal | enhancement | |||
ER | 100 | 300 | |||
BA | 100 | 291 | |||
RP | 100 | 306 | |||
LFR | 100 | 304 | |||
Karate | 34 | 78 | |||
Weaver | 42 | 152 | |||
Sparrow | 52 | 516 | |||
Lizard | 60 | 318 | |||
Dolphin | 62 | 159 |
The nonlinearity in the curves shown in Fig. 3 indicates that our perturbation theory is not accurate at predicting the amount of change in when we completely remove or add an edge in most cases. Therefore, we turn to ask whether the slope obtained from the perturbation theory is useful at determining the edge whose removal or addition changes by a large amount, representing strong promotion or suppression of cooperation in networks. We show in Fig. 4(a) the relationship between the change in when we remove an edge from the BA network and the slope obtained from Eq. (34). The two quantities are strongly negatively correlated (Pearson correlation coefficient , sample size ). This result indicates that the perturbation theory, which is theoretically accurate only in the vicinity of , is good at predicting the outcome of removing an edge. We show in Fig. 4(b) the change in when we add a new edge to the same BA network as a function of the slope, . The change in is not strongly positively correlated with , suggesting that the perturbation theory is not good at predicting the outcome of adding an edge, whereas the correlation coefficient is significant due to a large sample size (). Note that a large positive correlation coefficient when we add an edge would imply that the perturbation theory is good at predicting the outcome of adding an edge.
We show in Figs. 4(c) and 4(d) the results for the same correlation analysis for the planted -partition model network. When one removes an existing edge, the change in and slope are strongly negatively correlated (; see Fig. 4(c)), which is similar to the result for the BA model shown in Fig. 4(a), suggesting that the perturbation theory is good at predicting the outcome of removing an edge. When one adds a new edge, the change in and slope are weakly correlated for this network (; see Fig. 4(d)), which is similar to the result for the BA model shown in Fig. 4(b).
We show the corresponding results for the dolphin network in Figs. 4(e) and 4(f). The change in and slope are strongly negatively correlated when one removes an edge (; see Fig. 4(e)) and less strongly correlated when one adds a new edge (; see Fig. 4(f)). A strongly negative correlation for the edge removal (i.e., ) is similar to the result for the BA model. A positive correlation for the edge addition (i.e., ) implies that the perturbation theory is to some extent good at predicting the outcome of adding an edge.
We show in Table 1 the same relationships for the other networks. For all synthetic and empirical networks, the slope obtained from perturbation theory is strongly negatively correlated with the change in when we remove an existing edge (). Therefore, the perturbation theory is effective at predicting the outcome of removing an edge across different networks. However, the correlation is strongly positive only for a small fraction of networks (i.e., for three out of the nine networks) when we add a new edge to the network.


6.2 Enhancement of the weight of an existing edge
In this section, we allow weighted networks and consider an increase or decrease in the weight of an existing edge of the network. Because we effectively analyzed the case of the decrease in the edge weight in section 6.1 (i.e., by setting ), here we only consider enhancement of the weight of an existing edge by .
We enhanced the weight of an existing edge by , making the edge weight , and numerically examined in the altered weighted networks. We plot in Figs. 5(a), 5(c), and 5(e) the change in relative to the original network against for the three networks used in Figs. 3 and 4. For the BA model, increasing the weight of 74 out of the 291 existing edges from to (i.e., ) led to an increase in , making cooperation more difficult, whereas the opposite is the case when one enhances the weight of any other edge (see Fig. 5(a)). This result contrasts with the case of adding a new edge to the same network, which always increases (see Fig. 3(b)). In the planted 2-partition model (Fig. 5(c)) and the dolphin network (Fig. 5(e)), enhancing the edge weight of 7 out of the 306 edges and 23 out of the 159 edges, respectively, led to an increase in . Therefore, in a majority of cases, cooperation becomes easier by enhancing the weight of a single edge, which contrasts with the results for adding a new edge to these networks (see Figs. 3(d) and 3(f)). These results altogether suggest that adding new edges and enhancing the weight of existing edges often lead to different results.
Figures 5(a), 5(c), and 5(e) also indicate that the change in is close to linear as a function of . Therefore, our perturbation theory should be accurate at estimating the change in with . To verify this prediction, we show in Figs. 5(b), 5(d), and 5(f) the relationship between the change in in response to changing the weight of a single edge from to and obtained by the perturbation theory for the three networks. As expected, the accuracy of the perturbation theory is high. We have confirmed that a high accuracy also holds true for other networks (see the last column of Table 1). These high accuracy results are in stark contrast to the results in case of adding a new edge, with which the accuracy of the perturbation theory is low.

6.3 Sequential edge removal
The nonlinearity in the curves shown in Fig. 3, and the results shown in Fig. 4 and Table 1 indicate that our perturbation theory is not accurate at estimating the amount of change in upon an edge removal. Therefore, we turn to investigate whether our perturbation theory is good at finding edges to be sequentially removed to decrease by a large amount in larger networks. Denote by an original network. We remove the edge with the largest , resulting in network . Then, we calculate for each existing edge in and remove the edge with the largest , resulting in network . We repeat this procedure another three times to eventually obtain network , which has five fewer edges than .
A simple rule of thumb to determine edges to be removed to enhance cooperation is to use the degree of nodes composing the edge. In particular, for the death-birth rule is small for random regular graphs with small degrees [13] and general networks with a small mean degree [15]. Therefore, we test the performance of our perturbation theory against a degree-based heuristic to remove an edge for enhancing cooperation, which we define as follows. Denote by the edge to be removed and by and the degree of the th and th nodes, respectively. Note that for our networks, which are unweighted. For each network, we remove the edge whose is largest. After removing an edge according to this criterion, we select the edge with the largest in the reduced network and remove it. We repeat this procedure another three times to remove five edges in total. In our numerical experiments described below, we have verified that the selected edges are always the same if the score for the edge is defined by instead of .
We carry out sequential edge removal experiments on three synthetic networks and three empirical networks. Note that the six networks are mostly larger than those used in the previous numerical simulations. For these networks, it is computationally difficult to exactly calculate for all possible networks with, for example, one edge being removed from the original network.
We show the change in relative to the original network as we sequentially remove five edges using our perturbation theory by the red lines in Fig. 6. As expected, decreases, corresponding to negative values, as we remove edges one by one. We also show the result of the sequential edge removal based on the degree sum by the blue lines in the same figure. For all networks, there are multiple edges that have the same value of at least in one of the five steps to remove a single edge. In this case, we calculated for all the possible scenarios of removing one of the edges that maximize in each step of edge removal. This is why we have obtained multiple blue lines in the figure. In all cases, decreases as we sequentially remove edges with the largest value. Figure 6 indicates that the edge removal based on our perturbation theory results in a larger decrease in than that based on for all the networks. To be quantitative, we measured the decrease in after the removal of five edges compared to the original network with the perturbation theory and with the degree sum. The former was larger than the average of the latter (i.e., average of the blue lines in Fig. 6) by a factor of , , , , , and for the ER random graph (Fig. 6(a)), BA model (Fig. 6(b)), planted 2-partition network (Fig. 6(c)), lizard network (Fig. 6(d)), email network (Fig. 6(e)), and bird network (Fig. 6(f)), respectively.

7 Conclusions
To determine for an arbitrary network, one needs to solve a system of linear equations such that the time complexity is . With the Coppersmith-Winograd algorithm, the time complexity is reduced to , but this is still large (see section 4). In particular, it is computationally costly to carry out graph surgery with various possible edges to be added or removed to compare the results in terms of . Therefore, we have developed a perturbation theory for the graph surgery with which we can evaluate the perturbed in time. We have verified that the first-order term obtained from our perturbation theory predicts the rank of the change in when one removes an edge from the network with a high accuracy. Specifically, we have numerically shown that the edge with the largest value is the one whose actual removal decreases by the largest amount in two out of the three networks (see Fig. 4(a), 4(c), and 4(e)). Therefore, we conclude that our perturbation theory is useful for finding the edge whose removal efficiently enhances cooperation in the given network with a reduced computational cost.
We focused on the death-birth process because it tends to foster cooperation compared to other rules of strategy updating [13, 11]. However, it is straightforward to formulate similar perturbation methods in the case of other updating rules such as the birth-death process [18, 13] and the pairwise comparison rule [33, 34, 16, 35] as well as in the case of other payoff matrices. In particular, our theory should be applicable to the case of constant selection [18, 36], with which the payoff matrix is independent of the opponent’s action. The perturbation theory may be more accurate for other update rules or games than the combination of the death-birth rule and the prisoner’s dilemma game examined in the present study. Exploitation of our perturbation approach in these directions is left for future work.
Another direction of future work is interaction between the selection strength and network perturbation. In the present work, we have assumed the weak selection limit. However, one can retain a selection strength parameter (which is in this article) to be finite and write down a formal solution. Then, it may be interesting to consider the simultaneous limit of weak selection and weak network perturbation in a way and are interrelated. Apart from this research direction, assessing the validity of the present perturbation theory under strong selection is left for future work. To this end, we first need to understand the accuracy of the original theory of fixation of cooperation in networks [15], which our theory is based on, under strong selection.
We do not know why the perturbation theory is more accurate when one removes an edge than when one adds an edge. Furthermore, we have found that the perturbation theory is fairly accurate at predicting the result for adding a parallel edge where an edge already exists, whereas it is not accurate when adding an edge where an edge does not exist in the original network. In a related vein, we observed nonmonotonic behavior in the cooperativity in terms of especially when we gradually added a weighted edge (Figs. 3(b) and 3(f)). These results lead us to hypothesize that we can engineer networks that promote cooperation better by considering weighted networks than unweighted networks. These topics also warrant future work.
Data accessibility
Acknowledgments
N.M. acknowledges support from AFOSR European Office (under Grant No. FA9550-19-1-7024), the Sumitomo Foundation, the Japan Science and Technology Agency (JST) Moonshot R&D (under Grant No. JPMJMS2021), and the National Science Foundation (under Grant Nos. 2052720 and 2204936).
Appendix A Derivation of Eq. (16)
We restate the stationary probability , given by Eq. (1), as
(36) |
where is the original weighted degree of the th node, and , given by Eq. (14), is the original total edge weight of the network. If one perturbs the weight of an edge by , the weighted degree of the th node, , is equal to . After the perturbation, the total edge weight of the network changes to . Therefore, the stationary probability after the perturbation, , is given by
(37) |
The first-order derivative of in terms of , denoted by , is given by
(38) |
By setting in Eq. (38), we obtain
(39) |
We wrote instead of in Eq. (16) for brevity.
Appendix B Derivation of Eqs. (21), (22), and (23)
B.1 Derivation of Eq. (21)
Let be the transition probability of the random walk from node to node on the network after perturbing the weight of edge by . Note that is the transition probability on the original network. By definition, we have
(40) |
where represents the weight of edge after the same perturbation, and we remind that is the weighted degree of the th node after the perturbation. In Appendix A, we showed that
(41) |
We can also verify that
(42) |
where , defined by Eq. (17), is the indicator function, which is equal to if and only if edge is the perturbed edge ; it is equal to otherwise. By substituting Eqs. (41) and (42) in Eq. (40), we obtain
(43) |
By taking the first-order derivative of Eq. (43) with respect to , we obtain
(44) |
which leads to
(45) |
We omitted the argument of in the last line of Eq. (45) without ambiguity. This completes the proof of Eq. (21). Note that is equivalent to in Eq. (21). We chose a different notation in the main text to avoid confusion between the power of matrix and the derivative of .
B.2 Derivation of Eq. (22)
Let us evaluate matrix first. We denote by the entry of . By substituting Eq. (21) in
(48) |
we obtain
(49) |
where is the transition probability of the random walk from node to node in two time steps. Note that if and only if or . If , then must hold true for the term not to vanish. Similarly, if , then must hold true for not to vanish. If , then we obtain . Therefore, we can simplify Eq. (49) into
(50) |
B.3 Derivation of Eq. (23)
By matrix multiplication, we obtain
(53) |
Let , , and be the entry of matrices , , and , respectively.
Appendix C Derivation of
In this section, we derive as a block matrix
(57) |
where each is an matrix.
The th row of the diagonal block is filled by 0, and all the other rows are the same as those of matrix . For example, we obtain
(58) |
For , the th row of is equal to the th row of , and all the other rows are filled by 0. For example, we obtain
(59) |
and
(60) |
Equation (21) implies that only the th and th rows of may be nonzero. Owing to this property, there are only nonzero matrix blocks out of the blocks of , which we show using an example as follows. Assume that we perturb edge . Then, the fourth and seventh rows are the only nonzero rows of . Therefore, , where , has only the th and th rows nonzero. Any off-diagonal matrix block , where and , is zero because it has in the th row, this row is zero given that , and all the other rows are zero. We next consider , where . Diagonal block has only the th row nonzero, which is given by . Off-diagonal block , where , has only the th row nonzero, which is equal to . Therefore, all the blocks with are nonzero in general. Likewise, has only the th row nonzero, which is given by . Off-diagonal block , where , has only the th row nonzero, which is equal to . Therefore, all the blocks with are nonzero in general. This proves that there are nonzero matrix blocks .
Furthermore, most rows of are zero rows. Specifically, consider rows of given in a block matrix form by , where . As we have shown, the only non-zero block among , , is , and the only nonzero rows of are the th and th rows. Therefore, the rows of , i.e., th rows with , are zero rows. In addition, the th row of and the th row of are zero rows. Therefore, the number of nonzero rows of is equal to .
References
- \bibcommenthead
- Trivers [1971] Trivers, R.L.: The evolution of reciprocal altruism. Q. Rev. Biol. 46, 35–57 (1971)
- Axelrod [1984] Axelrod, R.: The Evolution of Cooperation. Basic Books, New York (1984)
- Hofbauer and Sigmund [1998] Hofbauer, J., Sigmund, K.: Evolutionary Games and Population Dynamics. Cambridge University Press, Cambridge, UK (1998)
- Nowak [2006a] Nowak, M.A.: Five rules for the evolution of cooperation. Science 314, 1560–1563 (2006)
- Nowak [2006b] Nowak, M.A.: Evolutionary Dynamics: Exploring the Equations of Life. Harvard University Press, Cambridge, UK (2006)
- Henrich and Henrich [2007] Henrich, N., Henrich, J.P.: Why Humans Cooperate: A Cultural and Evolutionary Explanation. Oxford University Press, Oxford, UK (2007)
- Sigmund [2010] Sigmund, K.: The Calculus of Selfishness. Princeton University Press, Princeton, NJ (2010)
- Bowles and Gintis [2011] Bowles, S., Gintis, H.: A Cooperative Species. Princeton University Press, Princeton, NJ (2011)
- Nowak and May [1992] Nowak, M.A., May, R.M.: Evolutionary games and spatial chaos. Nature 359, 826–829 (1992)
- Nowak and May [1993] Nowak, M.A., May, R.M.: The spatial dilemmas of evolution. Int. J. Bifurcation Chaos 3, 35–78 (1993)
- Szabó and Fath [2007] Szabó, G., Fath, G.: Evolutionary games on graphs. Phys. Rep. 446, 97–216 (2007)
- Santos and Pacheco [2005] Santos, F.C., Pacheco, J.M.: Scale-free networks provide a unifying framework for the emergence of cooperation. Phys. Rev. Lett. 95, 098104 (2005)
- Ohtsuki et al. [2006] Ohtsuki, H., Hauert, C., Lieberman, E., Nowak, M.A.: A simple rule for the evolution of cooperation on graphs and social networks. Nature 441, 502–505 (2006)
- Santos et al. [2006] Santos, F.C., Pacheco, J.M., Lenaerts, T.: Evolutionary dynamics of social dilemmas in structured heterogeneous populations. Proc. Natl. Acad. Sci. U.S.A. 103, 3490–3494 (2006)
- Allen et al. [2017] Allen, B., Lippner, G., Chen, Y.-T., Fotouhi, B., Momeni, N., Yau, S.-T., Nowak, M.A.: Evolutionary dynamics on any population structure. Nature 544, 227–230 (2017)
- Nowak et al. [2004] Nowak, M.A., Sasaki, A., Taylor, C., Fudenberg, D.: Emergence of cooperation and evolutionary stability in finite populations. Nature 428, 646–650 (2004)
- Ewens [2004] Ewens, W.J.: Mathematical Population Genetics: Theoretical Introduction vol. 1. Springer, New York, NY (2004)
- Lieberman et al. [2005] Lieberman, E., Hauert, C., Nowak, M.A.: Evolutionary dynamics on graphs. Nature 433, 312–316 (2005)
-
[19]
Aldous, D.,
Fill, J.A.:
Reversible Markov chains and random walks on graphs.
Unfinished monograph, recompiled 2014 (2002) available at
http://www.stat.berkeley.edu/aldous/RWG/book.html. Accessed on August 6, 2022 - Masuda et al. [2017] Masuda, N., Porter, M.A., Lambiotte, R.: Random walks and diffusion on networks. Phys. Rep. 716, 1–58 (2017)
- Coppersmith and Winograd [1987] Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. In: Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, pp. 1–6 (1987)
- Barabási and Albert [1999] Barabási, A.-L., Albert, R.: Emergence of scaling in random networks. Science 286, 509–512 (1999)
- Fortunato [2010] Fortunato, S.: Community detection in graphs. Phys. Rep. 486, 75–174 (2010)
- Lancichinetti et al. [2008] Lancichinetti, A., Fortunato, S., Radicchi, F.: Benchmark graphs for testing community detection algorithms. Phys. Rev. E 78, 046110 (2008)
- Zachary [1977] Zachary, W.W.: An information flow model for conflict and fission in small groups. J. Anthropol. Res. 33, 452–473 (1977)
- van Dijk et al. [2014] Dijk, R.E., Kaden, J.C., Argüelles-Ticó, A., Dawson, D.A., Burke, T., Hatchwell, B.J.: Cooperative investment in public goods is kin directed in communal nests of social birds. Ecol. Lett. 17, 1141–1148 (2014)
- Arnberg et al. [2015] Arnberg, N.N., Shizuka, D., Chaine, A.S., Lyon, B.E.: Social network structure in wintering golden-crowned sparrows is not correlated with kinship. Mol. Ecol. 24, 5034–5044 (2015)
- Bull et al. [2012] Bull, C.M., Godfrey, S., Gordon, D.M.: Social networks and the spread of salmonella in a sleepy lizard population. Mol. Ecol. 21, 4386–4392 (2012)
- Lusseau et al. [2003] Lusseau, D., Schneider, K., Boisseau, O.J., Haase, P., Slooten, E., Dawson, S.M.: The bottlenose dolphin community of doubtful sound features a large proportion of long-lasting associations. Behav. Ecol. Sociobiol. 54, 396–405 (2003)
- Michalski et al. [2011] Michalski, R., Palus, S., Kazienko, P.: Matching organizational structure and social network extracted from email communication. In: International Conference on Business Information Systems, pp. 197–206 (2011). Springer, Berlin, Germany
- Firth and Sheldon [2015] Firth, J.A., Sheldon, B.C.: Experimental manipulation of avian social structure reveals segregation is carried over across contexts. Proc. R. Soc. B 282, 20142350 (2015)
- Clauset et al. [2004] Clauset, A., Newman, M.E.J., Moore, C.: Finding community structure in very large networks. Phys. Rev. E 70, 066111 (2004)
- Blume [1993] Blume, L.E.: The statistical mechanics of strategic interaction. Games Econ. Behav. 5, 387–424 (1993)
- Szabó and Tőke [1998] Szabó, G., Tőke, C.: Evolutionary prisoner’s dilemma game on a square lattice. Phys. Rev. E 58, 69 (1998)
- Traulsen et al. [2006] Traulsen, A., Nowak, M.A., Pacheco, J.M.: Stochastic dynamics of invasion and fixation. Phys. Rev. E 74, 011909 (2006)
- Allen et al. [2021] Allen, B., Sample, C., Steinhagen, P., Shapiro, J., King, M., Hedspeth, T., Goncalves, M.: Fixation probabilities in graph-structured populations under weak selection. PLoS Comput. Biol. 17, 1008695 (2021)
- [37] Karate network data set: https://networkrepository.com/karate.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [38] Weaver network data set: https://networkrepository.com/aves-weaver-social-03.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [39] Sparrow network data set: https://networkrepository.com/aves-sparrow-social.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [40] Lizard network data set: https://networkrepository.com/reptilia-lizard-network-social.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [41] Dolphin network data set: https://networkrepository.com/dolphins.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [42] Email network data set: https://networkrepository.com/ia-radoslaw-email.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [43] Bird network data set: https://networkrepository.com/aves-wildbird-network.php organized by R. Rossi and N. Ahmed. Accessed on June 26, 2022
- [44] Meng, L. Data sets and Python codes. See https://github.com/lingqime/Perturbation-theory-for-evolutionary-game-dynamics-on-networks. Accessed on August 13, 2022