• You're Mobile Enabled
  • Access by Universitaet Linz

Diverse communities behave like typical random ecosystems

Wenping Cui*

Robert Marsland, III and Pankaj Mehta

  • Department of Physics, Boston University, 590 Commonwealth Avenue, Boston, Massachusetts 02139, USA and Department of Physics, Boston College, 140 Commonwealth Avenue, Chestnut Hill, Massachusetts 02467, USA

  • Department of Physics, Boston University, 590 Commonwealth Avenue, Boston, Massachusetts 02139, USA

  • *cuiw@bc.edu
  • marsland@bu.edu
  • pankajm@bu.edu

Phys. Rev. E 104, 034416 – Published 27 September, 2021

DOI: https://doi.org/10.1103/PhysRevE.104.034416

Abstract

In 1972, Robert May triggered a worldwide research program studying ecological communities using random matrix theory. Yet, it remains unclear if and when we can treat real communities as random ecosystems. Here, we draw on recent progress in random matrix theory and statistical physics to extend May's approach to generalized consumer-resource models. We show that in diverse ecosystems adding even modest amounts of noise to consumer preferences results in a transition to “typicality,” where macroscopic ecological properties of communities are indistinguishable from those of random ecosystems, even when resource preferences have prominent designed structures. We test these ideas using numerical simulations on a wide variety of ecological models. Our work offers an explanation for the success of random consumer resource models in reproducing experimentally observed ecological patterns in microbial communities and highlights the difficulty of scaling up bottom-up approaches in synthetic ecology to diverse communities.

Physics Subject Headings (PhySH)

Article Text

I. INTRODUCTION

One of the most stunning aspects of the natural world is the immense diversity of ecological communities, ranging from rainforests to human microbiomes. Ecological communities are critical for numerous processes ranging from global water cycling processes  to animal development and host health . For this reason, understanding the principles governing community assembly and function in diverse communities has wide ranging applications from conservation efforts to pharmaceutical engineering and bioremediation .

Many traditional ecological models focus on ecosystems consisting of a few species and resources. In such low dimensional models, it is often possible to characterize the ecological traits of all the species and resources and then use this information to make predictions about community-level properties . However, many natural communities are extremely diverse and the models and parameters are naturally high dimensional. This problem is especially pronounced in the context of microbial ecology where hundreds of species can coexist in a single location. In this case, a comprehensive parametrization of species and resource traits is no longer feasible, suggesting that new ideas and concepts are required to understand diverse communities.

A similar problem is encountered in statistical physics. For example, an ideal gas is characterized by the unit mole, which has the order of particles, making it impossible to simultaneously specify the microscopic state of the system (e.g., the positions and velocities of all particles). Despite this uncertainty, it is still possible to make predictions about macroscopic properties like pressure and the average energy by treating the positions and velocities of particles as independent random variables . The fact that such universal statistical behaviors emerge naturally in large disorder systems composed on many particles suggests that a similar approach maybe possible in ecological systems.

In 1972, Robert May suggested that large complex ecosystems can also be modeled as random systems . May considered a diverse ecosystem composed of species whose interspecific interactions were sampled randomly and independently from a normal distribution with zero mean and variance . In particular, May asked when such a diverse random ecosystem would be stable to small perturbations. To answer this question, he examined the largest, i.e., the rightmost eigenvalue of the community interaction matrix , whose diagonal entries—chosen to be by May—describe intraspecific competition and off-diagonal entries describe how much the growth rate of species is affected by a small change in the population of other species from its equilibrium value. Using a mathematical formula for the distribution of eigenvalues of large random matrices derived by Ginibre , May showed that increases with , and derived a stability criterion governing the maximum diversity of an ecosystem: A diverse ecosystem becomes unstable to small perturbations when  . May's stability criteria has proven to be robust against a wide array of changes in the assumptions, including adding biologically realistic correlation structures to the matrix, or incorporating the dependence of the community matrix on population sizes in the Lotka-Volterra model .

In May's model, all ecosystem properties are encoded in the species-species interaction matrix. A major limitation of these models is that they neglect resource dynamics, making it difficult to understand how ecosystem properties depend on both the external environment and species consumer preferences. For this reason, community assembly is often analyzed using generalized consumer resource models (CRMs) . In these models, species are modeled as consumer that can consume resources, and sometimes also produce resources . Recently, we have shown that such models, initialized with random parameters, can predict laboratory experiments on complex microbial communities  and reproduce large-scale ecological patterns observed in field surveys, including the Earth and Human Microbiome Projects . This suggests that the large-scale, reproducible patterns we see across microbiomes are emergent features of random ecosystems.

Yet, it remains unclear why random ecosystems can accurately describe real ecological communities. To answer these questions, in this paper we exploit ideas from random matrix theory and statistical physics to analyze generalized consumer-resource models in spirit of May's original analysis. We show that the macroscopic ecological properties of diverse ecosystems can be described using random ecosystems, much like thermodynamic quantities like pressure and average energy of the ideal gas can be described by considering particles to be random and independent.

A. Models

To explore these ideas, we devised a more concrete version of May's original thought experiment describing an ecosystem consisting of noninteracting species where interactions are gradually turned on. May's original argument only considered the local dynamics near a prespecified equilibrium point that eventually becomes unstable. Since we are interested in exploring what happens in consumer resource models, we must make additional modeling assumptions to arrive at a complete set of nonlinear dynamics. We focus on numerous variants of the consumer resource model (CRM) , including different choices of resource dynamics, consumer preferences, as well as more dramatic variants such as the microbial consumer resource model introduced in Refs. .

The original MacArthur consumer resource model  consists of species or consumers with abundances ( ) that can consume one of substitutable resources with abundances ( ), whose dynamics are described by the equations

(1)

The consumption rate of species for resource is encoded by the entry in the consumer preference matrix , is the carrying capacity of resource , and is a maintenance energy that encodes the minimum amount of energy that a species must harvest from the environment to survive. When the system is in the steady state, some species and resources can vanish. We denote the numbers of surviving species and resources by and , respectively, and in general at steady state we will have and . For this reason, we refer to this model as the CRM with resource extinction and consider its effects analytically and numerically in Sec.  and Appendix .

In the beginning, we focus primarily on a popular variant of the original CRM introduced by Tilman with slightly different resource dynamics :

(2)

From an ecological perspective, there are significant differences between this model variant and the original CRM. First, the resource supply rate is constant instead of following logistic growth rate. Second, the species consume resources at a rate that is independent of the resource concentrations in the environment. This can lead to unphysical, negative resource concentrations. Despite these differences, mathematically the equilibrium solutions of the two models have similar forms. One major difference that does arise is that in the dynamics described by Eq.  consumers can no longer cause a resource to go extinct (i.e., ). This makes this models significantly easier to analyze (especially within the context of random matrix theory) and leads to much simpler analytic expressions. For this reason, we largely focus on this latter model without resource extinction [see Figs. , and  for dynamics described by Eq.  and Appendix  for numerics and Appendix  for analytics on original CRM described by Eq. ]. Despite the unphysical, negative resource concentrations, the CRM without resource extinction captures almost all the qualitative behaviors present in more complicated and physically realistic CRMs (though there are some subtle but important differences discussed below).

Both the models in Eqs.  and  make very specific assumptions about resource dynamics. To check the generality of our results, we also numerically analyzed generalizations of the CRM, including linear resource dynamics where resources are supplied externally, and a model of microbial ecology with trophic feedbacks where organisms can feed each other via metabolic byproducts . This analysis can be found in Appendix . Furthermore, for simplicity, in most of this work we assume that . However, we have numerically checked that our results are robust to breaking on this assumption (see Fig. ).

In CRMs, the identity of each species is specified by its consumption preferences. In real ecosystems, it is well established that organisms can exhibit strong consumer preferences for particular resources. However, recent work has shown that consumer resource models with random consumer preferences can reproduce experimental observations in field surveys and laboratory experiments . To understand this phenomena, we asked how adding noise to consumer preferences changes macroscopic ecosystem level properties like diversity and average productivity. To do so, we considered a thought experiment where we started with predesigned consumer resource preference, and then added “noise” to the consumer resource preferences. Mathematically, we can decompose the consumer matrix in Eqs.  and  into two parts:

where encodes predesigned structures, and is a random matrix representing “noise.”

For simplicity, we started with noninteracting species where each species consumes its own resource. A set of noninteracting species can be constructed by engineering each species to consume a different resource type, with no overlap between consumption preferences. For example, one can imagine designing strains of Escherichia coli, where each strain expresses transporters only for a single carbon source with all other transporters edited out of the genome: i.e., a strain that can only transport lactose, another strain that can only transport sucrose, etc. An ecosystem with such consumer preference structure is shown in Fig. . In such an experiment, horizontal gene transfer would eventually begin distributing transporter genes from one strain to another, so a realistic model would have to allow for some amount of unintended, “off-target” resource consumption. In line with May, we can model the consumer preferences of species for resource in such an ecosystem as the sum of the identity matrix and a random component with variance that encodes nonspecific preferences [see Fig.  right]. In other words, the full consumer matrix can be written as .

FIG. 1.

Random interactions destabilize an ecosystem of specialist consumers. (a) Left: an ecosystem with system size starts with specialists consuming only one type of resource, resulting in a consumer preference matrix . Right: off-target consumption coefficients are sampled from a Gaussian distribution, resulting in an overall consumer preference matrix . (b) Fraction of surviving species vs. 𝜎𝑐, numerically computed using 𝑀=100 for an ecosystem described by Eq. , along with the corresponding results for a completely random ecosystem with 𝐁=0. The error bar shows ±1 standard deviation from 10 000 independent realizations. Also shown are examples of the matrices 𝐂 employed in the simulations. (c) Heatmap for the identity matrix plus a Gaussian random matrix with 𝜎𝑐=1 for two system sizes: 𝑀=100 and 𝑀=500.

II. RESULTS

A. Phase transition to random ecosystems

