1 Introduction

Several ecosystems exhibit alternative stable states [1,2,3,4]. For example, in semi-arid ecosystems, a vegetated state and a bare (or low-vegetation) state can co-exist at similar values of mean annual precipitation. Similarly, lakes can exist in turbid or clear states for the same nutrient loading rates. Such systems with bistable (or multiple stable) states can abruptly shift from one state to another when they cross a threshold value of the external driver. These systems also show hysteresis, i.e. the reverse transition occurs at a driver value different from the conditions that caused the initial transition [1, 2]. Therefore, restoration is often difficult and sometimes even impossible. To explain this phenomenon, strong positive feedback within ecosystems is often invoked as a necessary condition [5,6,7,8]. Here, we illustrate how demographic noise arising in finite systems can give rise to a bimodal distribution of ecosystem states—even without strong positive interactions.

Organisms display positive interactions which enhance (or reduce) each other’s fecundity (mortality). Many analytical and numerical simulation models incorporate ecosystem specific positive interactions [5, 8,9,10,11,12,13,14,15]. For example, in semi-arid ecosystems, plants increase local infiltration of surface water and reduce evapotranspiration: the chance of germination and growth of a plant in the vicinity of another plant is higher than that of plant in a bare region. Such positive density dependence on the growth rates—also called Allee effect—is an important factor in maintaining multiple stable states and in driving abrupt transitions between these states [5,6,7,8].

Besides positive interactions, stochasticity also plays an important role in determining ecosystem dynamics and stability. Broadly, stochasticity is of two types: environmental (extrinsic) stochasticity arising from random fluctuations in the environmental drivers and demographic (intrinsic) stochasticity arising from probabilistic and discrete nature of birth and death of individuals in finite systems. We now understand that environmental stochasticity can alter resilience and induce shifts between bistable systems [3, 16,17,18,19]. The effect of demographic stochasticity on the resilience of ecosystems has received less attention [18, 20,21,22,23,24]. For example, demographic noise may smoothen out abrupt transitions [21, 22]. In contrast, some studies make an opposite prediction too, i.e. demographic noise promotes alternative stable states [24] and abrupt transitions [20]. Although demographic noise is now relatively well studied in a number of ecological contexts [25,26,27,28,29,30], the precise role of finite population size on ecosystem dynamics is not much explored. Furthermore, few studies show how local interactions scale to demographic noise or disentangle the effects of spatial interactions from demographic stochasticity on the stability and resilience of ecosystems (but see [20, 31,32,33]).

In this paper, we use a simple model of vegetation dynamics to explore how finite system size affects ecosystem dynamics; we refer to the finite size description as mesoscopic dynamics. The manuscript is organised as follows, with an effort to make it pedagogical and accessible to anyone familiar with the basics of stochastic processes. In Sect. 2, we present a minimal, cellular automaton model which incorporates local processes of birth and death and positive feedback interactions among individuals [8, 34, 35]. We then present van Kampen’s system-size expansion method in Sect. 3 which yields a mesoscopic model, i.e. a stochastic differential equation governing the system dynamics while accounting for finite-size stochastic effects. Using this method, we are able to relate microscopic interaction rules to the structure of demographic noise at mesoscopic scales. In Sect. 4, we show the results of the model in the deterministic mean-field (i.e. infinite size) limit. In Sects. 5 and 6, using analytical calculations and numerical simulations, we show that strong demographic stochasticity caused by finite system size can give rise to a bimodal distribution of densities, even with relatively weak positive interactions. Finally, we discuss various implications.

2 A minimal individual-based model for ecosystem transitions

Our model is based on a statistical-physics inspired cellular-automaton model of tricritical directed percolation [34] that has been adopted in ecological contexts [4, 8, 35]. A two dimensional space is divided into \(L\times L = N\) discrete sites. Each site can take one of the two states: empty (denoted by 0) or occupied (by an organism; denoted by 1). We update these states at discrete time steps using probabilistic rules of birth and death, described below (see Fig. 1 for a schematic of the update rules of the model).

Fig. 1
figure 1

