<<

Properties of equilibria and glassy phases of the random Lotka-Volterra model with demographic noise

Ada Altieri,1 Félix Roy,2, 1 Chiara Cammarota,3, 4 and Giulio Biroli1 1Laboratoire de Physique de l’École normale supérieure, ENS, Université PSL, CNRS, Sorbonne Université, Université de Paris F-75005 Paris, France 2Institut de physique théorique, Université Paris Saclay, CEA, CNRS, F-91191 Gif-sur-Yvette, France 3Department of Mathematics, King’s College London, Strand London WC2R 2LS, United Kingdom 4Dip. Fisica, Università "Sapienza", Piazzale A. Moro 2, I-00185, Rome, Italy In this letter we study a reference model in theoretical , the disordered Lotka-Volterra model for ecological communities, in the presence of finite demographic noise. Our theoretical analysis, which takes advantage of a mapping to an equilibrium disordered system, proves that for sufficiently heterogeneous interactions and low demographic noise the system displays a multiple equilibria phase, which we fully characterize. In particular, we show that in this phase the number of stable equilibria is exponential in the number of . Upon further decreasing the demographic noise, we unveil a Gardner transition to a marginally stable phase, similar to that observed in jamming of amorphous materials. We confirm and complement our analytical results by numerical simulations. Furthermore, we extend their relevance by showing that they hold for others interacting random dynamical systems, such as the Random Replicant Model. Finally, we discuss their extension to the case of asymmetric couplings.

Introduction – Lotka-Volterra equations describing the mapped or related to models used in evolutionary game dynamics of interacting species are a key ingredient for theory and for economic systems [34–38]. We consider theoretical studies in ecology, genetics, and the case of symmetric interactions and small immigra- economy [1–6]. Cases in which the number of species is tion and work out the phase diagram as a function of very large are becoming of general interest in disparate the degree of heterogeneity in the interactions and of the fields, such as in ecology and biology, e.g. for bacte- strength of the demographic noise. Compared to previ- ria communities [7, 8], and economy where many agents ous works [5, 19, 20, 39] adding demographic noise not trade and interact simultaneously both in financial mar- only allows us to obtain a more general picture, but also kets and in complex economic systems [9, 10]. to fully characterize the phases and connect their proper- The theoretical framework used in the past for a small ties to the ones of equilibria. In particular, we shall show number of species is mainly based on the theory of dy- that the number of stable equilibria in the LV model is namical systems [11–16]. When the number of ordi- exponential in the system size and their organization in nary differential equations associated with the Lolta- configuration space follows general principles found for Volterra (LV) model becomes very large, i.e. for many models of mean-field spin-glasses. Our findings, which species, methods based on statistical physics become ide- are obtained for symmetric interactions, provide a use- ally suited. Indeed, several authors have recently inves- ful starting point to analyze the non-symmetric case, as tigated different aspects of ecology, such as we shall demonstrate by drawing general conclusions on properties of equilibria, endogeneous dynamical fluctu- properties of equilibria in the case of small asymmetry. ations, , using ideas and concepts rooted in Henceforth we focus on the disordered Lotka-Volterra statistical physics of disordered systems [5, 17–27]. Simi- model for ecological communities [5, 19] defined by the lar investigations have been also performed for economic equations: systems [28]. The complexity of dealing with a large num- ber of interacting species can actually become a welcome   dNi X new ingredient both conceptually and methodologically. = N 1 − N − α N + η (t) (1) dt i  i ij j i In fact, different collective behaviours can emerge. As j,(j6=i) it happens in physics, such phases are not tied to the specific model they come from, hence they can be char- arXiv:2009.10565v1 [cond-mat.dis-nn] 22 Sep 2020 where Ni(t) is the relative of species i at time acterized and characterize systems in a generic way [29]. t (i = 1,...S), and ηi(t) is a Gaussian noise with zero 0 0 From this perspective, it is natural to ask which kind of mean and covariance hηi(t)ηj(t )i = 2TNi(t)δijδ(t − t ) different collective behaviors arise from LV models in the (we follow Ito’s convention). This noise term allows us to limit of many interacting species and what are their main include the effect of demographic noise in a continuous properties [19, 20]. These questions, which have started setting [40–42]; the larger is the global the to attract a lot of attention recently, tie in with the anal- smaller is the strength, T , of the demographic noise. Im- ysis of the properties of equilibria [30–32]. migration from the mainland is modeled by a reflecting Here we focus on the disordered Lotka-Volterra model wall for the dynamics at Ni = λ, since this is more prac- of many interacting species, which is a representative tical for simulations than the usual way of adding a λ in model of well-mixed community ecology [33], and can be the RHS of Eq. (1) (see the Appendix for more details). 2

The elements of the interaction αij are indepen- dent and identically distributed variables such that: 2 mean[αij] = µ/S var[αij] = σ /S , (2)

that we consider in the symmetric case with αij = αji. As shown in [20], the process induced by eq. Single equilibrium phase

(1) admits an equilibrium-like stationary Boltzmann dis- T tribution: multiple equilibria phase   H({Ni} P ({N }) = exp − (3) i T

where Gardner phase

X  N 2  X H =− N − i + α N N + i 2 ij i j σ i i

0.12 t0 = 0 ]

q0 ) 0 t0 = 1 t

( 0.10 t0 = 10 N

) t = 100

t 0

