Introduction

What allows large, complex ecosystems to be stable? May’s analysis of randomly arranged communities of self-limiting populations challenged previous ecological thinking on this issue, showing that greater species richness and interaction connectivity tended to destabilize random communities rather than stabilize them1,2. This and subsequent theory set the stage for decades of work analyzing the complicated relationship between diversity and dynamics that continues today3,4,5,6,7. In contrast to randomly-assembled communities, an emerging focus in modern biodiversity theory is on the non-random structural features of ecological systems that impart stability4,8,9. For communities organized around feeding relationships (i.e., food webs), two types of structure receiving extensive attention are allometric hierarchies, where larger species mostly eat smaller ones and populations experience other demographic rates dependent on body size5,10,11; and dispersal among spatially discrete habitats12,13,14,15,16,17,18.

Body size-based food web topologies and allometric scaling of population demographic rates have been extensively examined and have both shown to be stabilizing for models of trophic interactions5,6,10,19,20. Simple mass-based hierarchical feeding rules—where species high in the feeding hierarchy are interpreted as larger-bodied consumers—can successfully reproduce realistic food web topologies4,5,11,21,22,23,24 that are more likely to be dynamically stable than random network configurations19,20. Likewise, allometric scaling of species’ demographic rates such as handling times, conversion efficiencies, and biomass turnover, are predicted to stabilize food webs5,10,25,26,27,28,29,30,31. This is particularly the case when the ratio of body masses between resources and consumers is large and consistent with values observed in natural webs5,10,32,33; but see34.

While the role of body size in nonspatial food web dynamics has been the focus of many theoretical and empirical studies, its influence on population dispersal rates in real ecosystems is still not well understood18. At larger scales, dispersal generates structure by linking spatially distinct food webs through the movement of individuals. The role of dispersal in population dynamics and community composition is a central focus in ecology, with early work emphasizing the colonization of islands by mainland species35,36 and the “rescue” of small populations in sink habitats37. Colonization–extinction dynamics in spatially subdivided habitats, originally examined in a population context38,39, extended these results and have been shown to promote higher regional food web diversity than can be supported in isolated well-mixed systems18. Dispersal can also stabilize species interactions locally by mimicking density-dependence in per capita growth rates40,41,42,43. More recent work has linked metacommunity dynamics to May’s original examination of species richness and connectance, showing that dispersal among spatially distinct subpopulations can be strongly stabilizing44,45. Complexity-stability relationships in these cases are relaxed or even reversed relative to results seen in linear stability analyses of random matrices.

Much like trophic interaction rates, many traits that shape animal locomotion and movement speed, and hence potentially influence dispersal, vary with body size46,47,48,49. Spatial patterns of resource use, home ranges, and geographic range size also exhibit strong allometric relationships27,50,51,52,53,54. While locomotion and space use do not necessarily equate to dispersal, these patterns do in turn create the potential for body size to influence spatial coupling of habitat patches55 and hence local food webs19,56,57. While many studies emphasize faster movements of large consumers, suggesting positive body size dispersal relationships, large-bodied species many face greater dispersal limitation in some habitats58,59,60, suggesting a range of potential relationships between body size and dispersal across ecosystems. The patterns and full effects of dispersal variation among species in food webs have so far been difficult to systematize, suggesting a need for general theory that can be used to guide work in this area18.

While less explored than local dynamics, existing theoretical evidence does suggest an important role for body size-dispersal scaling in ecosystem dynamics. Some mathematical models indicate that the coupling of distinct food webs by consumer movement can be stabilizing when those webs represent different energy channels or environmental conditions14,19,57. In other models, greater mobility of consumers is a key requirement for instability61,62,63,64. Yet other examples have identified dispersal-driven instabilities for communities in which primary producers traverse space more rapidly than other species16 or have shown that differences between resource and consumer dispersal can lead to complex consumer persistence outcomes when consumer compete for a single resource65. Overall, the effects of dispersal are complicated in ecological networks and a general understanding of how dispersal rules influence food web stability is lacking16,18.

Here, we examine how body size scaling of species’ dispersal rates influences stability in model trophic metacommunities (Fig. 1). In particular, we ask whether body size-dependent variation in dispersal rates influences trophic metacommunity stability relative to rates that are either uniform or randomly varying among species. We assume that body size structures the underlying food web and additionally that dispersal rates follow simple allometric scaling rules, similar to locomotive capabilities and space use patterns. Of course, actual movement and dispersal rates depend on complex behavioral rules18, are influenced by environmental and social information66,67,68,69, and are generally poorly understood at the scale of the food web. Our simplification serves as a theoretical point of reference for more complex treatments of dispersal variation in food webs.