Schematic of the model update rules. Left panel shows the baseline reproduction process as implemented when the neighbouring site of a focal plant is empty. Right panel shows the positive feedback process which is implemented when the neighbouring site of a focal plant is occupied. (This schematic adapted with modification from Fig. 1 in the Supporting Information for [8])

2.1 Baseline reproduction

During each discrete time step, a site is selected randomly, henceforth called the focal site. If the focal site is empty, we make no update and choose another site randomly. However, if the focal site is occupied by an organism, one of its four nearest neighbours is selected at random. This neighbour may be occupied or empty. If it is empty, we implement the baseline reproduction rule: the focal plant reproduces with a probability p and establishes a new plant at the neighbouring empty site (resulting in a transition represented as 10 \(\rightarrow \) 11). In addition, the focal plant may die with a probability d (represented as 10 \(\rightarrow \) 00).

The baseline birth probability p of the plants (or more generally an organism) per unit time can be thought of as a parameter representative of external factors like precipitation; we also refer to p as the environmental driver and a reduction in p as increased environmental stress. We interpret d as the density-independent death rate; this is in contrast to the previous models where the death rate was assumed to be \(1-p\) [4, 8, 34, 35].

2.2 Positive feedback

If the neighbouring site of the focal site is occupied, we implement the positive feedback rule: we randomly pick one of the six neighbours of the pair as the third site. If the third site is empty a plant germinates there with a probability q (represented as 110 \(\rightarrow \) 111) or the focal plant dies with a probability d (represented as 11 \(\rightarrow \) 01); the latter rule is implemented only if there is no germination at the third site. The positive feedback (i.e. \(q>0\)) has two effects: (1) it enhances the birth rate of the plants, (2) it reduces the death rate of the focal plant when its neighbouring sites are occupied.

Therefore, a discrete step update may involve (i) nothing if the focal site is empty, (ii) a basic reproduction rule if the chosen pair is 10, leading to one of the four outcomes shown in the left panel of Fig. 1 or (iii) a positive feedback rule if the chosen pair is 11, leading to one of the two outcomes shown in the right panel of Fig. 1. One time unit completes after \(L^2\) discrete updates such that all the cells are selected, on average, once for an update.

This model relates to the contact process, a well known spatial stochastic process studied in the context of infectious disease spread and population dynamics [36, 37]. Unlike the contact process, we assume that reproduction by the focal plant and its death are not mutually exclusive. We model birth and death as independent processes and both can happen in the same discrete time step, corresponding to the update \(10 \rightarrow 01\) which occurs with a probability pd. Likewise, there is a finite chance of neither of these events occurring, corresponding to the update \(10 \rightarrow 10\) with a probability \((1-p)(1-d)\). Therefore, the update rules of our model do not converge to the discrete formulation of the contact process by setting \(q=0\) and \(d=1-p.\)

However, we stress that \(10 \rightarrow 10\) and \(10 \rightarrow 01\) transitions have no effect on the macroscopic density of plants on the landscape. See Sect. 3 and Appendix A. Hence, in the mean-field limit, our model with \(q=0\) and \(d=1-p\) is equivalent to the contact process. Likewise, these transitions do not affect the doublet densities either; therefore, the pair-approximation for the contact process and our model with \(q=0\) and \(d=1-p\) are identical (see Appendix B).

3 Mesoscopic dynamics: coarse-grained population level model with demographic noise

Mean-field approximation of stochastic cellular-automaton models is constructed in the macroscopic limit (\(N \rightarrow \infty \)); thus, apart from spatial interactions, it fails to account for the stochasticity arising from finite system sizes. We use van Kampen’s system-size expansion method to address this limitation [25, 38, 39]. We note that our model exhibits an absorbing state at zero density, i.e. when all cells are unoccupied. See [40, 41] for improvements over van Kampen’s system size expansion in describing the dynamics of a system close to an absorbing boundary.

We further remark that the dynamics of the cellular-automaton can be described by a state variable n which is the the absolute number of occupied sites on the lattice, and hence \(n \in [0, N]\). Here N is the size of the system, i.e. the number of sites on the lattice. We define density as \(\rho = n/N\) and hence can take discrete values in the range 0 and 1, separated by 1/N. Below, we consider an approximation to obtain the mesoscopic dynamics of the density under the assumption that it can be approximated as a continuous variable \(\rho \).