( 0.08 t0 = 500 N

q1 [ q0

0.06 n o i Figure 2. Zoom on a pictorial landscape. The parameters q0 t 0.04 a and q1 denote the size of the largest and the innermost basins l e r

respectively within the two-level structure of the 1RSB phase. r 0.02 o c 0.00 of states, and hence of equilibria, using methods devel- 10 1 100 101 102 103 oped for structural glasses [44]. More specifically, we time t t0 have computed the complexity Σ (see the Appendix for details), which is defined as the logarithm of the number of equilibria with a given free-energy density f normal- Figure 3. Correlation function C(t, t0) as a function of t−t0 in ized by the number of species S. This allow us to show the one-equilibrium (Replica Symmetric) phase. The curves that the number of equilibria below the blue line in Fig. clearly collapse to the theoretically predicted value, q0, for times t0 > t . 1 is exponential in S, i.e. there is a finite complexity Σ. wait When decreasing further the demographic noise, the heterogeneity in the interactions becomes even more im- There are three sources of randomness for a given sam- portant and a second phase transition takes place. In ple: the interactions, the initial conditions and the demo- order to locate it, we repeat exactly the same procedure graphic noise. In the following, we obtain numerically the as for the single equilibrium phase but now within one average correlation function defined by of the typical states with a given free-energy f [45]. The computation is more involved (it corresponds to analyze S Nsample the stability of the 1RSB Ansatz) and leads to the con- 1 X X [N(t)N(t0)] = N r(t)N r(t0) (8) dition: E SN i i sample i=1 r=1 h i λ1rsb = (βσ)2 1 − (βσ)2h(hN 2i − hNi2 )2i = 0 R 1r 1r m-r where E[X] stands for the average over all those sources (7) of randomness. If the system size is sufficiently large where the two different averages correspond to i) the (S  1) as well as the sampling set, with Nsample  1, it intra-state average h·i1r and the inter-state average, can be shown that the stochastic process converges in law h·im-r. All technical details of the calculation will follow [48]. We generically choose S ∼ 500 and Nsample ∼ 50 in the Appendix. The critical temperature that results and eventually verify there is no (S, Nsample)-dependency from the equation above leads to the orange line in Fig. at this scale. We find that in the high-temperature phase 1. Crossing this line results in a fragmentation of each a time-translationally invariant (TTI) state is reached state into a fractal structure of sub-basins [46] (see the after a finite time-scale twait: landscape on the bottom in Fig. 1): each state becomes 0 0 0 0 a meta-basin that contains many equilibria, all of them ∀t ≥ t > twait E[N(t)N(t )] = C(t, t ) ' C(t − t ) . marginally stable, i.e. poised at the edge of stability [20], (9) and organized in configuration space in a hierarchical This convergence to a TTI regime is shown in Fig. 3. way, as it was discovered for mean-field spin glasses [43]. The long-time limit of C(t−t0) is the overlap between two This phase, which is called Gardner, plays an important generic configurations belonging to the single equilibrium role in the physics of jamming and amorphous materi- state: the dashed line in Fig. 3 is the analytical predic- 0 als [47]. Our results unveil its relevance in theoretical tion for limt−t0→∞ C(t−t ) which is in perfect agreement ecology by showing that it describes the organization of with the numerics. We have also checked that this agree- equilibria in the symmetric disordered LV-model at low ment holds upon varying T and for other observables, the enough demographic noise and for highly heterogeneous results are reported in the Appendix (see Fig. 11). From couplings. the time-dependence of C(t − t0) one can estimate the We now present numerical simulation results that con- typical time-scale characterizing dynamical fluctuations firm and complement our analytical study. We numer- within the single equilibrium phase. Formally, we define ically integrate the stochastic equation Eq. (1) using a τdecorrel by the identity: specifically designed method (see the Appendix for de- tails). The initial abundance for each species is drawn C(τ ) − C(∞) decorrel = 0.3 (10) independently in [0, 1]. (C(0) − C(∞)) 4

In Fig. 4, we plot τdecorrel as a function of (T − T1RSB), 1.00 where T1RSB is the critical value of T at which the single equilibrium phase becomes unstable (blue line in Fig. 1). We find that the thermodynamic instability is accompa- 0.95 ) 0 nied by a dynamical transition at which τdecorrel diverges t , 0 0.90 as a power law with an exponent close to 0.5, see Fig. 4. t ( t'=1e+02

For small demographic noise, i.e when T is below the C / t'=1e+03 ) blue line of Fig. 1, previous results on the dynamics of 0 0.85 t t'=1e+04 ,

mean-field spin glasses [49–51] suggest that the LV-model t

( t'=1e+05

should never reach an equilibrium stationary state, and C 0.80 instead it should display aging [52, 53]. In fact, one ex- t'=1e+06

rescaled correlation q0/qd pects that among the very many equilibria the dynam- 0.75 ics starting from high-temperature-like initial conditions q1/qd falls in the basin of attraction of the most numerous and 10 1 101 103 105 107 marginally stable equilibria, and display aging behaviour. time t-t' This is indeed what we report in Fig. 5 which shows that the longer is the age of the system, t0, the longer it takes to decorrelate. The landscape interpretation of this phe- Figure 5. Rescaled correlation as a function of (t − t0), for nomenon is that the system approaches at long times a different t0, showing aging dynamics. The dashed black and part of configuration space with many marginally stable red lines correspond respectively to the theoretical predictions for q1 and q0 both rescaled by the analytical prediction for equilibria. This leads to aging because the longer is the 0 0 time, the smaller is the fraction of unstable directions C(t t ) (called qd in the Appendix). to move, hence the slowing down of the dynamics, but the exploration never stops and eventually the system numerous applications in biology, optimization problems never settles down in any equilibrium [54–56]. The two [34, 57] as well as evolutionary game theory [58, 59], dashed lines in Fig. 5 correspond to our analytical pre- RRMs still attract great theoretical interest. The RRM, diction for the intra-state and the inter-state overlaps of which was introduced in [34] and further studied in [39], is the marginally stable equilibria. The agreement is satis- remarkably similar to the disordered LV-model we stud- factory but larger times would be needed to fully confirm ied. In the case of symmetric interactions, one can sim- it. ilarly map the problem onto an equilibrium statistical physics one with the following Hamiltonian: -0.56 slope S S X X 2 HR = − Jijxixj − a xi (11) i

T where x /S is the concentration of the ith family in the

( i l

e P r species pool subject to the global constraint i xi = S r 1 o 10

c for all xi ≥ 0. The couplings Jij are i.i.d. Gaussian

e 2 d variable with variance J /S. Provided an appropriate rescaling of the interaction matrix of the two models, we can show that the average interaction term µ for LV – standing for a purely competitive environment – plays the same role as the Lagrange multiplier that is introduced in RRM to enforce the sum of all concentrations to be 10 2 10 1 fixed. The main differences with respect to Eq. (4) is Temperature T T 1RSB the absence of the logarithmic term. Our analysis can be fully extended to the RRM, as we show in the Appendix.

Figure 4. Decorrelation time as a function of (T − T1RSB) in The main result is that the three phases we found for the logarithmic scale. The blue points correspond to numerical LV-model are present also for the RRM, and organized in data, while the dashed red line is a fit. The decay of the a phase diagram (see Fig. 8) that is remarkably similar decorrelation time in (T − T1RSB) occurs with an exponent to the one in Fig. 1. This strengthens the generality of ≈ −0.5. our results, and clarifies the nature of the glassy phase of the RRM that was first investigated in [39]. Our characterization of the phases and the dynamics Let us finally discuss how we expect our results to change of the LV-model has important consequences on related if the interactions contain a small random asymmetric systems, in particular on the so-called random replicant component. The multiple basins structure associated models (RRMs) that consist of an ensemble of replicants with the 1RSB phase should not be affected because evolving according to random interactions. Given their its basins correspond to stable stationary states, and a 5 small non-conservative random force should not desta- Appendix A: Thermodynamics and replica bilize them [60]. On the contrary, the fractal structure formalism and the into sub-basins are expected to be wiped out because of the marginal stability of the equi- The evolution of the species abundances Ni in the libria associated with it [32, 61, 62]. In absence of demo- (with i = 1, ..., S) is regulated by the following graphic noise, one therefore expects a single equilibrium dynamical equation: at small σ, which is replaced by an exponential number of chaotic attractors at large σ. The demographic noise   dNi X p adds additional dynamical fluctuations to these multiple = −N ∇ V (N ) + α N + N η (t) + λ dt i  Ni i i ij j i i equilbria and eventually makes them merge in a single j,(j6=i) equilibrium, thus leading to a phase diagram similar to (A1) Fig.1 but only with the blue line and two phases (single where ηi(t) is a white noise with covariance and multiple equilibria). 0 0 hηi(t)ηj(t )i = 2T δijδ(t − t ) and T is the tempera- In conclusion, we have unveiled a complex and rich ture. In the presence of a (demographic) noise – an structure for the organization of equilibria in a central intrinsic population randomness due to birth, death and model for ecological communities. Our results, sup- unpredictable interaction events – Eq. (A1) represents ported by dynamic simulations, highlight the relevance a generalized Langevin equation with a one-species of multiple equilibria phases for the dynamics of many quadratic potential Vi(Ni): strongly interacting species. Moreover, our findings clar- ify the glassy nature of the equilibria previously stud-  N 2  ied in [5, 19, 20, 22, 63]. As we have shown, our re- V (N ) = −ρ K N − i , (A2) i i i i i 2 sults carry out to more general contexts, in particular to models originating from evolutionary game theory. We which allows us to precisely recover the well-known expect that the collective dynamical behaviours — the Lotka-Volterra equations [64, 65]. The adimensional pa- phases — found in this work go beyond the LV-model rameter ρ = r /K denotes the ratio between the growth itself and may play an important role in a variety of con- i i i rate, r , and the , K . For simplicity, we texts from biology to economy, which can be modeled by i i will assume no species dependence on these parameters high-dimensional dynamical systems with random cou- and set r = 1, K = 1 in the following. plings. i i For a first-order analysis, the interaction matrix αij is Acknowledgments - We acknowledge stimulating dis- assumed to be symmetric: its elements are i.i.d. Gaussian cussions with G. Bunin and G. Parisi on this subject. variables with mean and variance respectively: This work was supported by the Simons Foundation 2 Grant on Cracking the Glass Problem (# 454935 Giulio mean[αij] = µ/S var[αij] = σ /S . (A3) Biroli). We can also suppose to add a small degree of asymmetry and perform a perturbative expansion. We should ex- pect, even for arbitrary small asymmetry, that the criti- cal (multiple equilibria) phase described in the main text will be suppressed, as proven long ago in spin-glass and neural network contexts [61, 62]. In the case of symmetric interactions, the dynamical equation (A1) admits an invariant probability distribu- tion in terms of an Hamiltonian operator H, as can be proven by writing the Fokker-Planck equation of the cor- responding stochastic process. More precisely, we can safely define an Hamiltonian H and solve the problem exactly within the replica formalism [43], as we will show in detail in the next Section. We thus define X X X H = Vi(Ni) + αijNiNj + (T − λ) ln Ni (A4) i i

where λ denotes an infinitesimally small species- independent immigration rate. It essentially guarantees the existence of all invadable species. Furthermore, it has to satisfy the lower bound λ with λ > T such that the probability distribution P ({Ni}) is correctly regularized at small Ni. 6

The connection with the statics is now clear: the origi- where the action reads nal dynamical process in Eq. (A1) describes the time evo- 2 2 2 2 X Q A(Q ,Q ,H ) = −ρ σ β ab + lution of a large interacting ecosystem whose thermody- ab aa a 2 a

1. Replica symmetric ansatz which depends on the effective Hamiltonian: a 2 2 X a b Heff({N }i) = − βρ σ Ni Ni Qab+ To deal with the thermodynamics of disordered sys- a

Ni  β qd q0 h where we recall that Vi(Ni) = −ρNi 1 − 2 and the immi- gration rate λ → 0+. 0.2 0.391812 0.105042 0.323492 In the thermodynamic limit, we can safely resort to 1 0.108159 0.0344899 0.185033 the Laplace method and evaluate the integral by saddle- 5 0.038878 0.014964 0.121134 point approximation. From the maximization of the action 10 0.028545 0.011976 0.107489 A(qd, q0, h), we get the corresponding for (qd, q0, h), which, 15 0.025080 0.011114 0.102506 after considering the analytical continuation n → 0, read: 20 0.023568 0.010910 0.100248 25 0.022987 0.011080 0.099264 R ∞ −βH (q ,q ,h,z) 2 ! Z dNe RS 0 d N 30 0.023028 0.011568 0.099033 Nc 2 qd = Dz R ∞ = hN i , dNe−βHRS(q0,qd,h,z) 35 0.023635 0.012435 0.099353 Nc 40 0.024938 0.013884 0.100173 ∞ 2 Z R dNe−βHRS(q0,qd,h,z)N ! 45 0.027021 0.016186 0.101385 Nc 2 (A17) q0 = Dz R ∞ = hNi , 50 0.031483 0.020585 0.103742 dNe−βHRS(q0,qd,h,z) Nc 55 0.036909 0.026430 0.106083 ∞ Z R e−βHRS(q0,qd,h,z)N 60 0.042154 0.032258 0.108096 Nc h = Dz R ∞ = hNi . dNe−βHRS(q0,qd,h,z) Nc Table I. Order parameters obtained by numerical integration where the calligraphic notation stands for the Gaussian inte- for increasing values of the inverse temperature β in the single 2 equilibrium (RS) phase. gral Dz ≡ R √dz e−z /2. 2π More precisely, the most internal average corresponds to the standard average over the Boltzmann measure, while the external one corresponds to the average over the quenched dis- 2. One-step replica symmetry breaking ansatz order. A worth noticing aspect concerns the correct choice of the extremes for the integration over N. The integral cannot In the presence of low demographic noise the RS solution is be extended over the interval [0, ∞) and a more attentive anal- no longer appropriate to describe the thermodynamics of the ysis is needed because of the term T ln N in the Hamiltonian. system, which can be more correctly identified by a one-step The logarithmic term contributes to tilting the quadratic po- replica symmetry breaking (1RSB) Ansatz. This instability tential and providing a negative, divergent trend for values is intrinsically related to the emergence of multiple minima of the abundances very close to zero. There are two alter- in the free-energy landscape, each of them associated with a natives: either play with the immigration rate λ or carefully different equilibrium configuration. According to the 1RSB select the lower cut-off in the integral over the species abun- approximation, the n replicas are now divided into n/m dif- dances, Nc (for more details, see Appendices E and F). We ferent groups of m replicas, with 0 ≤ m ≤ 1 and n/m integer. set the immigration rate to zero from the beginning of the The overlap matrix assumes now three different values computation. Conversely, we probe the optimal value of the −2 cut-off Nc, eventually set to 10 , as detailed also in E 4.  qd if a = b Lower cut-off values cannot be selected as they would result  Qab = q1 if a, b ∈ Bl (A18) in a non-optimal matching between our theoretical analysis  and numerical simulations within a Dynamical Mean- q0 if a, b 6∈ Bl Theory formalism. The solution of Eqs. (A17) is obtained by implementing where Bl stands for the group of replicas in the same block. an iterative algorithm. The iteration stops when the relative This Ansatz yields the definition of an overlap matrix with error between the value of the updated parameter and that at m − 1 off-diagonal elements equal to q1 and n − m elements the previous time step is smaller than a given precision value, equal to q0. A new parameter, m, comes into play which . We study the convergence of the equations and their stabil- is usually denoted as breaking point parameter in the replica ity as a function of the demographic noise, whose amplitude jargon. The external field is instead assumed to be uniform corresponds to the physical temperature T . The analysis at for all replicas a. zero temperature has been recently performed in [20]. Our work provides then a full and more comprehensive perspec- Ha = h , ∀a . (A19) tive. We derive the complete phase diagram starting from a high demographic noise initial condition – corresponding to Exactly as in Eq. (A9), the free energy within the 1RSB the high-temperature phase – up to a very low demographic Ansatz reads: noise (corresponding to the zero-temperature limit). Z We report below the resulting values at different inverse 1RSB 1 F = − ln dq dq dq dh eSA(qd,q1,q0,h) (A20) temperatures β ≡ 1/T obtained via the numerical integration βn d 1 0 −2 for µ = 10, σ = 1 and a cut-off Nc = 10 . Upon increasing β, the diagonal and off-diagonal value of We are now able to write the resulting expression for the the overlap matrix tend to become degenerate with (qd−q0) → action A: 0 (see Table I) and the stability matrix – which is defined by 2 2 2 n  2 2 2 the second derivative of the free energy with respect to the A(qd, q1, q0, h) = − ρ σ β (n − m)q0 + (m − 1)q1 + qd + overlap – develops zero modes, precisely at β ≈ 58. The RS 4 n 2 1 X solution is then marginally stable. In this regime, to correctly + ρµβ h + ln Z , 2 S i incorporate and describe the complexity of the landscape, a i more structured Ansatz, so-called 1RSB, must be introduced. (A21) 8

where the replicated partition function Zi turns out to be us to study the harmonic fluctuations with respect to δQab. n/m ( Thanks to symmetry group properties of the replica space, Z dz 2 Z dt i −zi /2 Y aB ,i Y a the diagonalization of the stability matrix can be expressed Zi = √ e √ dNi × 2π 2π in terms of three different sectors. Following [67], we define aB =1 a∈aB   (A22) the three eigenvalues: the longitudinal, λL, the anomalous, 2 ) ta ,i X a λA, and the replicon, λR. We are specifically interested in the exp − B − β H (N , z , t )  2 1RSB i i aB ,i  computation of the replicon mode as it is responsible for pos- a∈aB sible RSB effects. By contrast, a zero longitudinal mode can hence, according to Eq. (A16), we have: give information in terms of spinodal points describing how a state opens up along an unstable direction and originates N 2 H (N , z , t ) = −ρ2σ2β(q − q ) i + then a saddle. 1RSB i i aB ,i d 1 2 √ √ (A23) The detection of a vanishing replicon mode from the high- + (ρµh − taB ,iρσ q1 − q0 − ziρσ q0)Ni+ temperature (one single equilibrium) phase is related to the

+ Vi(Ni) + T ln Ni . appearance of marginal states. This feature is extremely important because of its intimate connection with out-of- To decouple replica indices according to a 1RSB solution, we equilibrium aging dynamics. have thus introduced a double Gaussian integration leading We consider then the variation of the RS action with re- to two different kinds of averages: i) over the single replica; spect to the overlap matrix ii) over a group of replicas in the same block of size m. The two averages correspond respectively to 2 2 2 2 2 X Qab 2 2 2 X Qaa R ∞ A(Qab,Qaa,Ha) = −ρ σ β − ρ σ β + dN exp [−βH1RSB(N, z, ta )] · 2 4 Nc B a

h = hhNi1rim-r ∂2A that can be solved iteratively up to convergence. The initial Mabcd ≡ − = ∂Qab∂Qcd condition is chosen close to the RS solution but with q1 > q0. h i 2 2 2 2 2 2 a b c d As the overlap parameters stand for the degree of similarity = β ρ σ δ(ab),(cd) − (β ρ σ )hN N ,N N ic between two replicas in the same block or in different blocks, (A29) the found solution is thermodynamically relevant only if qd > q1 > q0. Indeed, in the very low-temperature limit, qd → q1, where the subscript h·ic denotes the connected part of the similarly to the analysis we have performed for the RS solution correlator. When evaluated at the saddle point and in the (see A 1). limit n → 0, the stability matrix (A29) can be decomposed The determination of the breaking parameter m requires as a function of three different correlators more attention. We can follow different routes depending on   whether one aims to find the m-value that optimizes the ex- δacδbc + δadδbc Mabcd =Mab,ab + pression of free energy or the one that identifies the aging 2 solution in a dynamical framework. In this second case, the  δ + δ + δ + δ  (A30) +M ac bd ad bc + parameter m is chosen in such a way that the found solu- ab,ac 4 tion is marginal: one optimizes over the parameters in Eq. (A26) while selecting m accordingly to the marginal stability +Mab,cd condition. We will devote the next Section to a detailed ex- from which the projection on the replicon subspace is planation of what marginal stability means and what kind of consequences it yields for the system.   2 2 λR = (βρσ) 1 − (βρσ) (Mab,ab − 2Mab,ac + Mab,cd) (A31) 3. Meaning of the replicon eigenvalue of the The h·i is performed over the effective Hamiltonian, while the stability matrix average over the quenched disorder is always denoted as ·. The replicon mode gives information about the fluctuations To investigate the stability of the different phases, we in- inside the innermost block of the overlap matrix, correspond- troduce the Hessian matrix of the free energy, which allows ing to the fluctuations within the same state. According to 9 this structure and the different combinations of the replica For the first time in an ecological context we are able to prove indices, three elements must be determined in a rigorous way the analogy between glassy physics and com- plex energy landscapes in large , with respect to Mab,ab − 2Mab,ac + Mab,cd = previous studies in this direction [20, 22]. h i (A32) h(N a)2(N b)2i − 2h(N a)2N bN ci + hN aN bN cN di

Appendix B: Derivation of the complete phase diagram

Our analysis, based on increasingly structured Ansatz, has allowed us to derive the complete phase diagram of the Lotka-

Volterra model as a function of the demographic noise. By varying this control parameter, we have highlighted the exis- tence of different phase transitions of increasing complexity. Thus far the only available results have been obtained without R

λ demographic noise, exactly at zero temperature [19].

T Single equilibrium phase

Figure 6. Replicon eigenvalue obtained within the replica T symmetric (RS) Ansatz for µ = 10, σ = 1 (in orange) and multiple equilibria phase σ = 0.85 (in green) as a function of temperature. Below the dashed black line corresponding to the zero value, the replicon becomes negative and makes the RS approximation no longer valid. Upon decreasing σ, the transition towards the 1RSB phase occurs at a lower critical temperature. Gardner phase

In the simplest scenario corresponding to the presence of one single equilibrium, the expression for the replicon eigen- σ value can be further simplified as: h i Figure 7. Two-dimensional phase diagram of the Lotka- 2 2 2 2 2 λR = (βρσ) 1 − (βρσ) (hN i − hNi ) , (A33) Volterra model in the presence of demographic noise as a function of the heterogeneity parameter σ (in the presence where the averaged difference describes the fluctuations be- of the logarithmic term and with a selected value of the cut- tween the first and second moment of the species abundances −2 off Nc = 10 ). We can distinguish three different phases: i) within one state, namely between the diagonal value qd and a single equilibrium phase above the blue line; ii) a multiple the off-diagonal contribution q0 of the overlap matrix. The equilibria regime (1RSB stable phase) between the light blue difference between the two overlap values can also be inter- and the orange lines; iii) a Gardner phase, characterized by preted as the response function of the single species to an in- a hierarchical organization of the different equilibria in the finitesimal perturbation. A large, diverging response – which free-energy landscape. is related to the inverse of the replicon mode – is a further evidence that the system is close to a critical point. We can repeat exactly the same procedure to obtain the In correspondence of the blue line in Fig. (7) the landscape replicon in the 1RSB Ansatz. The analysis of harmonic fluc- structure is no longer identified by a single equilibrium but tuations proceeds exactly as for the RS case. The only dif- should be replaced by a two-level hierarchy, which results in ference now is that – as for Eqs. (A24)-(A25) – we have to the appearance of new equilibrium configurations. distinguish between the intra-state average and the inter-state In particular we have realized that with very low demo- average, that is over a bunch of replicas in the inner block of graphic noise the system undergoes a Gardner transition to size m. a new marginally stable phase: each amorphous state, say h i a basin, is fragmented into a fractal structure of sub-basins 1rsb 2 2 2 2 2 λR = (βρσ) 1 − (βρσ) h(hN i1r − hNi1r) im-r , (A34) (metabasin). The internal structure of states in which a basin splits is described by the Full RSB solution of the partition The value at which the 1RSB replicon vanishes signals a crit- function, according to which the replica symmetry is broken ical phase transition towards a more structured phase. This an infinite number of times. Similar to what observed in low- so-called Gardner phase turns out to be characterized by a temperature glasses, such a transition will revolutionize our hierarchical organization of the different equilibria, whose an- understanding of ecosystems. The emergence of a infinite hi- alytical solution is well described within a Full RSB Ansatz. erarchy of scales for the order parameter is also related to an 10