Figure  shows how the number of surviving species at steady-state changes as one adds more and more nonspecific resource preferences to an ecosystem initially composed of noninteracting species. As in May's analysis, the appropriate measure of the importance of the random component is the root-mean-squared off-target consumption 𝜎𝑐=𝑀𝜎2 (recall 𝑀=𝑆). This scaling reflects the fact that two consumer matrices 𝐂 with the same 𝜎𝑐 but different system sizes 𝑀 can have very different amounts of absolute noise as shown in Fig. , but exhibit almost identical community-level properties (with all differences coming from finite-size effects; see Fig.  for the universal behavior at different 𝑀). Figure  shows the fraction of surviving species 𝑆*/𝑀 in the ecosystem as a function of 𝜎𝑐. At small values of 𝜎𝑐, all the species survive and 𝑆*=𝑆. As high as 𝜎𝑐=0.7, almost all of the original species are still present in the community. But between 𝜎𝑐=0.7 and 𝜎𝑐=1, there is a sharp transition in community structure, which results in about half of the original species becoming extinct.

Remarkably, the fraction of surviving species converges to the same value as for a completely random consumer preference matrix and remains finite as 𝜎𝑐 . This means that ecosystems with an arbitrarily large number of species can be stably formed by considering a sufficiently large initial species pool. We also examined two other community-level properties: the mean species abundance 𝑁 (i.e., the average productivity) and the second moment of the population size 𝑁2, which includes information about the distribution of population sizes of various species. Figure  shows that both of these quantities are also well-approximated by the random consumer preference matrix for 𝜎𝑐>1. These numerical predictions are in excellent agreement with analytic predictions derived in the 𝑆 limit derived in Appendix  using the cavity method .

FIG. 2.

Community properties for structured and random ecosystems. (a) Examples of designed interactions Top: the identity matrix; Middle: a Gaussian-type circulant matrix; Bottom: a block matrix (see Appendix  for details). Simulations of designed and random ecosystems where the random component of the the consumer preferences 𝐂 are sampled from a (b) Gaussian distribution 𝒩(0,𝜎𝑐𝑀), (c) Uniform Distribution: 𝒰(0,𝑏), or a (d) Binomial distribution: 𝐵𝑒𝑟𝑛𝑜𝑢𝑙𝑙𝑖(𝑝𝑐). The plots show the fraction of surviving species 𝑆*/𝑀, mean species abundance 𝑁, and second moment of the species abundances 𝑁2 for designed and purely random ecosystems ( 𝐁=0) the number of nonspecific consumer preferences is increased.

This convergence to random ecosystem behavior is quite robust, and holds for other choices of designed consumer preferences beyond the identity matrix considered above. Figure  shows numerical simulations of the diversity 𝑆*/𝑀, average productivity 𝑁, and second moment of the species abundances 𝑁2 as a function of the noise 𝜎𝑐 for two other choices of designed consumer preference matrices: a block structure with predefined groups of species exhibiting strong intra-group competition and a unimodal structure where each species is more likely to consume resources similar to its preferred resource. Once again, we see that the ecosystem quickly transitions to a behavior where these macroscopic properties are indistinguishable from those of a random ecosystem. Borrowing terminology from physics, we call systems whose macroscopic properties are well described by random ecosystems as typical. The primary effect of the choice of consumer preference matrix is to adjust the threshold value of 𝜎𝑐 where the transition to typicality occurs. In all cases, we find that the random behavior takes over when the average total off-target consumption capacity over all 𝑀 resource types becomes greater than the consumption of the primary resource in the original designed ecosystem in the absence of noise.

The character of the self-organized state is also robust to changes in the sampling scheme for the random component of the consumer preferences. Gaussian noise in consumer preferences simplifies the analytic calculations but also sometimes results in nonphysical negative values for consumer preferences. We therefore tested two sampling schemes that always produce positive values for consumer preferences: uniformly sampling the random component of preferences 𝐶𝑖𝛼 in an interval from 0 to 𝑏, and binary sampling where 𝐶𝑖𝛼=1 with probability 𝑝𝑐 and zero otherwise. Changing 𝑏 or 𝑝𝑐 affects both the mean and the variance of the random components of the consumer preferences simultaneously making it difficult to directly compare to the Gaussian case. Nonetheless, as can be seen in Fig. , the qualitative behaviors is identical to the Gaussian case, with macroscopic ecological properties becoming indistinguishable from those of a fully random ecosystem when the average off-target resource consumption comparable to the the consumption of the designed resources.

B. Sensitivity to perturbations and the transition to typicality

To better understand why mass extinctions happen at 𝜎*𝑐1 and allow for comparison with May's original analysis, we calculated an effective species-species competition matrix 𝐴𝑖𝑗 between species for an ecosystem whose dynamics are governed by Eq. . We exploited the observation by MacArthur and others that if resource abundances always remain close to their steady state values, the steady-states of the CRM coincide with those of an effective generalized Lotka-Volterra model of the form

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖(𝛼𝐌𝐶𝑖𝛼𝐾𝛼𝑚𝑖𝑗𝐴𝑖𝑗𝑁𝑗),
(3)

with the species-species interaction matrix given by

𝐴𝑖𝑗=𝛼𝐌𝐶𝑖𝛼𝐶𝑇𝛼𝑗
(4)

(see Fig.  and Appendix  for details). This matrix is related to May's community matrix governing stability 𝐉 discussed in the introduction through the relation 𝐽𝑖𝑗=𝑁𝑖𝐴𝑖𝑗, where 𝑁𝑖 is the steady-state abundance of species 𝑖. For symmetric interaction matrices of the form in Eq. , it is possible to prove that the largest eigenvalue 𝜆max of 𝐉 reaches zero from below only when the smallest eigenvalue 𝜆min of 𝐀 reaches zero from above (see Appendix ).

FIG. 3.

Effect of random interactions on ecosystem sensitivity. (a) The bipartite interactions 𝐶𝑖𝛼 in MacArthur's consumer-resource model can be mapped to pairwise competition coefficients 𝐴𝑖𝑗 in generalized Lotka-Volterra equations through 𝐴𝑖𝑗=𝛼𝐌𝐶𝑖𝛼𝐶𝑇𝛼𝑗. (b) Spectra of 𝐴𝑖𝑗 at different 𝜎𝑐 for 𝐂=𝟙+𝐂, where 𝐂 is a random matrix with i.i.d entries drawn from a normal distribution with mean zero and standard deviation 𝜎𝑐. The red solid line is the Marchenko-Pastur distribution. (c) Comparison between numerical simulations and analytic results for the minimum eigenvalue of 𝐀 at different 𝜎𝑐. (d) Comparison between numerical simulations and analytic solutions for the mean sensitivity 𝜈 of steady-state population sizes to changes in species growth rates. See Appendix  for details.

As shown in Fig. , the behavior broadly falls into one of three different regimes depending on the amount of noise introduced in the consumer preferences: a low-noise regime when 𝜎𝑐1, a cross-over regime when 0𝜎𝑐1, and a high-noise regime when 𝜎𝑐>1. Figure  shows how the eigenvalue spectrum of the corresponding Lotka-Volterra interaction matrix 𝐀 change as 𝜎𝑐 increases.

1. Low-noise regime (𝜎𝑐1)

In the low-noise regime, the engineered structure in the consumer preference controls large scale ecological properties. Furthermore, the eigenvalue spectrum of the LV-interaction matrix 𝐀 is centered around 1 reflecting the fact there is very little competition between species (i.e., species still occupy largely independent niches). For this reason, in this regime all the initial species in the ecosystem survive to steady-state so that 𝑆*/𝑀=1.

2. Crossover regime (0𝜎𝑐1)

With increasing 𝜎𝑐, the eigenvalues due the noise component in 𝐀 repel each other like in the Coulomb gas and the spectrum spreads out . 𝜆min decreases until it reaches the threshold of stability 𝜆min0 at 𝜎*𝑐1. Note that 𝜆min is close to 0 but not exactly at 0 because the steady-state of the CRM is always stable . In this regime even a small environmental perturbations or small amounts of demographic noise can result in species extinctions . This is closely related to the divergence of structural stability when 𝜆min0 . In Appendix  we show analytically using the Cavity method  that in the limit 𝑀, 𝜆min is approaches 0 from above when 𝜎*𝑐=1. At 𝜎𝑐1 the engineered structure and noise have comparable amplitudes. For the case where the consumer preferences are chose to be binary noise, this threshold corresponds to a critical noise level 𝑝𝑐1𝑀, meaning on average there is one random nonzero element in the row besides the diagonal one. More generally, our numerics suggest that the threshold to typicality occurs in a wide variety of models when the expected off-target resource consumption rates become comparable to the consumption rate for the designed resources.

3. Noise-dominated regime (𝜎𝑐>1)

In this regime, we observe two new phenomena that were not accessible in May's original framework. First, the spectrum of the species-species interaction matrix 𝐴𝑖𝑗 approaches the Marchenko-Pastur law ,

𝜌(𝑥)=12𝜋𝜎2𝑐𝑐𝑥(𝑏𝑥)(𝑥𝑎)+Θ(𝑐1)(1𝑐1)𝛿(𝑥),
(5)

where 𝑎=𝜎2𝑐(1𝑐)2, 𝑏=𝜎2𝑐(1+𝑐)2, 𝑐=𝑆*/𝑀, and Θ(𝑥) represents the Heaviside step function. This differs from May's analysis where the spectrum of the interaction network follows Girko's Circular law . The reason for this difference is that species-species interaction matrix obtained from the CRM is the outer product of a random matrix 𝐂 with itself [i.e., a Wishart matrix, see Eq. ], reflecting the fact that the CRM has two different kinds of degrees of freedom: resources and species. The Marchenko-Pastur law is the distribution we would expect for an ecosystem with completely random consumer preferences . This helps explain our earlier observations that community-level observables of ecosystems are indistinguishable from the purely random ecosystems when 𝜎𝑐 is sufficiently large [see Fig. ].

Second, as 𝜎𝑐 increases past 1 and ecosystem properties become typical, the resulting ecosystems once again become insensitive to external perturbation . To see this, we note that we can measure sensitivity to perturbations by examining the minimum eigenvalue of the interaction matrix 𝐴𝑖𝑗, with larger 𝜆min meaning decreased sensitivity to perturabations (see Appendix ). The minimum eigenvalue in the Marchenko-Pastur distribution is located at

𝜆min=𝜎2𝑐(1𝑆*/𝑀)2.
(6)

As one increases 𝜎𝑐, 𝑆*/𝑀1/2 from above since there is increases competition between species for shared resources. Consequently, 𝜆min is always much larger than zero once ecosystems crossover to their typical behavior.

