Power spectral density for a general Ornstein–Uhlenbeck process
In the following we develop a method to compute the power spectral density of N-dimensional Ornstein–Uhlenbeck processes,
$$frac{d{boldsymbol{xi }}}{dt}={boldsymbol{A}}{boldsymbol{xi }}+{boldsymbol{zeta }}(t),$$
(15)
where ζ(t) is an N-vector of Gaussian white noise with correlations ({mathbb{E}}[{boldsymbol{zeta }}(t){boldsymbol{zeta }}{(t^{prime} )}^{T}]=delta (t-t^{prime} ){boldsymbol{B}}). The matrix A determines the mean behaviour of ξ and is considered to be locally stable, i.e. all eigenvalues of A have negative real part. Using the matrices A and B one can fully determine the power spectral density of fluctuations for the Ornstein-Uhlenbeck process.
We are interested in the case that the coefficients Aij and Bij are derived from a complex network of interactions with weights drawn at random, possibly with correlations. This framework encompasses a very general class of models with a wealth of real-world applications including but not limited to the ecological focus we have here. The method we describe exploits the underlying network structure of A and B to deduce a self-consistent scheme of equations whose solution contains information on the power spectral density.
We start with the definition of the power spectral density Φ(ω) as the Fourier transform of the covariance ({mathbb{E}}[{boldsymbol{xi }}(t){boldsymbol{xi }}{(t+tau )}^{T}]) at equilibrium,
$${mathbf{Phi }}(omega )=int_{-infty }^{infty }{{rm{e}}}^{-{rm{i}}omega tau }{mathbb{E}}[{boldsymbol{xi }}(t){boldsymbol{xi }}(t+tau )]dtau .$$
(16)
From ref. 33 on multivariate Ornstein–Uhlenbeck processes, we know that the power spectral density can also be written in the form of the matrix equation,
$${mathbf{Phi }}(omega )={({boldsymbol{A}}-iomega {boldsymbol{I}})}^{-1}{boldsymbol{B}}{({{boldsymbol{A}}}^{T}+iomega {boldsymbol{I}})}^{-1}.$$
(17)
In practice, this equation is difficult to use for large systems as large matrix inversion is analytically intractable and numerical schemes are slow and sometimes unstable. We take an alternative route by recasting Eq. (17) as a complex Gaussian integral reminiscent of problems appearing in the statistical physics of disordered systems. Our approach in the following is to treat ω as a fixed parameter and drop the explicit dependence from our notation. We begin by writing
$${mathbf{Phi }}(omega )=frac{| {boldsymbol{A}}-iomega {boldsymbol{I}}{| }^{2}}{{pi }^{N}| {boldsymbol{B}}| }int_{{mathbb{C}}}{e}^{-{{boldsymbol{u}}}^{dagger }{{boldsymbol{Phi }}}^{-1}{boldsymbol{u}}}{boldsymbol{u}}{{boldsymbol{u}}}^{dagger }mathop{prod }limits_{i=1}^{N}d{u}_{i} .$$
(18)
Simplification of the integrand is achieved by unpicking the matrix inversion in the exponent via a Hubbard-Stratonovich transformation46,47. To this end we recast the system in the language of statistical mechanics by introducing N complex-valued ‘spins’ ui and N auxiliary variables vi, with the ‘Hamiltonian’
$${mathcal{H}}({boldsymbol{u}},{boldsymbol{v}})=-{{boldsymbol{u}}}^{dagger }({boldsymbol{A}}-{rm{i}}omega ){boldsymbol{v}}+{{boldsymbol{v}}}^{dagger }{({boldsymbol{A}}-{rm{i}}omega )}^{dagger }{boldsymbol{u}}+{{boldsymbol{v}}}^{dagger }{boldsymbol{B}}{boldsymbol{v}} .$$
(19)
Introducing a bracket operator
$$langle cdots rangle :=frac{{int}_{{mathbb{C}}}{e}^{-{mathcal{H}}({boldsymbol{u}},{boldsymbol{v}})}(cdots )d{boldsymbol{u}}d{boldsymbol{v}}}{{int}_{{mathbb{C}}}{e}^{-{mathcal{H}}({boldsymbol{u}},{boldsymbol{v}})}d{boldsymbol{u}}d{boldsymbol{v}}} ,$$
(20)
we can obtain succinct expressions for the power spectral density Φ = 〈uu†〉 as well as the resolvent matrix ({boldsymbol{{mathcal{R}}}}={({rm{i}}omega -{boldsymbol{A}})}^{-1}=langle {boldsymbol{u}}{{boldsymbol{v}}}^{dagger }rangle). Thus we may write,
$${mathbf{Phi }}=frac{1}{{mathcal{Z}}}{int}_{{mathbb{C}}}{e}^{-{mathcal{H}}({boldsymbol{u}},{boldsymbol{v}})}{boldsymbol{u}}{{boldsymbol{u}}}^{dagger }mathop{prod }limits_{i=1}^{N}d{u}_{i}d{v}_{i} ,$$
(21)
where ({mathcal{Z}}=| {boldsymbol{A}}-iomega {boldsymbol{I}}{| }^{2}/{pi }^{2N}).
This construction may seem laborious at first, but it unlocks a powerful collection of statistical mechanics tools, including the ‘cavity method’. Originally, the cavity method has been introduced in order to analyse a model for spin glass systems48,49. Further applications of the method include the analysis of the eigenvalue distribution in sparse matrices50,51,52. We will exploit the network structure in a similar fashion in order to compute the power spectral density.
In our analysis, we find that it is convenient to split the Hamiltonian in Eq. (19) into the sum of its local contributions at sites i, ({{mathcal{H}}}_{i}), and contributions from interactions between i and j, ({{mathcal{H}}}_{ij}),
$${mathcal{H}}=mathop{sum}limits_{i}{{mathcal{H}}}_{i}+mathop{sum}limits_{i sim j}{{mathcal{H}}}_{ij} .$$
(22)
These terms can be decomposed as ({{mathcal{H}}}_{i}={{boldsymbol{w}}}_{i}^{dagger }{{boldsymbol{chi }}}_{i}{{boldsymbol{w}}}_{i}) and ({{mathcal{H}}}_{ij}={{boldsymbol{w}}}_{i}^{dagger }{{boldsymbol{chi }}}_{ij}{{boldsymbol{w}}}_{j}), where we introduce the compound spins ({{boldsymbol{w}}}_{i}={({u}_{i},{v}_{i})}^{T}) and transfer matrices,
$${{boldsymbol{chi }}}_{i} = , left(begin{array}{ll}0&{A}_{ii}+iomega -{A}_{ii}+iomega &{B}_{ii}end{array}right) , {{boldsymbol{chi }}}_{ij} = , left(begin{array}{ll}0&{A}_{ji} -{A}_{ij}&{B}_{ij}end{array}right) .$$
(23)
Let us focus on the power spectral density of a particular variable ξi, obtained from the diagonal element ϕi = Φii. For this we compute the single-site marginal fi by integrating over all other variables,
$${f}_{i}({{boldsymbol{w}}}_{i})=frac{1}{{mathcal{Z}}}{int}_{{mathbb{C}}}{e}^{-{mathcal{H}}}mathop{prod}limits_{jne i}d{{boldsymbol{w}}}_{j}.$$
(24)
Alternatively, ϕi can be obtained as the top left entry of the covariance matrix ({{mathbf{Psi }}}_{i}=langle {{boldsymbol{w}}}_{i}{{boldsymbol{w}}}_{i}^{dagger }rangle). We write the covariance matrix as the integral,
$${{mathbf{Psi }}}_{i}={int}_{{mathbb{C}}}{f}_{i}({{boldsymbol{w}}}_{i}){{boldsymbol{w}}}_{i}{{boldsymbol{w}}}_{i}^{dagger }d{{boldsymbol{w}}}_{i} ,$$
(25)
which could also be expressed in terms of a Gaussian integral,
$${{mathbf{Psi }}}_{i}=frac{1}{{pi }^{2}| {{mathbf{Psi }}}_{i}| }{int}_{{mathbb{C}}}{e}^{-{{boldsymbol{w}}}_{i}^{dagger }{{mathbf{Psi }}}_{i}^{-1}{{boldsymbol{w}}}_{i}}{{boldsymbol{w}}}_{i}{{boldsymbol{w}}}_{i}^{dagger }d{{boldsymbol{w}}}_{i} .$$
(26)
By comparing Eqs. (25) and (26) we find that
$${f}_{i}({{boldsymbol{w}}}_{i})=frac{1}{{pi }^{2}| {{mathbf{Psi }}}_{i}| }{e}^{-{{boldsymbol{w}}}_{i}^{dagger }{{mathbf{Psi }}}_{i}^{-1}{{boldsymbol{w}}}_{i}} .$$
(27)
We now insert Eq. (22) into Eq. (24) and obtain,
$${f}_{i}({{boldsymbol{w}}}_{i})=frac{1}{{pi }^{2}| {{mathbf{Psi }}}_{i}| }{e}^{-{{mathcal{H}}}_{i}}{int}_{{mathbb{C}}}mathop{prod}limits_{i sim j}left({e}^{-{{mathcal{H}}}_{ij}-{{mathcal{H}}}_{ji}}{f}_{j}^{(i)}d{{boldsymbol{w}}}_{j}right) ,$$
(28)
where we write ({f}_{j}^{(i)}) for the ‘cavity marginals’,
$${f}_{j}^{(i)}({{boldsymbol{w}}}_{j})=frac{1}{{{mathcal{Z}}}^{(i)}}{int}_{{mathbb{C}}}{e}^{-{{mathcal{H}}}^{(i)}}mathop{prod}limits_{kne i,j}d{{boldsymbol{w}}}_{k} .$$
(29)
In essence, the above discussion amounts to organising the 2N integrals in Eq. (21) in a convenient way, with the advantage of providing a simple intuition for the role of the underlying network. The superscript (i) is used to indicate that the quantity corresponds to the cavity network where node i has been removed. We will further use this notation for the ‘cavity covariance matrix’ ({{mathbf{Psi }}}_{jl}^{(i)}) introduced in the following.
Next we perform the integration in Eq. (28) and compare to the form in Eq. (27). We thus obtain a recursion formula for the covariance matrix Ψi and the cavity covariance matrices ({{mathbf{Psi }}}_{jl}^{(i)}),
$${{mathbf{Psi }}}_{i}={left({{boldsymbol{chi }}}_{i}-mathop{sum}limits_{{{i !sim! j}atop {i! sim! l}}}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}_{jl}^{(i)}{{boldsymbol{chi }}}_{li}right)}^{-1},$$
(30)
where the notation i ~ j indicates that we sum over nodes j connected to node i. Unless there is some specific structure underlying the network, we assume that most real world cases have a ‘tree-like’ structure from the local view point of a single node i. Hence, it is highly unlikely that the nodes j and l are nearby in the cavity network where node i is removed, and thus ({{mathbf{Psi }}}_{jl}^{(i)}) only gives non-zero contributions if j = l. We therefore reduce Eq. (30) and obtain for the covariance matrix,
$${{mathbf{Psi }}}_{i}={left({{boldsymbol{chi }}}_{i}-mathop{sum}limits_{i sim j}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}_{j}^{(i)}{{boldsymbol{chi }}}_{ji}right)}^{-1}.$$
(31)
Similarly, the cavity covariance matrix obeys the equation,
$${{mathbf{Psi }}}_{j}^{(i)}={left({{boldsymbol{chi }}}_{j}-mathop{sum}limits_{j sim k,kne i}{{boldsymbol{chi }}}_{jk}{{mathbf{Psi }}}_{k}^{(j)}{{boldsymbol{chi }}}_{kj}right)}^{-1}.$$
(32)
Here we use that Ψ(i, j) = Ψ(j) when the nodes i and k are not connected. In other words, removing node j from the cavity network where node i is missing, has the same effect as removing it from the full network. The system in Eq. (31) describes a collection of nonlinear matrix equations that must be solved self-consistently.
For networks with high enough connectivity (and to good approximation even with modest connectivity), the removal of a single node does not affect the rest of the network, as its contribution is negligible compared to the full system. Hence the system in Eq. (31) can be reduced to a smaller set of equations approximately satisfied by the matrices Ψi:
$${{mathbf{Psi }}}_{i}approx {left({{boldsymbol{chi }}}_{i}-mathop{sum}limits_{i sim j}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}_{j}{{boldsymbol{chi }}}_{ji}right)}^{-1}.$$
(33)
The power spectral density ϕi can be obtained as the top left entry of Ψi.
In order to progress further, we now consider specific approximations that help us compute the power spectral density. First, we take a mean-field approach in order to obtain the mean power spectral density for all nodes part of the network; we then use the result for the mean-field in order to compute a close approximation to the local power spectral density of a single node. Later, we adapt the method to partitioned networks where nodes belong to different types of connected groups.
Mean field
For the following, we assume that all agents in the system behave the same on average. In practice, the terms governed by self-interactions Aii are drawn from the same distribution for all agents. Similarly, the terms including Bii are governed by one distribution. Interaction strengths and connections with other nodes in the network are also sampled equally for all agents (we have explored a large Lotka-Volterra ecosystem as an example of such a network). In the mean-field (MF) formulation we assume that the mean degree and excess degree are approximately equal, and replace all quantities in Eqs. (31) and (32) with their average. Ψi = ΨMF ∀ i. We then obtain the following recursion equation,
$${{mathbf{Psi }}}^{{rm{MF}}}={left[{mathbb{E}}[{{boldsymbol{chi }}}_{i}]-{mathbb{E}}left(mathop{sum}limits_{i sim j}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}^{{rm{MF}}}{{boldsymbol{chi }}}_{ji}right)right]}^{-1}.$$
(34)
In order to solve this equation, we parameterise,
$${{mathbf{Psi }}}^{{rm{MF}}}=left(begin{array}{ll}phi &r -bar{r}&0end{array}right),$$
(35)
where the top left entry ϕ corresponds to the mean power spectral density, and we introduce r as the mean diagonal element of the resolvent matrix ({boldsymbol{{mathcal{R}}}}). Finally by inserting the ansatz of Eq. (35) into Eq. (34) we obtain,
$$left(begin{array}{ll}phi &r -bar{r}&0end{array}right)^{-1}= , left(begin{array}{ll}0&{mathbb{E}}[{A}_{ii}]+iomega -{mathbb{E}}[{A}_{ii}]+iomega &{mathbb{E}}[{B}_{ii}]end{array}right) , +cleft(begin{array}{ll}0&bar{r}{mathbb{E}}[{A}_{ij}{A}_{ji}] -r{mathbb{E}}[{A}_{ij}{A}_{ji}]&phi {mathbb{E}}[{A}_{ij}^{2}]+(r+bar{r}){mathbb{E}}[{A}_{ij}{B}_{ij}]end{array}right),$$
(36)
where c is the average degree (i.e. number of connections) per node. Moreover, the expectations in the second term are to be taken over connected nodes i ~ j (i.e. non-zero matrix entries).
From Eq. (36) above, we obtain the equations,
$$frac{phi }{| r{| }^{2}} = , {mathbb{E}}[{B}_{ii}]+cleft(phi {mathbb{E}}[{A}_{ij}^{2}]+2{rm{Re}}(r){mathbb{E}}[{A}_{ij}{B}_{ij}]right), frac{bar{r}}{| r{| }^{2}} = , -!{mathbb{E}}[{A}_{ii}]+iomega -cr{mathbb{E}}[{A}_{ij}{A}_{ji}].$$
(37)
We solve the second equation in Eq. (37) for r and write the mean power spectral density in terms of r,
$$phi = , | r{| }^{2}frac{{mathbb{E}}[{B}_{ii}]+2c{rm{Re}}(r){mathbb{E}}[{A}_{ij}{B}_{ij}]}{1-c| r{| }^{2}{mathbb{E}}[{A}_{ij}^{2}]}, r = , frac{1}{2c{mathbb{E}}[{A}_{ij}{A}_{ji}]}left[-{mathbb{E}}[{A}_{ii}]+iomega right. , left.-sqrt{{(-{mathbb{E}}[{A}_{ii}]+iomega )}^{2}-4c{mathbb{E}}[{A}_{ij}{A}_{ji}]}right]$$
(38)
This equation informs the first part of the results presented in the main text.
Single defect approximation
The single defect approximation (SDA) makes use of the mean-field approximation for the cavity fields, but retains local information about individual nodes. We parameterise similarly to Eq. (35) for a single individual. Moreover, we replace all other quantities with the respective mean-field approximation. Specifically, we obtain
$${left(begin{array}{ll}{phi }_{i}^{{rm{SDA}}}&{r}_{i}^{{rm{SDA}}} -{bar{r}}_{i}^{{rm{SDA}}}&0end{array}right)}^{-1}= ,left(begin{array}{ll}0&{A}_{ii}+iomega -{A}_{ii}+iomega &{B}_{ii}end{array}right) , +mathop{sum}limits_{i sim j}left(begin{array}{ll}0&{bar{r}}^{{rm{MF}}}{A}_{ij}{A}_{ji} -{r}^{{rm{MF}}}{A}_{ij}{A}_{ji}&{phi }^{{rm{MF}}}{A}_{ij}^{2}+({r}^{{rm{MF}}}+{bar{r}}^{{rm{MF}}}){A}_{ij}{B}_{ij}end{array}right).$$
(39)
We solve this equation for ({phi }_{i}^{{rm{SDA}}},{r}_{i}^{{rm{SDA}}}), which delivers
$$frac{{phi }_{i}^{{rm{SDA}}}}{| {r}_{i}^{{rm{SDA}}}{| }^{2}} = , {phi }^{{rm{MF}}}mathop{sum}limits_{i sim j}{A}_{ij}^{2}+2{rm{Re}}({r}^{{rm{MF}}})mathop{sum}limits_{i sim j}{A}_{ij}{B}_{ij}+{B}_{ii} , {r}_{i}^{{rm{SDA}}} = , {left({A}_{ii}+iomega +{bar{r}}^{{rm{MF}}}mathop{sum}limits_{i sim j}{A}_{ij}{A}_{ji}right)}^{-1}.$$
(40)
Partitioned network
Previously we assumed that all nodes in a network are interchangeable in distribution. However, many real-world applications feature agents with different properties, imposing a high-level structure on the network. We realise this by partitioning nodes into distinct groups that interact with each other (see the section Trophic structure model for a simple example).
In order to handle different connected groups we make use of the cavity method as in Eqs. (31) and (32). In particular, we split the sum in the second term on the right-hand side of these equations into contributions from each group in the partitioned network. Let M denote the number of subgroups Vm in a partitioned network then we write,
$${{mathbf{Psi }}}_{i}= , {left({{boldsymbol{chi }}}_{i}-mathop{sum }limits_{m}^{M}mathop{sum}limits_{{{i !sim! j}atop {j!in! {V}_{m}}}}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}_{j}^{(i)}{{boldsymbol{chi }}}_{ji}right)}^{-1} , {{mathbf{Psi }}}_{j}^{(i)} = , {left({{boldsymbol{chi }}}_{j}-mathop{sum }limits_{m}^{M}mathop{sum}limits_{{{j !sim! k}atop {k!in !{V}_{m}}}}{{boldsymbol{chi }}}_{jk}{{mathbf{Psi }}}_{k}^{(j)}{{boldsymbol{chi }}}_{kj}right)}^{-1}.$$
(41)
Similar to the previous sections we replace all quantities with a mean-field average ({{mathbf{Psi }}}_{m}^{{rm{MF}}}), but for each group separately. Hence we obtain M equations of the form
$${{mathbf{Psi }}}_{i}^{{rm{MF}}}={left[{mathbb{E}}[{{boldsymbol{chi }}}_{i}]-{mathbb{E}}left(mathop{sum }limits_{m}^{M}mathop{sum}limits_{{{i !sim! j}atop {j!in !{V}_{m}}}}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}_{m}^{{rm{MF}}}{{boldsymbol{chi }}}_{ji}right)right]}^{-1}.$$
(42)
In order to compute the mean power spectral density for different groups separately, we use a parameterisation as in Eq. (35) for each group. Therefore we have,
$${{mathbf{Psi }}}_{m}^{{rm{MF}}}=left(begin{array}{ll}{phi }_{m}&{r}_{m} -{bar{r}}_{m}&0end{array}right),$$
(43)
for all m = 1, …, M. This delivers 2M equations to solve for all rm and ϕm. Numerically this is straightforward, although algebraically long-winded for the general case. However, the equations simplify for special cases. In the section Trophic structure model we demonstrate this method for a bipartite network where a lack of intra-group interactions simplifies the analysis.
Large Lotka-Volterra ecosystem
Model description
First, we define the framework for a general Lotka-Volterra ecosystem with N species and a large but finite system size V ≫ 1. Note that this parameter can be interpreted as a scaling factor for the fluctuation amplitude and thus, larger systems exhibit higher stability and quantitative reliability for our analytic results. Let Xi denote the number of individuals and xi = Xi/V the density of species i = 1, …, N. We start from the following set of reactions that define the underlying stochastic dynamics of the system:
$$ , {X}_{i},mathop{to }limits^{{b}_{i}},2{X}_{i} ({rm{birth}}) , 2{X}_{i},mathop{to }limits^{{R}_{ii}},{X}_{i} ({rm{death}}) , {X}_{i}+{X}_{j},mathop{to }limits^{{R}_{ij}},left{begin{array}{ll}2{X}_{i}+{X}_{j}&({rm{mutualism}}),hfill {X}_{i}&({rm{competition}}), 2{X}_{i}&({rm{predation}}).hfillend{array}right.$$
(44)
The self-interactions are governed by the birth rate bi > 0 and density-dependent mortality rate Rii > 0. Furthermore, we define three interaction types between species i and j, namely mutualism, competition and predation. In the case of mutualistic interactions, both species benefit from each other, whereas competition means that both species have a higher mortality rate, depending on the density of the other species. For predator-prey pairs, one predator species benefits from the death of a prey species. The predator and prey species are chosen randomly, such that species i is equally likely to be a predator or prey of species j.
With probability Pc we assign an interaction rate Rij > 0 to the species pair (i, j), and with probability 1 − Pc there is no interaction between species i and j (i.e. Rij = 0). In other words, each species has on average c = NPc interaction partners. The reaction rates are considered to be i.i.d. random variables drawn from a half-normal distribution (| {mathcal{N}}(0,{sigma }^{2})|), where we write for the mean reaction rate (mu ={mathbb{E}}[{R}_{ij}]=sigma sqrt{2/pi }) and raw second moment ({sigma }^{2}={mathbb{E}}[{R}_{ij}^{2}]). For each interaction pair, the interaction type is chosen such that the proportion of predator-prey pairs is p ∈ [0, 1], and all non-predator-prey interactions are equally distributed between mutualistic and competitive interactions (i.e. the overall proportion of mutualistic/competitive interactions is 1/2(1 − p)). Lastly, we define the symmetry parameter γ = 1 − 2p, where γ = −1 if all interactions are of predator-prey type (p = 1), and similarly γ = +1 if there are no predator-prey interactions (p = 0). In a mixed case where predator-prey and mutualistic/competitive interactions have equal proportion (p = 1/2), we have γ = 0. Later we will see that γ is equivalent to the correlation of signed interaction strengths.
In the limit V → ∞, the dynamics of the species density xi obey the ordinary differential equations,
$$frac{d{x}_{i}}{dt}={x}_{i}left({b}_{i}+mathop{sum }limits_{j}^{N}{alpha }_{ij}{x}_{j}right),$$
(45)
where αij are the interaction coefficients with ∣αij∣ = ∣αji∣ = Rij. The signs of the interaction coefficients are determined by the type of interaction between species i and j. For mutualistic interactions we have αij = αji > 0, and αij = αji < 0 for competitive interactions. In the case of predator–prey interactions the coefficients have opposite sign αij = −αji. Hence the symmetry parameter as described above is given by the correlation of interaction coefficients (gamma ={mathbb{E}}[{alpha }_{ij}{alpha }_{ji}]). Furthermore, in order to ensure bounded species densities, we require negative self-interactions αii = −Rii < 0.
If species live in isolation (i.e. when αij = 0 ∀ i ≠ j), we see that the densities approach the ‘effective’ carrying capacity Ki = −bi/αii. For the following computations we consider a large Lotka-Volterra system. Since we are only interested in the effects of interactions between species, we assume that all self-interactions are approximately equal. Thus we write for the birth rate bi = b and mortality rate αii = −b. This gives the effective carrying capacity K = 1 for all species.
The fixed point x* at the deterministic equilibrium state is given by,
$${x}_{i}^{* }=1+mathop{sum}limits_{jne i}{alpha }_{ij}{x}_{j}^{* }.$$
(46)
We assume a random mixture of mutualistic and competitive interactions with equal proportions, and therefore the interaction coefficients αij have zero mean ( ∀ i ≠ j). Furthermore, we postulate that for large ecosystems where N → ∞, the equilibrium state ({x}_{i}^{* }={mathbb{E}}[{x}_{i}^{* }]equiv {x}^{* }). Hence we obtain the expected equilibrium density x* = 1 for all species i. Note that the following computations are valid for any known fixed point x*, and our assumptions are for mathematical simplification only. The results are independent of the particular equilibrium configuration, as long as a stable equilibrium can be measured and extracted from data (we discuss a few caveats where we apply our method to time series data from a plankton ecosystem). This assumption allows us to write the Jacobian matrix for a linearisation around the equilibrium state, with elements,
$${J}_{ii}{| }_{{boldsymbol{x}} = {{boldsymbol{x}}}^{* }} = , {alpha }_{ii}=-b, {J}_{ij}{| }_{{boldsymbol{x}} = {{boldsymbol{x}}}^{* }} = , {alpha }_{ij}.$$
(47)
In other words, the community matrix of a large Lotka-Volterra system as described above has the same form as the interaction matrix, i.e. Aij = αij. The local stability of such community matrix A is given by the elliptic law7,8. It states that with high probability all eigenvalues of the random matrix A are distributed on an ellipse in the complex plane, centered at (−b, 0) on the real axis. Thus for a stable matrix we require all eigenvalues to be negative, and hence the horizontal semi-axis of the ellipse determines the allowed range for the centre. It follows the stability criterion,
$$sqrt{c{sigma }^{2}}(1+gamma ),< ,b,$$
(48)
with the average number of connections c per species, and the correlation (gamma ={mathbb{E}}[{A}_{ij}{A}_{ji}]). For a random community matrix (i.e. γ = 0), we recover the stability criterion that has been proven by May1, (sqrt{c{sigma }^{2}} < b). If γ < 0, where the proportion of predator-prey type interactions is larger, the horizontal semi-axis of the ellipse becomes smaller. In other words, the stability criterion relaxes for predator-prey interactions. For γ = −1 (i.e. Aij = −Aji ∀ i, j), all interactions are of predator-prey type and all eigenvalues become purely imaginary. Therefore the stability criterion becomes 0 < b, as the ellipse stretches vertically into the imaginary plane. The opposite is true for mutualistic/competitive interactions (i.e. γ = +1), where eigenvalues are distributed on an ellipse with large horizontal radius along the real axis. Thus it is more likely that some eigenvalues have positive real part and the system destabilises. We choose the parameter b for each case, such that the stability criteria are fulfilled.
For a large but finite system size V, we write the stochastic differential equations,
$$frac{d{x}_{i}}{dt}={x}_{i}left(b+mathop{sum }limits_{j}^{N}{alpha }_{ij}{x}_{j}right)+frac{1}{sqrt{V}}{eta }_{i}(t),$$
(49)
where ηi(t) are Gaussian random variables with (langle {eta }_{i}(t),{eta }_{j}(t^{prime} )rangle =delta (t-t^{prime} ){B}_{ij}). The noise matrix B can be obtained from the reactions that determine the process. The diagonal elements are given by the self-interactions and total interaction from all other species, and the off-diagonal elements depend on the type of interaction between species i and j. We assume that only predator-prey type interactions contribute to the covariance of species fluctuations (i.e. that only predator-prey interactions involve the simultaneous change in abundance of a species pair). Therefore, we write
$${B}_{ii}({boldsymbol{x}}) = , {x}_{i}left(b+mathop{sum }limits_{j=1}^{N}{R}_{ij}{x}_{j}right), {B}_{ij}({boldsymbol{x}}) = , left{begin{array}{ll}-{R}_{ij}{x}_{i}{x}_{j}&{rm{if}} {alpha }_{ij}=-{alpha }_{ji}, 0&{rm{else.}}hfillend{array}right.$$
(50)
We next linearise around the fixed point to obtain a new equation for the fluctuations, ({boldsymbol{xi }}=sqrt{V}({boldsymbol{x}}-{{boldsymbol{x}}}^{* })), which has the form of an Ornstein-Uhlenbeck process as defined in Eq. (15). Recall that in our simplified model the equilibrium abundance x* = 1 (note however, that in general the entries of the noise matrix B depend on the particular fixed point of a given system). Therefore we write for the noise matrix evaluated at the fixed point
$${B}_{ii}({{boldsymbol{x}}}^{* })= , 2b+cmu , {B}_{ij}({{boldsymbol{x}}}^{* }) = , left{begin{array}{ll}-{R}_{ij}&{rm{if}} {alpha }_{ij}=-{alpha }_{ji}, 0&{rm{else,}}hfillend{array}right.$$
(51)
where μ is given as the mean (over non-zero entries) reaction rate (mu ={mathbb{E}}[{R}_{ij}]=sigma sqrt{2/pi }).
Computing the power spectral density
Let us now compute the mean power spectral density ϕ of the process described above using Eq. (38) as starting point. We replace the necessary quantities that we obtain from the community matrix A and noise matrix B as defined in the previous section. In particular, we have the expected diagonal elements of the community matrix ({mathbb{E}}[{A}_{ii}]=-b), and the noise matrix ({mathbb{E}}[{B}_{ii}]=2b+cmu). Moreover the raw second moment of the non-zero interactions is given by ({mathbb{E}}[{A}_{ij}]={sigma }^{2}) and the correlation ({mathbb{E}}[{A}_{ij}{A}_{ji}]=gamma {sigma }^{2}). We use that ({mathbb{E}}[{A}_{ij}{B}_{ij}]=0 forall i,j) since the off-diagonal elements of the noise matrix are only non-zero if there is a predator-prey interaction between species i and j. However, the elements of Aij have opposite signs in the case of predator-prey pairs and thus sum to zero.
Plugging in these quantities into Eq. (38) we obtain,
$$phi = , | r{| }^{2}frac{2b+cmu }{1-| r{| }^{2}c{sigma }^{2}} , r = , frac{1}{2cgamma {sigma }^{2}}left[b+iomega -sqrt{{(b+iomega )}^{2}-4cgamma {sigma }^{2}}right].$$
(52)
In the main text, we explore the theoretical ecological consequences of this result.
Trophic structure model
Model description
In the following we define a model analogous to the one described in the previous section. For a large but finite system size V we write the model in terms of a stochastic process. Previously we allowed for different types of interactions, however, in this model we only focus on predator-prey interactions. More specifically, the interaction network is partitioned into Nx predator species and Ny prey species, where N = Nx + Ny is the total number of species. We assume that predators only interact with prey and vice versa (i.e. we assume no inter-species interactions within the groups of predators or prey) as illustrated in Fig. 6. Moreover, each predator and prey species interacts with themselves (density-dependent mortality).
Here we have nx = 4 predators with cx = 3 prey each, and ny = 6 prey with cy = 2 predators each. The bold lines illustrate the connections to the focal node before and after removing a node from the network. Predator nodes (black) only have local contributions from prey nodes (white) and vice versa. In the mean-field approximation for the power spectral density, these contributions are replaced by the average of each group.
In the previous model we assigned the same birth rate to all species in the ecosystem. Here we assume that predators decline at rate d in absence of prey, and b is the birth rate of prey species. For simplicity, we assume that d, b are fixed quantities, equal for all predators and prey respectively. Furthermore, Rij is the interaction rate between predator i and prey j. Each predator species has a fixed number of prey cx and each prey species has a fixed number of predators cy, such that Nxcx = Nycy. The parameters cx, cy can be interpreted as outgoing degrees of predator and prey nodes respectively. Connections between predators and prey are then wired randomly. The interaction strength is set to Rij = α, and considered equal for all predator-prey interactions (analogous to a mean reaction rate). Where there is no interaction between species, the interaction rate is simply set to zero. Note that this means that the total sum of interaction strength is constant αcx and αcy for all predator and prey species respectively. In contrast to the previous model, now only the network structure contributes to the randomness of the system.
Let xi denote the density of predator species i = 1, …, Nx, and yj the density of prey species j = 1, …, Ny. In the deterministic limit where V → ∞ we then write the following ODEs,
$$frac{d{x}_{i}}{dt} = , {x}_{i}left(-d-{x}_{i}+mathop{sum }limits_{j=1}^{{N}_{y}}{R}_{ij}{y}_{j}right), frac{d{y}_{j}}{dt} = , {y}_{j}left(b-{y}_{j}-mathop{sum }limits_{i=1}^{{N}_{x}}{R}_{ji}{x}_{i}right).$$
(53)
Given the fixed number of connections cx, cy and interaction strength α, we can simplify the ODEs to two equations for the average predator and prey densities,
$$frac{dx}{dt} = , xleft(-d-x+{c}_{x}alpha yright), frac{dy}{dt} = , yleft(b-y-{c}_{y}alpha xright).$$
(54)
In the limit of large N, the equilibrium state of the system converges to the average quantities obtained from this reduced form. The biologically relevant equilibrium states for this system are given by the trivial fixed points (x*, y*) = (0, 0), (0, b), and the non-trivial fixed point,
$${x}^{* }= , frac{{c}_{x}alpha b-d}{{c}_{x}{c}_{y}{alpha }^{2}+1}, {y}^{* }= , frac{{c}_{y}alpha d+b}{{c}_{x}{c}_{y}{alpha }^{2}+1}.$$
(55)
Next, we write the Jacobian matrix for a linearisation around the non-trivial fixed point. The community matrix takes the form,
$${boldsymbol{A}}=left(begin{array}{ll}-{x}^{* }{boldsymbol{I}}&{x}^{* }{boldsymbol{R}} -{y}^{* }{{boldsymbol{R}}}^{T}&-{y}^{* }{boldsymbol{I}}end{array}right),$$
(56)
where the first i = 1, …, Nx rows and columns represent the predator species, and the remaining j = Nx + 1, …, Nx + Ny rows and columns correspond to the prey species.
For a large but finite system size V we write the corresponding stochastic differential equations,
$$frac{d{x}_{i}}{dt} = , {x}_{i}left(-d-{x}_{i}+mathop{sum }limits_{j}^{{N}_{y}}{R}_{ij}{y}_{j}right)+frac{1}{sqrt{V}}{eta }_{i}(t), frac{d{y}_{j}}{dt} = , {y}_{j}left(b-{y}_{j}-mathop{sum }limits_{i}^{{N}_{x}}{R}_{ji}{x}_{i}right)+frac{1}{sqrt{V}}{eta }_{j}(t),$$
(57)
where ηi,j(t) are Gaussian noise with (langle {eta }_{i}(t),{eta }_{j}(t^{prime} )rangle ={delta }_{ij}(t-t^{prime} ){B}_{ij}). The noise matrix is given by the self- and total interactions on the diagonal, and the interactions between predators and prey on the off-diagonal. We therefore write,
$${boldsymbol{B}}=left(begin{array}{ll}2{x}^{* }({x}^{* }+d){boldsymbol{I}}&-{x}^{* }{y}^{* }{boldsymbol{R}} -{x}^{* }{y}^{* }{{boldsymbol{R}}}^{T}&2{y}^{* }b{boldsymbol{I}}end{array}right).$$
(58)
Again, this allows us to write the dynamics in form of an Ornstein-Uhlenbeck process as defined in Eq. (15).
Computing the power spectral density
In the following, we use features of the bipartite interaction network. For instance, all nodes that are connected to e.g. node xi, will be prey nodes yj, and thus are not connected with each other (see Fig. 6). This allows us to write the following recursion formulas for the mean power spectral densities according to Eq. (42),
$${{mathbf{Psi }}}_{x}^{-1}= , {mathbb{E}}[{{boldsymbol{chi }}}_{i}]-{mathbb{E}}left[mathop{sum }limits_{i sim j}^{{N}_{y}}{{boldsymbol{chi }}}_{ij}{{mathbf{Psi }}}_{y}{{boldsymbol{chi }}}_{ji}right] , {{mathbf{Psi }}}_{y}^{-1}= , {mathbb{E}}[{{boldsymbol{chi }}}_{j}]-{mathbb{E}}left[mathop{sum }limits_{j sim i}^{{N}_{x}}{{boldsymbol{chi }}}_{ji}{{mathbf{Psi }}}_{x}{{boldsymbol{chi }}}_{ij}right].$$
(59)
Recall that the top left entries of Ψx and Ψy deliver the mean power spectral densities for predators ϕx and prey ϕy respectively. For the bipartite model, the helping matrices χi, χij (as defined in Eq. (23)) are given by,
$${{boldsymbol{chi }}}_{x} = , left(begin{array}{ll}0&-x+iomega x+iomega &2x(x+d)end{array}right), {{boldsymbol{chi }}}_{y} = , left(begin{array}{ll}0&-y+iomega y+iomega &2ybend{array}right), {{boldsymbol{chi }}}_{xy} = , left(begin{array}{ll}0&-alpha y -alpha x&-alpha xyend{array}right), {{boldsymbol{chi }}}_{yx}=left(begin{array}{ll}0&alpha x alpha y&-alpha xyend{array}right).$$
(60)
Inserting and writing out Eq. (59) gives,
$$left(begin{array}{ll}{phi }_{x}&{r}_{x} -{bar{r}}_{x}&0end{array}right)^{-1}= , left(begin{array}{ll}0&-x+iomega x+iomega &2x(x+d)end{array}right) , +{alpha }^{2}{c}_{x}left(begin{array}{ll}0&-{bar{r}}_{y}xy {r}_{y}xy&{phi }_{y}{x}^{2}-({r}_{y}+{bar{r}}_{y}){x}^{2}yend{array}right) , left(begin{array}{ll}{phi }_{y}&{r}_{y} -{bar{r}}_{y}&0end{array}right)^{-1}= , left(begin{array}{ll}0&-y+iomega y+iomega &2ybend{array}right) , +{alpha }^{2}{c}_{y}left(begin{array}{ll}0&-{bar{r}}_{x}xy {r}_{x}xy&{phi }_{x}{y}^{2}+({r}_{x}+{bar{r}}_{x})x{y}^{2}end{array}right),$$
(61)
where cx, cy are the number of connections per predator and prey species respectively. Analogous to Eq. (38) we now derive a system of equations and solve for rx, ry and ϕx, ϕy. In the main text we describe the features of the power spectral density deduced from this system of equations.
Interpreting the power spectral density in the context of temporal stability
For orientation, we here provide some interpretation of the power spectral density in the context of temporal stability. Essentially when we talk about temporal stability, we can be referring to one of two measures. The first is how far stochastic trajectories tend to stray from their equilibrium value over long time horizons. We refer to this as ‘variability’20. The second is how quickly population abundances tend to change over finite time horizons. We will characterise this by the ‘temporal autocorrelation’.
The variability can be characterised by the variance in time-averaged trajectories around the mean22. For a system such as Eq. (2), which we recall can be a linear approximation for a nonlinear system such as Eq. (1), we find that ξ is normally distributed with zero mean and a covariance matrix, Σ, that solves the following Lyapunov equation53;
$${boldsymbol{A}}{mathbf{Sigma }}+{mathbf{Sigma }}{{boldsymbol{A}}}^{T}+{boldsymbol{B}}({{boldsymbol{x}}}^{* })=0 .$$
(62)
The stationary distribution of ξ is then ({P}_{{rm{st}}}({boldsymbol{xi }})={mathcal{N}}({boldsymbol{0}},{mathbf{Sigma }})). For instance, in the left panels of Fig. 7, we show stochastic trajectories for two different systems, with standard deviations marked by black dashed lines. Meanwhile, the marginal normal distribution for these trajectories is plotted in the inset of the right panels of Fig. 7. A system can then be said to be ‘less stable’ (in a temporal sense) if it has a greater variability. A consideration of the solutions to Eq. (62) shows that this measure of temporal stability is highly correlated with asymptotic stability; less stable deterministic systems tend to have stochastic counterparts with higher variance around equilibrium states.
Left panels: Examples of stochastic trajectories with 0 means indicated by solid lines and the standard deviations indicated by dashed lines. Insets show the same trajectories over a smaller time-window. Right panels: Corresponding power-spectral densities of the trajectories in the left hand panels. Insets show histograms of the corresponding stochastic trajectories, overlaid by the theoretical stationary distribution (black dashed line). Bottom panel: The temporal autocorrelation of the stochastic trajectories in the left hand panels can be obtained as the Fourier transform of the corresponding power spectra in the right hand panels.
Despite the fact that the trajectories in Fig. 7 have the same variance (see black dashed lines in left panels and inset plots in right panels) it is clear that they have very different temporal structure. While these differences are entirely masked by the measure of variability (which time-averages out the temporal structure), such differences are captured by the power-spectral density (see Fig. 7, right panels). For instance, the peak at ω ≈ 0.3 in the power spectrum in the upper right hand panel indicates that the trajectories in the upper left panel exhibit quasi-cycles (i.e. have a typical frequency, see inset), while the peak at ω = 0 at following decay of the power spectrum in the middle right hand panel indicates that the trajectories in the middle left panel do not exhibit quasi-cycles (i.e. do not have a typical frequency, see inset).
In the context of temporal stability, the relationship between the power spectra and the autocorrelation function 〈ξ(t)ξ(t − τ)〉 is of particular importance. By the Wiener-Khinchin theorem, we know that the autocorrelation function is given by the Fourier transform of the power spectrum. This is shown in the bottom panel of Fig. 7. The autocorrelation of the trajectory in the upper panels decays rapidly with time. In contrast, the autocorrelation of the trajectory in the middle panel decays more slowly. This can be clearly seen in the inset trajectory plots (left hand panels, top and middle). Thus we see that a distinct measure of temporal stability exists that is more appropriate over shorter time horizons; a system can be said to be ‘less stable’ over finite times if it has a more rapidly decaying autocorrelation function. This measure of temporal stability is more weakly correlated with asymptotic stability than its counterpart, variability, as it is affected by the magnitude imaginary parts of the system’s eigenvalues (rather than their real parts, as in asymptotic stability).
Figure details
Figure 1, left panels
A large random Lotka-Volterra ecosystem of the type described above was generated. Parameters used were: N = 1000, c = 50, γ = −1, σ2 = 1/4/c, b = 0.05. The solid line is the result of Eq. (6), noting that (mu =sqrt{2{sigma }^{2}/pi }). For the empirical power spectrum, we used an Euler-Maryama time-stepping method to simulate a time series of length ({t}_{max }={2}^{10}) and time step h = 2−7. The power spectrum for each species was calculated with a Fast Fourier Transform, and the result averaged over all species. The top panel shows part of the time series generated for the first species.
Figure 1, right panel
A two-trophic level model ecosystem was generated as described above. Parameters in this case were: Nx = 200, Ny = 800, cx = 20, cy = 5, α = 10, b = 1, d = 1. Time series and power spectra were computed similarly to the left panels.
Figure 2
For the left panel, we generated Lotka-Volterra ecosystems with parameters N = 1000, c = 50, σ2 = 0.5, using (b=2+(1+gamma )sqrt{left(right.}c* {sigma }^{2}left.right)) for the simulations with γ = 0 and γ = 1. Time series and spectra were computed similarly to Fig. 1. For the right panels more care is needed. Finite random matrices typically have a small number of eigenvalues that are order (1/sqrt{N}) larger than predicted by the stability boundary in the limit N → ∞. To achieve the near-instability results in this figure, we first generated the off-diagonal entries of the community matrices, then chose the birth rate b to put the rightmost eigenvalue of A exactly at zero.
Figure 3
Parameters here are: N = 500, c = 20, γ = −1, σ2 = 1/4/c, b = 0.2. For the ‘direct’ results we numerically computed the power spectral density according to the matrix formula in Eq. (17). This was preferable to simulations of the time series, as a long time horizon is required to achieve good resolution of the individual contributions to the power spectral density.
Figure 4
Parameters here are: Nx = 100, Ny = 200, cx = 20, cy = 10, α = 5, b = 1, d = 1.
Figure 5
The dataset 41467_2017_2571_MOESM6_ESM.xlsx was imported into Matlab and processed as follows: We took the average of the three reported daily measurements to construct an 88-day time series for each species. To limit boundary effects we discarded all species with at least one with zero measured abundance, in doing so retaining 100 species. The mean was subtracted and then the power spectrum fitted using the covariance method with 8th order autoregression. The model fitting was achieved with a non-linear least squares method applied to our Eq. (38), with parameters b, cσ2 (a composite parameter), γ, and an additional scale parameter for overall noise strength.
Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.
Source: Ecology - nature.com