We examine landscapes of discrete habitat patches that include variation in local abiotic conditions, generating spatial heterogeneity in rates of primary production and trophic interactions among species. Clearly, the stability of such heterogeneous metacommunities will depend on the proportion of patches in the landscape with locally favorable conditions for stability. We show how the body size scaling of species’ dispersal rates alters this relationship. Because general rules describing the dependence of dispersal on body size are lacking and likely vary among ecosystems18, we consider both positive and negative relationships between dispersal rates and body sizes. Our results show strong effects of dispersal-body size scaling on metacommunity stability, largely due to increased connectivity among local webs with different stability properties.

Figure 1
figure 1

Model metacommunities are composed of local food webs connected to one another by dispersal. (A) Each local web inhabits a habitat patch that is part of a spatial network, generated as a random geometric graph. Species in each web have a body size that is larger at higher trophic levels. Food webs have the same number of species and topology in all patches, but interaction rates and other ecological parameters vary among habitats mimicking spatial environmental heterogeneity. (B) Dispersal varies as either an increasing or decreasing function of body size.

Model formulation

We model trophic metacommunities as copies of food webs consisting of S species, embedded in a set of N patches. We chose to represent spatial networks as random geometric graphs, which provide a reasonable approximation for real networks18 of habitats and the dispersal connections between them (Fig. 1). This formulation best represents a scenario where the metacommunity spans an area with a single species pool of size S from which local food webs in each patch can be assembled.

Food web topologies were generated using the niche model21, which recapitulates realistic yet variable feeding relationships with only two input parameters, species richness S and connectance C. Briefly, species are assigned a position on a 1-dimensional niche axis and feed on species over a range determined by C. The feeding range is centered below the species’ niche positions, creating a trophic hierarchy where each species i has trophic position \(T_i\) defined by the path length to any basal producer. The niche model creates food web topologies where large-bodied species generally eat smaller ones, although feeding on species with larger niche axis values is also possible21.

Following5,7,10,11, we assigned body sizes assuming that the normalized mass \(M_i\) of each species i scales with their trophic position \(T_i\), as \(M_i = R^{T_i}\). For reported results, normalized producer body sizes are uniformly set to one while \(R = 42\). This value of R represents the average predator-prey body mass ratio reported by32. While body size ratios may vary quite substantially from this value in real food webs, the stabilizing effects of changes in R are well-understood6,10; limited preliminary explorations suggest increases to R provide greater stability to local food webs in agreement with previous work.

Dynamics on the links defined by each niche model topology were represented as the set of ordinary differential equations of the form

$$\begin{aligned} \begin{aligned} \frac{dB_i^k}{dt} ={}&G_{B_i^k}(B_i^k) + F_{B_i^k}({\mathbf {B}}^k) - X_{B_i^k}(B_i^k) - \sum _{j}{E_{B_j^{k}B_i^{k}}({\mathbf {B}}^k)} + \sum _{l}{[D_{B_i^l}(B_i^l)-D_{B_i^k}(B_i^k)]} \end{aligned} \end{aligned}$$
(1)

where \(B_i^k\) is the biomass density of species i in patch k. The non-specified function G is the growth rate of primary producers, F is the rate of biomass accumulation due to feeding on other species, X is rate of biomass loss due to respiration and mortality, E is the rate of biomass loss due to consumption by species j, and D is the dispersal rate between patches. While the functional forms are not explicitly specified, the general form of Eq. (1) admits the calculation of a Jacobian matrix that quantifies how species in the metacommunity respond to perturbations from steady state and therefore metacommunity stability70,71. Using the generalized modeling method6,70, the derivatives of functions G, F, X, and E that constitute the non-dispersal elements of the Jacobian matrix can be recast in terms of scale, branching, and elasticity parameters (see “Methods”). The generalized model parameters have clear ecological interpretations: scale parameters set the time scale of biomass turnover, while branching and elasticity parameters set the relative contributions of different processes to biomass gains and losses and the form of non-linearities, respectively6,70,71. The normalized turnover rate \(\alpha _i\) multiplies the branching and elasticity parameters in the Jacobian matrix. We assume this rate scales with mass as \(\alpha _i=M_i^{-1/4}\) (Table 1), which creates an influence of body size on species interactions, biomass production, and metabolic losses consistent with previous work (see “Methods” for more details).

The range of generalized model parameter values studied here map to most commonly encountered functional forms (e.g., Lotka–Volterra-like population growth and Holling type II and III functional responses) that link interaction rates with species’ densities in conventional models, and follow ecologically-based arguments from prior work. For explicit connections between generalized model terms and more traditional ecological models, we refer the readers to6,70,71 (Table 1).