3.1 Deriving the mesoscopic model with system-size expansion

We wish to describe the dynamics of a scalar variable \(\rho \), representing the proportion of occupied cells or density of the landscape. Assuming that in a finite system of size N the stochastic update rules are ‘birth’ or ‘death’ like events, which may change \(\rho \) to \(\rho +\frac{1}{N}\) or \(\rho -\frac{1}{N}\), the master equation to describe the temporal evolution of the probability distribution of \(\rho \) at time t [42, 43], denoted by \(P(\rho ,t)\) is

$$\begin{aligned} \frac{\partial P(\rho ,t)}{\partial t}= & {} \sum _{\rho ' \ne \rho } [T(\rho |\rho ')P(\rho ',t) - T(\rho '|\rho )P(\rho ,t)] \nonumber \\= & {} T\left( \rho |\rho +\frac{1}{N}\right) P\left( \rho +\frac{1}{N},t\right) \nonumber \\&+ T \left( \rho |\rho -\frac{1}{N}\right) P\left( \rho -\frac{1}{N},t\right) \nonumber \\&- T\left( \rho +\frac{1}{N}|\rho \right) P(\rho ,t) \nonumber \\&- T \left( \rho -\frac{1}{N}|\rho \right) P(\rho ,t), \end{aligned}$$
(1)

