Sharp thresholds limit the benefit of defector avoidance in cooperation on networks

Significance Cooperators in biological systems often need some advantage to persist in the presence of selfish defectors, but knowing which strategies or behaviors will impact the outcomes of cooperation games remains a challenge. We demonstrate that modeling games as networks of spatially arranged ecological communities allows one to know whether any strategy will or will not impact the outcomes of any game played on all spatial configurations, without relying on a limited set of examples. By applying the general theory to the so-called snowdrift game, with cooperators who avoid defectors, we show exactly when a defector avoidance strategy can be beneficial and how the long-term outcomes of cooperative behaviors depend on the spatial arrangement of locations where games are played.

Cooperation, behavior that leads to benefits for others at a cost to oneself, is widespread across biological systems, ranging from cells cooperating to form organisms, to cooperation among individuals in populations and among microbiotic and macrobiotic taxa in ecosystems. In many cases the costs of cooperation are high. Hence, how cooperative behavior persists in a population represents a fundamental question in biology (1)(2)(3)(4)(5)(6)(7)(8).
In general, cooperation is most likely to evolve and persist if there are mechanisms that directly or indirectly benefit cooperators' reproductive success. Examples include kin selection, punishment of defectors who forgo the cooperative investment, or a direct selfbenefit such as in cases of investment into a common good (4).
Among the most general mechanisms that can favor cooperation is the notion of network or spatial reciprocity (1,(9)(10)(11). In classical examples of reciprocity, cooperation creates favorable conditions for other proximal cooperators (4). A result is the emergence of cooperative havens, where the rewards generated by mutual cooperation have enriched some physical or topological neighborhoods. The formation of cooperative neighborhoods in structured populations, where individuals interact with only a limited subset of the population, has traditionally been studied on networks, where each node represents an individual agent and an edge means that the two connected individuals play against each other (1,10,(12)(13)(14)(15)(16)(17)(18)(19). By assuming weak selection and treating space implicitly, the resulting systems can often be analyzed mathematically. Although this framework has become a powerful tool for conceptual understanding, it represents a strong abstraction from real-world ecology where interactions, and hence cooperative behaviors, occur often randomly within a location that is itself embedded in a larger spatial context (20)(21)(22)(23). By focusing on spatially explicit models of cooperation, we gain the opportunity to understand feedbacks between the rules of the game, movement strategies, and long-term persistence of cooperation at larger scales (10,20,(23)(24)(25)(26)(27).
Here we study a model of cooperation in spatially structured populations inspired by ecological metacommunities (21)(22)(23)28), where network nodes-instead of individuals-represent habitat patches containing many interacting individuals, and edges mean that two patches are connected by dispersal of those individuals (Fig. 1A). Each patch is a location where games are played, harboring cooperator and defector subpopulations which grow and shrink in time due to internal interactions and movement among locations. Metacommunity models allow one to represent the effects of physical spatial structure directly and explicitly. Moreover, they can be analyzed using master stability functions, which can be used to untangle the impacts of local dynamics and network structure (28)(29)(30). We use this ability to explore how different movement strategies impact the outcomes of a cooperation game as a function of network structure.

Significance
Cooperators in biological systems often need some advantage to persist in the presence of selfish defectors, but knowing which strategies or behaviors will impact the outcomes of cooperation games remains a challenge. We demonstrate that modeling games as networks of spatially arranged ecological communities allows one to know whether any strategy will or will not impact the outcomes of any game played on all spatial configurations, without relying on a limited set of examples. By applying the general theory to the so-called snowdrift game, with cooperators who avoid defectors, we show exactly when a defector avoidance strategy can be beneficial and how the long-term outcomes of cooperative behaviors depend on the spatial arrangement of locations where games are played.

Results
We start by illustrating the existence of sharp thresholds in the onset of spatial reciprocity by considering the well-studied snowdrift game (3, 31) on a spatial network of two patches (Fig. 1A) and showing when a specific dispersal strategy for relocating between patches can lead to the formation of cooperative safe havens for this game. Most of the assumptions made here will be relaxed in the next section where we present the general theory, which can be extended to any scenario with minor modifications (28), including to n-strategy games (27), higher-order interactions (32), and explicit resource-or object-mediated cooperation (7,33). Introductory Example. Consider a spatial network of two linked nodes, where each node i ∈ [1, 2] is a habitat patch in which organisms live, interact, and reproduce. The link between them represents an avenue of dispersal that individuals occasionally use to disperse to the other patch (Fig. 1A). Some of the individuals within each patch i are cooperators (C i ) who make an investment that creates a shared benefit, whereas other individuals are defectors (D i ) who forego this investment. Within patches, individuals undergo random pairwise encounters defined by a payoff matrix which specifies rewards for mutual cooperation R (C encounters another C ), the sucker's payoff S (C encounters D), the temptation to defect T (D encounters C ), and the punishment for mutual defection P (D encounters another D); the payoffs satisfy P < S < R < T to define a snowdrift game (31,34). We focus first on a straightforward dispersal strategy for cooperators in a spatial setting: attempting to avoid defectors. Suppose that the defector avoidance strategy is such that cooperators leave a patch if they have been cheated in multiple consecutive interactions. Although easy to motivate psychologically, the choice to allow the cooperators to selectively "walk away" from a patch remains less explored as authors are generally hesitant to give cooperators such an ability that confers a direct advantage (35,36). As we show below, defector avoidance is not always beneficial for cooperators, often leaving outcomes unchanged. However, when a threshold in network connectivity is crossed, self-organized patterns form where some patches maintain significantly higher or lower cooperator densities indefinitely.
In the model, individuals in both patches are subject to population dynamics of the forṁ where G, M , and E are functions of cooperator and defector densities that are described below and represent the effects of reproduction, mortality, and dispersal, and δ is the link strength of the spatial network. We assume that the reproduction of individuals is directly proportional to the payoff that they achieve in the game. Using mass-action laws for the encounters, this yields the reproduction rates where, following ref. 20, intrinsic growth and encounter rates are accommodated as part of R, S , T , and P . We assume densitydependent mortality, resulting in where μ is a rate constant. Finally, the effects of dispersal are where Z is the per capita rate at which individuals leave a habitat.
Here we consider a situation where defectors disperse at a constant rate Z D,i = 1, whereas cooperators leave if they have been cheated α times in a row (Materials and Methods), [6] Exploring the model numerically for α = 3 ( Fig. 1), we find that at low link strengths δ (i.e., low diffusion rates) the system approaches a homogeneous stable state, where each patch harbors the same relative densities of cooperators and defectors ( Fig. 1 B and C; equilibrium densities are denoted by C i , D i ). In this example, defectors are the most abundant type in all habitat patches, C i − D i < 0 for all i (Fig. 1B). When the link strength is increased beyond a critical point, then the homogeneous state becomes unstable to perturbations, and the system undergoes a bifurcation and instead approaches a heterogeneous state ( Fig. 1 B  and D), where the cooperators constitute a majority in one patch while they largely abandon the other.
General Theory. We now describe a general theory for the stability of homogeneous states in a broad class of games on arbitrary patch networks, using a master stability function approach (28,29). Consider a game with the following properties: 1) the interaction dynamics within a patch can be faithfully modeled by a system of differential equations and 2) if played on a single patch the system will approach a stationary state. Now consider this game on a network of patches, where 3) patches are of identical quality, 4) links are bidirectional and lossless, and 5) the emigration rate from a patch is proportional to the number of links. These conditions do not exclude very high-dimensional systems, strong nonlinearities, strong selection in the evolutionary dynamics, or complex decision rules [e.g., cross-diffusion, adaptive dispersal (23)]. Under the conditions above, at least one steady state exists where the communities in each patch are identical (e.g., Fig. 1C); we call these states homogeneous. In homogeneous states, community compositions are independent of spatial network topology and can be found, even for very large networks, by analyzing a patch in isolation (Materials and Methods). However, the stability of homogeneous states is sensitive to network topologies, and thus, stable homogeneous behavior may be possible on some patch networks, while instability may lead to heterogeneous behaviors emerging in others (28,(37)(38)(39).
The stability of homogeneous states can be computed from local linearizations of the dynamics, captured by the Jacobian matrix J. For a model with N heritable types or player strategies per patch and M patches, J has the dimension NM × NM . However, the Jacobian is not an unstructured matrix but instead intricately reflects the structure of the system, which we can make explicit by writing where I is an N × N identity matrix, P is the Jacobian matrix for the game played on an isolated patch, the coupling matrix C is a Jacobian-like matrix that consists of partial derivatives of the emigration rates from one patch with respect to population sizes in that patch, L is the weighted Laplacian matrix of the patch network, and ⊗ is a Kronecker product (28, 37, 40) (see Materials and Methods for details on these matrices).
A stationary state is stable if all eigenvalues of the Jacobian matrix, Ev(J), have negative real parts. Using Eq. 7 these eigenvalues can be computed as where Ev returns the set of eigenvalues of a matrix and κ m is the mth eigenvalue of L (28) (Materials and Methods). An attractive feature of this approach is that it separates the impact of spatial network structure encoded in L from the effect of local dynamics. Specifically, it shows that the spatial network structure can affect the stability of the system only via the Laplacian eigenvalues, κ. An alternative interpretation of Eq. 8 is to view κ as an unknown, real-valued parameter and define a master stability function that captures the general relationship between the structure of all patch networks and pattern-forming instabilities. The master stability function can be defined as where Ev max denotes the eigenvalue with the largest real part. If a particular value of κ leads to a positive S , S (κ) > 0, then we can say that any network with that Laplacian eigenvalue κ will be susceptible to pattern-forming instabilities for a particular game (P) and movement strategy (C). Because the effect of space is thus encapsulated in the Laplacian eigenvalues, the remaining eigenvalue problem in Eq. 9 is easier since the relevant matrix has the size N × N , even for very large spatial networks.
To illustrate the master stability function let us return to the game from the introductory example, which we now consider on arbitrary networks described by a weighted adjacency matrix A, such that link weight between node i and j is A ij . In this more general case the game is described by the following equations: where w i = j A ij is the weighted degree of i . Using the same parameters as before (Fig. 1), the nonspatial Jacobian P and the coupling matrix C calculated at equilibrium (Materials and Methods) are This leads to the master stability function (Fig. 2) We can see that S > 0 on any network that has a Laplacian eigenvalue κ > 15.13; we refer to this as the critical κ, or κ crit , which is specific to the game but independent of the network structure on which the game is played. For example, a pair of nodes connected by a single link of weight δ has a leading eigenvalue of κ 1 = 2δ. This shows that the homogeneous state in our example game must become unstable on such an isolated link if δ > 7.56, which explains our previous observations (Fig. 1B). Together, the results from this section illustrate that the master stability function approach can be used to disentangle the impacts of game parameters from the impact of the topological structure of the underlying network.

Impact of Network Motifs.
There is a wealth of mathematical knowledge that links Laplacian eigenvalues to specific network properties. Because the Laplacian is symmetric, it must have an eigenvalue κ that is greater or equal to the largest eigenvalue in any subgraph of the network (41). Hence, if any motif in the network has an eigenvalue κ > κ crit , the whole network must also have such an eigenvalue, and the homogeneous state must be unstable.
The subgraph rule allows us to extend our results on isolated links in the network to any link in the network. We can for instance say that the homogeneous state is unstable if there is any link of strength δ > κ crit /2. Similar criteria can be constructed for any conceivable motif. For example, a node that is connected to n other nodes via links with a strength of least δ has an eigenvalue κ ≥ (n + 1)δ. This shows that the homogeneous state in our example game is definitely unstable if there is a node that has at least 15 links of strength 1 or more. It is also possible to derive sufficient criteria for stability of the homogeneous state. For example, Gershgorin's theorem implies that any Laplacian eigenvalue obeys κ ≤ 2k max , where k max = max j i A ij is the maximum weighted node degree in the network (41). Thus, in the example game the homogeneous state is guaranteed to be stable if k max < κ crit /2 (e.g., Fig. 1B).
The examples in the present section illustrate that one can derive topological stability criteria that link dynamical transitions to features of the network, such as the presence or absence of certain network motifs. Additional rules for specific kinds of networks (e.g., regular graphs and lattices) can also be derived (19,42). Such criteria are particularly easy to formulate for games that are characterized by rising master stability functions, including our example system. As a next step we explore the conditions under which a game has this property.
The Value of Forgiving Dispersal Strategies. Diffusion generally has an equalizing effect that favors homogeneous outcomes (23,28,43). Nonlinear mortality, which is needed in the model to avoid boundless growth, constitutes a further dampening force that drives the system to homogeneity. It can be shown that strong nonlinearities in the movement behavior are necessary to overcome this dampening and allow pattern formation. In our example game, the rule that a cooperator leaves, on average, when cheated α times in a row leads to factors [D/(C + D)] α (Materials and Methods). One can quickly verify that an overzealous dispersal strategy, where one leaves after being cheated for the first time, is not nonlinear enough to destabilize the homogeneous state. Thus, in a world where everybody is eager to emigrate to avoid defectors, emigration is useless as the conditions would become identical in all nodes. By contrast, a more forgiving strategy where agents only disperse after having been cheated 10 times in a row leads to very nonlinear dispersal functions that are likely to destabilize the homogeneous state. Thus, a forgiving dispersal strategy may be rewarded indirectly by the formation of safe havens for cooperation.
We tested the counterintuitive benefit of forgiving dispersal strategies in numerical experiments, where we considered a large number (2 × 10 7 ) of feasible steady states in systems with different parameter values (Table 1 and Materials and Methods). We focus only on systems where the homogeneous state is stable at sufficiently low values of coupling and then ask how much the coupling strength has to be increased to trigger instability. The results show that more forgiving strategies, where cooperators endure more contiguous interactions with defectors before emigrating on average, consistently lead to instability at lower coupling strength, even as the benefits to defection increase (Fig. 3). This provides further evidence that forgiving dispersal strategies favor the formation of spatially heterogeneous states.
Locations of Safe Havens for Cooperation. So far we have shown that defector avoidance has no impact on the outcomes of the game unless certain thresholds are crossed, which in turn can be linked to topological features of the underlying network. We now use simulations to explore the behavior beyond this threshold. For illustration we consider 100-node random geometric graphs, which provide a reasonable approximation for real networks of habitats and the dispersal connections between them (23). The coupling strength κ is chosen for each simulation such that it exceeds the threshold value (Eq. 9) at which the homogeneous state becomes unstable. Visual inspection of simulated metacommunities quickly reveals that some of the nodes become cooperator dominated. Moreover, these safe havens of cooperation seem to occupy locally well-connected nodes but not the most highly connected nodes in the whole network (Fig. 4A).
In network science the number of connections (degree centrality) is a relatively crude notion of the topological importance of a node in the network. A more sophisticated metric is provided by adjacency-based eigenvector centrality (44), which is loosely related to Google's PageRank (45) algorithm. Analyzing an ensemble of 1,000 network simulations (parameters as in Fig. 1) reveals that the nodes of lowest eigenvector centrality become defector dominated, whereas better connected nodes with a higher centrality can sustain a majority of cooperators. However, the most-central nodes in each network are a toss-up, containing almost equal populations of defectors and cooperators (Fig. 4B). Hence, at least in our example game, the locations where cooperative safe havens form are highly connected nodes, but not the Fig. 3. Correlation between log 10 κ crit and key parameters: normalized temptation, T − R, and the tolerance for consecutive defector encounters, α. Points and error bars show mean ± SEM, which are too small to see for most values. Parameter ranges are given in Table 1.  Fig. 2). Nodes show the proportion of cooperators (blue) and defectors (red); node radius is proportional to |C i − D i |. Parameters are the same as in Fig. 1. (B) Simulations on 1,000 random geometric graphs, showing the association between relative cooperator densities at equilibrium (C i − D i ) and patch eigenvector centrality (bin means ± SEM).
most-highly connected nodes, and this pattern is seen consistently across distinct spatial networks.

Shortwave Instabilities and Other Dispersal Strategies.
A distinctive feature of the example game is that it is unstable for sufficiently high values of κ. Drawing on an analogy with pattern formation in continuous space, we call this behavior shortwave instability.
As pointed out in refs. 28, 30, 37, there is a deep analogy between the master stability function on networks and the Turing instability in partial differential equations (PDEs). The master stability function equation becomes identical to Turing's seminal approach if we replace the negative network Laplacian −L with the Laplace operator in continuous space. The eigenvalue κ can then be interpreted as a wave number. A rising master stability function shows that the instability is most pronounced at arbitrarily high wave numbers, i.e., arbitrarily short waves, which would be unphysical in PDE systems, but is meaningful in a network.
To explore when shortwave instabilities occur, consider that except for some pathological cases, we can assume that as the weighted degree of at least one node in the network approaches infinity, lim as P becomes negligible in comparison to κC. This shows that the shortwave instability occurs when the dispersal strategy is such that C has a negative eigenvalue. For games with two types (C and D) the coupling matrix has the form.
At least one eigenvalue with negative real part exists if either One can think of the two terms in the first condition as the degree to which cooperators promote the emigration of cooperators (∂ C E C ) and vice versa for defectors. Hence, the first condition is met if cooperators suppress the emigration of cooperators strongly enough to overcome the effect of defectors promoting their own emigration. Assuming that presence of defectors promotes the emigration of both cooperators and defectors we can write the second condition as ∂C E C ∂D E C < ∂C ED ∂D ED . The fraction on the righthand side can be assumed to be negative or zero because the presence of cooperators should reduce defector emigration or leave it unchanged in reasonable models. By contrast the left-hand side can be positive as ∂ C E C can either be negative, due to retention of cooperators in a cooperative environment, or positive due to the mass-action effect leading to a positive scaling of cooperator emigration with cooperator numbers. However, the condition can again be satisfied if cooperators suppress their own emigration strongly enough.
Summarizing these results, we can say that shortwave instabilities are primarily expected in those systems where cooperators strongly (nonlinearly) increase the retention of other cooperators in their patch. The defector avoidance rule analyzed in this paper is a special case of this general condition.

Discussion
We showed that ecologically motivated models of cooperation games on networks can be studied mathematically. In particular, the master-stability function approach from synchronization provides a powerful tool to explore when a particular game will lead to heterogeneous states where spatial reciprocity becomes possible and safe havens for cooperation can be formed.
A focus of prior work has been on understanding the evolution and persistence of cooperation in structured populations, where individuals interact through pairwise encounters that constitute a network (1,9,(13)(14)(15)46), or via diffusive public goods (7,8,47), sometimes on a featureless, continuous spatial plane (25,26). In this study, we build on this work by studying populations that are structured in a different way, namely, as patchy communities where interactions occur randomly within patches and movement among patches in a spatial landscape define the network links (Fig. 1A). We find that cooperation can thrive in metacommunities but that it is mediated by the ability of cooperators and defectors to move between patches. Our findings indicate that the specific movement strategies deployed by both cooperators and defectors are an important factor in the maintenance of cooperation in spatially structured populations (e.g., Eq. 17). Future work could explore this result in metacommunities of heterogeneous habitat patches (48,49) or with lossy links, with individuals who follow adaptive dispersal strategies (50), or in systems with multiple interaction types (33,(51)(52)(53). Extending our results to nonstationary dynamics will also be useful for understanding more complicated games that show different types of pattern-forming instabilities (Materials and Methods).
The work presented here revealed two main findings which some readers may find counterintuitive: First, allowing cooperators to emigrate selectively (23,35,36), in response to defector density, does not always confer a direct benefit to the cooperators. Defector avoidance can only result in an increased payoff for cooperators if it is sufficiently strong to overcome a sharply defined threshold, where the system leaves the homogeneous state. The master stability function approach allows us not only to compute this threshold precisely but to disentangle the effects of the game and the underlying network topology. This opens up a promising angle for future investigations on the impact of specific scenarios and specific network motifs.
Our second major finding concerns the role of forgiving dispersal strategies in triggering shortwave instabilities. The shortwave instability is a genuine network effect that would not be observed in continuous geometries. Based on our findings we expect this instability to occur particularly if the cooperators respond strongly nonlinearly to cooperation levels. Namely, the instability may be triggered by forgiving dispersal strategies where the cooperator only leaves a patch after being cheated several times in consecutive games. Therefore, forgiving dispersal strategies may be far more beneficial than stricter responses. In many scenarios only the forgiving strategy will induce the heterogeneity in the system that ultimately creates safe havens for cooperation, whereas a stricter more immediate response to defection will result in maladaptive dispersal in a system of identical patches.
One possible criticism may be that even in the heterogeneous state, cooperation does not become widespread but mostly remains confined to some nodes which typically occupy central (but not most-central) positions in the network. We nevertheless believe that the formation of such hubs for cooperation can be an important stepping stone in the evolution of higher forms of cooperation and social complexity. Beyond the scope of the class of models explored here, the formation of local cooperation hubs may enable secondary processes, such as the formation of social norms and governance structures, which once established can help promote cooperative behavior in the rest of the network.

Materials and Methods
Patch Steady States and Stability. The class of systems considered here have homogeneous stationary states where all nodes approach the same state regardless of the topology of the underlying spatial network (Fig. 1 B and C). In these states the net biomass flows in and out of each patch must be equal, such that neither dispersal (selective or otherwise) nor network topology can affect population densities. In any homogeneous state, the densities of cooperators and defectors in any patch are therefore identical to densities in the nonspatial case (28) described byĊ Setting time derivatives to 0 in Eqs. 18 and 19, we find that the system has the three following homogeneous steady states that describe biomass densities across i identical patches: 1) only cooperators persist, with C i = R/μ and D i = 0; 2) only defectors persist, with C i = 0 and D i = P/μ; and 3) cooperators and defectors coexist, with The coexistence state is only biologically feasible if C i > 0 and D i > 0, which places conditions on the relative payoffs each type of player can receive from interactions. This holds under two sets of conditions. The first occurs when P > S and R > T. In these cases, the payoff from an interaction with a defector is larger for defectors, while the payoff from an interaction with a cooperator is larger for cooperators. Alternatively, positivity occurs when P < S and R < T. This case includes the classical "snowdrift" game (34): a cooperator meeting a defector pays the entire cost but still experiences the benefits, while a defector encountering another defector results in no benefit to either (P < S). Meanwhile, a cooperator meeting another cooperator invests a fraction of the cost, while a defector meeting a cooperator gets the benefit for free (R < T).
The within-patch Jacobian matrix P in the coexistence steady state is which has eigenvalues Thus, when P > S and R > T, λ 2 > 0, and the system is always unstable. By contrast, if P < S and R < T, λ 2 < 0, and so the state is stable as long as ST − PR > 0, such that λ 1 < 0. A stable homogeneous steady state, with coexistence of both types within each patch, exists if and only if P < S and R < T, proving that shortwave instability (e.g., Fig. 3) cannot occur in the prisoner's dilemma since it violates these conditions by definition (3).
Spatial Networks and Dispersal. To generate larger networks for simulations ( Fig. 4), we randomly assign coordinates drawn from a uniform distribution ∼U(0, 1) to patches in a two-dimensional space. Patches are connected if the Euclidean distance between their coordinates falls below a threshold value h = 0.195. Simulations were conducted with the Mathematica 12.3.1.0 software. To define the defector avoidance rule for emigrating from patches, first suppose that from the perspective of a cooperator, interactions occur at random time points, amounting to some effective rate r (i.e., a Poisson process). Assume further that in each interaction, the player is cheated with some probability p. In a sequence of n interactions, we find n − α + 1 subsequences of α consecutive events, which can be treated as independent trials to very good accuracy. Each of the subsequences will consist of α cheating events with probability p α , and so the rate at which the player experiences α consecutive cheating events and then leaves is rp α , explaining the form of Eq. 6.
A Master Stability Function Approach. If we start in a homogeneous state, we cannot observe a beneficial effect of any dispersal strategy (e.g., defector avoidance) unless the homogeneous state loses stability, the system departs from the homogeneous state, and spatial patterns begin to form. Such patterns are characterized by an unequal distribution of cooperators and defectors, which can benefit cooperators.
To explore the stability of the homogeneous state we compute the Jacobian matrix J, with a NM × NM dimension, where N is the number of player types and M is the number of patches in the spatial network. The Jacobian of the spatial system in the compact form can then be expressed as J = I ⊗ P − L ⊗ C, [24] where I is the identity matrix, L is the Laplacian matrix of the spatial network (M × M), and C is the coupling matrix (N × N). The Laplacian matrix is constructed by setting L ii = j A ij and subtracting A, where A is the weighted adjacency matrix. For the case of defector avoidance, the coupling matrix is where φ = P − S R − T + P − S . [26] As the matrix J has a block structure, its eigenvectors also have a similar structure (28), w = v ⊗ q, where v is an N-dimensional vector and q is an M-dimensional vector. Let v be an eigenvector of L with eigenvalue κ, such that Lv = κv. Also, let q be an eigenvector of P − κC with eigenvalue λ. Then, w is an eigenvector of J with eigenvalue λ as the following calculation shows: ⊗ q), [27] = Iv ⊗ Pq − Lv ⊗ Cq, [28] = v ⊗ Pq − κv ⊗ Cq, [29] = v ⊗ (P − κC)q, = v ⊗ λq = λ(v ⊗ q) = λw.

[31]
Since all eigenvectors of J can be constructed in this way, the complete spectrum of J is then where κm is the mth eigenvalue of L (28). Since every Laplacian eigenvalue κ i generates a set of Jacobian eigenvalues which is independent of the other Laplacian eigenvalues, Eq. 32 defines a master stability function using only knowledge about the local system (P) with some minor modifications to account for spatial processes (C). This method therefore permits the fast computation of the leading Jacobian eigenvalue for a given Laplacian eigenvalue. The resulting function S(κ) = Re[λmax(κ)] is then a master stability function for the metacommunity. To achieve stability, all eigenvalues of the Jacobian need to have negative real parts, which means only when Tr(J) < 0 and Det(J) > 0 if any Laplacian eigenvalue falls into a range where the master stability function is positive. This enables us to analyze the stability of the spatial reaction-diffusion system by first computing the spectrum of the Laplacian matrix.
Data, Materials, and Software Availability. There are no data underlying this work.