Table 1 Parameter definitions and ranges used to compute metacommunity steady states.

Trophic metacommunities were constructed as follows. First, a spatial structure of \(N = 10\) habitat patches was randomly generated as a geometric graph on the interval [0, 1] with a neighborhood radius of 0.32 (see “Methods”). Each patch k in the spatial network contains a copy of the same S species niche model21 web. Heterogeneity in factors that influence primary production and trophic interactions were modeled as random variation among patches in branching and elasticity parameters6,70,71. Values of these spatially variable parameters were drawn independently from uniform distributions defined by ecologically meaningful ranges, shown in (Table 1). In the example of the producer nutrient availability parameter \(\phi\) (Fig. 1), ten values of \(\phi _i^k\) for each producer species i are randomly drawn from [0, 1] and then assigned to each patch k for a given metacommunity. This process is repeated for each branching and elasticity parameter for each species from the ranges defined in (Table 1); scale parameters were assumed to be spatially homogeneous.

For simplicity, we assume that there is no dependence of per capita dispersal rates on patch identity or on interspecific densities (i.e. no cross-diffusion). We further assume that dispersal is a linear function of local intraspecific density and allow for dispersal rates to vary among species,

$$\begin{aligned} D_{B_i^k}(B_i^k) = \delta _i^k B_i^k, D_{B_i^l}(B_i^l) = \delta _i^l B_i^l; \delta _i^k = \delta _i^l = \delta _i. \end{aligned}$$
(2)

Each species i in a particular metacommunity scenario is assigned a species-specific dispersal rate \(\delta _i\) that is dependent on its body size. We chose a power law relationship between body mass and dispersal rate, as this general form captures many allometric scaling relationships related to locomotive capabilities and spatial habitat use27,46,48,72. Specifically,

$$\begin{aligned} \delta _i = d M_i ^ z \end{aligned}$$
(3)

where d is the global link strength of the spatial network and z is the body size scaling exponent for dispersal. Producers have a body size equal to one such that for producers, \(\delta _i = d\). When z is positive, species with higher trophic positions and thus larger body sizes traverse the spatial network at a higher rate. This scenario potentially reflects terrestrial and pelagic food webs where larger animals have greater mobility and hence dispersal potential14. In other systems, z may be negative16,18,48, giving species in lower trophic levels the fastest dispersal rates with lower rates for larger bodied species. Because z modifies body mass according to a power law and the producer body size is scaled to one, the maximum attainable dispersal rate a large-bodied organism can achieve with positive scaling is larger than a small-bodied organism can achieve with negative scaling for the same distribution of body sizes.

We examined metacommunity stability using linear stability analysis. This procedure was applied in classic work on community stability by May and others1,2 and has since been expanded to incorporate spatial processes17,44. Linear stability is assessed by examining the eigenvalues of the Jacobian matrix of the trophic metacommunity, \({\mathbf {J}}\). Each local food web has a corresponding local Jacobian \({\mathbf {J}}_k\) that is derived from Eq. (1); these local Jacobians are collected and numerically arranged as blocks on the diagonal of the \(S N \times S N\) matrix \({\mathbf {P}}\). The local food web information is then used to calculate the metacommunity Jacobian \({\mathbf {J}}\) using the equation12,16,17

$$\begin{aligned} {\mathbf {J}}={\mathbf {P}} - {\mathbf {L}} \otimes {\mathbf {D}}, \end{aligned}$$
(4)

where \(\otimes\) is the Kronecker product; the \(N \times N\) matrix \({\mathbf {L}}\) is the Laplacian of the corresponding spatial network; and \({\mathbf {D}}\) is an \(S \times S\) Jacobian-like diagonal matrix containing species-specific dispersal rates calculated from Eq. (2). Eigenvalues of local food web Jacobians \({\mathbf {J}}_k\) and the metacommunity Jacobian \({\mathbf {J}}\) were computed numerically; stability occurs when the real parts of all eigenvalues are negative. Additional details regarding this method of analysis are found in refs.12,16,17,73 and in the “Methods”.

Body size scaling could increase stability in metacommunities owing to simple increases in overall dispersal, rather than because of particular relationships between body size, trophic position and dispersal rate. To test this possibility, we compared our suite of model metacommunities with different dispersal rules to those with random variation in dispersal rates. For each metacommunity and each dispersal scenario, we computed Jacobians with 100 random permutations of species’ dispersal rates (i.e., the diagonal entries of D, see Eq. (3)) and compared stability properties in these randomized metacommunities to their corresponding intact systems.

Results