infinite number of time-scales playing a central role in popu- playing the same role as the αij s in our notation. xi are real P lation dynamics, as we will discuss in the next Sections. variables subject to the global constraint i xi = S, ∀xi ≥ 0 What a Full RSB regime precisely yields for biological and with i = 1, ..., S. One can introduce a Lagrange multiplier γ ecological settings with the appearance of an abundance of to enforce the normalization condition over xi, which leads to soft modes is particularly fascinating and still an open matter the following expression for the partition function: of debate. Z S S Z i∞  Y X X 2 Z = dxi dγ exp − β Jij xixj − βa xi + 0 i=1 −i∞ ij i Appendix C: Results for the spin-glass model X  without logarithmic interaction − γ (xi − 1) . i (C4) We consider exactly the same system without the loga- rithmic interaction in the species abundances. In the limit As usual, one can introduce the replica trick to average over λ → 0+, the resulting Hamiltonian is the quenched variables Jij and thus rewrite Eq. (C4) as X X Z  H = Vi(Ni) + αij NiNj (C1) X 2  Zn = dγαTrnS exp − S βaXα + γα(Xα − 1) + i ij α 2 2 2  where the first term has the same quadratic dependence in the S β J X 2 2 + X X species abundances as in Eq. (A2), while the latter represents 4 α β αβ the pairwise interacting part of the Hamiltonian. In theoreti- (C5) cal physics, Eq. (C1) is an example of spin-glass model where the degrees of freedom can be either discrete variables, to where X are exactly the same n variables as before that have model magnetic spins, or continuous variables. The couplings now lost their dependence on the index i because of the equiv- between spins are chosen randomly, taking both positive and alence of all sites. By introducing the overlap parameter Qαβ negative values and thus resulting in frustration and non- between Xα and Xβ , one obtains convex optimization phenomena. The simplest and most clas-   sical example of spin glass is represented by the Sherrington- Z X 2 X Kirkpatrick (SK) model [68] where each spin variable interacts Zn = dγαdQαβ exp −S Qαβ + S γα × with all the others in a fully-connected topology. αβ α (C6)