The above analysis suggests that 𝜆min is an important property that can be used to characterize the three regimes seen in Fig. . In the low-noise regime, species-species interactions are weak and 𝜆min1, whereas in the high-noise regime 𝜆min=𝜎2𝑐(1𝑆*/𝑀)2. The calculation of 𝜆min in Regime B is challenging because of the mixture between the engineered structure and noise. However, we can use techniques from RMT for wireless communication (i.e., information-plus-noise models) to analytically estimate 𝜆min . The results are shown in the red scatter points in Fig.  (see Appendix ). As discussed above, 𝜆min approaches zero as 𝜎𝑐 approaches one.

The spectrum of 𝐀 also contains quantitative information about the sensitivity of the ecosystem in the Cavity method. Specifically, as shown in Appendix , we can define a susceptibility 𝜈 that measures the average response of the steady-state population size 𝑁𝑖 to perturbing of the species maintenance cost 𝑚𝑖 [see Eq. ]. We further show that 𝜈 is directly related to the the sum of the inverse eigenvalues of 𝐴𝑖𝑗 through the expression

𝜈=1𝑀𝑖(1/𝜆𝑖)=1𝑀tr(𝐀1).
(7)

Figure  shows that this quantity is initially constant as 𝜎𝑐 is increased from 0, then reaches the maximum value at 𝜎𝑐=1, and finally rapidly decreases to near zero. In Appendix  we provide analytical calculations based on the cavity method confirming these numerical results.

Note that our results are not restricted to Gaussian noise but also apply to the other cases where the noise in consumer preferences is binary or uniform (see Figs.  and ). This is because the central limit theorem guarantees that the statistics of eigenvalues of large random matrices converge to the statistics in Gaussian random matrices for many biologically plausible choices of consumer preferences.

C. Effect of resource extinction

Thus far we have focused on a CRM without resource extinctions specified by Eqs. . As discussed extensively in Appendix , if we allow for resource extinction [Eqs. ] and write

𝐴𝑖𝑗=𝛼𝐌*𝐶𝑖𝛼𝐶𝑇𝛼𝑗
(8)

instead of Eq. , then, somewhat surprisingly, our cavity method predicts a second-order phase transition to typicality rather than a cross-over as is the case without resource extinction. The signature of such a second-order transition is the divergence of the susceptibility matrix 𝜈 discussed above. Figure  shows 𝜈 with and without resource extinction, numerically confirming the existence of this second order transition. This second-order transition is also reflected in the spectrum of the interaction matrix 𝐀 through the the appearance of zero eigenvalue modes for CRMs when resources can go extinct.

FIG. 4.

Effect of resource extinction on an ecosystem. A schematic for the consumer preference matrix with (a) and without (b) resource extinction for specialist consumers that each eat independent resources. The left schematic corresponds to the initial consumer matrix, and the right schematic to the consumer matrix after species and resource extinctions. Notice that resource extinctions can result in singular consumer matrices. (c) Spectra of 𝐴𝑖𝑗 at 𝜎𝑐=0.3 with consumer matrices chosen as in Fig.  with (left) and without resource extinction (right). The zero modes are marked with a red ellipse. (d) The mean sensitivity 𝜈 of steady-state at different 𝜎𝑐. The dashed lines in panel (d) are cavity solutions. The scatter points are results from numerical simulations. See Appendix  for detailed calculations.

The existence of zero modes can be understood by noting that resource extinction and species extinction correspond to the column and row deletion in the consumption matrix [shown in Fig. ]. Such deletions can change the engineered component of the effective consumer preferences for surviving species and resources, resulting in large fluctuations in the interaction matrix 𝐀. In the presence of these large fluctuations, the interaction matrix no longer self-averages, giving rise to the observed second-order phase transition. This same mechanism also leads to a second-order phase transition to typical behavior when the engineered portion of the consumer resources is block diagonal, even in the absence of resource extinctions (see Fig. ).

III. DISCUSSION

It is common practice in theoretical ecology to model ecosystems using random matrices. Yet it remains unclear if and when we can treat real communities as random ecosystems. Here, we investigated this question by generalizing May's analysis to consumer resource models and asking when the macroscopic, community-level properties can be accurately predicted using random parameters. We found that introducing even modest amount of stochasticity into consumer preferences ensures that the macroscopic properties of diverse ecosystems will be indistinguishable from those of a completely random ecosystem. Our calculations and numerics suggest that transition to typicality occurs when the total amount of off-target resource consumption becomes comparable to the consumption rate of targeted resources.

We confirmed our analytic calculations using numerical simulations on CRMs with different types of resource dynamics and different classes of nonspecific interactions. We emphasize that despite the fact that random ecosystems can make accurate predictions about macroscopic properties like the average diversity or productivity, they will in general fail to capture species level details. This phenomena is well understood in the context of statistical physics where it is possible to predict thermodynamic quantities such as pressure and temperature even though one cannot accurately predict microstates.

These observations may help explain the surprising success of consumer resource models with random parameters in predicting the behavior of microbial ecosystems in the laboratory and natural environments . They also suggest that maybe possible to predict macroscopic ecosystem level properties like diversity or total biomass even when ecosystems are poorly characterized or have lots of missing data.

The foregoing analysis has several other interesting implications. First, it suggests that bottom-up engineering of complex ecosystems may prove to be very difficult. As the number of components increases, small uncertainties in each of the interaction parameters may eventually overwhelm the designed interactions, and destabilize the intended steady state. Instead, such system are much more likely end up in a typical state which our theory suggests is much more stable than the intended designed state as ecosystems become more diverse.

Our work also suggests that in ecosystems well described by consumer resource models, crossing a May-like transition generically gives rise to typical random ecosystems rather than a marginal stable phase as was found in a recent analysis of the Generalized Lotka-Volterra model  (an important caveat to this statement is that adding nonresource based interactions to consumer resource models can restore complicated behavior reminiscent of the marginally stable phase ). This suggests that even when cumulative parameter uncertainties preclude a detailed characterization of an ecosystem, methods from statistical physics and Random Matrix Theory can be employed to predict system-level properties . It will be interesting to explore if and how these insights can be exploited to design top-down control strategies for ecosystems and identify assembly rules for microbial communities with many species .

In this paper, we only consider white noise, which is independently and identically added to all interaction components. In the future, it will be interesting to ask how other specialized noises, resulting from demographic stochasticity, phenotypic variation, can affect our results. Based on our experience, we expect that, even in these more complicated ecosystems, our conclusion will hold quite generally in the thermodynamics limit. But much more work needs to be done to confirm if this intuition is really correct.

We thank Josh Goldford, Zhenyu Liao, Jason Rocks, Guangwei Si, Jean Vila, and Yu Hu for helpful discussions. We also especially appreciate numerous valuable comments from Stefano Allesina. The work was supported by NIH NIGMS Grant No. 1R35GM119461, Simons Investigator in the Mathematical Modeling of Living Systems (MMLS). The authors are pleased to acknowledge that the computational work reported on in this paper was performed on the Shared Computing Cluster which is administered by Boston University Research Computing Services.

APPENDIX A: MODEL SETUP

We primarily analyze CRMs of the form given by Eqs.  and . To do so, we decompose the consumer matrix 𝐂 into two parts:

𝐂=𝐁+𝐂,
(A1)

with 𝐁 encoding a predesigned set of resource-mediated interactions, and 𝐂 a random matrix encoding “off-target” consumption. We consider three types of 𝐁 (see Fig. ): the identity matrix, a square Gaussian-type circulant matrix 𝐵𝑖𝛼=𝑒min(𝑖,|𝑀𝑖|)2/𝑟2 with 𝑟=7 , and a block matrix with identical 10×10 blocks (all elements are 1 inside the 10×10 block). We also consider three types of random matrices 𝐂. In all cases, each element in the matrix is sampled independently from an underlying probability distribution. The three distributions we consider are a normal distribution with mean zero and standard deviation 𝜎𝑐/𝑀, a uniform distribution where each element is sampled uniformly from [0,𝑏], and a Bernoulli distribution where each element can be +1 with probability 𝑝𝑐 and 0 with probability 1𝑝𝑐 (i.e., Binary Noise).

For all simulations, unless otherwise specified, the default choices for parameters are: 𝑀=100, 𝜇=0, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1, and 𝜎𝑚=0.01, and each data point is averaged from 5000 independent realizations. The simulation detail for each figure can be found at Appendix . All simulations are available on GitHub .

1. Alternative models used in the Appendix

To test the generality of our results, we also simulated more complicated variants of the consumer resource model (see Fig.  and Appendix ). First, we simulated a consumer resource model with linear resource dynamics :

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖(𝛽𝐶𝑖𝛽𝑅𝛽𝑚𝑖),𝑑𝑅𝛼𝑑𝑡=𝜅𝛼𝑅𝛼𝑗𝑁𝑗𝐶𝑗𝛼𝑅𝛼.
(A2)

In this model resources are supplied externally at a rate rather than described by a logistic growth. This small change in resource dynamics can significantly change the ecosystem properties because it prevents resources from going extinct in the steady state. In the simulations, we set 𝑀=100, 𝜇=1, 𝜅=1, 𝜎𝜅=0.1, 𝑚=0.1, and 𝜎𝑚=0.01, and each data point is averaged from 1000 independent realizations.

Second, we simulated a generalization of the MacArthur's Consumer Resource model to a model we call the microbial consumer resource model (MicroCRM). The MicroCRM was introduced in Ref.  and refined in Ref.  to simulate microbial communities. In this model, in addition to consuming resources species can produce new resources through cross-feeding. This dramatically changes the resource dynamics through the introduction of trophic feedbacks. Unlike the original CRM and the CRM with linear resource dynamics, the MicroCRM possesses no Lyapunov function. Full details of the model are available in the appendices of Refs. . In particular, the dynamics we use are described in Eq. (17) of Ref.  with the leakage rate 𝑙=0.4. The fraction of secretion flux secreted to the same resource type is 𝑓𝑠=0.45, the fraction of secretion flux to “waste” resource is 𝑓𝑤=0.45 and variability in secretion fluxes among resources is 𝑑0=0.2. We set 𝑀=100, 𝜇=1, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1 and 𝜎𝑚=0.01 and each data point is averaged from 1000 independent realizations.

APPENDIX B: SENSITIVITY TO PARAMETER PERTURBATIONS