Linear stability of both local food webs and metacommunities varied dramatically over the multitude of food webs examined, depending on species richness, food web connectance, branching, elasticity6, and dispersal parameters. The baseline dispersal rate d and body size scaling exponent z in particular influenced metacommunity stability. Figure 2 presents the aggregated results of all numerical analyses organized by local food web and metacommunity stability. The proportion of stable local food webs gives the proportion of webs in a metacommunity that would be stable in the absence of any dispersal. The proportion of stable metacommunities gives the probability that a corresponding trophic metacommunity will be stable when those patches are then linked by dispersal. The proportion of stable local food webs has the intuitive effect of positively increasing the chance that the metacommunity they constitute will also be stable; a metacommunity composed entirely of locally stable food webs is always stable. However, the strength of this positive relationship relies critically on the rules that determine dispersal rates across trophic levels.

Figure 2
figure 2

The relationship between local and metacommunity stability as influenced by dispersal. The baseline dispersal rate d and the body size scaling coefficient z determine the species-specific dispersal rate \(\delta _i = d M_i^z\), where \(M_i\) is the mass of species i. All species have the same dispersal rate d when z = 0. When z is positive, larger bodied species have faster dispersal rates, whereas when z is negative, it is smaller bodied species that have faster dispersal rates. Other parameters vary across all simulations as indicated by Table 1. Error bars denote ± 2 S.E.M., and are too small to see.

Metacommunities are most likely to be stable when larger-bodied species disperse through spatial networks of habitat patches faster than smaller-bodied ones (that is, for \(z > 0\), Fig. 2). Thus, having more patches with conditions that promote stability and experiencing higher overall spatial coupling both stabilize metacommunities. For a given proportion of stable local food webs and for all but the strongest global coupling (i.e. large d), metacommunities with a positive relationship between body size and dispersal rate are most likely to stable, while those with negative scaling are least likely to be stable.

The stabilizing effects of positive body size-dispersal scaling are most pronounced when the global link strength among habitat patches d is relatively low. When \(d=1\), metacommunity stability with size-dependent dispersal is nearly indistinguishable from the case of uniform dispersal. As overall large levels of dispersal provide a substantial stabilizing effect, positive body size-dispersal scaling therefore appears to be beneficial for stability because large consumers increase spatial connectivity above the baseline rate set by primary producers (i.e. it is guaranteed that \(\delta _i \ge d\)). With negative scaling, these same consumers have lower dispersal rates than producers (i.e. \(\delta _i \le d\)), lowering the overall spatial coupling between metacommunity patches and reducing stability.

Figure 3
figure 3

The effects of key parameters on metacommunity stability. Stability is as defined in Fig. 2 and parameters are defined in Table 1. Correlations given are coefficients from the best-fitting generalized linear model \(\pm 2\) SEM. Positive correlations indicate that larger values of a parameter correspond to a higher probability that a randomly-assembled metacommunity will be stable.

Correlations between key model parameters (see Methods) and metacommunity stability are shown in Fig. 3, confirming the importance of dispersal rules. Of all model parameters examined, the baseline dispersal rate d and the body size scaling parameter z have by far the strongest stabilizing effects. In contrast, species richness S and food web connectance C have the greatest de-stabilizing effects, largely through their well-documented effects on local food webs2,3,6. No other parameter showed a notable correlation with stability, either positive or negative.

The results in Fig. 2 show how body size scaling of dispersal can stabilize metacommunities by increasing coupling among patches. In Fig. 4, we compare stability of metacommunities with body size-dispersal scaling to those where the same set of dispersal rates are randomly re-assigned to species (permuted metacommunities). With these comparisons we ask whether, for a given global link strength d, it is coupling by large-bodied species specifically or simply greater coupling overall that drives stability. The 1:1 line in Fig. 4 shows where the leading eigenvalue \(\lambda _{1}\) of a metacommunity is the same as median leading eigenvalues of the corresponding permuted metacommunities. Most eigenvalue comparisons fall near this line across the entire range of dispersal scaling exponents z and global link strengths d (Fig. S1). Figure 5 presents these results categorized by their qualitative effects on stability. The sign of the leading eigenvalues for the metacommunities with permuted dispersal are typically the same as the intact ones, indicating that the median effect of shuffling dispersal rates among species is rarely a qualitative change in stability. In fact, there is no combination of body size scaling z and dispersal coupling d where a qualitative change in stability occurs in more than 25% of metacommunities (Fig. 5, Fig. S2). Yet despite the frequent preservation of qualitative dynamics, re-arranging the species-specific dispersal rates in the permutation analysis, which effectively alters which species’ have the fastest and slowest movement among patches, does change alter the magnitudes of \(\lambda _{1}\) (Fig. 4; Figs. S1 and S2) and therefore the rates at which metacommunities return to, or depart from, steady states following perturbation. We conjecture that dispersal hierarchies may be important for the transient dynamics of ecosystems, and suggest that an understanding of how dispersal rules impact different dimensions of ecological stability will be an important goal for future work.