× TrnS exp [SL(Q, γ, X)]

1. Connections with the random replicant model where the action L(Q, γ, X) is

X X 2 X L(Q, γ, X) ≡ βJ Q X X − βa X − γ X . In theoretical ecology, a similar model was first introduced αβ α β α α α αβ α α by Diederich and Opper in the 80s, studying the mean-field (C7) dynamical evolution of S randomly interacting species with The second term, absent in the ordinary SK model, is actually a deterministic self-interaction [34]. This pioneering model due to the global quadratic constraint on the species concen- is usually known as replicator model. Later on, a detailed trations. Using the same Ansatz as in [39] and optimizing study was also performed in [39] by using the replica formal- over Q and γ with the following choice: ism in the zero-temperature limit. Even though without the αβ α ( demographic noise, this model turns out to be not partic- Q = qδ + t ularly interesting in a purely ecological context, it can still αβ αβ (C8) provide further insights on the replicator equations in many γα = γ other interdisciplinary domains [69], such as in the study of one can get to writing the replica symmetric action Nash equilibria [70] in Game Theory. Given S species, the Lyapunov function of the replicator X 2   X L (q, t, γ, X) = −β(a − qJ) X + 2zpβJt − γ X model is written as a function of the concentration variables RS α α α α xi in the following way (C9) where the auxiliary Gaussian variable z has been introduced S S X X 2 to decouple replicas. Because under this transformation the H = J x x − a x (C2) R ij i j i integrals become independent, one can safely forget the de- i

X  −ρX 1 − 2 with respect to the original model proposed in Exactly as for the previous analysis, we have performed [39], where we have replaced N ↔ X for consistency of nota- both a RS and 1RSB computation. In the former, the saddle- tion. We can thus conclude point equations read:  2 2  ρ − ρ σ β(qd − q0) ⇐⇒ −βJ(a/J − q) √ p (C11) (ρµh − zρσ q0 − ρ) ⇐⇒ −2z t˜− γ˜ . ∞ ! Z R dNe−βHRS(q0,qd,h,z)N 2 The Lotka-Volterra model embeds a quadratic one species po- 0 qd = Dz R ∞ , 2 dNe−βHRS(q0,qd,h,z) tential as a function of Ni , which contributes to shifting the 0 linear and quadratic terms of an amount ρ. The parameter ∞ !2 Z R dNe−βHRS(q0,qd,h,z)N γ˜ in the random replicant model is related to the (competi- 0 q0 = Dz ∞ , (C13) R −βHRS(q0,qd,h,z) tive) interaction term µ, while a˜ ≡ a/J is associated with the 0 dNe heterogeneity parameter σ. ∞ Z R e−βHRS(q0,qd,h,z)N In [39] it was shown there exists a critical value of the con- 0 √ h = Dz R ∞ . a dNe−βHRS(q0,qd,h,z) trol parameter a˜ =≡ J , a˜c = 1/ 2, below which the system 0 develops non-ergodic features and replica symmetry breaking effects. At higher values, irrespective of the initial condi- tions, only one equilibrium is possible, whereas in the region characterized by a˜ < a˜c the final configuration is strongly affected by a small perturbation that can allow the system to reach different equilibria. This last phase corresponds to a high- scenario between the interacting species. Interestingly, the replicator model can be proven to have a where now the integral over N is extended over the entire one-to-one mapping with many different problems of interest positive axis without fixing any cut-off. Dz denotes, as usual, in optimization and disordered systems. the Gaussian integration over the auxiliary variable z – which is introduced to decouple replicas – with zero mean and unit variance. The RS Hamiltonian then reads: 2. Exact solution in the replica symmetric case

The following analysis focuses on the Lotka-Volterra Hamil- tonian, as reported in Eq. (A4), and considered in the absence N 2 √ of the logarithmic term. We will derive exact expressions for H (N, z) = − ρ2σ2β(q − q ) + (ρµh − zρ q σ)N + V (N) RS d 0 2 0 the order parameters to be analyzed as a function of temper- N  2 2  √ ature up to T = 0. In this case, the temperature explicitly = ρ − ρ σ β(qd − q0) + (ρµh − zρσ q0 − ρK) N. comes out in the weighting factor exp(−βH) and implies for 2 (C14) the replicated partition function:   Z 2 Y X (αij − µ/S) Zn = dN adα exp − − βH({N }) i ij  2σ2/S i  i,(ij) (ij) Therefore, Eqs. (C13) can be exactly computed in terms of (C12) the error function and its combinations, i.e.

√ (" βρ(K−hµ+ q zσ)2 Z − 0 √ 2−2(q −q )βρσ2 p 2 qd = Dz e d 0 2(K − hµ + q0zσ) βρ[1 − (qd − q0)βρσ ]+

√ 2 βρ(K−hµ+ q0zσ) √  √  2−2(q −q )βρσ2  2 2 2 e d 0 2π 1 + βρ (K − hµ) + 2 q0z(K − hµ)σ + (q0 − qd + q0z )σ × (C15)

 √ !!# ) βρ(K − hµ + q0zσ) 1 × 1 + Erf √ √ , p 2 2 2 βρ(1 + q0βρσ − qdβρσ ) 2Z

√ √ (" βρ(K−hµ+ q zσ)2 βρ(K−hµ+ q zσ)2 Z − 0 0 √ √ 2−2(q −q )βρσ2 2−2(q −q )βρσ2 p 2 2 q0 = Dz e d 0 e d 0 πβρ(K − hµ + q0zσ) + 2βρ(1 + q0βρσ − qdβρσ )+

√ 2 (C16) βρ(K−hµ+ q zσ)2 " √ #!# ) 0 √ √ βρ(K − hµ + q0zσ) 2−2(q −q )βρσ2 1 + e d 0 πβρ (K − hµ + q0zσ) Erf √ , p 2 2 2 βρ(1 + q0βρσ − qdβρσ ) Z 12

√ βρ(K−hµ+ q zσ)2 Z √ √ √ − 0 2−2(q −q )βρσ2 p 2 2 h = Dz πβρ(K − hµ + q0zσ) + 2e d 0 βρ(1 + q0βρσ − qdβρσ )+  √  (C17) √ √ βρ(K − hµ + q0zσ) 1 + πβρ(K − hµ + q0zσ)Erf √ , p 2 2 2 βρ(1 + q0βρσ − qdβρσ ) Z where the partition function reads:  √ ! √ 2 2 βρ(K − hµ + q0zσ) Z = πβρ[1 − (qd − q0)βρσ ] 1 + Erf √ . (C18) p 2 2 2 βρ(1 + q0βρσ − qdβρσ )

Exactly as for the previous Section where we have derived the equilibrium configuration even starting from different initial expression for the replicon eigenvalue, we have here: conditions. As shown in Fig. (8), upon decreasing T new h i phases emerge, leading respectively to an intermediate stable 2 2 2 2 2 λR = (βρσ) 1 − (βρσ) (hN i − hNi ) , (C19) 1RSB phase and a Gardner phase in the very low-temperature limit. 2 2 where the expressions for the averaged values hN i and hNi We have thus obtained the complete phase diagram at fixed correspond precisely to qd and q0 obtained in Eqs. (C15)- µ = 10. (C16) according to a RS Ansatz. The overline denotes the average over the quenched disorder, which is technically im- plemented by integrating over the Gaussian variable z.

3. Replica symmetry broken case

RS phase The computation can be easily generalized to more complex scenarios. In particular, in the 1RSB case the Hamiltonian reads T

2 N H (N, z, t) = ρ − ρ2σ2β(q − q ) + 1RSB stable phase 1RSB 2 d 1 √ √ +(ρµh − tρσ q1 − q0 − zρσ q0 − ρK)N

(C20) with the only difference of considering now the double Gaus- sian integration over z and t that account respectively for the Full RSB phase single replica average and the m-block average. Even though the structure of the resulting equations for (qd, q1, q0, h), we are still able to get an exact closed-form derivation. Exactly σ as before for the most general case, the saddle-point equations read Figure 8. Two-dimensional phase diagram showing the insta- bility lines respectively for the one equilibrium (RS) phase 2 qd = hhN i1rim-r and the multiple equilibria phase (1RSB) as a function of σ 2 (without the logarithmic term). Between the two lines (in q1 = hhNi1rim-r (C21) light blue and orange respectively) a stable 1RSB phase per- 2 q0 = hhNi1rim-r sists. The red dot corresponds to the analytically predicted h = hhNi1rim-r value in the zero-temperature√ limit allowing for the estimation of the critical value σc = 1/ 2 ≈ 0.707. to be solved iteratively.

In Eqs. (C11) we have derived the exact mapping between 4. Derivation of the phase diagram: evidence of a our model and the Random Replicant Model (RRM), pointing Gardner phase out how the mean and the variance of the interaction matrix are essentially related to the Lagrange multiplier γ˜ and the By fixing the carrying capacity K = 1 and ρ = 1 in Eqs. parameter a˜ ensuring the global quadratic constraint. In our (C15)-(C16)-(C17), we have explored the phase space as a case the phase diagram does not display any special depen- function of the parameter β = 1/T along with the variation dence on the mean interaction µ and can be thus analyzed of the mean and the variance µ and σ respectively of the at fixed value, by changing only the heterogeneity and the interaction matrix. The equations (C13) have been solved demographic noise. However, at variance with the original iteratively starting from the high-temperature region up to RRM model, fixing µ would correspond to allowing the sum zero temperature. For high values of σ and T there exists of the species concentrations to vary, i.e. injecting or remov- only one equilibrium: the system is thus able to recover its ing species in the ecosystem. 13

∗ Appendix D: Derivation of the complexity free-energy states with f = f0 and, as a consequence, Σ(f0) = 0. In this phase, the number of states is sub- We aim to determine the number of local minima N of the exponential in the system size. free energy corresponding to the different equilibrium config- While in the very high-temperature phase, the paramagnetic urations in the landscape structure. The logarithm of the solution is always present, for T < Td, it disappears and is number of minima divided by S defines the complexity Σ(f) replaced by a non-trivial combination of states. To explic- (a.k.a. configurational entropy) of the ecosystem. This pro- itly compute the complexity of the system, Σ, and grasping vides a crucial information to determine what kind of univer- the physics behind it, several techniques have been proposed sality class the system belongs to. In particular, in statistical in the last decades. In the following, we will focus on the physics of disordered systems two main universality classes so-called real replica method [44]. It consists in replicating m are well-known: i) spin-glass models, in which the number of times the system and coupling the different copies through an minima of the free energy is not exponential in the system size infinitesimally small parameter , which will be sent to zero and the free energy barriers are sub-extensive; ii) structural at the end of the computation after the thermodynamic limit. glasses, for which the number of free-energy minima is actu- This attractive coupling naturally breaks the replica symme- ally exponential in the system size. Then, there exists a finite try: it constrains the m copies to be in the same metastable temperature range, between a static transition temperature state yet remaining uncorrelated within a state. As a conse- Ts and a dynamical transition temperature Td, within which quence, the free energy can be simply written as m times the the complexity turns out to be finite. individual contribution fα. In this case: As we deal with mean-field models, we can resort to a sim- Z X −Nmβfα(T ) N[Σ(f,T )−βmf] plified description for which the total partition function of the Zm ≡ e = dfe (D5) model can be expressed as the sum of α pure states contri- α butions. More precisely, we can define a generic effective po- and, by evaluating the integral by saddle-point method, we tential as a function of local order parameters whose minima get a similar expression to (D4) are in correspondence one-to-one with the so-called Thouless- Anderson-Palmer states [43, 71–73]. Provided the number of ∂Σ(f, T ) = βm (D6) minima of the free energy is exponential in the system size, ∂f f ∗(m,T ) the partition function can be expressed as: where one can immediately notice that the breaking parame- Z X −βNfα(T ) X −βNf ter m has a clear counterpart in the study of the complexity. Z ∼ e = df δ(f − fα(T ))e = Fixing the temperature and varying only the parameter m, α α (D1) one can expand the complexity around its minimum and ob- Z ∗ ∗ dfρ(f)e−βNf ∼ eN[Σ(f ,T )−βf ]n . tain: Σ(f, T ) ≈ Σ(f0) + a(T )(f − f0) + ... (D7) Therefore, the configurational entropy corresponds to which implies that for m = 1 the static transition is the so- lution of the equation a(T ) = 1 , whereas at small m the 1 X T Σ(f, T ) ≡ ln δ(f − f (T )) (D2) condition is precisely replaced by Eq. (D6). S α α The free-energy density of a system of m different copies

∗ can thus be rewritten as [74] while f ∈ [f0, fth] satisfies the extremal condition: 1 d φ(m, β) = − ln Zm = min [βmf − Σ(f)] = [f − (1/β)Σ(f, T )] = 0 (D3) βN f (D8) df =βmf ∗(m, β) − Σ(f ∗(m, T )) . namely dΣ(f, T ) 1 Generalizing the canonical definition of entropy applied to dis- = . (D4) ordered systems, the complexity is thus defined as the Leg- df T endre transform of the free energy averaged over quenched Three different regimes can be generically observed in mean- disorder. field models: From the parametric plot of f ∗(m, β) and its transform • i) in the high-temperature phase (corresponding to high Σ(m, β), one can extract the information about the behavior demographic noise), namely for above the dynamical of the configurational entropy at any temperature and, con- transition temperature, the paramagnetic state domi- sequently, of the associated TAP states. Therefore, Σ can be nates the free-energy density for any value [f0, fth]; explicitly calculated from φ(m, β) or, thanks to the identity: • ii) between the dynamical and the statical transitions, φ(m, β) = mF 1RSB (D9) there exists a value f ∗ such that the quantity f ∗ − (1/β)Σ(f ∗) evaluated in f ∗ coincides with the paramag- from a direct computation of the 1RSB free energy netic value of the free-energy density. However, in this 2 d  1RSB second regime, the resulting state is composed by an Σ =m βF = dm exponential number of metastables states of individual ∗  Z  2 d 1 SA(q ,q ,q ,h) free-energy density f . Upon crossing the dynamical = − m ln dqddq1dq0dh e d 1 0 . temperature, the free energy preserves its analyticity dm n without undergoing any true phase transition; (D10) • iii) For temperatures lower the static transition tem- We compute then the derivative of the free energy w.r.t m, perature, the leading contribution is due to the lowest which eventually leads to 14