We begin by defining four susceptibility matrices that measure how the steady-state resource and species abundances respond to changes in the resource supply and species death (growth) rates:

𝜒𝑅𝛼𝛽=𝜕𝑅𝛼𝜕𝐾𝛽,𝜒𝑁𝑖𝛼=𝜕𝑁𝑖𝜕𝐾𝛼,𝜈𝑅𝛼𝑖=𝜕𝑅𝛼𝜕𝑚𝑖,𝜈𝑁𝑖𝑗=𝜕𝑁𝑖𝜕𝑚𝑗,
(B1)

where the bar 𝑋 over the variable 𝑋 denotes the steady-state (equilibrium) solution.

For the extinct species and resources, by definition the susceptibilities are zero. For this reason, we focus only on the surviving resources and species. At steady-state, Eq.  gives

0=𝛼𝐌*𝐶𝑖𝛼𝑅𝛼𝑚𝑖,
(B2)

0=𝐾𝛼𝑅𝛼𝑗𝐒*𝑁𝑗𝐶𝑗𝛼,
(B3)

where 𝐌* and 𝐒* denote the sets of resources and species, respectively, that survive in the ecosystem at steady state. Differentiating these equations yields the relations

0=𝛼𝐌*𝐶𝑖𝛼𝜕𝑅𝛼𝜕𝐾𝛽,𝛿𝛼𝛽=𝜕𝑅𝛼𝜕𝐾𝛽+𝑗𝐒*𝜕𝑁𝑗𝜕𝐾𝛽𝐶𝑗𝛼,𝛿𝑖𝑗=𝛼𝐌*𝐶𝑖𝛼𝜕𝑅𝛼𝜕𝑚𝑗,0=𝜕𝑅𝛼𝜕𝑚𝑖+𝑗𝐒*𝜕𝑁𝑗𝜕𝑚𝑖𝐶𝑗𝛼.
(B4)

Substituting in for the partial derivatives using the susceptibility matrices defined above, we have

0=𝛼𝐌*𝐶𝑖𝛼𝜒𝑅𝛼𝛽,𝛿𝛼𝛽=𝜒𝑅𝛼𝛽+𝑗𝐒*𝜒𝑁𝑗𝛽𝐶𝑗𝛼,𝛿𝑖𝑗=𝛼𝐌*𝐶𝑖𝛼𝜈𝑅𝛼𝑗,0=𝜈𝑅𝛼𝑖+𝑗𝐒*𝜈𝑁𝑗𝑖𝐶𝑗𝛼.
(B5)

These two equations can be written as single matrix equation for block matrices:

(𝐂0𝟙𝐂𝑇)(𝜈𝑅𝜒𝑅𝜈𝑁𝜒𝑁)=𝟙.
(B6)

To solve this equation, we define a 𝑆*×𝑆* matrix: 𝐴𝑖𝑗=𝛼𝑀*𝐶𝑖𝛼𝐶𝑇𝛼𝑗. A straightforward calculation yields

𝜒𝑅𝛼𝛽=𝛿𝛼𝛽𝑖𝐒*𝑗𝐒*𝐶𝑇𝛼𝑖𝐴1𝑖𝑗𝐶𝑗𝛽,
(B7)

𝜒𝑁𝑖𝛼=𝑗𝐒*𝐴1𝑖𝑗𝐶𝑗𝛽,𝜈𝑅𝛼𝑖=𝑗𝐒*𝐶𝑇𝛼𝑗𝐴1𝑗𝑖,
(B8)

𝜈𝑁𝑖𝑗=𝐴1𝑖𝑗,𝑖,𝑗𝐒*and𝛼,𝛽𝐌*.
(B9)

APPENDIX C: CAVITY SOLUTION

When the designed component of the consumer preferences is the identity [i.e., 𝐁=𝟙 in Eq. ], the effect of random off-target consumption on system-scale properties can be computed analytically in the 𝑀,𝑆 limit using the cavity method . The cavity calculation is straightforward but tedious. For this reason, it is helpful to introduce the notation:

  • (i) 𝑀*𝑀=𝜙𝑅, 𝑅=1𝑀𝛽𝑅𝛽, and 𝑞𝑅=1𝑀𝛽𝑅2𝛽=𝑅2, where 𝑀* is the number of surviving resources.

  • (ii) 𝑆*𝑆=𝜙𝑁, 𝑁=1𝑆𝑗𝑁𝑗, and 𝑞𝑁=1𝑆𝑗𝑁2𝑗=𝑁2, where 𝑆* is the number of surviving species.

  • (iii) 𝐶𝑖𝛼𝜇𝑀+𝜎𝑐𝑑𝑖𝛼 assuming 𝑑𝑖𝛼=0, 𝑑𝑖𝛼𝑑𝑗𝛽=𝛿𝑖𝑗𝛿𝛼𝛽𝑀, with 𝑐𝑖𝛼=𝜇𝑀, 𝑐𝑖𝛼𝑐𝑗𝛽=𝜎2𝑐𝑀𝛿𝑖𝑗𝛿𝛼𝛽+𝜇2𝑀2𝜎2𝑐𝑀𝛿𝑖𝑗𝛿𝛼𝛽.

  • (iv) 𝐾𝛼=𝐾+𝛿𝐾𝛼, with 𝐾𝛼=1𝑀𝛽𝐾𝛽=𝐾, 𝛿𝐾𝛼𝛿𝐾𝛽=𝛿𝛼𝛽𝜎2𝐾.

  • (v) 𝑚𝑖=𝑚+𝛿𝑚𝑖, with 𝑚𝑖=𝑚, 𝛿𝑚𝑖𝛿𝑚𝑗=𝛿𝑖𝑗𝜎2𝑚.

  • (vi) 𝛾=𝑀𝑆, and for the identity matrix 𝛾=1.

Following similar steps as in Ref. , we perturb the ecosystem with a new species and resource 𝑁0 and 𝑅0. Ignoring 𝒪(1/𝑀) terms yields the following equations:

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖[𝑅𝑖𝑚+𝛽(𝜇𝑀+𝜎𝑐𝑑𝑖𝛽)𝑅𝛽+(𝜇𝑀+𝜎𝑐𝑑𝑖0)𝑅0𝛿𝑚𝑖𝛽(𝜇𝑀+𝜎𝑐𝑑𝑖𝛽)𝑅𝛽],
(C1)

𝑑𝑅𝛼𝑑𝑡=𝑅𝛼[𝐾+𝛿𝐾𝛼𝑅𝛼𝑁𝛼𝑗(𝜇𝑀+𝜎𝑐𝑑𝑗𝛼)𝑁𝑗(𝜇𝑀+𝜎𝑐𝑑0𝛼)𝑁0𝐾+𝛿𝐾𝛼𝑅𝛼𝑁𝛼𝑗(𝜇𝑀+𝜎𝑐𝑑𝑗𝛼)𝑁𝑗],
(C2)

𝑑𝑁0𝑑𝑡=𝑁0[𝑅0𝑚+𝛽(𝜇𝑀+𝜎𝑐𝑑𝑗𝛼)𝑅𝛽𝛿𝑚0],
(C3)

𝑑𝑅0𝑑𝑡=𝑅0[𝐾+𝛿𝐾0𝑅0𝑁0𝑗(𝜇𝑆+𝜎𝑐𝑑𝑗0)𝑁𝑗].
(C4)

Denote by 𝑁𝛼/0, 𝑅𝛼/0, and 𝑁𝑖, 𝑅𝛼 the equilibrium values of the species and resources before and after adding the newcomers, respectively. These can be related to each other using the susceptibilities defined above:

𝑁𝑖=𝑁𝑖/0𝜎𝑐𝑗𝜈𝑁𝑖𝑗𝑑𝑗0𝑅0𝜎𝑐𝛽𝜒𝑁𝑖𝛽𝑑0𝛽𝑁0,
(C5)

𝑅𝛼=𝑅𝛼/0𝜎𝑐𝑖𝜈𝑅𝛼𝑖𝑑𝑖0𝑅0𝜎𝑐𝛽𝜒𝑅𝛼𝛽𝑑0𝛽𝑁0.
(C6)

In what follows we assume replica symmetry. In this case, the sums in the equations above can be approximated as Gaussian random variables. For this reason, it is helpful to introduce new auxiliary random variables:

𝑧𝑁=𝛽𝜎𝑐𝑅𝛽/0𝑑0𝛽𝛿𝑚0,
(C7)

𝑧𝑅=𝑗𝜎𝑐𝑁𝑗/0𝑑𝑗0𝛿𝐾0,
(C8)

where 𝑧𝑁=0, 𝜎𝑧𝑁=𝜎2𝑐𝑞𝑅+𝜎2𝑚 and 𝑧𝑅=0, 𝜎𝑧𝑅=𝜎2𝑐𝑞𝑁+𝜎2𝐾.

Case 1: Both 𝑅0 and 𝑁0 are positive. Following calculations analogous to Ref.  and noting that 𝛾=𝑀𝑆=1 yields

𝑅0=max[0,𝜎2𝑐𝜒(𝐾𝜇𝑁+𝑧𝑅)𝜇𝑅+𝑚𝑧𝑁(1𝜎2𝑐𝜈)𝜎2𝑐𝜒+1],
(C9)

𝑁0=max[0,(1𝜎2𝑐𝜈)(𝜇𝑅𝑚+𝑧𝑁)+𝐾𝜇𝑁+𝑧𝑅(1𝜎2𝑐𝜈)𝜎2𝑐𝜒+1].
(C10)

Case 2: Either 𝑅0 or 𝑁0 is zero. We get exactly the same expression as the random ecosystem we derived in Ref. ,

𝑅0=0,𝑁0=𝜇𝑅𝑚+𝑧𝑁𝜎2𝑐𝜒or𝑁0=0,𝑅0=𝐾𝜇𝑁+𝑧𝑅1𝜎2𝑐𝜈.
(C11)

Case 3: Both 𝑅0 and 𝑁0 are zero, namely,

𝑅0=0and𝑁0=0.
(C12)

Combining the cases above, the steady-state solution is a Gaussian mixture depending on the positivity of 𝑅0 and 𝑁0.