Figure 4
figure 4

The effect of dispersal variation on metacommunity stability for spatial link strength \(d = 0.1\). The metacommunity is stable when the real part of the leading eigenvalue of the metacommunity Jacobian \(\lambda _1 < 0\). Allometric dispersal is defined Eq. (3). Permuted dispersal refers to the metacommunity where the allometric dispersal rates for all species were randomly reassigned to new species. Each data point represents a unique metacommunity with allometric dispersal compared to 100 counterparts with dispersal rates randomly rearranged among species, and are shown with 1:1 lines. Points that lie above the 1:1 line represent cases where the median value of \(\lambda _1\) for the permuted dispersal metacommunities are greater than the corresponding original metacommunity, indicating that the permuted metacommunities are typically less stable. Points that lie below the 1:1 line represent cases where the permuted metacommunities are typically more stable. Grey regions mark portions of the plot representing qualitative changes in stability where the real part of the leading eigenvalue \(\lambda _1\) of the original metacommunity has a different sign than the median value of the eigenvalues of the comparable metacommunities with permuted dispersal.

Discussion

Our model reveals an apparent stabilizing effect of positive body size scaling of dispersal in heterogeneous metacommunities (Fig. 2), consistent with some conceptual and mathematical theories17,19,74. We found that increased connectivity, manifested either through larger values of global patch coupling d or stronger positive body size-dispersal scaling z, generates conditions in which fewer stable patches are required for the metacommunity they comprise to be stable (Fig. 2). When dispersal scaling z was positive, the largest bodied species also had the highest dispersal rate, which was larger than the baseline dispersal rates of primary producers, d. In the permutational analysis, that largest value was randomly re-assigned to another species, yet stability did not typically change. Thus, by comparing metacommunities with allometric dispersal to those whose dispersal rates were random permutations of the original values (Figs. 4 and 5), we found evidence that increased overall connectivity, and not predator movement per se, was responsible for metacommunity stability.

There are many potential explanations for why random dispersal maintains roughly the same degree of metacommunity stability as positive body size scaling. The stabilizing effects of dispersal in randomly assembled metacommunities have been shown to operate when dispersal is both homogeneous and variable among species44. We conjecture that, for the non-random food webs we examine here, the existence of stabilizing structural motifs could be enhanced by dispersal. Consumers play key roles in the stabilizing effects of food webs compartments75, including linking separate energy channels19,76 and forming long interaction loops77. Higher dispersal by these consumers, even if they are not top predators, could substantially enhance metacommunity stability by connecting stabilizing subscommunities across habitats. Additionally, patterns of dispersal where low level consumers have the greatest dispersal connectivity have been shown to confer stability in some tri-trophic metacommunities64. Finally, differential dispersal among species at similar trophic levels could generate competition-colonization and fecundity-dispersal trade-offs (reviewed in78), which may enhance stability in simple metacommunities.

How the above mechanisms operate in more complex spatial food webs remains an open question, and identifying the body size and trophic determinants of dispersal remains a central challenge in spatial ecology. We assume a power-law scaling between dispersal and body size similar to relationships observed with other traits27,79. While some examples are consistent with this assumption14,55,80,81, some traits that could influence dispersal may show more complex patterns. For example, maximum speed may generally show a positive relationship with body size except for the largest animals48, suggesting that some traits that influence dispersal may not be monotonically dependent on body size49,72,81. Organisms may also utilize multiple dispersal modes (e.g. move both passively and actively82,83) and exhibit other complex behaviors that could influence metacommunity connectivity49,69,84,85. The results of our permutation analysis suggest that the exact allometric dependence may not be as important to metacommunity stability as the overall maximum level of dispersal (Figs. 4 and 5).