ta dta − B m 2 2 2 2 t R √ B 2 Z Z aB  Z e A(z, ta ) ln A(z, ta ) m ρ σ β 2 2 dtaB − m 2π B B Σ = (q − q ) + Dz ln √ e 2 A(z, ta ) − m Dz (D11) 1 0 B dta 4 2π R √ B A(z, t )m 2π aB

where we have denoted as A(z, taB ): Appendix E: Comparison theory and numerics Z −βH (N,z,t ) 1RSB aB A(z, taB ) ≡ dNe (D12) 1. Protocol

We quantitatively evaluate the above expression within the For comparing with the theoretical results, we sample the 1RSB phase to determine the nature of the emerging transi- dynamical system presented in Equation (1). The input pa- tion. We find strictly positive values of complexity at finite rameters of a sample are the system size S, the interaction temperature and fully compatible with the results previously matrix parameters (µ, σ), the immigration λ, the strength of obtained at zero temperature [20]. We manage then to prove the demographic noise T (temperature), and the initial con- that the emergent 1RSB stable phase is actually character- dition distribution P[{Ni(0)}i=1..S ]. In order to sample one ized by a finite complexity, i.e. an exponential number of realization of the ecosystem, we perform the following steps: metastable states. Note also that, because the replicon 1RSB becomes negative below the Gardner transition temperature, 1. We sample the S-sized symmetric interaction matrix α, the complexity is well-defined only in the region for which the from the Gaussian distribution with scaled parameters 1RSB can be safely applied, i.e. in the interval [f0, fG], fG (µ, σ). being the free-energy density at the Gardner transition. 2. We sample the initial conditions N (t = 0) from the Within this formalism, it is also possible to reproduce i distribution P[{Ni(0)}i=1..S ]. For instance, we use a the complexity curves at different and fixed m starting factorized uniform distribution in [0, 1]: from its equilibrium value m∗. The self-condition equation 1RSB ∗ ∂F /∂m = 0 gives indeed the equilibrium value m , which S corresponds to the lowest free energy density and then to a Y P[{Ni(0)}i=1..S ] = 1{Ni(0) ∈ [0, 1]} vanishing complexity. The resulting complexity curve is ex- i=1 pected to have an increasing trend for lower values of m up to a maximum point where unstable states start to appear and where 1{.} is the indicator function. dominate the thermodynamics. t=0..tmax 3. We sample the demographic noise {ηi(t)}i=1..S , from the white-noise distribution, with temperature T . 4. Then, all three random contributions (interactions, ini- tial conditions and demographic noise) have been dealt with. We can then integrate deterministically the sys- t=0..tmax tem, to end up with {Ni(t)}i=1..S , where tmax is the temporal extent for the simulation. Actually, the above 3 and 4 points are a bit more involved: the implementation of immigration is detailed in Appendix F, and the exact numerical scheme we used is presented in Ap- pendix G. But for simplicity’s sake, let’s focus on this frame- work: we fix parameters (S, µ, σ, λ, T ), we sample the three random contributions, we integrate, and we obtain the species t=0..tmax over time {Ni(t)}i=1..S . When we reproduce different sets of data by keeping the same parameters, but sampling different randomness, we ob- tain {N r(t)}t=0..tmax . i i=1..S, r=1..Nsample