where \(T(\rho |\rho ')\) is the transition rate from the state \(\rho '\) to state \(\rho \), which in turn depends on the stochastic update rules of the model.

To simplify the above master equation, we follow [28, 39] and define the step operators \(\epsilon ^+\) and \(\epsilon ^-\) that have the following effect on a continuously differentiable single variable function \(h(\rho )\)

$$\begin{aligned} \epsilon ^+ h(\rho ) = h\left( \rho +\frac{1}{N}\right) \quad \epsilon ^- h(\rho ) = h\left( \rho -\frac{1}{N}\right) . \end{aligned}$$

For brevity, we denote the transition rates that correspond to birth and death as \(T^+\) and \(T^-\), respectively,

$$\begin{aligned} T^+(\rho )= & {} T \left( \rho +\frac{1}{N}|\rho \right) \\ T^-(\rho )= & {} T\left( \rho -\frac{1}{N}|\rho \right) . \end{aligned}$$

Using these operators and the abbreviated notation for transition rates, we rewrite the master equation (1) as

$$\begin{aligned} \frac{\partial P(\rho ,t)}{\partial t}= & {} (\epsilon ^- - 1) T^+(\rho ) P(\rho ,t) \nonumber \\&+ (\epsilon ^+ - 1) T^-(\rho ) P(\rho ,t). \end{aligned}$$
(2)

Assuming large N, the step operators are approximated with a second-order Taylor series:

$$\begin{aligned} \epsilon ^{\pm } h(\rho ) \approx \left[ 1 \pm \frac{1}{N} \frac{\partial }{\partial \rho } + \frac{1}{2N^2} \frac{\partial ^2}{\partial \rho ^2} \right] h(\rho ). \end{aligned}$$
(3)

Substituting Eq. (3) in Eq. (2), distributing terms and rearranging, we have

$$\begin{aligned} \begin{aligned} \frac{\partial P(\rho ,t)}{\partial t}&\approx - \frac{1}{N} \frac{\partial }{\partial \rho } \left[ \left( T^+(\rho ) - T^-(\rho )\right) P(\rho ,t) \right] \\&\quad + \frac{1}{2N^2} \frac{\partial ^2}{\partial \rho ^2} \left[ \left( T^+(\rho ) + T^-(\rho )\right) P(\rho ,t) \right] . \end{aligned} \end{aligned}$$

To ease the notation, we make the following substitutions

$$\begin{aligned} f(\rho ) = T^+(\rho ) - T^-(\rho ) \quad g(\rho ) = \sqrt{T^+(\rho ) + T^-(\rho )}.\quad \end{aligned}$$
(4)

Next, we rescale time as \(t=Nt'\) and drop the prime to obtain

$$\begin{aligned} \frac{\partial P(\rho ,t)}{\partial t} = - \frac{\partial }{\partial \rho } \left[ f(\rho ) P(\rho ,t) \right] + \frac{1}{2N} \frac{\partial ^2}{\partial \rho ^2} \left[ g(\rho )^{2}P(\rho ,t) \right] .\nonumber \\ \end{aligned}$$
(5)

This is the Fokker–Plank equation (FPE). For a given stochastic process, FPE describes the time evolution of the state variable’s probability distribution \(P(\rho ,t)\). The function \(f(\rho )\) and \(g(\rho )^{2}\) are called the drift and diffusion coefficient, respectively. If we wish to analyse individual trajectories, we must construct a stochastic differential equation (SDE) for the state variable. For a given stochastic process, the SDE and FPE are closely related [42, 43]. The Ito sense SDE corresponding to the the FPE (5) is given by [42, 43]

$$\begin{aligned} \frac{{\text {d}}\rho }{{\text {d}}t} = f(\rho ) + \frac{1}{\sqrt{N}}g(\rho ) \eta (t), \end{aligned}$$
(6)

where \(\eta (t)\) is a Gaussian white noise with \(\left< \eta (t) \right> = 0\) and \(\left<\eta (t)\eta (t') \right> = \delta (t-t').\) Equation (6) together with Eq. (4) constitute the mesoscopic description of the microscopic stochastic model. The stochastic term in this description has two features: First, the noise is multiplicative, i.e. the strength of noise depends on the current value of the state variable \(\rho \). Second, the strength depends inversely on the system size N.

3.2 Mesoscopic dynamics (SDE) of our model

For a well-mixed system, specifying the transition rates is a straightforward application of the law of mass action: the rate of reaction is proportional to the concentration of the reacting species. Applying the approximation of well-mixed system to our model, we obtain the following transition rates:

$$\begin{aligned} T^+(\rho )= & {} T\left( \rho + \frac{1}{N}|\rho \right) = \rho (1-\rho )p + \rho ^{2}(1-\rho )q, \end{aligned}$$
(7)
$$\begin{aligned} T^-(\rho )= & {} T\left( \rho - \frac{1}{N}|\rho \right) = \rho (1-\rho )d + \rho ^{2}(1-q)d. \end{aligned}$$
(8)

In Eq. (7) we have used the fact that the density can change from \(\rho \) to \(\rho + \frac{1}{N}\) in two ways: \(01 \rightarrow 11\) with a probability p or \(011 \rightarrow 111\) with a probability q. Similarly, in Eq. (8) the density can change from \(\rho \) to \(\rho -\frac{1}{N}\) in two ways: \(10 \rightarrow 00\) with a probability d or \(11 \rightarrow 01\) with a probability \((1-q)d\). See Appendix 1 for further detailed steps on well-mixed or mean-field approximation.

We emphasise that reactions \(01 \rightarrow 01\) and \(01 \rightarrow 10\) have no effect on \(\rho \), hence they do not appear in the master equation.

Substituting Eqs. (7) and (8) in Eq. (6), we obtain the mesoscopic SDE for our model, interpreted in an Ito sense,

$$\begin{aligned} \frac{{\text {d}}\rho }{{\text {d}}t}= & {} (p-d)\rho - (p-q-qd)\rho ^{2} - q\rho ^{3} \nonumber \\&+ \frac{1}{\sqrt{N}} \sqrt{(p+d)\rho -(p-q+qd)\rho ^{2} -q\rho ^{3}} \, \eta (t),\qquad \end{aligned}$$
(9)

where \(\eta (t)\) is a Gaussian white noise with zero mean and a unit variance.

The mesoscopic SDE (9) has two terms: The first term is the deterministic part and is same as the mean-field approximation (see Appendix 1). The second term is the stochastic part, where the strength of noise depends on the state of the system (\(\rho \)) and is inversely related to the system size N. Therefore, via Eq. (9) we are able to capture the defining feature of demographic noise—discrete and probabilistic nature of birth and death in finite systems.

3.3 Solving the Fokker–Planck equation

In the above derivation, we have assumed that the drift and diffusion coefficients are not time dependent. In such a case, we can in principle obtain the steady-state probability distribution function \(P_{\text {s}}(\rho )\)—if it exists—by setting \(\frac{\partial P_{\text {s}}(\rho ,t)}{\partial t} = 0\) in Eq. (5) and invoking appropriate boundary conditions. If we have natural boundaries at the edges of the interval of our interest (i.e the variable is restricted to this interval), we can then solve the resulting ordinary differential equation under the no current condition at the boundary. This yields

$$\begin{aligned} P_{\text {s}}(\rho ) = {\mathcal {N}}{\exp \left( - \, \frac{2}{\sigma ^2} U(\rho )\right) }, \end{aligned}$$
(10)

where \(U(\rho )\) is referred to as effective potential and is given by [43, 44]

$$\begin{aligned} U(\rho ) = - \int _{\rho _0}^{\rho } \frac{f(\rho ') - \sigma ^2 g(\rho ') g'(\rho ')}{g(\rho ')^2} {\text {d}}\rho ', \end{aligned}$$
(11)

where \(\rho _0\) is an arbitrary point in the domain on which we wish to study the stochastic process. \({\mathcal {N}}\) is a normalization constant.

Bifurcation diagrams that show the steady states of the system are typically described for mean-field deterministic systems (but see [16]). When we have a stochastic process, we can only speak in terms of most probable/least probable states of the steady-state, assuming a steady-state exists for the system. Following [44], we find the most probable/least probable states via extrema of \(P_{\text {s}}(\rho )\). If an extremum is a mode of \(P_{\text {s}}\), it corresponds to a most likely state which can be considered equivalent to a stable state subject to perturbations. On the other hand, if an extremum is a minimum of \(P_{\text {s}}\), it may be interpreted as an unstable state from which the system is kicked out, so to speak, by stochasticity.

However, the model we have presented here and the associated mesoscopic SDE describe a stochastic process that has an absorbing boundary at \(\rho =0\), i.e once the system reaches this boundary, it cannot reflect back into the region from which it arrived. The other boundary is at \(\rho =1\), which is a reflecting boundary. Technically, for such systems, a steady-state normalisable probability density function does not exist. However, we can still use this function to gain insight into the dynamics of the system sufficiently far from the singularity at \(\rho =0\); we will denote the non-trivial solution of the FPE for our model as \(F(\rho )\) in all subsequent invocations.

In this spirit, we plot the extrema of \(F_{\text {s}}\) as a function of p, for different values of N (Fig. 3). The modes are shown (each with a different color) as solid lines while the minimum is shown as a red dashed line.

4 Mean-field approximation shows that positive feedback promotes alternative stable states in infinitely large systems

Fig. 2
figure 2

Mean-field model shows continuous transition (A) or abrupt transition (B), depending on the value of the positive feedback parameter q. Black, blue and red curves show the three equilibrium densities. Solid lines are the stable states and dotted lines are the unstable states. For low values of positive feedback (\(q<q_t\)), the system shifts from a vegetated state to a bare state (\(\rho =0\)) continuously at \(p_c=d\). For strong positive feedback (\(q>q_t\)), two stable states exist for a range of parameter value: \(p_{c2}-p_{c1}\). When p is reduced below a threshold (\(p_{c_1} = d-\frac{(p_{c_1}-q-qd)^2}{4q}\), hence lower than d), the system shifts from a vegetated state to bare state abruptly. The reverse transition occurs at the \(p_{c_2}=d\) (C) shows the stability diagram of the mean-field model for all values of p and q. Solid line shows the critical thresholds (\(p_{c1}\)) below which only bare state is stable. Black dot represents the tri-critical point at which the nature of transition changes from continuous to abrupt. The region between the solid line and the dotted line has two states. Here, d is kept fixed as 0.3

Considering the macroscopic limit, i.e. \(N \rightarrow \infty \), the stochastic differential equation converges to an ordinary (deterministic) differential equation given by

$$\begin{aligned} \frac{{\text {d}}\rho }{{\text {d}}t} = (p-d)\rho - (p-q-qd)\rho ^2 - q\rho ^3. \end{aligned}$$
(12)

The equilibria and associated stability of the mean-field model is found by setting \({\text {d}}\rho /{\text {d}}t = 0\) and performing linear stability analysis [45] on the resulting steady states (see Appendix A). One of the equilibria is a bare state \(\rho *=0\). The bare state is stable when \(p<d\) and unstable for \(p>d\). In other words, when the baseline birth rate p exceeds a critical threshold of \(p_c=d\), the system in bare state undergoes a transition to a vegetated state (\(\rho ^*>0\)).

The nature of the transition as a function of p, however, depends on the value of the positive feedback parameter q. The transition from a bare state to a vegetated state, as a function of p, is a continuous transition for \(0 \le q<\frac{d}{1+d}\), i.e. low values of q. In other words, for ecosystems with weak positive interactions, the transition from a vegetated to a bare state with deteriorating environmental conditions is gradual (Fig. 2A).

For systems with strong positive feedback, specifically \(q >q_t = \frac{d}{1+d}\), the transition between bare state and the vegetated state is a discontinuous function of p (Fig. 2B). Here, for a range of driver values \(p_{c_1}<p<p_{c_2}\), where \(p_{c_1}=d-\frac{(p_{c_1}-q-qd)^2}{4q}\) and \(p_{c_2}=d\), we find three equilibria; a stable bare state (solid black line in Fig. 2B), an unstable intermediate vegetated state (dotted red line in Fig. 2B) and a stable large vegetated state (solid blue line in Fig. 2B). The value of parameter p at which the stable and unstable vegetated states meet and cease to exist, denoted \(p_{c1}\), is referred to as a saddle-node bifurcation.

If a system is in the vegetated state and the driver value reduces below the critical threshold of \(p_{c1}\) (\(<d\)), the system collapses from a vegetated state to the bare state. Likewise, when the driver increases above the threshold \(p_{c2}=d\), a system in bare state undergoes an abrupt transition to a vegetated state. These transitions are also referred to as abrupt regime shifts, catastrophic shifts, tipping points or critical transitions [2, 46]. We also note that the system exhibits hysteresis; i.e. the two abrupt transitions occur at different threshold values of p. Furthermore, depending on the initial condition, the system may reach either the bare state or the vegetated state.

The threshold value of positive feedback at which the type of transition changes from smooth to abrupt (\(q=\frac{d}{1+d}\)) is called the tri-critical point. The region of bistability, i.e. the range \(p_{c_1}\) to \(p_{c_2}\), increases with the strength of positive feedback q.

Figure 2C summarises the mean-field predictions of our model, as a function of environmental driver (baseline birthrate p) and positive feedback parameter (q). It shows that vegetated systems with strong positive feedback can survive in harsher environmental conditions (i.e. for lower values of p than the critical threshold of continuous transitions; note that \(p_{c1}<d\)). However, systems with strong positive feedback are also prone to collapse as a function of changing environmental conditions. In other words, large positive feedback among individuals promotes bistability in ecosystems. These mean-field approximation results and interpretations of our model are consistent with the literature on spatial ecosystem models with positive feedback [7, 9, 47, 48], which often incorporate models of ecosystems with many more parameters (but see [4, 8]).

5 Demographic noise can lead to a bimodal distribution of densities even with weak positive feedback

To investigate the effects of demographic noise in finite systems, we solve for \(F_{{\text {s}}}(\rho )\) (see Sect. 3.3) for the case of our model where \(q=0\). We use \(F_{{\text {s}}}(\rho )\) instead of \(P_{{\text {s}}}(\rho )\) to emphasize that \(F_{{\text {s}}}(\rho )\) is a non-normalizable function. In the FPE,

$$\begin{aligned} \frac{\partial F(\rho ,t)}{\partial t}= & {} - \frac{\partial }{\partial \rho } \left[ \left( (p-d)\rho -p\rho ^2\right) F(\rho ) \right] \nonumber \\&+ \frac{1}{2N} \frac{\partial ^2}{\partial \rho ^2} \left[ \left( (p+d)\rho -p\rho ^2\right) F(\rho ) \right] \qquad \end{aligned}$$
(13)

the strength of demographic noise is proportional to \(\frac{1}{\sqrt{N}}\). In the mean-field limit of the \(q=0\) case, the escape time [43] from both the active phase (stable, when \(p>d\)) and the absorbing phase (stable, when \(p<d\)) is infinite, i.e. they are asymptotically stable in the respective ranges.

Fig. 3
figure 3

The vegetated state and the bare state can coexist via a bimodal distribution of densities in finite systems. For finite N, the trivial steady-state solution of the FPE is a delta-function at \(\rho =0\) for all values of p (solid black line in A and B). When we consider the non-trivial solution \(F_{{\text {s}}}\) (see text) of the FPE, a non-zero mode—denoting a vegetated state (solid blue lines in A and B)—appears when the baseline birth probability p is greater than a threshold value. This mode co-exists with the divergence at \(\rho =0\); they are separated by a minimum denoted with a red-dashed line. In the \(N\rightarrow \infty \) limit (C), steady-state density shows a continuous transition, which is consistent with the transcritical bifurcation that can be obtained from a linear stability analysis of the mean-field model. Here, \(d=0.3\) and \(q=0\)

However, when N is finite, we find the following: (i) the threshold value of p at which the vegetated state (the non-zero mode of \(F_{{\text {s}}}(\rho )\)) ceases to exist is larger than the mean-field threshold (i.e \(p_{\text {c}}(N)>d\)), and (ii) the absorbing phase is asymptotically stable for the entire range of p.

This has the following implications: (1) a finite system has a non-zero probability of collapse from a vegetated state to the bare state, and (2) for a given value of p and d that sustain a non-zero mode for \(F_{{\text {s}}}\), the probability of collapse from the vegetated to the bare state is higher for a smaller system.

Therefore, due to finite-size effects that manifest via enhanced demographic noise, we predict small systems exhibit a bimodal distribution of densities and an abrupt collapse of the system from the non-zero density to a bare state.

We caution that we have not demonstrated that this abrupt collapse is equivalent to a first order phase transition. However, we demonstrate that the bimodal distribution of density leads to an ‘effectively discontinuous transition’.

6 Numerical simulations show similar effects of demographic noise

Fig. 4
figure 4

Numerical simulations of the spatially-explicit individual-based model confirm bimodality for finite-size systems. A L=16 (or \(N=16 \times 16\)). Region between \(p=0.45\) to \(p=0.5\) shows bi-modality. Furthermore, a range of densities with zero-probability of occurrence is evident between the non-zero mode and the mode at zero. B L=128 (or \(N=128 \times 128\)). There is no sign of bi-modality and the transition from \(\rho ^{*}=0\) to \(\rho ^{*}>0\) is much smoother. C, D, E and F show phase diagram constructed from numerical simulations for different system sizes in two dimensions

To verify if we observe these effects in spatially explicit systems that are finite, we conducted numerical simulations of our cellular automaton model using the stochastic update rules described in Sect. 2. We display the results in Fig. 4 for many system sizes \(N=L \times L\). For all parameter values (except for \(p>0.65\) in \(L=512\), where we simulated 10,000 time steps), we run the simulation for 1 million time steps. We chose four system sizes: \(16 \times 16, 32 \times 32\), \(128 \times 128\) and \(512 \times 512\) for the purpose of illustration in Fig. 4. For the system size \(16 \times 16\) (i.e. \(L=16\)), for each value of p we construct a normalized frequency distribution of density based on 10,000 independent realizations (Fig. 4A). For \(L=128\) (hence, \(N=128 \times 128\)), due to computational constraints, we calculate frequency distribution based on 100 realisations only (Fig. 4B). We then plot the average density for \(L = 16\) (Fig. 4C), 32 (Fig. 4D), 128 (Fig. 4E), 512 (Fig. 4F) based respectively on 10,000, 2000, 100 and 100 realisations as follows: for each p, the upper arm was constructed by culling the realizations that fell into the absorbing phase (\(\rho =0\)) and calculating the mean of the densities of the remaining realisations. The lower arm \((\rho =0)\) was plotted if at least one realization with \(\rho =0\) was reported. This method gives a well defined bimodal region for each L.

Our numerical simulations confirm the qualitative predictions of the analytical results based on system-size approximation: (1) small systems exhibit bimodal frequency distribution of density (Fig. 4A, C, D), (2) the vegetated state abruptly ceases to exist when p is less than a threshold value (Fig. 4C–E); this threshold value is larger for smaller system sizes, (3) the region of bimodality reduces with increasing system size (Fig. 4C–D).

We observe a sizeable range of p in which the absorbing phase is never reached, even in systems as small as \(L=16.\) Although this may be attributed to finite runtime of our simulations, it is nevertheless a plausible feature of real ecological systems when the time to reach a steady state is large. For large systems, the transition from vegetated to bare state is much less abrupt, and for \(L=512\), becomes continuous for all practical purposes (Fig. 4B, F).

7 Discussion

In this study, we used a spatially explicit individual-based model to investigate the role of demographic stochasticity in ecological transitions. Using analytical methods and numerical simulations, we showed that finite-size effects on demographic noise can result in a bimodal distribution of densities, thus potentially causing stochasticity-driven abrupt transitions, even with weak positive feedback mechanisms.

Our conclusions are broadly consistent with the results in the ecology literature, which has extensively looked at the role of stochasticity in population extinctions. Specifically, these studies conclude that demographic stochasticity can induce Allee-like effects, in which populations smaller than a threshold size are likely to go to extinction [20, 32, 33]. However, these studies write a continuum description for the system. In contrast, using the system-size expansion, we show how the local microscopic update rules scale to mesoscopic dynamics of the population. This allowed us to explicitly capture the effect of finite system size in the stochastic term. Our derivations show that the stochastic term is multiplicative, depending on both the state variable density (\(\rho \)) and the system size (N); this is of the form \(\frac{1}{\sqrt{N}}\sqrt{\rho + {\mathcal {O}}(\rho ^2)}\). However, most previous studies include density effects via a \(\sqrt{\rho }\) term alone [21, 49,50,51,52] and do not consider the effect of system size.

The variance of the white noise process driving the mesoscopic dynamics is proportional to 1/N, the smallest possible increment/decrease in density in a finite system of size N. Decreasing N increases the relative role of stochasticity in determining trajectories by reducing the range and increasing step-size of the stochastic process associated with n (the absolute number of individuals). Finiteness brings the vegetated state closer to the absorbing boundary at \(\rho =0\). Trajectories that are closer to the absorbing boundary lead to a higher probability of a collapse to a bare state. Thus, apart from finite system-size, considering the effect of boundary conditions on the dynamics of the system is important.

Environmental noise is another form of stochasticity important for determining ecosystem dynamics. Several studies have shown that large environmental noise can induce abrupt transitions in ecosystems before it reaches the critical threshold [3, 16, 53, 54]. However, in some cases [50], environmental fluctuations can change the stability landscape and induce resilience. The combined effect of demographic noise and environmental noise needs to be carefully investigated to obtain insights for the management of ecosystems [55].

Abrupt transitions in our model must not be confused with a first-order phase transition occurring at a critical point. In the physics literature, phase transitions are defined at the thermodynamic limit while our focus here is on finite systems. We think that explicitly accounting for finite system sizes is important for gaining insights into ecological applications, for no ecological system is infinitely large. Furthermore, habitat fragmentation is likely to lead to many patches of small sizes where finite-size induced demographic noise can not be ignored. By virtue of having their dynamics restricted closer to an absorbing state (bare state in our model), these systems are prone to an abrupt collapse. In the absence of early mitigation, restoration would in principle have to ensure a non-negligible re-establishment seeding and a significant improvement of environmental conditions, to ensure that the system is pushed back into a growth dominated regime.

A plethora of recent studies have investigated the possibility of forecasting abrupt transitions, using the idea of early warning signals [17, 23, 46, 56,57,58,59,60,61,62,63]. Can similar early warning signals be constructed for systems with demographic noise? Investigating this and other related questions is a possible future direction.