Our assumed allometric dispersal rates mirrors our assumption that body size influences trophic position, with consumers being generally larger than their prey, such that higher-level consumers either disperse much more or much less than lower-level consumers and producers. Allometric food web structures have been employed frequently in modeling studies of food web stability6,10,20,86,87. For simplicity, we fixed the predator-prey body size ratio in our modeled food webs to the geometric mean value reported in32 which tended to be observed most commonly among invertebrate and ectotherm vertebrate predators and in aquatic and marine environments. While predator-prey body size ratios may exhibit some predictable patterns, it is less clear how consistent these are across entire food webs. Recent syntheses suggest that more consistent patterns can be found in marine and freshwater webs, with weaker or absent patterns in terrestrial systems34. Some data suggest body size ratios increase with increasing predator body size32,88, which we anticipate would make the stabilizing effects of large body size ratios even stronger, although this relationship is variable across predatory type and study methodology28,88. In the context of food web modeling, large body size ratios are important for stability because they alter trophic interaction strengths10,86. Despite our assumption of fixed consumer-resource body size ratios, our generalized modeling approach was able to produce wide variation in interactions strengths across all food web sizes and connectivities. The consistent results we observed suggest that relaxing our assumed allometric food web structure would not qualitatively alter our conclusions. Gravel et al.44 additionally found that increasing dispersal had strong stabilizing effects on metacommunities regardless of whether local communities were randomly assembled or possessed a hierarchical food web structure (but see17). However, the interaction between food web structure, body size variation, and dispersal structure remains unresolved and a fertile area of inquiry.

Negative body size-dispersal scaling relationships lead to lower stability in our model by lowering dispersal coupling relative to situations where all species in the food web share the same dispersal rate. These results may be most likely relevant for systems where connectivity results from passive transport of smaller-bodied organisms, for example wind-dispersed plants or freshwater zooplankton, flooding-dispersed pond invertebrates, and marine organisms with planktonic larvae. Passive dispersal can generate stochastic variation in connectivity80, which may have complicated effects on stability. Yet it can also lead to increased connectivity by large numbers of individuals59,89,90. Thus, while we show that negative scaling could potentially equate to low stability, the overall levels of dispersal may be very high in systems where lower trophic levels disperse at greater rates, similar to increasing d in our model, reducing the scaling effect and leading to higher stability.

Figure 5
figure 5

Eigenvalues \(\lambda _1\) from Fig. 4 categorized by qualitative effects on stability. Categories Stability is gained and Stability is lost correspond to cases where the median effect of randomly reassigning species’ dispersal rates is a change in the sign of \(\lambda _1\). Stability is unaffected indicates no sign change.

Spatial variation in model parameters were central to how dispersal connectivity influenced stability in our model. The positive relationship between stability and the dispersal parameters d and z was consistent throughout the parameter region we explored; additional numerical results not shown confirmed this relationship more broadly. This pattern contrasts with some other metacommunity models that exhibited a unimodal relationship between dispersal and stability91,92,93,94. Unimodal dispersal-stability relationships occur when very high dispersal leads the system to behave as a single, well-mixed habitat. Species persistence and the variation-reducing effects of dispersal therefore no longer operate. Similar outcomes do not seem to occur in our model, at least at the parameter values examined, because rates of primary production and trophic interactions are forced to vary in space. A key effect of dispersal in the presence of such spatial variation is to reduce variation among interaction rates of the average, well-mixed food web, which actually increases stability44,45.

Homogenous systems could exhibit very different dynamics. Dispersal-induced instabilities are frequent in homogeneous space trophic models (e.g.16,95), leading to spatially patterned steady-states or asynchronous oscillations even when local dynamics are stable. The presence of high-dispersing top predators in more complex food webs appears to generally stabilize spatially homogeneous systems17, although faster consumer movement is also a necessary condition for spatially pattered steady states to arise in two- and three-species food chains95,96. Dispersal-induced oscillatory instabilities in contrast are more likely when primary producers disperse much faster than primary and secondary consumers in simple food chains64,95. Therefore, we might expect a generally stabilizing effect of positive body size scaling and a generally destabilizing effect from negative scaling with oscillatory instabilities. However, these predictions could be complicated in more complex ecological networks, where spatial dynamics can be additionally influenced by consumers sharing a common prey (e.g.97) or prey being consumed by a shared predator (e.g.95). Furthermore, pattern formation and asynchronous oscillations could impart “stability” in a different sense by lowering population variation at larger scales64,98.

Our definition of stability pertains to metacommunity behavior near equilibrium and is therefore limited in describing non-equilibrium dynamics. In this class of models, instabilities can indeed include trajectories that tend to zero (i.e., species extinctions), but other outcomes including non-equilibrium co-existence with synchronous or asynchronous oscillations are also possible99,100,101,102. The relationship between species persistence and other non-equilibrium dynamics is not always clear, particularly when species interactions are nonlinear. In metacommunities, regional persistence can occur even in the presence of local extinctions91,92,94. Unstable oscillations or even local extinctions may in fact drive spatially asynchronous dynamics that enhances regional persistence64,92,94,98. In these cases, positive body size scaling could counteract such effects; just as coupling by large, mobile consumers stabilizes heterogeneous metacommunities in our model, predator movement could dampen the amplitude of asynchronous oscillations. Wide-ranging predators may also synchronize prey dynamics103,104,105. The rich non-equilibrium behavior possible in highly speciose food webs with nonlinearities, like we examine here, will likely require extensive investigation and generalizations may be challenging18.