2. Observables

In order to compare with the theory, we need to decide on the observables. So far, there are four sources of statis- tics in the process: the three random parts (interactions, ini- tial conditions and demographic noise) that we labelled with r = 1..Nsample, and the species themselves i = 1..S. In the following, we will denote E[X] the average over all those con- tributions. For example:

S Nsample 0 −1 −1 X X r r 0 E[N(t)N(t )] = S Nsample Ni (t)Ni (t ) i=1 r=1 15

It can be shown [48] that if the system is large enough 0.5 (S  1) and the sampling thorough enough (Nsample  1), [N(t)] there is a convergence in law of the process. Mainly, there is h a well defined limit (S, Nsample → ∞) that we can compare 0.4 [N(t)2] with the theory. To fix ideas, we generically use S ∼ 500 qd and Nsample ∼ 50, and we checked there is no (S, Nsample) dependency at this scale. More precisely, in the S → ∞ limit, 0.3 the free energy is self-averaging, so results should typically not depend on the realization of the sampling. Here for the numerics, as 1  S < ∞, we still use some averaging over the 0.2 samples to get cleaner data. The theory is a thermodynamical one, so we will first as- 0.1

sume that if we wait for a big-enough twait, the system will one time observables reach a time-translationnally invariant (TTI) state. For in- stance, the two-time correlation C is a function of the time 1 0 1 2 3 difference: 10 10 10 10 10 time 0 0 0 0 ∀ t ≥ t > twait, E[N(t)N(t )] = C(t, t ) = C(t − t ) We check this numerically. The waiting-time depends on Figure 9. RS one time observables converge in time. Pa- the parameters, mainly (σ, T ). However, if we lie in the rameters are (S, µ, σ, λ, T ) = (500, 10, 1, 10−2, 10−1). This replica-symmetric (RS) phase, we can always find the TTI data comes from only one sample of the process, with dis- 2 −1 state, for rather small waiting times twait ∼ 10 . crete timestep dt = 10 . The dashed lines correspond to the All the comparisons we will be making are in this state read TTI value of h and qd. (t ≥ twait), for the RS phase. We will now use a mapping between thermodynamics properties, and dynamical ones. We use the notations from Equations (A13). 0.12 t0 = 0 ] ) 0 t0 = 1 h = [N(t)] t E ( 0.10 t0 = 10  2 N qd = C(0) = E N(t) ) t = 100

t 0