𝑅0=Θ(𝑅0){Θ(𝑁0)𝜎2𝑐𝜒(𝐾𝜇𝑁+𝑧𝑅)𝜇𝑅+𝑚𝑧𝑁(1𝜎2𝑐𝜈)𝜎2𝑐𝜒+1+[1Θ(𝑁0)]𝐾𝜇𝑁+𝑧𝑅1𝜎2𝑐𝜈},
(C13)

𝑁0=Θ(𝑁0){Θ(𝑅0)(1𝜎2𝑐𝜈)(𝜇𝑅𝑚+𝑧𝑁)+𝐾𝜇𝑁+𝑧𝑅(1𝜎2𝑐𝜈)𝜎2𝑐𝜒+1+[1Θ(𝑅0)]𝜇𝑅𝑚+𝑧𝑁𝜎2𝑐𝜒}.
(C14)

Cavity equations for the susceptibilities can be obtained directly by differentiating these equations:

𝜈=1𝑀𝑖𝜈𝑁𝑖𝑖=𝜕𝑁0𝜕𝑚=𝜙𝑁𝜙𝑅(1𝜎2𝑐𝜈)(1𝜎2𝑐𝜈)𝜎2𝑐𝜒+1𝜙𝑁(1𝜙𝑅)𝜎2𝑐𝜒,
(C15)

𝜒=1𝑀𝛼𝜒𝑅𝛼𝛼=𝜕𝑅0𝜕𝐾=𝜙𝑁𝜙𝑅𝜎2𝑐𝜒(1𝜎2𝑐𝜈)𝜎2𝑐𝜒+1+(1𝜙𝑁)𝜙𝑅1𝜎2𝑐𝜈.
(C16)

1. With resource extinction

Two solutions are found by solving Eqs.  and :

𝜙𝑅𝜙𝑁=0,𝜒=0,𝜈=1𝜎2𝑐1,
(C17)

𝜙𝑅𝜙𝑁>0,𝜒=𝜙𝑅𝜙𝑁,𝜈=12𝜙𝑁𝜎2𝑐+𝜙𝑅𝜎2𝑐1+2(12𝜙𝑁)𝜙𝑅𝜎2𝑐+𝜙2𝑅𝜎4𝑐2𝜎4𝑐(𝜙𝑅𝜙𝑁).
(C18)

2. Without resource extinction

In this case, the resource never vanishes so that we can fix 𝜙𝑅=1 and solve Eqs.  and . Two solutions are found:

1𝜙𝑁=0,𝜒=0,𝜈=1𝜎2𝑐1,
(C19)

1𝜙𝑁>0,𝜒=1𝜙𝑁,𝜈=12𝜙𝑁𝜎2𝑐+𝜎2𝑐1+2𝜎2𝑐4𝜙𝑁𝜎2𝑐+𝜎4𝑐2𝜎4𝑐(1+𝜙𝑁).
(C20)

The two solutions above are continuous at the transition point: 𝜒=0, i.e., 𝜙𝑁=1. Assume there is a small perturbation near the transition: 𝜙𝑁=1𝜀 and 𝜀1 and 𝜈 in Eq.  can be expanded around 𝜀. It is easy to check the 𝜈 in Eq.  has the same expression as Eq.  at the first order of 𝜀. Therefore, only one solution exists:

𝜒=1𝜙𝑁,𝜈=12𝜙𝑁𝜎2𝑐+𝜎2𝑐1+2𝜎2𝑐4𝜙𝑁𝜎2𝑐+𝜎4𝑐2𝜎4𝑐(1+𝜙𝑁).
(C21)

The comparison between cavity solutions and numerical simulations for 𝜒 and 𝜈 are given in Figs.  and , respectively.

3. Without resource extinction and species extinction

In this case, both the resource and the species never vanish so that we can fix 𝜙𝑅=1 and 𝜙𝑁=1. Solving Eqs.  and , only one solution is found:

𝜒=0,𝜈=1𝜎2𝑐1.
(C22)

4. Behavior in three regimes

To understand these solutions and behaviors better, it is helpful to consider three regimes: Regime A where 𝜒=𝜙𝑅𝜙𝑁=0, Regime B where 𝜒 becomes nonzero and species start to extinct, and Regime C where 𝜎𝑐1 and it becomes a random ecosystem.

In Regime B, resource extinction has a significant effect on the system's feasibility, shown in Fig. . With resource extinction, Eq.  shows there is a sudden change for the linear response function 𝜈 from Regime A: 𝜒=0 to Regime B 𝜒0. As 𝜈1𝜙𝑅𝜙𝑁, even a slightly decrease of the number of surviving species will induce a huge perturbation to the ecosystem, corresponding to a phase transition between Regime A and Regime B at 𝜎*𝑐0.2.

Without resource extinction, Eq.  shows the linear response function 𝜈 is continuous from Regime A to Regime B. There is a crossover instead of a phase transition there. The peak for the crossover is a finite value and can be calculated by taking the derivative of Eq.  over 𝜎𝑐, ignoring the correlation between 𝜎𝑐 and 𝜙𝑁. It happens approximately at 𝜎*𝑐=4𝜙𝑁21.04, where 𝜙𝑁=0.77 can be obtained from numerical simulation. The explanation for the difference from random matrix theory are provided in the main text and also the spectrums in Figs.  and .

Without resource and species extinction, as shown in Eq. , 𝜈 diverges at 𝜎*𝑐=1, corresponding to 𝜆min reaching exactly zero. This result is also consistent with Eq. , predicted by random matrix theory, which ignores the effect of row or column deletions in the interaction matrix. This tells there do not exists any feasible solutions for the coexistence of M species and M resources. Therefore, species must go extinct before 𝜎*𝑐=1.

In Regime C, further increasing of 𝜎𝑐 after 𝜎𝑐>1, the 𝜎4𝑐 term in the square root becomes dominating and the the susceptibility 𝜈 behaves like a random ecosystem quickly, which explains the dramatic drop of the species packing shown in Fig. . It indicates the ecosystem tends to a self-organized random state.

5. Solutions in Regimes A and C

In Regime A ( 𝜎𝑐1), for Eqs.  with resource extinction, the solutions for the steady states become

𝑅0=max[0,𝑚𝑧𝑁],𝑁0=max[0,𝐾+𝑧𝑅].
(C23)

For Eqs.  without resource extinction, the solutions for the steady states become

𝑅0=𝑚𝑧𝑁,𝑁0=max[0,𝐾+𝑧𝑅].
(C24)

For ecosystems without resource and species extinction, the solutions for the steady states become

𝑅0=𝑚𝑧𝑁,𝑁0=𝐾+𝑧𝑅.
(C25)

For Regime C ( 𝜎𝑐1), for Eqs.  with resource extinction, the solutions for the steady states become

𝑅0=max[0,𝐾𝜇𝑁+𝑧𝑅1𝜎2𝑐𝜈],𝑁0=max[0,𝜇𝑅𝑚+𝑧𝑁𝜎2𝑐𝜒],
(C26)

in agreement with the equations obtained in Ref.  for purely random interactions. For Eqs.  without resource extinction, the solutions for the steady states become

𝑅0=𝐾𝜇𝑁+𝑧𝑅1𝜎2𝑐𝜈,𝑁0=max[0,𝜇𝑅𝑚+𝑧𝑁𝜎2𝑐𝜒].
(C27)

For ecosystems without resource and species extinction, the solutions for the steady states become

𝑅0=𝐾𝜇𝑁+𝑧𝑅1𝜎2𝑐𝜈,𝑁0=𝜇𝑅𝑚+𝑧𝑁𝜎2𝑐𝜒.
(C28)

APPENDIX D: LOTKA-VOLTERRA MODEL, WISHART MATRIX, AND MARCHENKO-PASTUR LAW

In this section, we show how the generalized Lotka-Volterra model can be related to the CRM, and in particular, the how the steady states of the two models can be made to coincide. Solving for the steady-state values of the nonextinct resources by setting the bottom equation in Eqs.  equal to zero gives

𝑅𝛼=𝐾𝛼𝑖𝑁𝑖𝐶𝑖𝛼.

Substituting this into the top equation in Eqs.  gives

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖(𝛼𝐌*𝐶𝑖𝛼𝐾𝛼𝑚𝑖𝑗𝐴𝑖𝑗𝑁𝑗),

where we have defined an interaction matrix 𝐴𝑖𝑗=𝛼𝐌*𝐶𝑖𝛼𝐶𝑇𝛼𝑗 and 𝐌* is the set of surviving resources. We can use this equation to solve for the steady-state (equilibrium) abundances of nonextinct species and arrive at the expression

𝑁𝑖=𝑗𝐒*𝐴1𝑖𝑗(𝛼𝐌*𝐶𝑗𝛼𝐾𝛼𝑚𝑗),

where 𝐒* is the set of surviving species. In terms of 𝑁𝑖, the Lotka-Volterra equations become

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖𝑗𝐴𝑖𝑗(𝑁𝑗𝑁𝑗),
(D1)

with community matrix

𝐽𝑖𝑗=(𝜕𝜕𝑁𝑗𝑑𝑁𝑖𝑑𝑡){𝑁𝑗}=𝑁𝑖𝐴𝑖𝑗.
(D2)

In May's work, 𝐽𝑖𝑗 is assumed to be an i.i.d. random matrix and an extension of Wigner's arguments about Gaussian random matrices is used to compute the leading eigenvalue . Since the 𝑁𝑖 are not known a priori, the stability of Lotka-Volterra type dynamics are more easily studied in terms of the eigenvalues of 𝐴𝑖𝑗, using the connection between the leading eigenvalues of 𝐉 and 𝐀 derived below.

APPENDIX E: RELATING THE EIGENVALUES OF 𝐀 AND 𝐉

In this section, we prove that the largest eigenvalue 𝜆max of the community matrix 𝐉 (which controls the Lyapunov stability of the fixed point) is negative if and only if the smallest eigenvalue 𝜆min of the Lotka-Volterra competition matrix 𝐀 is positive. For this stability analysis, we remove the rows and columns corresponding to species that go extinct in the steady state, since allowing 𝑁𝑖=0 trivially generates zero eigenvalues. 𝐉 and 𝐀 will always refer to the resulting matrices of dimension 𝑆*×𝑆*.

We start by defining the diagonal matrix 𝐍, whose nonzero elements are the equilibrium population sizes 𝑁𝑖. This lets us write

𝐉=𝐍1/2(𝐍1/2𝐀𝐍1/2)𝐍1/2,
(E1)