Consumers, especially large-bodied top predators, are being disproportionately lost from the world’s ecosystems74,106,107. These losses have far-ranging implications for ecosystem structure and stability6,17,74,106,108,109. A potential consequence of consumer extinction is loss of spatial coupling, which previous research and our results here suggest could lead to further regional instability14,17,76, including increased variability and subsequent species losses. While positive body size scaling had the greatest stabilizing effect in our model, we also found through our permutation analysis that randomly shifting the highest dispersal rate from the largest predator to other species in the food web at other trophic positions yielded equivalent qualitative stability. Thus, our results suggest that the conservation value of connectivity may not be lost when top consumers are. Instead, identifying alternative agents of connectivity and promoting their dispersal following top consumer loss may serve as a productive strategy. In practice, finding substitutes for large bodied consumers in some ecosystems may be difficult given the out-sized role in ecosystem coupling these species play. Yet, continued threats to top consumer persistence and the potential conservation value of dispersal among other species suggest the utility of planning for robust connectivity at the community rather than population level110,111.

Methods

Steady states and stability of Eq. (1) were studied using the generalized modeling method6,70. The method assumes all populations in the food web possess a steady state, allowing us to re-cast population densities and functions as normalized proportions of the steady state. Thus, for each population \(B_i^k\) of \(i=1,...,S\) species across \(k=1,...,N\) patches there exists a steady state \(B_i^{k*}\) that allows us to define the normalized densities \(b_i^k=\frac{B_i^k}{B_i^{k*}}\). The normalized equations for the non-dispersal components of the metacommunity are therefore

$$\begin{aligned} \begin{aligned} \frac{db_i^k}{dt} ={}&\alpha _i [(1-\rho _i^k)g_{B_i^k}(b_i^k)+\rho _i^k f_{B_i^k}(c_{B_i^k},b_i^k)-(1-\sigma _i^k)x_{B_i^k}(b_i^k) \\&-\sigma _i^k\sum _{j}{\beta _{ij}^k e_{B_j^{k}B_i^{k}}({\mathbf {b}}^k)}]; \;\;\;\;c_{B_j^k}=\sum _{i}{\chi _{ji}{\tilde{f}}_{B_j^k}(B_i^k)}. \end{aligned} \end{aligned}$$
(5)

The functions g, f, x, and e represent the functions G, F, X, and E from Eq. (1) normalized by their values evaluated at steady state; the newly introduced variables \(c_{B_j^k}\) and \({\tilde{f}}_{B_j^k}(B_i^k)\) represent the total amount of food available to species j and the contribution of species i to the food available to species j, respectively71. Additional scale and branching parameters that arise from the normalization procedure set the rates and strength of interactions in the local food web. The normalized turnover rate \(\alpha _i\) scales the biomass flow rates for each species in the food web with mass, \(\alpha _i=M_i^{-1/4}\), while the branching parameters quantify the structure of these flows. Specific interpretations of the scale and branching parameters are given in Table 1 and provided in detail in70.

Determining stability of Eq. (4) relies on establishing the Jacobian matrix for the local food web, \({\mathbf {J}}_k\). The Jacobian is constructed from elements that describe the change in the dynamic equation for each species that occurs given a change in each component state variable and the functions of each state variable near steady state. The local food web Jacobian therefore is a square \(S\times S\) matrix where diagonal entries \(J_{i,i}\) describe the effects of a change in species i on itself and the non-diagonal entries \(J_{j,i}\) describe the effects of species i on species j. Quantifying the changes of functions of state variables near steady state is accomplished in the generalized modeling framework by defining the following exponent parameters6,16,70,71,

$$\begin{aligned} \begin{aligned} {}&\phi _i^k=\frac{\partial }{\partial b_i^k}g_{B_i^k}(b_i^k)\bigg |_{x=x^*},\;\;\;\;\psi _i^k=\frac{\partial }{\partial b_i^k}f_{B_i^k}(c_{B_i^k}, b_i^k)\bigg |_{x=x^*},\;\;\;\;\lambda _{ji}^k=\frac{\partial }{\partial b_i^k}{\tilde{f}}_{B_j^k}(B_i^k)\bigg |_{x=x^*},\\&\gamma _i^k=\frac{\partial }{\partial c_{B_i^k}}f_{B_i^k}(c_{B_i^k}, b_i^k)\bigg |_{x=x^*},\;\;\;\;\mu _i^k=\frac{\partial }{\partial b_i^k}x_{B_i^k}(b_i^k)\bigg |_{x=x^*}. \end{aligned} \end{aligned}$$
(6)