( 0.08 q0 = lim C(τ) = lim [N(t)N(t + τ)] ∼ [N(t)N(tmax)] t0 = 500 τ→∞ τ→∞ E E N [ q0

The lhs is predicted by the theory, and the rhs are numer- 0.06 ical observables. n o i

t 0.04 a l e r

3. Example of numerical results in the RS phase r 0.02 o c On figure 9, we show that one time observables such as 0.00  2 E [N(t)] or E N(t) converge to a constant value in time. 10 1 100 101 102 103 This indicates the reach of a TTI state. It can be confirmed time t t0 by the collapse of two-time observables such as the correla- 0 0 0 0 tion E[N(t)N(t )] = C(t, t ), that we plot as C(t − t , t ) for 0 0 0 different t on figure 10. Figure 10. RS correlation E[N(t)N(t )] = C(t, t ), plotted 0 0 We can see that for t > twait ∼ 20 here, the system is as a function of t − t for different t . This data is from the indeed TTI, at least regarding these observables. We then same sample as figure 9. We see that, up to fluctuations, the read the values of h = [N(t)] and q = N(t)2 0 0 E TTI d E TTI correlation collapse as a function of t − t for t > twait ∼ 20. when they stabilize. And we read q0 = E [N(t)N(tmax)]TTI The dashed line correspond to the read TTI value of q0. Here, on the collapse of figure 10. the timescale for decorrelation is around τdecorrel ∼ 10. We can also infer a relevant information from figure 10: the timescale for decorrelation τdecorrel. We are only interested in the scaling of this observable, so we introduce a rough On figure 12, we show how the timescale for decorrelation estimate. We approximate τdecorrel by the needed time so that τdecorrel diverges as we approach the 1RSB transition from the decorrelation decay is of 70%. Mathematically, τdecorrel above in temperature. Data seems to indicate a critical ex- is then determined by: −1/2 ponent as τdecorrel(T ) ∼ (T − T1RSB ) .

C(τdecorrel) − C(∞) = 0.3 (C(0) − C(∞))

5. Rough results in the 1RSB phase 4. Match in the RS phase In the 1RSB phase, thermodynamics indicate that the sys- The results are presented on figure 11: the theory matches tem no longer reaches a TTI state. Instead, it presents aging beautifully the numerics. behaviour: the older the system is, the slower it becomes. In 16

0.14 -0.56 slope

h 0.12

0.10 ) T ( 1 l

10 e r

r 1 o 10 c e d

d 0.04 q

0.02 10 1 10 2 10 1 0.03 T1RSB Temperature T T theory 1RSB

0 numerics

q 0.02 Figure 12. Critical slowing down of the dynamics. We plot the decorrelation time τdecorrel(T ) as a function of T −T1RSB , in a 0.01 10 1 loglog scale. Blues crosses come from the same numerical data Temperature as figure 11. Red dashed line is a simple fit. As we approach the transition, the system becomes slower and slower, and the dynamical timescale diverges. Figure 11. Comparison with the theory in the RS phase. Parameters are (S, µ, σ, λ) = (500, 10, 1, 10−2). We consider the observables (h, qD, q0) as a function of temperature. The 1.00 orange full line is the theory predictions. Blue crosses are numerical results, error bars are taken with respects to the 0.95 Nsample = 50 different samples of the ecosystem. We found ) 0 twait ∼ 200 to be enough to observe TTI state in all these t , values of temperature, except for the last point on the left 0 0.90 t (T = 2.102): due to slowing down of the dynamics, we had to ( t'=1e+02 C / t'=1e+03 increase the extent of the simulation and found twait ∼ 3000. ) 0 0.85 the orange dashed line correspond to the critical temperature t t'=1e+04 , t at which the theory becomes 1RSB. Indeed, numerically we ( t'=1e+05

C 0.80 can’t observe TTI state below this temperature, even increas- t'=1e+06 7 ing tmax to 10 .

rescaled correlation q0/qd 0.75 q1/qd the simplest case of aging, there is a good understanding of 10 1 101 103 105 107 the correlation decay C(t, t0). At equal time, the correlation is 0 0 time t-t' the dynamical one C(t , t ) = qd. Then it decorrelates quickly 0 0 for t > t to an intermediate plateau C(t, t ) = q1 < qd, as the system explores the neighbouring phase space. Eventu- Figure 13. 1RSB aging. Parameters are 0 −2 ally, for t  t , the correlation decreases to a final plateau (S, µ, σ, λ, T, Nsample) = (2000, 10, 1, 10 , 1/80, 40). We 0 0 0 0 C(t, t ) = q0 < q1. The timescale from the intermediate plot the rescaled correlation C(t, t )/C(t , t ) as a function of plateau to the final plateau increases with the age t0 of the t − t0, for different t0. The different curves no longer collapse, system. These theoretical predictions are compared with nu- there is no TTI state anymore. In dotted black and red lines, merical results on figure 13. we respectively show the predictions for the intermerdiate and final plateau values. They do not coincide exactly with the data, but the trends correspond. Appendix F: Mathematical issues for immigration implementation function I(N). Immigration is generically implemented so In this part, we detail the mathematical issue for immi- that the populations do not go too close to 0. In the usual gration implementation. This problem is independent on the immigration, I(N) = 1, but we will see that this is problem- interactions, so we drop them (α = 0 here). We consider the atic. following one-species Ito-stochastic process: We want to have a hint at the stationary distribution of population P∞(N) = P (N, t = ∞). In order to obtain it, we dN √ = N(1 − N) + 2T N η + λI(N) (F1) change variables so that the noise becomes additive, and not dt multiplicative√ any more. Here the relevant change of variables with white noise hη(t)η(t0)i = δ(t − t0), and immigration is s(t) = N(t), and Ito’s lemma gives: 17

noise becomes treatable, the deterministic part becomes ds s2 − s4 + λI(N) T/4 = − + p2T/4 η numerically unstable. Most articles then study the√ numerical dt 2s s integration of processes such as N˙ = α + βN + σN η. Then we use Langevin-Boltzmann to read the stationary distribution. [75] proposes Balanced Implicit Method: they implement In the usual immigration I(N) = 1 case, the stationary a clever discretization scheme so that the boundaries (pos- distribution is always integrable: itivity) are respected. The scheme amounts to Euler’s for small time step. It needs a small regularization. It does 1 N 2 not work for LV, because it needs very small regularization P (N) = Z−1N λ/T −1 exp (N − ) ∞ T 2 parameter and time-step to give good results. This is too heavy numerically. However, the corresponding effective potential Veff (N) be- haves repulsively around N = 0 only if λ > T : [76] derives the exact Fokker Planck solution of a simpler system. But sampling is inefficient (rejection method). [77] N 2 Veff (N) = −N + − (λ − T ) ln N builds on this method by improving the sampling method, but 2 this still isn’t satisfactory. Eventually, [78] improves again the Indeed, if we introduce an approximate induced cut-off method, by exactly solving (Fokker-Planck) the full process. −b value Ncut(b) such that P∞(N < Ncut) ∼ e  1, the scal- The sampling is clever, with Poisson variables. They also −bT /λ indicate a way to solve more elaborate processes, which we ing yields Ncut(b) ∼ e , which means that the density is still relevant up to e−bT /λ  1. will detail in the following section. Our strategy is heavily based on [78]. Basically, this means that demographic noise with usual im- migration will not prevent populations from reaching very low values. The usual immigration is not strong enough when fac- ing demographic noise. This is indeed problematic, because 2. Our implementation whenever we will want to actually compute observables, the integrals will be dominated by the domain N ∼ 0. This The idea from [78] is to separate the process into solvable is wrong physically (important species should be the high ones. More precisely, we want to solve: population ones), and difficult numerically (integration is ill- defined). √ 2 X  N˙ = N η −N −N α N − 1 ...+hardW all(λ) In order to solve this, we can implement stronger immi- i i i i i ij j gration such as I(N) = N −α with α > 0. However, another (G1) even simpler physical solution is to impose a hard repulsive where hardW all(λ) implements the hard wall boundary at boundary condition on the problem: an infinite potential at N = λ. We will discretize time with a timestep dt, and further 0 N = λ. In this case, the same steps can be performed and we subdivise it into three timesteps dt = dt/3. We consider that obtain the stationary distribution: only one part of the process is active during a subtimestep dt0. So the final scheme is the following: 1. From [76], we know how to sample efficiently the demo-  1 N 2  P (N) = Z−1N −1 exp (N − ) 1{N > λ} graphic noise only ∞ T 2  N (t)  N˜ (t + dt0) = Gamma Poisson[ i ] T dt0 which is well-behaved. This is the solution we chose for i T dt0 both the theory predictions and the numerics. We will now This corresponds to a process which only feels the de- detail in the next section how to integrate this process nu- √ mographic noise N˙ = N η during [0, dt0]. We re- merically. i i i spectively used the notation Poisson[ω] (Gamma[ω]) for random Poisson (Gamma) variables, with parameter ω. 2. Treating immigration as a reflecting wall. The particle Appendix G: Numerical scheme to sample wishes to go to N˜ but bounces on the wall. demographic noise i 0 0 Ni(t + dt ) = λ + |N˜i(t + dt ) − λ|

1. Litterature review 0 0 3. During [dt , 2dt ], only integrate the blue process N˙ i = 2 −Ni : Numerical simulations need discrete time. However, N (t + dt0) when discretizing time with bounded random processes, 0 i Ni(t + 2dt )= 0 0 one often encounters a non-zero probability that during one 1 + dt Ni(t + dt ) time-step the system will cross the boundary of the system 0 0 4. During [2dt , 3dt ], only integrate the pink process N˙ i = (for example the N ≥ 0 boundary in our case), and become P −Ni ( αij Nj − 1): numerically unstable. We review different solutions that 0 0 0  X  have been proposed to solve this issue, and check how they Ni(t + 3dt )= Ni(t + 2dt ) exp dt 1 − αij Nj (t) deal with our Lotka-Volterra (LV) system. A more thorough review can be found in [42]. There are a lot of different combinations of this kind of schemes. We tried some, and chose this one after a lot of A first naive way to go around the difficulty is to change checks on simpler models for which we know the distributions variable (sqrt, ln...). But this won’t work because if the at all times. 18

3. Issues of our implementation Appendix H: Ongoing investigations

1. χ After careful tests on simpler models, we used this scheme 4 to compare with the theory. Initially we used a hardwall immigration at λ = 10−3. The agreement was quite good A cleaner numerical test for the transition RS to 1RSB for second degree observables (qd, q0), but not for h. This would be the divergence of the χ4 correlation. So far, we do is due to the numerical scheme. Indeed, if T is quite high not have enough data to present clean results, but in principle (T  λ), the sampling of the demographic noise sends many this observation should not be too difficult. O(1) species close to 0, then they bounce on the wall and end up at N = 2λ. Therefore there is an induced concentration of species at N = 2λ. Because of the 2λ peak, there is a 2. Improve the numerical scheme subsampling of the O(1) populations. In order to reduce this issue, we use a higher λ = 10−2 In the current numerical scheme, we first sample pure de- in the final results that are shown on figure 11. We reckon mographic noise then implement the hard wall immigration. the slight discrepancy at high temperature between theory When doing this, a lot of trajectories do bounce on the wall, and numerics comes from this issue. A solution is still under which lowers the accuracy of the scheme. A way to solve this investigation in Appendix H . We are aware that the method would be to directly solve the Fokker-Planck equation associ- is still in development. However, it is already enough at the ated to the whole process "demographic noise + hard wall". moment to beautifully confirm the theory. We reckon this can be done adapting the proof from [78].

[1] R. May, A. R. McLean, et al., Theoretical ecology: prin- [20] G. Biroli, G. Bunin, and C. Cammarota, New Journal ciples and applications (Oxford University Press on De- of Physics 20, 083051 (2018). mand, 2007). [21] M. Tikhonov and R. Monasson, Physical review letters [2] K. Faust and J. Raes, Nature Reviews Microbiology 10, 118, 048103 (2017). 538 (2012). [22] A. Altieri and S. Franz, Physical Review E 99, 010401 [3] V. Bucci and J. B. Xavier, Journal of molecular biology (2019). 426, 3907 (2014). [23] M. T. Pearce, A. Agarwala, and D. S. Fisher, Proceed- [4] R. M. Goodwin, Chaotic economic dynamics (Oxford ings of the National Academy of Sciences (2020). University Press, 2003). [24] F. Roy, M. Barbier, G. Biroli, G. Bunin, et al., PLOS [5] D. A. Kessler and N. M. Shnerb, Physical Review E 91, Computational Biology 16, 1 (2020). 042705 (2015). [25] R. Marsland, W. Cui, and P. Mehta, Scientific reports [6] D. S. Maynard, Z. R. Miller, and S. Allesina, Nature 10, 1 (2020). Ecology & Evolution 4, 91 (2020). [26] L. Sidhom and T. Galla, Physical Review E 101, 032101 [7] J. A. Chandler, J. M. Lang, S. Bhatnagar, J. A. Eisen, (2020). and A. Kopp, PLoS genet 7, e1002272 (2011). [27] I. Dalmedigos and G. Bunin, arXiv preprint [8] J. Lloyd-Price, A. Mahurkar, G. Rahnavard, J. Crabtree, arXiv:2002.04358 (2020). J. Orvis, A. B. Hall, A. Brady, H. H. Creasy, C. Mc- [28] J. Moran and J.-P. Bouchaud, Physical Review E 100, Cracken, M. G. Giglio, et al., Nature 550, 61 (2017). 032307 (2019). [9] S. F. Risk, OECD Economic Outlook 2012 (2012). [29] Along a similar vein, models of liquids and crystals that [10] S. Thurner, IFP/FGS Working Paper 14 (2011). are used in physics are disparate, approximate and often [11] L. Barreira and C. Valls, in Dynamical Systems inaccurate with respect to real system. Yet, the proper- (Springer, 2013) pp. 57–86. ties of the phases that arise from their studies provide a [12] R. MacArthur, Theoretical population biology 1, 1 precise and quantitative description of the phases found (1970). in nature. [13] D. Tilman, competition and community struc- [30] Y. V. Fyodorov and B. A. Khoruzhenko, Proceedings of ture (Princeton university press, 1982). the National Academy of Sciences 113, 6827 (2016). [14] S. Ruan, in Delay differential equations and applications [31] Y. V. Fyodorov and P. Le Doussal, Journal of Physics A: (Springer, 2006) pp. 477–517. Mathematical and Theoretical 51, 474002 (2018). [15] J. Vano, J. Wildenberg, M. Anderson, J. Noel, and [32] Y. V. Fyodorov, G. Ben Arous, and B. A. Khoruzhenko, J. Sprott, Nonlinearity 19, 2391 (2006). arXiv preprint arXiv:2008.00690 (2020). [16] J. H. van Opheusden, L. Hemerik, M. van Opheusden, [33] M. Barbier, J.-F. Arnoldi, G. Bunin, and M. Loreau, and W. van der Werf, SpringerPlus 4, 474 (2015). Proceedings of the National Academy of Sciences 115, [17] C. K. Fisher and P. Mehta, Proceedings of the National 2156 (2018). Academy of Sciences 111, 13111 (2014). [34] S. Diederich and M. Opper, Physical Review A 39, 4333 [18] C. A. Serván, J. A. Capitán, J. Grilli, K. E. Morri- (1989). son, and S. Allesina, Nature ecology & evolution 2, 1237 [35] T. Galla and J. D. Farmer, Proceedings of the National (2018). Academy of Sciences 110, 1232 (2013). [19] G. Bunin, Physical Review E 95, 042414 (2017). [36] J. B. Sanders, J. D. Farmer, and T. Galla, Scientific reports 8, 1 (2018). 19

[37] S. Solomon et al., Advances in Complex Systems (ACS) [57] W. Mende, The predator-prey model: do we live in a 3, 301 (2000). Volterra world? (Akademie-Verlag, 1986). [38] J. Moran and J.-P. Bouchaud, Physical Review E 100, [58] J. M. Smith and J. M. M. Smith, Evolution and the The- 032307 (2019). ory of Games (Cambridge university press, 1982). [39] P. Biscari and G. Parisi, Journal of Physics A: Mathe- [59] K. Sigmund et al., Evolutionary Game Dynamics: Amer- matical and General 28, 4697 (1995). ican Mathematical Society Short Course, January 4-5, [40] G. Domokos and I. Scheuring, Journal of Theoretical Bi- 2011, New Orleans, Louisiana, Vol. 69 (American Math- ology 227, 535 (2004). ematical Soc., 2011). [41] T. Rogers, A. J. McKane, and A. G. Rossberg, EPL [60] L. Berthier and J. Kurchan, Nature Physics 9, 310 (Europhysics Letters) 97, 40008 (2012). (2013). [42] H. Weissmann, N. M. Shnerb, and D. A. Kessler, Phys- [61] J. Hertz, G. Grinstein, and S. Solla, in AIP Conference ical Review E 98, 022131 (2018). Proceedings, Vol. 151 (American Institute of Physics, [43] M. Mézard, G. Parisi, and M. Virasoro, Spin glass the- 1986) pp. 212–218. ory and beyond: An Introduction to the Replica Method [62] J. Hertz, G. Grinstein, and S. Solla, in Heidelberg collo- and Its Applications, Vol. 9 (World Scientific Publishing quium on glassy dynamics (Springer, 1987) pp. 538–546. Company, 1987). [63] A. Altieri, in Jamming and Glass Transitions (Springer, [44] R. Monasson, Physical review letters 75, 2847 (1995). 2019) pp. 133–152. [45] We focus on the ones giving the leading contribution to [64] A. J. Lotka, Proceedings of the National Academy of Sci- the partition function; considering a different value would ences 6, 410 (1920). just slightly shift the transition line but keeps qualita- [65] V. Volterra, Variazioni e fluttuazioni del numero tively unaltered the conclusions. d’individui in specie animali conviventi (C. Ferrari, [46] P. Charbonneau, J. Kurchan, G. Parisi, P. Urbani, and 1927). F. Zamponi, Nature communications 5, 1 (2014). [66] G. Parisi, Physical Review Letters 50, 1946 (1983). [47] L. Berthier, G. Biroli, P. Charbonneau, E. I. Corwin, [67] A. Bray and M. Moore, Journal of Physics C: Solid State S. Franz, and F. Zamponi, The Journal of chemical Physics 12, 79 (1979). physics 151, 010901 (2019). [68] S. Kirkpatrick and D. Sherrington, Phys. Rev. Lett 35, [48] G. Ben Arous, A. Dembo, and A. Guionnet, Probability 1792 (1975). Theory and Related Fields 136, 619 (2006). [69] R. Cressman and Y. Tao, Proceedings of the National [49] H. Sompolinsky and A. Zippelius, Physical Review B 25, Academy of Sciences 111, 10810 (2014). 6860 (1982). [70] J. Berg and M. Weigt, EPL (Europhysics Letters) 48, [50] S. Franz and M. Mézard, Physica A: Statistical Mechan- 129 (1999). ics and its Applications 210, 48 (1994). [71] D. J. Thouless, P. W. Anderson, and R. G. Palmer, [51] L. F. Cugliandolo and J. Kurchan, Physical Review Let- Philosophical Magazine 35, 593 (1977). ters 71, 173 (1993). [72] A. Crisanti and H.-J. Sommers, Journal de Physique I 5, [52] L. F. Cugliandolo, in Slow Relaxations and nonequilib- 805 (1995). rium dynamics in condensed matter (Springer, 2003) pp. [73] A. Cavagna, I. Giardina, and G. Parisi, Physical Review 367–521. B 57, 11251 (1998). [53] G. Biroli, Journal of Statistical Mechanics: Theory and [74] To be more definite, the exact protocol requires the com- Experiment 2005, P05014 (2005). 1 m n putation of φ(m, β) = − βN lim ∂n(Z ) , reproducing a [54] J. Kurchan and L. Laloux, Journal of Physics A: Math- n→0 system of (m × n) copies and eventually taking the limit ematical and General 29, 1929 (1996). n → 0. [55] L. F. Cugliandolo, J. Kurchan, and L. Peliti, Physical [75] G. N. Milstein, E. Platen, and H. Schurz, SIAM Journal Review E 55, 3898 (1997). on Numerical Analysis 35, 1010 (1998). [56] G. Parisi, Proceedings of the National Academy of Sci- [76] L. Pechenik and H. Levine, Physical Review E 59, 3893 ences 103, 7948 (2006). (1999). [77] E. Moro, Physical Review E 70, 045102 (2004). [78] I. Dornic, H. Chate, and M. A. Munoz, Physical Review Letters 94, 100601 (2005).