where 𝐍1/2 is the diagonal matrix whose entries are the square roots of the population sizes. This equation says that 𝐉 is similar to 𝐖𝐍1/2𝐀𝐍1/2, which implies that they share the same eigenvalues.

Since 𝐖 and 𝐀 are both symmetric matrices, their eigenvalues are all real, and the positivity of all the eigenvalues is equivalent to the positive-definiteness of the matrix.

Now we note that 𝐖 is positive definite if and only if 𝐀 is positive definite. For if 𝐀 is positive definite, then 𝐱𝑇𝐀𝐱>0 for all column vectors 𝐱0, including the column vector 𝐱=𝐍1/2𝐲 for any column vector 𝐲0. But this implies that 𝐲𝑇𝐍1/2𝐀𝐍1/2𝐲>0 for all 𝐲0, i.e., that 𝐖 is positive definite. Conversely, if 𝐖 is positive definite, then 𝐲𝑇𝐍1/2𝐀𝐍1/2𝐲>0 for all 𝐲0, including 𝐲=𝐍1/2𝐱 for any 𝐱0. But this implies that 𝐱𝑇𝐀𝐱>0 for all 𝐱0, i.e., that 𝐀 is positive definite.

We conclude that the eigenvalues of 𝐖 are all positive if and only if the eigenvalues of 𝐀 are all positive. Therefore the largest eigenvalue of 𝐉=𝐍1/2𝐖𝐍1/2 is negative if and only if the smallest eigenvalue of 𝐀 is positive, as claimed in the main text.

An alternative but much simpler proof can be provided with the properties of the D-stable matrix . A real square matrix 𝐀 is said to be D-stable if the matrix 𝐃𝐀 is positive definite for every choice of a positive diagnoal matrix 𝐃. A sufficient condition for D-stablility is that 𝐀+𝐀𝐓 is positive definite. The Lotka-Volterra competition matrix 𝐀 is symmetric and positive definite, i.e., D-stable. 𝐍 is all positive. It is obvious that 𝐉=𝐍𝐀 is positive definite. Further discussions about its application in ecology can be found in Refs. 

APPENDIX F: CORRESPONDENCE BETWEEN RMT AND CAVITY SOLUTION

Our numerical simulations show that after the transition, our ecosystems are well described by purely random interactions. This suggests that we should be able to derive our cavity results using random matrix theory (RMT). We now show that this is indeed the case. Our starting point are the average susceptibilities which are defined as

𝜒=1𝑀𝛼𝐌𝜒𝑅𝛼𝛼=1𝑀𝛼𝐌*𝜒𝑅𝛼𝛼,
(F1)

𝜈=1𝑆𝑖𝐒𝜈𝑁𝑖𝑖=1𝑆𝑖𝐒*𝜈𝑁𝑖𝑖.
(F2)

From the cavity calculations, we only care about 𝜒𝑅𝛼𝛽 and 𝜈𝑁𝑖𝑗, because the other susceptibilities are lower order in 1/𝑀.

We can combine these equations with Eqs.  and  to obtain

𝜒=1𝑀𝛼𝐌*𝜒𝑅𝛼𝛼=1𝑀Tr(𝜒𝑅𝛼𝛽)
(F3)

=1𝑀Tr(𝛿𝛼𝛽)1𝑀Tr(𝑖𝐒*𝑗𝐒*𝐶𝑇𝛼𝑖𝐴1𝑖𝑗𝐶𝑗𝛽)=𝑀*𝑀1𝑀Tr(𝑖𝐒*𝑗𝐒*𝐴1𝑖𝑗𝐶𝑗𝛽𝐶𝑇𝛽)=𝑀*𝑀𝑆*𝑀=𝜙𝑅𝛾1𝜙𝑁.
(F4)

We now show that the cavity solutions are consistent with results from RMT using Eqs.  and  in Regime A and Regime C described in the main text.

1. Regime A: 𝐂=𝟙

This regime happens when 𝜎𝑐1. Substituting, 𝐂=𝟙 into Eqs.  and  yields

𝜒=0,𝜈=1.
(F5)

This is consistent with the cavity solution Eq.  with 𝜎𝑐=0 since in this case 𝑆*=𝑆=𝑀.

2. Regime C: 𝐶𝑖𝛼𝑖.𝑖.𝑑.𝒩(0,𝜎𝑐/𝑀)

In this regime, 𝜎𝑐1. In this case, 𝐴𝑖𝑗=𝛼𝐒*𝐶𝑖𝛼𝐶𝑇𝛼𝑗 takes the form of a Wishart matrix. We will exploit this to calculate 𝜒 and 𝜈. Notice,

𝜈=1𝑆𝑖𝐒*𝜈𝑁𝑖𝑖=1𝑆Tr(𝐴1𝑖𝑗)=1𝑆𝑆*𝑖=1𝜆1𝑖,
(F6)

where 𝜆𝑖 is the eigenvalue of 𝐴𝑖𝑗. From the Marchenko-Pastur law , we know that the eigenvalues of a random Wishart matrix obey the Marchenko-Pastur distribution. Substituting Eq.  into the expression for 𝜈 and replacing the sum with an integral yields

𝜈=𝑆*𝑆𝑏𝑎1𝑥𝜌(𝑥)𝑑𝑥=𝑆*𝑆𝑎+𝑏2𝑎𝑏4𝜎2𝑐𝑦𝑎𝑏=1𝜎2𝑐𝜙𝑁𝜙𝑅𝛾1𝜙𝑁.
(F7)

The second line of Eq.  is obtained by transferring the integral function to a complex analytic function and applying the residue theorem. This result is the same as the cavity solution Eq.  when 𝜎𝑐1.

3. Regime B using the Stieltjes transformation

In Regime B, it hard to estimate the minimum eigenvalue. We can use Stieltjes transformation of information-plus-noise-type matrices which are well studied in wireless communications , where 𝐁 represents the information encoded in the signal and 𝐂 is the noise in wireless communications. In this case, we have

𝐶𝑖𝛼=𝟙+𝐶𝑖𝛼,𝐶𝑖𝛼𝑖.𝑖.𝑑.𝒩(0,𝜎𝑐/𝑀),𝐴𝑖𝑗=𝛼𝑀*𝐶𝑖𝛼𝐶𝑇𝛼𝑗=𝛼𝑀*𝐶𝑖𝛼𝐶𝑇𝛼𝑗+𝐶𝑖𝛼+𝐶𝑇𝛼𝑖+𝟙.
(F8)

Using Theorem 1.1 in Dozier and Silverstein , the Stieltjes transform 𝑚(𝑧) of 𝐴𝑖𝑗 satisfies

𝜎4𝑐𝑧𝑚32𝜎2𝑐𝑧𝑚+(𝜎2𝑐+𝑧1)𝑚1=0.
(F9)

The asymptotic spectrum of 𝐴𝑖𝑗 can be obtained by 𝑚(𝑧), the solution of Eq.  with

𝜌(𝑥)=limɛ0+𝑚(𝑥𝑖ɛ)𝑚(𝑥+𝑖ɛ)2𝑖𝜋.
(F10)

The result is shown in Fig. . The minimum eigenvalue reaches 0 nearly at 𝜎*𝑐=1, as predicted by the cavity solution.

FIG. 5.

The asymptotic spectrum of 𝐴𝑖𝑗 for different values of 𝜎𝑐 by solving Eq.  numerically.

We emphasize that the phase transition point, derived from Eq. , does not change at different 𝜇. In the original paper by Marchenko and Pastur, Eq.  requires the elements are i.i.d variables with mean 0 and variance 𝜎2. Recently, it has been shown a nonzero 𝜇 contributes only one eigenvalue 𝜆. It is either in the domain of MP Law, 𝜆[𝑎,𝑏] or off the domain 𝜆>𝑏  and thus it does not affect the minimum eigenvalue. We can understand it intuitively with a simple example: 𝟙+𝜇𝕁, where 𝟙 is the identity matrix, 𝕁 is a 𝑛×𝑛 all-ones matrix. The eigenvalues can be calculated by

Det[(1𝜆)𝟙+𝜇𝕁]=[1𝜆+(𝑛1)𝜇](1𝜆)𝑛1.

It shows when 𝑛1, it only contributes a very large eigenvalue 1+(𝑛1)𝜇 and the others stay at 1.

APPENDIX G: PARAMETERS IN SIMULATIONS

All simulations are done with the CVXPY package . The code is available on GitHub .

  • (1) Figures , and : the consumer matrix 𝐂 is sampled from the Gaussian distribution 𝒩(𝜇𝑀,𝜎𝑐𝑀). 𝑆=100, 𝑀=100, 𝜇=0, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1, and 𝜎𝑚=0.01, and each data point is averaged from 5000 independent realizations. The model is simulated with Eqs. .

  • (2) Figure : the consumer matrix 𝐂 is sampled from the uniform distribution 𝒰(0,𝑏). 𝑆=100, 𝑀=100, 𝜇=0, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1, 𝜎𝑚=0.01, and each data point is averaged from 5000 independent realizations. The model is described by Eqs. .

  • (3) Figure : the consumer matrix 𝐂 is sampled from the Bernoulli distribution 𝐵𝑒𝑟𝑛𝑜𝑢𝑙𝑙𝑖(𝑝𝑐). 𝑆=100, 𝑀=100, 𝜇=0, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1, 𝜎𝑚=0.01, and each data point is averaged from 5000 independent realizations. The model is described by Eqs. .

  • (4) Figures : the simulation is the same as Fig. . Each spectrum is drawn from 10 000 independent realizations.

  • (5) Figure : the consumer matrix 𝐂 is sampled from the Gaussian distribution 𝒩(𝜇𝑀,𝜎𝑐𝑀). 𝑆=100, 𝑀=100, 𝜇=0, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1, and 𝜎𝑚=0.01. The model without resource extinction simulated with Eqs. , and each data point is averaged from 5000 independent realizations.. The model with resource extinction is simulated with Eqs. , and each data point is averaged from 4000 independent realizations. Each spectrum is drawn from 1 independent realizations for 𝑆=500.

  • (6) Figure : the simulation is the same as Fig. . Each histogram is drawn from 10 000 independent realizations.

    FIG. 6.

    Species abundance 𝑁 in equilibrium at different 𝜎𝑐. The simulation details can be found at Appendix .

  • (7) Figure : the consumer matrix 𝐂 is sampled from the Gaussian distribution 𝒩(𝜇𝑀,𝜎𝑐𝑀). 𝑆=100, 𝑀=100, 𝜇=1, 𝐾=1, 𝜎𝐾=0.1, 𝑚=0.1, and 𝜎𝑚=0.01. For (C), 𝜔=1, 𝜎𝜔=0, and model details can be found in Ref. ; for (D), the dynamics is described in Eq. (17) in the Supplemental Material of Ref. . The noise is only applied on the consumption matrix and 𝐷 is kept the same at different 𝜎𝑐. Each data point is averaged from 4000 independent realizations for (A), from 5000 independent realizations for (B), and from 1000 independent realizations for (C, D).

  • (8) Figure : the simulation is the same as Fig.  except 𝑆=200, 𝑀=100. For the identity case, the consumer matrix is obtained by concatenating the 𝑀×𝑀 identity plus noise matrix and a (𝑆𝑀)×𝑀 Gaussian random matrix. The model without resource extinction simulated with Eqs. , and each data point is averaged from 5000 independent realizations.

  • (9) Figures , and : the simulation is the same as Figs.  and . The model without resource extinction simulated with Eqs. , and each data point is averaged from 5000 independent realizations. The model with resource extinction is simulated with Eqs. , and each data point is averaged from 4000 independent realizations.