These exponent parameters can be interpreted formally as elasticities70,71. Furthermore, they recapitulate effects of relevant non-linearities on ecological dynamics commonly employed in standard ecological models such as the amount of saturation in the functional response (\(\gamma _i^k\)), the shape of the producer growth function (\(\phi _i^k\)), the presence of intraspecific consumer interference (\(\psi _i^k\)), and the density-dependence of consumer mortality rates (\(\mu _i^k\)). The exponent parameter \(\lambda _{j,i}^k\) can be interpreted as the adaptability of consumer preferences to different prey items; following previous work6 we assume constant preferences for simplicity.

Niche model food web topologies that specify the structure of interactions in Eq. (5) were generated following21. Each species i is assumed to exist on a niche axis between [0,1] and is assigned a niche value using a uniform distribution. The species then is assumed to consume all species over a range \(r_i\) that is near or below the position of species i on the niche axis, generating a trophic hierarchy. The location of the range is assigned using a beta function with expected value 2C. We chose input values for species richness S as integers between 10 and 30 inclusive, [10..30], and for connectance C as (0.12, 0.14, ..., 0.24). The latter range was chosen to encompass empirically observed connectance values112. Only webs with a single connected component were retained for analysis.

Spatial networks were generated as random geometric graphs (RGG). Networks of N patches were generated by first randomly assigning coordinates in 2 dimensional space to each patch drawn from a standard uniform distribution. patches were then connected if the Euclidean distance between their coordinates fell below a threshold n. Networks with unconnected patches were discarded. For results included here, we used \(N=10\) and \(n=0.32\).

The spatial structure of the RGG is encoded in the Laplacian matrix \({\mathbf {L}}\). The Laplacian \({\mathbf {L}}\) is an \(N\times N\) matrix where the diagonal entries \(L_{k=l}\) represent the number of dispersal connections (i.e. degree) of each patch k. The off-diagonal elements of L reflect dispersal connections between individual patches, where \(L_{k\ne l}=-1\) when patches k and l are connected and 0 otherwise. Linking the Laplacian to the dispersal matrix \({\mathbf {D}}\) yields the spatial structure of the dispersal network. The dispersal matrix is an \(S\times S\) matrix with species-specific dispersal rates on the diagonal \(D_{i=j}=\delta _i\) and all other entries zero. Using \({\mathbf {L}} \otimes {\mathbf {D}}\), with \(\otimes\) being the Kroenecker product, yields the \(SN\times SN\) block matrix that describes the pattern of connections between all patches by all species.

Local food webs were embedded in the spatial structure of the metacommunity using Eq. (3). Each local web Jacobian \({\mathbf {J}}_k\) was numerically placed on the diagonal of the metacommunity food web matrix P. Because we assume environmental heterogeneity, the entries of each \({\mathbf {J}}_k\) in a given P vary, although the topologies remain fixed. Environmental heterogeneity is implemented as variation in branching and elasticity parameters; the value of each parameter for each species in a local web \({\mathbf {J}}_k\) was determined by drawing from uniform distributions in the appropriate range defined in Table 1.

We generated one hundred unique food web topologies for each combination of species richness S and connectance C, yielding 7700 unique metacommunity topologies. We explored metacommunity dynamics over five values of dispersal coupling d and seven values of dispersal allometry z, yielding 192,500 unique metacommunities. For each unique metacommunity, we then compared its stability with that of 100 similar metacommunities whose dispersal rates are randomly re-assigned dispersal rates. For each permutation metacommunity, the dispersal rate of each species was randomly reassigned to a different a species with equal probability. The stability of the original metacommunity was compared with the median stability of its corresponding random dispersal metacommunities using the values and signs of the real part of the leading eigenvalues of the metacommunity Jacobians.

Associations between different parameters and metacommunity stability were quantified using generalized linear models (GLMs) with binomial errors and a logit link function, with an information criterion-based model selection scheme. Following White et al.113 we use GLMs as a framework for partitioning variance and correlations between important model parameters and metacommunity stability, and not for assessing statistical significance. We first fitted a global model comprising linear combinations of fixed effects for local food web species richness S, web connectance C, the strength of spatial network links d, the body size scaling exponent for allometric dispersal z, and the spatial variances and means of parameters describing consumer satiation, interaction strengths, and nutrient availability to primary producers (Table 1). We then computed Akaike’s information criterion (AIC) for all submodels comprising different combinations of fixed effects in the global model, and selected the model with the lowest AIC score as the best fitting. This model included four terms: species richness S, web connectance C, global spatial network link strength d, and the exponent of allometric dispersal z (Fig. 3).