APPENDIX H: DISTINCTION BETWEEN EXTINCT AND SURVIVING SPECIES

In the main text, we show that the value of species packing 𝑆*𝑀 in Figs.  and . However, in numerical simulations, even for the extinct species, the abundance is never exactly equal 0 due to numerical errors. As a result, we must choose a threshold to distinguish extinct and surviving species to calculate 𝑆*. Since we are using the equivalence with convex optimization to solve the generalized consumer-resource models , we can easily choose a reasonable threshold (e.g., 1010 for both species since the surviving species are well separated in two peaks (see Fig. ).

APPENDIX I: SUSCEPTIBILITY MATRIX FOR LINEAR RESOURCE DYNAMICS

In the quasistatic limit, Eqs.  become

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖(𝑁𝑖𝛼𝐶𝑖𝛼𝐾𝛼1+𝑗𝐶𝑗𝛼𝑁𝑗𝑚𝑖),

which can not be reduced to the Lotka–Volterra model. Therefore, we have to rederive the susceptibility matrix for Eqs. .

To have well-defined susceptibilities, we introduce an auxiliary variable 𝑤𝛼 and Eqs.  become

𝑑𝑁𝑖𝑑𝑡=𝑁𝑖(𝛽𝐶𝑖𝛽𝑅𝛽𝑚𝑖),𝑑𝑅𝛼𝑑𝑡=𝜅𝛼𝑤𝛼𝑅𝛼𝑗𝑁𝑗𝐶𝑗𝛼𝑅𝛼.
(I1)

At the end we can set 𝑤𝛼 to 1 to recover Eqs. . Employing the results from Refs. , the new susceptibility matrix is

𝜒𝑅𝛼𝛽=𝜕𝑅𝛼𝜕𝜔𝛽,𝜒𝑁𝑖𝛼=𝜕𝑁𝑖𝜕𝜔𝛼,𝜈𝑅𝛼𝑖=𝜕𝑅𝛼𝜕𝑚𝑖,𝜈𝑁𝑖𝑗=𝜕𝑁𝑖𝜕𝑚𝑗,
(I2)

where the bar 𝑋 over the variable 𝑋 denotes the steady-state (equilibrium) solution.

For the extinct species and resources, by definition the susceptibilities are zero. For this reason, we focus only on the surviving resources and species. At steady state, Eqs.  give

0=𝛼𝐌𝐶𝑖𝛼𝑅𝛼𝑚𝑖,
(I3)

0=𝐾𝛼𝜔𝛼𝑅𝛼𝑅𝛼𝑗𝐒*𝑁𝑗𝐶𝑗𝛼,
(I4)

where 𝐒* denote the sets of species, respectively, that survive in the ecosystem at steady-state and 𝐌 denotes the full sets of resources as they all are nonzero for the linear resource dynamics. Differentiating these equations yields the relations

0=𝛼𝐌𝐶𝑖𝛼𝜕𝑅𝛼𝜕𝜔𝛽,𝑅𝛼𝛿𝛼𝛽=(𝜔𝛼+𝑗𝐒*𝑁𝑗𝐶𝑗𝛼)𝜕𝑅𝛼𝜕𝜔𝛽+𝑗𝐒*𝜕𝑁𝑗𝜕𝜔𝛽𝐶𝑗𝛼𝑅𝛼,𝛿𝑖𝑗=𝛼𝐌𝐶𝑖𝛼𝜕𝑅𝛼𝜕𝑚𝑗,0=(𝜔𝛼+𝑗𝐒*𝑁𝑗𝐶𝑗𝛼)𝜕𝑅𝛼𝜕𝑚𝑖+𝑗𝐒*𝜕𝑁𝑗𝜕𝑚𝑖𝐶𝑗𝛼𝑅𝛼.
(I5)

Substituting in for the partial derivatives using the susceptibility matrices defined above, we have

0=𝛼𝐌𝐶𝑖𝛼𝜒𝑅𝛼𝛽,𝑅𝛼𝛿𝛼𝛽=(𝜔𝛼+𝑗𝐒*𝑁𝑗𝐶𝑗𝛼)𝜒𝑅𝛼𝛽+𝑗𝐒*𝜒𝑁𝑗𝛽𝐶𝑗𝛼𝑅𝛼,𝛿𝑖𝑗=𝛼𝐌𝐶𝑖𝛼𝜈𝑅𝛼𝑗,0=(𝜔𝛼+𝑗𝐒*𝑁𝑗𝐶𝑗𝛼)𝜈𝑅𝛼𝑖+𝑗𝐒*𝜈𝑁𝑗𝑖𝐶𝑗𝛼𝑅𝛼.
(I6)

These two equations can be written as a single matrix equation for block matrices:

[𝐂0diag(𝑊𝛼)𝐆𝑇][𝜈𝑅𝜒𝑅𝜈𝑁𝜒𝑁]=[𝟙00diag(𝑅𝛼)],
(I7)

where 𝑊𝛼=𝜔𝛼+𝑗𝐒*𝑁𝑗𝐶𝑗𝛼, 𝐺𝑖𝛼=𝐶𝑖𝛼𝑅𝛼, and diag is the operator transforming a vector to a diagonal matrix.

To solve this equation, we define two 𝑆*×𝑆* matrices: 𝐴𝑖𝑗=𝛼𝐌*𝐶𝑖𝛼𝐶𝑇𝑗𝛼 and 𝐻𝑖𝑗=(𝛼𝐌*𝑅𝛼𝑊𝛼𝐶𝑖𝛼𝐶𝑇𝑗𝛼)1. Employing Eq. (3.2) for the square off-diagonal partition, a straightforward calculation yields

[𝐂0diag(𝑊𝛼)𝐆𝑇]1=[𝑖𝐒*𝑅𝛼𝑊𝛼𝐶𝑇𝑖𝛼𝐻𝑖𝑗𝛿𝛼𝛽𝑊𝛼𝑖,𝑗𝐒*𝑅𝛼𝐶𝑇𝑖𝛼𝑊𝛼𝐻𝑖𝑗𝐶𝑗𝛽𝑊𝛽𝐇𝑗𝐒*𝐻𝑖𝑗𝐶𝑗𝛼/𝑊𝛼],
(I8)

𝜒𝑅𝛼𝛽=𝑅𝛼𝑊𝛼𝛿𝛼𝛽𝑖,𝑗𝐒*𝑅𝛼𝐶𝑇𝑖𝛼𝑊𝛼𝐻𝑖𝑗𝐶𝑗𝛽𝑅𝛽𝑊𝛽,
(I9)

𝜒𝑁𝑖𝛼=𝑗𝐒*𝐻𝑖𝑗𝐶𝑗𝛼𝑅𝛼𝑊𝛼,𝜈𝑅𝛼𝑖=𝑗𝐒*𝑅𝛼𝐶𝑇𝑗𝛼𝑊𝛼𝐻𝑗𝑖,
(I10)

𝜈𝑁𝑖𝑗=𝐻𝑖𝑗,𝑖,𝑗𝐒*and𝛼,𝛽𝐌*.
(I11)

We can see that the new susceptibilities: 𝐻𝑖𝑗=(𝛼𝐌*𝑅𝛼𝑊𝛼𝐶𝑖𝛼𝐶𝑇𝑗𝛼)1 is different with 𝐴𝑖𝑗=𝛼𝐌*𝐶𝑖𝛼𝐶𝑇𝑗𝛼 in Eq. . Therefore, it can not behave exactly like Marchenko Pastur distribution, shown in Fig. . However, since it is very similar to the Wishart matrix, most of our results are still preserved with Eqs. .

FIG. 7.

Reproduce Fig.  in the main text with model Eqs. . The parameters are the same as Fig. .

APPENDIX J: ADDITIONAL FIGURES

The figures below are referred to in the main text.

FIG. 8.

Reproduce Fig : the fraction of surviving species 𝑆*/𝑀 vs 𝜎𝑐 for 𝑀=25 and 𝑀=100. It shows 𝑀=25 is enough to reproduce our result in the main text. Theoretically, numeric converges to our analytical result at the rate of 1𝑀. And it is true that a smaller value of 𝑀 can result in a larger fluctuation, corresponding to a larger error bar. But the average converges to the same value which is the thermodynamic limit we care about.

FIG. 9.

Community properties for generalized consumer-resource models under Gaussian noise. (a) MacArthur's consumer resource model with resource extinction. (b) Linear resource dynamics: the resource dynamics is changed to 𝑑𝑅𝛼𝑑𝑡=𝐾𝛼𝑅𝛼𝑖𝑁𝑖𝐶𝑖𝛼𝑅𝛼. (c) With cross-feeding: the dynamics is described in Eq. (17) in the Supplemental Material of Ref. . The noise is only applied on the consumption matrix and 𝐷 is kept the same at different 𝜎𝑐. In both models, 𝐁=𝟙. See Appendix  for details.

FIG. 10.

Effects when 𝑆𝑀. (a) Community properties, (b) the minimum eigenvalue 𝜆min, (c) the mean sensitivity 𝜈. All simulations are the same as figures in the main text except 𝑆=200,𝑀=100. See Appendix  for details.

FIG. 11.

Spectra of 𝐴𝑖𝑗 in different cases. (a) Uniform Noise: 𝒰(0,𝑏) and (b) Binary Noise: 𝐵𝑒𝑟𝑛𝑜𝑢𝑙𝑙𝑖(𝑝𝑐); the engineered matrix 𝐁 is an identity matrix. (c) Gaussian noise and the engineered matrix 𝐁 is a circulant matrix. (d) Gaussian noise and the engineered matrix 𝐁 is a block matrix. Note that 𝐴𝑖𝑗 are obtained from numerical simulations. See Appendix  for details.

FIG. 12.

Comparison between numerical simulations (scatter points) and cavity solutions (solid lines) for 𝜒 at different 𝜎𝑐 for different cases. (a) CRM without resource extinction, Eqs. . (b) CRM with resource extinction, Eqs. . Note 𝑆* and 𝑀* are obtained from the numerical simulations, although in principle they could be obtained by solving the cavity equations directly.

FIG. 13.

Comparison of the minimum eigenvalue 𝜆min and the mean sensitivity 𝜈 between different distributions for the identity case at different 𝜎𝑐. (a) CRM without resource extinction, Eqs. . (b) CRM with resource extinction, Eqs. . Note that the Bernoulli and uniform distribution are mapped to the corresponding Gaussian distribution 𝜇=𝑝𝑐𝑀, 𝜎𝑐=𝑀𝑝𝑐(1𝑝𝑐) and 𝜇=𝑏𝑀/2, 𝜎𝑐=𝑏𝑀/12, respectively.

FIG. 14.

Comparison the minimum eigenvalue 𝜆min and the mean sensitivity 𝜈 between different engineered matrices 𝐁 at different 𝜎𝑐. (a) CRM without resource extinction, Eqs. . (b) CRM with resource extinction, Eqs. .

References (48)

  1. D. V. Spracklen, S. R. Arnold, and C. Taylor, Observations of increased tropical rainfall preceded by air passage over forests, Nature (London) 489, 282 (2012).
  2. Y. Belkaid and T. W. Hand, Role of the microbiota in immunity and inflammation, Cell 157, 121 (2014).
  3. J. I. Prosser, B. J. Bohannan, T. P. Curtis, R. J. Ellis, M. K. Firestone, R. P. Freckleton, J. L. Green, L. E. Green, K. Killham, J. J. Lennon et al., The role of ecological theory in microbial ecology, Nat. Rev. Microbiol. 5, 384 (2007).
  4. J. Friedman, L. M. Higgins, and J. Gore, Community structure follows simple assembly rules in microbial microcosms, Nat. Ecol. Evol. 1, 0109 (2017).
  5. J. Friedman and J. Gore, Ecological systems biology: The dynamics of interacting populations, Curr. Opin. Syst. Biol. 1, 114 (2017).
  6. C. Ratzke, J. Denk, and J. Gore, Ecological suicide in microbes, Nat. Ecol. Evol. 2, 867 (2018).
  7. S.-K. Ma, Modern Theory of Critical Phenomena (Routledge, London, UK, 2018).
  8. R. M. May, Will a large complex system be stable? Nature (London) 238, 413 (1972).
  9. J. Ginibre, Statistical ensembles of complex, quaternion, and real matrices, J. Math. Phys. 6, 440 (1965).
  10. T. Gross, L. Rudolf, S. A. Levin, and U. Dieckmann, Generalized models reveal stabilizing factors in food webs, Science 325, 747 (2009).
  11. S. Allesina and S. Tang, Stability criteria for complex ecosystems, Nature (London) 483, 205 (2012).
  12. R. MacArthur and R. Levins, The limiting similarity, convergence, and divergence of coexisting species, Am. Nat. 101, 377 (1967).
  13. D. Tilman, Resource Competition and Community Structure (Princeton University Press, Princeton, NJ, 1982).
  14. J. E. Goldford, N. Lu, D. Bajić, S. Estrela, M. Tikhonov, A. Sanchez-Gorostiaga, D. Segrè, P. Mehta, and A. Sanchez, Emergent simplicity in microbial community assembly, Science 361, 469 (2018).
  15. R. Marsland, W. Cui, J. Goldford, and P. Mehta, The community simulator: A python package for microbial ecology, PLoS One 15, e0230430 (2020).
  16. R. Marsland, W. Cui, and P. Mehta, A minimal model for microbial biodiversity can reproduce experimentally observed ecological patterns, Sci. Rep. 10, 3308 (2020).
  17. M. Tikhonov and R. Monasson, Collective Phase in Resource Competition in a Highly Diverse Ecosystem, Phys. Rev. Lett. 118, 048103 (2017).
  18. A. Posfai, T. Taillefumier, and N. S. Wingreen, Metabolic Trade-Offs Promote Diversity in a Model Ecosystem, Phys. Rev. Lett. 118, 028103 (2017).
  19. R. Marsland III, W. Cui, J. Goldford, A. Sanchez, K. Korolev, and P. Mehta, Available energy fluxes drive a transition in the diversity, stability, and functional structure of microbial communities, PLoS Comput. Biol. 15, e1006793 (2019).
  20. C. A. Serván, J. A. Capitán, J. Grilli, K. E. Morrison, and S. Allesina, Coexistence of many species in random ecosystems, Nat. Ecol. Evol. 2, 1237 (2018).
  21. G. Bunin, Ecological communities with Lotka-Volterra dynamics, Phys. Rev. E 95, 042414 (2017).
  22. M. Advani, G. Bunin, and P. Mehta, Statistical physics of community ecology: A cavity solution to MacArthur's consumer resource model, J. Stat. Mech.: Theory Exp. (2018) 033406.
  23. F. J. Dyson, Statistical theory of the energy levels of complex systems, J. Math. Phys. 3, 140 (1962).
  24. P. Chesson, Macarthur's consumer-resource model, Theor. Popul. Biol. 37, 26 (1990).
  25. I. Dalmedigos and G. Bunin, Dynamical persistence in high-diversity resource-consumer communities, PLoS Comput. Biol. 16, e1008189 (2020).
  26. R. P. Rohr, S. Saavedra, and J. Bascompte, On the structural stability of mutualistic systems, Science 345, 1253497 (2014).
  27. V. A. Marčenko and L. A. Pastur, Distribution of eigenvalues for some sets of random matrices, Math. USSR Sb. 1, 457 (1967).
  28. T. Rogers, I. P. Castillo, R. Kühn, and K. Takeda, Cavity approach to the spectral density of sparse symmetric random matrices, Phys. Rev. E 78, 031116 (2008).
  29. A. Altieri and S. Franz, Constraint satisfaction mechanisms for marginal stability and criticality in large ecosystems, Phys. Rev. E 99, 010401(R) (2019).
  30. E. Agliari, F. Alemanno, A. Barra, and A. Fachechi, On the Marchenko-Pastur law in analog bipartite spin-glasses, J. Phys. A: Math. Theor. 52, 254002 (2019).
  31. R. Couillet and M. Debbah, Random Matrix Methods for Wireless Communications (Cambridge University Press, Cambridge, UK, 2011).
  32. P. Loubaton, P. Vallet et al., Almost sure localization of the eigenvalues in a Gaussian information plus noise model: Application to the spiked models, Electron. J. Probab. 16, 1934 (2011).
  33. G. Biroli, G. Bunin, and C. Cammarota, Marginally stable equilibria in critical ecosystems, New J. Phys. 20, 083051 (2018).
  34. F. Roy, G. Biroli, G. Bunin, and C. Cammarota, Numerical implementation of dynamical mean field theory for disordered systems: Application to the Lotka-Volterra model of ecosystems, J. Phys. A: Math. Theor. 52, 484001 (2019).
  35. A. Altieri, F. Roy, C. Cammarota, and G. Biroli, Properties of Equilibria and Glassy Phases of the Random Lotka-Volterra Model with Demographic Noise, Phys. Rev. Lett. 126, 258301 (2021).
  36. M. Barbier, J.-F. Arnoldi, G. Bunin, and M. Loreau, Generic assembly patterns in complex ecological communities, Proc. Natl. Acad. Sci. U.S.A. 115, 2156 (2018).
  37. S. Butler and J. P. O'Dwyer, Stability criteria for complex microbial communities, Nat. Commun. 9, 2970 (2018).
  38. https://github.com/Emergent-Behaviors-in-Biology/typical-random-ecosystems.
  39. W. Cui, R. Marsland III, and P. Mehta, Effect of Resource Dynamics on Species Packing in Diverse Ecosystems, Phys. Rev. Lett. 125, 048101 (2020).
  40. L. Hogben, Handbook of Linear Algebra (Chapman and Hall/CRC, London, UK, 2013).
  41. J. Grilli, M. Adorisio, S. Suweis, G. Barabás, J. R. Banavar, S. Allesina, and A. Maritan, Feasibility and coexistence of large ecological communities, Nat. Commun. 8, 14389 (2017).
  42. R. B. Dozier and J. W. Silverstein, On the empirical distribution of eigenvalues of large dimensional information-plus-noise-type matrices, J. Multivariate Anal. 98, 678 (2007).
  43. J. Baik, G. B. Arous, S. Péché et al., Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices, Ann. Prob. 33, 1643 (2005).
  44. F. Benaych-Georges and R. R. Nadakuditi, The singular values and vectors of low rank perturbations of large rectangular random matrices, J. Multivariate Anal. 111, 120 (2012).
  45. A. Agrawal, R. Verschueren, S. Diamond, and S. Boyd, A rewriting system for convex optimization problems, J. Control Decis. 5, 42 (2018).
  46. R. Marsland III, W. Cui, and P. Mehta, The minimum environmental perturbation principle: A new perspective on niche theory, Am. Nat. 196, 291 (2020).
  47. P. Mehta, W. Cui, C.-H. Wang, and R. Marsland III, Constrained optimization as ecological dynamics with applications to random quadratic programming in high dimensions, Phys. Rev. E 99, 052111 (2019).
  48. W. Cui, J. W. Rocks, and P. Mehta, The perturbative resolvent method: Spectral densities of random matrix ensembles via perturbation theory, arXiv:2012.00663.