How noise and coupling influence leading indicators of population extinction in a spatially extended ecological system

ABSTRACT Anticipating critical transitions in spatially extended systems is a key topic of interest to ecologists. Gradually declining metapopulations are an important example of a spatially extended biological system that may exhibit a critical transition. Theory for spatially extended systems approaching extinction that accounts for environmental stochasticity and coupling is currently lacking. Here, we develop spatially implicit two-patch models with additive and multiplicative forms of environmental stochasticity that are slowly forced through population collapse, through changing environmental conditions. We derive patch-specific expressions for candidate indicators of extinction and test their performance via a simulation study. Coupling and spatial heterogeneities decrease the magnitude of the proposed indicators in coupled populations relative to isolated populations, and the noise regime and the degree of coupling together determine trends in summary statistics. This theory may be readily applied to other spatially extended ecological systems, such as coupled infectious disease systems on the verge of elimination.


Introduction
Understanding and predicting critical transitions in complex systems, where a system shifts from one dynamical state to another, is a key research topic in a wide range of fields [38], including ecology [7,9,40], financial systems [4,19,37], climate science [30] and medicine (e.g. [27,36,44,46]). Certain types of critical transitions can be represented mathematically as bifurcations if the change in the external forcing variable is slow relative to internal system variables. A sudden drastic change from one state to another, distant, state may be characterized by a fold or saddle-node bifurcation, whereas a smooth, gradual change in system state, where states meet and exchange stability, can be expressed as a transcritical bifurcation. For example, in ecology, populations subject to Allee effects may be described in terms of saddle-node bifurcations, whereas logistically growing populations on the verge of extinction are often characterized by transcritical bifurcations.
The gradual loss of stability is a key property of systems close to a bifurcation point. As the bifurcation point is approached, system perturbations take longer to return to equilibrium. This phenomenon has been termed 'critical slowing down' [42,47,50]. The return rate of the system to the steady state is characterized by the magnitude of the dominant eigenvalue of the linearization matrix, which approaches zero as the system approaches criticality. In ecology, critical slowing down is one measure of resilience, the ability of a system to withstand disturbances [38,40]. What is interesting is that bifurcations can be potentially anticipated by identifying critical slowing down through statistical analysis of temporal and spatial patterns in data [38]. Temporal summary statistics such as lag-1 autocorrelation, variance and skewness have been used to predict impending bifurcations through identification of critical slowing down in simulated data to test their usefulness as part of early warning systems for critical transitions [14]. Temporal statistics can be derived in terms of the parameters of linearized stochastic differential equation models [17,33] and through linearized systems of difference equations (known as autoregressive models in the time series literature), for example, [22,23,39], but theory for multidimensional systems approaching critical transitions, subject to different noise regimes other than additive, is not well-developed (but see [34,35] for derivations of temporal statistics for two-dimensional infectious disease systems subject to demographic stochasticity).
Spatial systems are multi-dimensional, and it is not well understood how spatial interactions, such as movement between patches, synchronous environmental fluctuations (Moran effects), spatial heterogeneities and rescue effects through dispersal affect predictability of critical transitions in spatially extended systems. Bel et al. [6] explored how the existence of Maxwell points affect the nature of a transition in a spatial system. Villa Martin et al. [49] increased the intensities of demographic noise, coupling and spatial heterogeneity to show the nature of the critical transition in a stochastic partial differential equation can be altered from abrupt to gradual. Both of these studies used stochastic reaction-diffusion equations to investigate the dynamics of spatiotemporal systems near criticality. Alternatively, dynamical systems on networks have been used to account for interactions between spatial structure and criticality (e.g. [41,43]). Clearly, any early warning system devised for spatially extended systems needs to account for these complexities. Numerous spatial summary statistics have been proposed as leading indicators of transitions [25]. Guttal and Jayaprakash [18] studied the performance of spatial statistics such as spatial variance and spatial skewness as indicators of vegetation population collapse due to increased grazing pressure. Dakos et al. [13] investigated spatial correlation as an indicator of transitions, while Dai et al. [10] proposed the recovery length indicator as a measure of propensity to transition in spatially extended systems. However, spatial statistics are not calculated from time series; rather, they are computed from 'spatial snapshots' of the system at specific times (e.g. [8]). Spatial statistics average over dynamics within patches, which might not be as accurate if dispersal is small, or if environmental conditions are heterogeneous. The loss of accuracy may be particularly important if different biotic or abiotic variables are changing with time in some patches but not in others, and how their influence propagates through the system might be more accurately assessed using patch-specific indicators. Additionally, from a mathematical perspective, spatial statistics do not usually have analytical expressions in terms of the parameters of a model. Consequently, temporal indicators that are specific to each patch are needed, in addition to spatial statistics, to anticipate transitions in spatially extended systems.
To understand how critical slowing down manifests in a multi-patch system, analytical predictions for temporal statistics summarizing variability and slowing down properties in each patch are required. For example, to empirically assess predictability of metapopulation extinction, Dai et al. [10] conducted a multi-patch yeast population experiment that coupled separate populations through transferral of yeast between patches. They showed that increasing the degree of coupling decreased the magnitude of temporal early warning signals of collapse of the metapopulation relative to the isolated subpopulations. Each beaker containing yeast was a patch in the metapopulation. They speculated that transfer between patches 'smooths out' the stochastic fluctuations, and used discrete-time autoregressive models with additive noise to show that temporal signals are smaller in connected populations than in isolated populations. However, their approach assumed only additive noise, and they did not delineate how noise and coupling interact to determine statistical patterns in time series. Patch-specific predictions can additionally be used to answer questions such as whether a single patch can have a clear signal of an impending bifurcation, or whether all patches need to be monitored. A predictive theory for temporal statistics of spatially extended systems that accounts for environmental stochasticity and coupling is currently lacking.
To address this gap, we model a logistically growing metapopulation as a continuous system of two patches, where each subpopulation is gradually approaching extinction as a result of intrinsic patch parameters changing over long time scales. Gradually declining metapopulations on the verge of collapse are an important example of a spatially extended biological system that can exhibit a critical transition. Mathematically, a metapopulation that grows logistically at the local level is characterized by a transcritical bifurcation at the point of extinction. We focus on a smooth transition to extinction in this paper, as this type of transition is important for logistically growing populations approaching extinction [15,20], and for susceptible-infectious-susceptible model infectious disease systems on the verge of elimination due to control activities that lessen transmission or quicken recovery [34]. We address the question of whether temporal statistics for subpopulation fluctuations can provide information on whether a two-patch metapopulation is losing stability, and consequently becoming closer to extinction. We use the model to show analytically that strong coupling suppresses temporal early warning signals in coupled homogeneous populations relative to isolated populations, and we test the predictions through a simulation study. We additionally extend the framework to study the effect of spatial heterogeneities on predicting extinction. Finally, we explore whether both patches exhibit early warning signals of extinction, or whether a single patch can be monitored. Our results suggest that critical slowing down is detectable in both patches, and we recommend they should be monitored simultaneously.

Basic spatial model
Consider the following general model for a spatially extended population occupying two patches, where x i ≥ 0, i = 1,2, denotes the density of subpopulation i that occupy patch i. In the absence of dispersal, subpopulation dynamics are determined by logistic growth at rate r i x i − x 2 i in each patch. The model assumes that individuals migrate from patch i into patch j at rate mx i . If the coupling strength m is positive, then a fraction m of subpopulation i disperse into the alternative patch. Population dynamics in each patch are determined by local environmental conditions, and we assume that local patch conditions affect the intrinsic growth rate of subpopulation i in each patch (r i ≥ 0). In the absence of dispersal, if r i > 0, net reproduction is greater than net mortality in each patch, and in ecological terms, each patch is a 'source'. The model allows for homogeneous environmental conditions (r 1 = r 2 = r) and spatial heterogeneity in intrinsic dynamics (r 1 = r 2 ). The spatially heterogeneous model has a positive steady state (x * 1 , x * 2 ) that can be determined numerically.
In the absence of coupling, each population is isolated, and each patch has two steady states. If r i > 0, each population i has a positive, locally stable steady state at x i = r i , and the population extinction state x i = 0 is unstable. At r i = 0, the two steady states meet and exchange stability, and a transcritical bifurcation occurs.
If environmental conditions are homogeneous (i.e. r 1 = r 2 = r > 0) and the subpopulations move between the patches at rate m > 0, the spatially extended system has two steady states: a positive steady state (x * 1 , x * 2 ) = (r, r) and an extinction state (0, 0). These steady states are spatially homogeneous because the population density is the same in each patch. The eigenvalues of the spatially homogeneous system (1) are −r and −r − 2m (e.g. [24]). If environmental conditions deteriorate in both patches, we assume that r declines towards zero. Consequently, the magnitude of both eigenvalues will decrease, and extinction will occur in both patches when the dominant eigenvalue −r is equal to zero. Therefore, critical slowing down prior to population extinction is predicted in the spatially homogeneous system.

Fast-slow models
To capture the decline of the metapopulation towards extinction due to progressively worsening environmental conditions, a fast-slow model is needed to describe the dynamic approach to the transcritical bifurcation point. To model the effect of deteriorating environmental conditions and subsequent approach to population extinction in a spatially homogeneous system, we assume the intrinsic growth rate r declines slowly relative to the population dynamics in each patch. We modify model (1) to allow for slowly changing environmental conditions, where r 0 > 0 determines the rate of change of the intrinsic growth rate r in each patch. By Fenichel's Theorem [16,29], in the limit r 0 → 0, trajectories of system (2) approach those of the model where r is constant. Since r evolves over a longer time scale relative to the population dynamics, we assume 0 < r 0 << 1, and deteriorating conditions cause a linear decline in r, where t * = r/r 0 denotes the time that r(t) becomes zero, which is an estimate for the time that the solution of model (2) and (3) reaches (0, 0). In spatially heterogeneous systems, the environmental conditions that affect patch quality (e.g. resource availability) may vary. Consequently, the population dynamics in each patch may be governed by different intrinsic growth rates. Here, we assume environmental conditions remain constant in patch 1, (i.e. the growth rate r 1 remains positive and constant) but conditions deteriorate in patch 2, decreasing the growth rate of the population in that patch. These assumptions yield the following model, and conditions induce a linear deterioration in the intrinsic growth rate of patch 2, where t * denotes the time that r 2 (t) reaches zero. By Fenichel's theorem [16,29], for sufficiently small r 0 , the dynamics of the fast-slow system will approach those of the system where r 2 is constant. Models (2) and (4) can be expressed as where r 1 (t) = r 2 (t) = r(t) in the spatially homogeneous case (Equations (2) and (3)).
In the spatially heterogeneous case, we assume r 1 (t) = r 1 > 0 and r 2 (t) is given by Equation (5).

Stochastic models
Environmental conditions may fluctuate due to variation in climate and weather patterns such as humidity and precipitation, and population dynamics in each patch are sensitive to random fluctuations. We derive systems of Ito stochastic differential equations describing spatially homogeneous metapopulations by assuming that environmental stochasticity can influence patch dynamics through two different mechanisms.

Additive noise
The assumption of additive environmental noise implies that environmental variation affects the change in population density as a whole in each patch. In a small time increment t, we assume the change in population density x i in each patch fluctuates randomly according to a normal distribution with mean (r i (t)x i − x 2 i − mx i + mx j ) t and variance σ 2 a t, The strength of noise σ a is assumed to be equal in each patch, and environmental variations are uncorrelated in space (e.g. the noise level does not decay with distance between patches) and in time (random fluctuations in population density x 1 do not covary with fluctuations in x 2 ). We can express (7) as a system of equations, where η i are normal random variables with mean zero and unit variance. If t → 0 and assuming the stochastic integral exists and is unique, is a Wiener process [2]. Equations (8) converge in the mean square sense to the system of stochastic differential equations, System (9) is a stochastic analogue of the fast-slow system (6).

Mechanistic (multiplicative) noise
Model (9) assumes the patch growth rate is affected by environmental variation by a non-specific mechanism. Here we derive an alternative stochastic fast-slow model. In a small time increment t, the intrinsic growth rate in each patch is influenced by random environmental fluctuations that are normally distributed with mean r i (t) t and variance σ 2 μ t, The strength of noise σ μ is assumed to be equal in each patch, and environmental variations are uncorrelated in space and time. Noting that Equation (10) can be written as r i (t) t + σ μ √ tη i , where η i are independent normally distributed random variables with mean zero and unit variance, we can write down the following system of equations that describe the change in population densities in a small increment t, If t → 0 and assuming the stochastic integral exists and is unique, then η i √ t → dW i (t), where dW i (t) is a Wiener process [2]. Equations (8) converges in the mean square sense to the system of stochastic differential equations, Since random perturbations scale with the population density x i in each patch, system (12) describes a multiplicative noise model. We call model (12) mechanistic because uncorrelated environmental variations of equal strength are assumed to specifically affect the intrinsic growth rate of each subpopulation.

Numerical simulations of the homogeneous stochastic models
To examine the behaviour of the stochastic fast-slow models as extinction is approached, we simulated the models using the parameters in Table 1. Figure 1 shows realizations of the x 1 subpopulation in isolated patches (m = 0) ( Figure 1(a, d)) compared to simulations of systems where the x 1 population is coupled to another patch, under low and high dispersal, subject to the contrasting noise regimes, and with homogeneous environmental conditions. Under both noise regimes, coupling patches through migration dampens environmental fluctuations in each patch, compared to when the patches are isolated. When coupling is low, and intrinsic dynamics are equal in each patch, coupled populations fluctuate on a similar level to isolated populations (e.g. compare Figure 1(a, b)). When coupling is high, it is evident from the simulations that fluctuations are dampened due to the influence of coupling. These observations are independent of the type of noise. When noise is mechanistic, the x 1 population appears to be less likely to go extinct, since the noise level tracks the equilibrium population level. In contrast, the population exhibits greater fluctuations close to the extinction threshold when noise is additive. These observations are independent of whether the system is coupled or not. Finally, it is evident from the r 0 10 −5 Estimated time to extinction predicted by model (6) t * 1000 Initial population x i value (homogeneous system) x i (0) 0.1 Initial population x 1 value (strong source patch) x 1 (0) 0.1 Initial population x 1 value (weak source patch) x 1 (0) 0.02 Initial population x 2 value (deteriorating patch) x 2 (0) 0.1 a We explore the effects of spatial heterogeneity by assuming that conditions deteriorate in the second patch only.  Table 1. simulations that the stochastic fast-slow systems take longer to reach extinction than the time t * that the time-varying intrinsic growth rate r(t) reaches zero.

Leading indicators of population extinction
To anticipate subpopulation extinction from time series of each subpopulation, we seek to quantify the behaviour of subpopulation fluctuations through temporal leading indicator statistics. Here, we will show that three leading indicator statistics change systematically as extinction is approached, as a direct result of increases in the return rate of the system to the steady state. The steady state here is taken to be the mean of the quasi-stationary population distribution. Consequently, we let r i (t) = r i in models (9) and (12) and quantify the behaviour of fluctuations near the positive steady state (x * 1 , x * 2 ) of model (1). Of course, the fast-slow models assume the mean is evolving slowly through time, but the steady state is a useful approximation for the mean of the fast-slow models provided that the intrinsic growth rate in each patch changes sufficiently slowly. Recall that by Fenichel's Theorem, since 0 < r 0 << 1, the dynamics of the fast-slow system approach those of the system where r i is constant.
To derive summary statistics for fluctuations about the positive steady state, we first note that we can express systems (9) and (12) as follows, where , t) = 0 in both models since the subpopulations do not covary with each other). The probability distribution P(x(t), t) of the solutions of system (13) satisfies the forward Kolmogorov equation [2],

Linearization of the model
To quantify the behaviour of fluctuations near the positive steady state, we Taylor expand the terms in the mean vector and variance-covariance matrix about (x * 1 , x * 2 ), retaining leading order terms, where a ij denote the partial derivatives of f i and z i = x i − x * i denote perturbations from the steady state. Similarly, The entries a ij of the Jacobian matrix are given by a ii = r i − 2x * i − m, a ij = m, i = j, and the terms of the variance-covariance matrix are D ii = σ a for additive noise and D ii = σ μ x * i for multiplicative noise. The joint probability distribution of fluctuations z(t) = (z 1 , z 2 ) from the steady state satisfies Solutions of the following system of stochastic differential equations, have the same probability distribution (z(t), t) [3].

Derivation of the spectral density
To derive leading indicators of extinction, we first derive the spectral density of the fluctuating subpopulation in each patch. The spectral density is a function that delineates how the amplitudes of each component of the fluctuations in each subpopulation are distributed with respect to angular frequency. It can be obtained through the technique of Fourier transforms. Here we briefly outline the Fourier transformation method. We note that any continuous function z(t) defined in the time interval −T/2 ≤ t ≤ T/2 may be written in terms of its Fourier transformz(ω), where ω denotes angular frequency. Roughly, Equation (17) describes a superposition of amplitudes of all the angular frequency components of the signal z(t). Consequently, Fourier transformation of a time-varying function or signal conveniently describes the underlying frequencies that comprise it [33]. The Fourier transform of z(t) is given bỹ We rewrite system (16) in a convenient form for Fourier transformation, where 1 (t) and 2 (t) represent white noise processes associated with the covariance matrix {D ij }. Fourier transformation of system (19) yields, are the Fourier transforms of the functions z 1 (t), z 2 (t), 1 (t) and 2 (t), respectively. After some algebra, we obtain an expression from Equation (20) for the Fourier transformz 1 (ω), where T and d are the trace and determinant of the Jacobian matrix {a ij }, respectively. Using Equation (21) we can establish the spectral density of the fluctuations (see Appendix for the formal definition and details of the calculation), which we denote by Through similar calculations, we obtain the spectral density of fluctuations of the subpopulation in patch 2, The spectral density function describes the expectation of the square of the modulus of the Fourier-transformed signal z(t) averaged over all time, and it is a measure of how the amplitudes of all the angular frequency components of a stationary process z(t) are distributed with frequency. Equations (22) and (23) are functions of environmental variability, intrinsic growth rate in each patch and coupling between the patches. Consequently, all of these quantities contribute to the size of subpopulation fluctuations in each patch. Various temporal leading indicator statistics can be derived from the spectral density S i (ω). The variance, lag-1 autocovariance function, lag-1 autocorrelation function and coefficient of variation of the fluctuations around the steady state (x * 1 , x * 2 ) may be obtained using Equations (22) and (23) through integration, (e.g. as in [33,34]). Variance and coefficient of variation are measures of the size of fluctuations as extinction is approached. The lag-τ autocovariance function of a signal z(t) is where z * denotes the long-term average value of the signal. The lag-τ autocovariance and autocorrelation functions quantify the degree of memory in the system. Essentially, points in the time series of residuals z i (t) and z i (t + τ ) become increasingly correlated as a bifurcation is approached, due to critical slowing down of the system.
To obtain the variance of the fluctuations of subpopulation i in each patch, we integrate the spectral density over all frequencies, taking advantage of the evenness of S i (ω) [33], To obtain the lag-τ autocovariance function of x i , we calculate [33] 1 2π Dividing Equation (25) by the variance yields the lag-τ autocorrelation function for subpopulation i. The coefficient of variation can be obtained from dividing the square root of the subpopulation variance by the subpopulation mean. All of these statistics can be obtained through numerical integration, but in the homogeneous case, it is possible to derive simple expressions for variance, lag-1 autocovariance, lag-1 autocorrelation and coefficient of variation, which yield analytical insight into how these statistics signal the onset of critical slowing down in the homogeneous spatial system prior to the bifurcation.

Derivations of leading indicators from the spatially homogeneous model
Here, we derive analytical expressions for the variance, coefficient of variation, lag-1 autocovariance function and lag-1 autocorrelation function for the spatially homogeneous model with r > 0 and m > 0. For the spatially homogeneous model, a 11 = a 22 = −r − m and a 12 = a 21 = m. If noise is additive in nature, the spectral density of the fluctuations of the subpopulations in each patch i is given by To obtain the variance of the fluctuations, we integrate the spectral density over all frequencies, To obtain the autocovariance function, we calculate taking advantage of the evenness of S i (ω). Since we are interested in the lag-1 autocovariance function, we set the time lag τ to unity. Integrating expression (28) with τ = 1 gives Dividing this expression by the variance yields the lag-1 autocorrelation function, We note that the variance and lag-1 autocorrelation functions can be expressed in terms of the eigenvalues λ i , i = 1,2 of the spatially homogeneous system, The return rate to the steady state, which is determined by the magnitude of the eigenvalues, governs the behaviour of the summary statistics.
Alternatively, if noise is multiplicative, the spectral density of the fluctuations is Repeating the analysis for the multiplicative noise case yields the following expressions for the variance, lag-1 autocovariance and lag-1 autocorrelation functions, Notice that the lag-1 autocorrelation functions are equal for both noise types, and are determined entirely by the deterministic dynamics. Additionally, the variance can be expressed in terms of the magnitudes of the eigenvalues λ 1 = −r and To obtain the coefficient of variation statistic for each patch, a measure of variability standardized by the mean, we simply divide the standard deviation (square root of the fluctuation variance) by the subpopulation mean r in each patch, In summary, measures of variability depend on the strength of noise, and moreover, the type of noise (additive vs. multiplicative) influences their functional forms. It is evident that all of these indicators are continuous functions of the intrinsic growth rate r and the strength of coupling m. All of the leading indicator functions exist for r in (0, ∞) and are defined for m in (0, ∞).

Predicted behaviour of leading indicators derived from the spatially homogeneous model
Finally, we are interested in the qualitative behaviour of the leading indicators as patch quality deteriorates, that is, the intrinsic growth rate r of each subpopulation approaches zero from the right, for all r in (0, ∞). Taking the limit of each expression as r → 0 + yields, (44) To understand how the statistics change as extinction is approached due to changes in intrinsic dynamics, we calculate the first derivative of each statistic with respect to r ( Table 2). By taking the first derivative of each function with respect to r, provided m and r are strictly positive, v a (r, m), CV a (r, m), CV μ (r, m) and acf 1 (r, m) are strictly decreasing functions of r, and consequently, all of these functions increase monotonically as r approaches zero from the right ( Table 2). On the other hand, v μ (r) is a strictly increasing function of r, and thus decreases monotonically as r tends to zero. Therefore, we predict strictly increasing trends in lag-1 autocorrelation and coefficient of variation, as extinction is approached in each patch, and strictly increasing variance if noise is additive, and strictly decreasing variance if noise is multiplicative.
To understand the effect of coupling on the behaviour of the temporal leading indicators, we examine the functions as m approaches zero from the right, and as m approaches positive infinity. As the degree of coupling decreases, the populations in each patch behave like isolated subpopulations, whereas when coupling increases, and the subpopulations become more well-mixed, the metapopulation behaves like one large patch.
As m decreases to zero from the right, the limit of each statistic approaches the expression for the statistic in the absence of dispersal [33], Consequently, the summary statistics capture the behaviour of the metapopulation as being similar to isolated subpopulations. If coupling increases to infinity, the limits are Increasing the level of migration between patches muffles the temporal signals that measure variability. As m approaches +∞, the limit of the variance approaches 1/2 of the limit of the variance in the absence of dispersal, in both additive and multiplicative cases. In a very wellmixed metapopulation, temporal variance in each patch will be muffled relative to isolated patches. Similarly, as m approaches +∞, the limit of the coefficient of variation approaches 1/ √ 2 of its limit in the absence of coupling, in both noise regimes. Table 2 shows that the derivative of each function monotonically decreases with m, provided m > 0, r > 0 and σ > 0.
Notice that the limit of the lag-1 autocorrelation function approaches exp(−r) as m approaches 0 and +∞. The first derivative of acf 1 (m, r) with respect to m is, Provided m and r are strictly positive, a critical point of acf 1 (m, r) exists at The second derivative test indicates that a local minimum of acf 1 (m, r) occurs at m c . Differentiating expression (55) with respect to m and evaluating the resulting function at m c yields The second derivative is always positive at m c , since exp(−r) > 0, r > 0, and the denominator of expression (57) is strictly positive since the square term dominates.
Consequently, when dispersal is low in the spatially homogeneous system, points x i (t) and x i (t + 1) in a stationary time series are highly correlated. As dispersal increases, temporal correlation between x i (t) and x i (t + 1) decreases, due to mixing between subpopulations. For m > m c , however, points become increasingly autocorrelated because migration is high enough between patches to cause the metapopulation to behave as one patch. In sum, x i (t) and x i (t + 1) are least correlated at intermediate levels of coupling. For intermediate levels of dispersal, we expect the lag-1 autocorrelation to be decreased relative to that in isolated patches, but if coupling is sufficiently high, lag-1 autocorrelation approaches that of a single patch.

Numerical predictions for the summary statistics for the spatially homogeneous system
Evaluating the summary statistics numerically about the mean (x * 1 , x * 2 ) = (r, r) confirms the theoretical predictions in Section 3.4. As the growth rate r approaches zero from the right in each patch, trends in the leading indicators change as predicted by the theory (Figure 2). The influence of coupling dampens patterns in indicator statistics that measure variability (e.g. note the difference in the trend in variance as r decreases under moderately high and low coupling, under both noise regimes, Figure 2(e,f)). Moreover, a moderately high dispersal rate leads to larger changes in lag-1 autocorrelation in synchronous populations compared to isolated patches, as r decreases, as predicted.  Table 1. Predictions were calculated for fluctuations about the steady state (r, r) of system (1) (representing the mean of the stochastic fast-slow system) for r values ranging from 0.1 down to 0.001, in increments of 0.001.
The increasing trend in the lag-1 autocorrelation statistic is independent of noise type, but the noise mechanism influences the patterns in the variability statistics ( Figure 2). Variance decreases when environmental noise influences the growth rate parameter, but it increases if noise is additive. The coefficient of variation increases under both noise regimes, but it increases more rapidly under the effect of additive noise than multiplicative noise. In sum, noise type and coupling influence indicator statistics for population extinction.

Simulation study procedure
The theoretical predictions for the summary statistics in Section 3 are calculated about the steady state (the subpopulation mean (x * 1 , x * 2 ) = (r, r)). To test the robustness of the theoretical predictions for the leading indicator statistics under deteriorating environmental conditions, we conducted a simulation study using the fast-slow models derived in Section 2. Using the parameters in Table 1, we simulated 500 stochastic fast-slow models approaching extinction under high and low dispersal regimes, multiplicative and additive noise, and under spatially homogeneous conditions (system (2) and (3)) and heterogeneous environmental conditions (system (4) and (5)).
To evaluate the performance of the summary statistics as indicators of population extinction, we processed the time series data for the subpopulations occupying each patch as follows. We used Gaussian filtering to remove the influence of the gradually varying mean [12]. We fitted a Gaussian kernel smoothing function with a fixed bandwidth across each x i time series up to the time that extinction was predicted in the deteriorating patch (t * in Table 1). We obtained the residuals by subtracting the fitted function from each time series. To capture changes in the statistics through time, we calculated the lag-1 autocorrelation, variance and coefficient of variation of the residuals over a moving window half the length of each time series. Lag-1 autocorrelation and variance of each x i replicate were, respectively, calculated using the acf and var functions in R, and the coefficient of variation was found by calculating the mean and standard deviation of each replicate. To establish the average behaviour of each statistic, we calculated the median and 95% prediction intervals for each of the statistics for each patch over 500 simulations of each model. The prediction intervals were obtained using the quantile function in R. To quantify the degree of association between time and the statistic for each time series, we used Kendall's correlation coefficient τ , a non-parametric statistic of association between two quantities that has values between 1 (representing positive correlation) and −1 (negative correlation). Kendall's correlation coefficient was used to quantify the strength of the trend for each realization, and the median value of τ from the 500 simulations of each model was recorded to assess the generality of detectability of statistical patterns. To represent the distribution of Kendall's τ for each set of model simulations, Kendall's τ boxplots were calculated for each model (see the electronic supplementary material for details).

Synchronous system results
The theoretical predictions for trends in the indicator statistics are robust under a moving window over a suite of simulations. Increases in lag-1 autocorrelation, variance and coefficient of variation are observed from the simulation study of the coupled model with additive noise (Figure 3), whereas increasing lag-1 autocorrelation and coefficient of variation, and decreasing variance are observed as the extinction threshold is approached in the coupled system with multiplicative noise (Figure 4). As predicted from the theory, higher dispersal levels induce decreased magnitude and slope of the trends in the indicator statistics. Under additive noise, median Kendall correlation coefficient values are all positive, indicating that on average, positive trends in indicator statistics occur as extinction is approached, but there is variability in the observed trends of lag-1 autocorrelation and variance (see Figures 1 and 2 in the electronic supplementary material). The reduction in median τ for these statistics suggest that higher dispersal levels weaken the positive relationship with changing intrinsic dynamics. In contrast, the median correlation coefficient calculated from the simulations for the coefficient of variation is close to unity, showing that a strong positive relationship between decreasing intrinsic dynamics and coefficient of variation can be expected under additive noise. This finding is common to all dispersal regimes. Variance exhibits a strong decreasing trend in the systems with multiplicative  Table 1.
noise, and the corresponding coefficient of variation signal is not as strong as that observed in the additive noise models (compare the median correlation coefficients). Trends in lag-1 autocorrelation are also slightly weaker in systems with multiplicative noise compared to systems with additive noise. In sum, indicator statistics behave as predicted by the theory, with coefficient of variation performing consistently well as an indicator of critical slowing down across coupling levels and noise regimes.

How spatial heterogeneity affects critical slowing down in a spatially extended system
Spatial systems are generally heterogeneous or 'patchy' in nature [31], rather than spatially homogeneous. To examine how spatial heterogeneities affect critical slowing down in a spatially extended system, and whether the predictions for the leading indicator statistics for the spatially homogeneous model are robust to heterogeneities, we considered two fastslow spatially heterogeneous models with additive noise. We assumed that environmental   Table 1.
conditions remain constant in patch 1, while conditions in patch 2 deteriorate. We investigated the dynamics when patch 1 is a 'strong source' patch, that is, patch quality is good and conditions are favourable for population growth. We also investigated the onset of critical slowing down when patch 1 is a 'weak source patch', that is, when conditions are poor for population growth, and the population is close to extinction. Figure 5 shows simulations of the fast-slow model with a strong source patch and a deteriorating patch under low and high dispersal. Due to mixing, subpopulations in both patches decline. The presence of the good patch prevents deterioration to population extinction in the second patch. Although the second patch deteriorates at the same rate as the deteriorating patches in the spatially homogeneous system, the good source patch promotes a strong 'rescue effect'. Under the higher dispersal regime, the populations in each patch decline at similar rates due to the high level of mixing between subpopulations ( Figure 5(b, d)). Similar patterns of subpopulation decline due to high levels of coupling are also observed when patch 1 is a poor quality environment ( Figure 6(b, d)). When a poor quality patch is coupled to a deteriorating subpopulation, both subpopulations decline towards extinction and exhibit larger fluctuations compared to subpopulations where one patch offers a good quality environment (compare  Table 1. Figures 5 with 6). The weak source patch does not promote a rescue effect, even for higher levels of coupling. The spatially heterogeneous metapopulation with a weak source patch appears to be more responsive to the intrinsic dynamics in each patch because there is an initial transient in each patch before the system relaxes to the moving steady state of the fast-slow system ( Figure 6). Initially, the subpopulation in patch 1 is buffered from extinction due to dispersal of individuals from patch 2, whose subpopulation initially has a greater intrinsic growth rate than the patch 2 subpopulation. Figures 5 and 6 suggest the following hypothesis: as a consequence of a rescue effect, temporal indicators of critical slowing down should be weaker in a spatially heterogeneous system with a strong source patch than a spatially heterogeneous system with a weak source patch. The latter system is closer to the extinction threshold, whereas the metapopulation with a strong source patch is saved from extinction.

Theoretical predictions for leading indicators of extinction in spatially heterogeneous systems
To examine the behaviour of leading indicators of extinction in a spatially heterogeneous system, we numerically integrated equations (22) and (23) Table 1.
(x * 1 , x * 2 ) of system (1) (which we took to represent the mean of the stochastic fast-slow system) for r 2 values ranging between 0.1 and 10 −3 , while r 1 remained constant (Table 1) and used the integrals to calculate summary statistics. Figures 7 and 8 show the behaviour of the summary statistics as r 2 decreases towards zero from the right. Similar to the spatially homogeneous system with additive noise, the lag-1 autocorrelation function, variance and coefficient of variation all increase, in both patches, as environmental conditions in patch 2 deteriorate. Moreover, trends in leading indicators are dampened with increasing dispersal, just as predicted by the analysis of the spatially homogenous system.
It is also interesting to compare the temporal signals obtained from subpopulation fluctuations in each patch. Since conditions in patch 2 are deteriorating, it is reasonable to expect that subpopulation x 2 would exhibit a stronger signal of critical slowing down than the x 1 subpopulation subject to a constant growth rate in patch 1, but this is not always the case, because coupling the subpopulations in a metapopulation dampens the signals. Under low dispersal and good quality conditions in patch 1, x 2 exhibits a stronger signal of critical slowing down than x 1 , as indicated by the magnitude and slope of the summary statistics (Figure 7(a,c,e)), but x 1 exhibits more elevated signals of critical slowing   Table 1. Predictions were calculated for fluctuations about the steady state (x * 1 , x * 2 ) of system (1) (representing the mean of the stochastic fast-slow system) for r 2 values ranging from 0.1 down to 10 −3 , in increments of 10 −3 , while r 1 remained constant at 0.1.
down than x 2 when coupling is high (Figure 7(b,d,f)). Here, the good quality patch 1 acts to buffer subpopulation 2 from extinction through high levels of dispersal between patches.
Under high dispersal and bad quality conditions in patch 2, patterns in leading indicators are similar in both patches (Figure 8(b,d,f)). Intrinsic dynamics in each patch become more similar as patch 2 conditions deteriorate. When migration between patches is low, leading indicators obtained from population fluctuations in patch 2 change more rapidly than those obtained from patch 1 as r 2 approaches zero from the right. Further away from the extinction point at r 2 = 0, patch 1 has larger variance, lag-1 autocorrelation and coefficient of variation due to poor conditions that make the x 1 subpopulation closer to extinction. All of the summary statistics increase, in both patches, as r 2 approaches zero.
Comparing magnitudes of the signals in Figures 7 and 8, we observe stronger signals of critical slowing down in the summary statistics obtained from the weak-source-patch spatially heterogeneous model than the model with a good quality patch. These predictions suggest that the spatially heterogeneous system with a weak source patch, which is close to  Table 1. Predictions were calculated for fluctuations about the steady state (x * 1 , x * 2 ) of system (1) (representing the mean of the stochastic fast-slow system) for r 2 values ranging from 0.1 down to 10 −3 , in increments of 10 −3 , while r 1 remained constant at 0.02. extinction, should exhibit stronger signals of critical slowing down than the model with a good source patch that promotes metapopulation persistence.

Simulation study predictions for leading indicators of extinction in spatially heterogeneous systems
Predictions for the summary statistics calculated from the spatially heterogeneous fastslow models over a moving window (Figures 9 and 10) agree with the predicted trends obtained through numerical integration (Figures 7 and 8). From the median τ values, positive associations between each of the leading indicators and time are predicted, but there is considerably more variability in leading indicator trends than those obtained from simulations of the spatially homogeneous system (compare the median Kendall's τ values in Figure 3 with those Figures 9 and 10). Moreover, the prediction that stronger signals of critical slowing down are observed in the spatially heterogeneous system with a weak source patch than the corresponding system with a strong source patch is robust in the simulated fast-slow models (compare τ -values in Figure 9 with those in Figure 10). Just as in the spatially homogeneous system, the coefficient of variation appears to be the most reliable indicator of extinction.   Table 1.

Discussion
Anticipating critical transitions in spatially extended systems is a complex task. Temporal, patch-specific indicators are potentially useful for predicting extinction events in multi-patch systems with low mixing between sites and environmental stochasticity. We developed a stochastic fast-slow two-patch model appropriate for various noise regimes and environmental conditions. We used the static model to derive leading indicators of extinction particular to each patch. Through simulating the stochastic fast-slow models, we showed that predicted trends in the leading indicators are robust, and therefore, critical slowing down prior to population extinction is detectable. Noise, coupling and return rates to the steady state together determine temporal summary statistics for the two-patch model studied here. Using a spatially homogeneous model, we showed that increasing the level of coupling between patches dampens signals by decreasing their magnitude relative to those obtained for isolated populations. Additionally, the framework presented here accounts for the fact that environmental stochasticity can impact a population in different ways -by either affecting the entire patch growth rate,   Table 1. Initial transient behaviour of x 1 and x 2 ( Figure 6) is captured by the sharp change in statistics over the moving window.
or a specific parameter in the system, for example, vital rates such as intrinsic growth rate. Noise regimes affect the trends in variance, with additive noise inducing rising variance, whereas noise that scales with population density induces declining variance. On the other hand, the lag-1 autocorrelation function is independent of the noise regime, but exhibits non-monotonic behaviour with increasing coupling strength. Coupling patches through moderate levels of dispersal predicted a lower patch-specific lag-1 autocorrelation than that for isolated populations, but sufficiently high dispersal predicted an autocorrelation comparable to that of isolated populations, as the metapopulation becomes well-mixed enough to behave as a single patch, and population dynamics become synchronous across patches. The simulation study suggested that the coefficient of variation is the most robust temporal indicator across different noise and coupling regimes, and environmental conditions. As the critical threshold for extinction is approached, the population mean decreases to zero at a faster rate than the rate of change of its standard deviation, and consequently, the coefficient of variation is expected to blow up. These predictions for the behaviour of the leading indicators are robust even when the condition of spatial homogeneity is relaxed.
The analytical expressions derived in the homogeneous case are a useful approximation for their predictive capability in spatially heterogenous systems, where having patch-specific indicators that account for coupling between units becomes more important. Increasing the degree of coupling induces synchronous dynamics in the two patches in the heterogeneous model. When a good quality patch forms part of the spatially extended system, rescue effects through dispersal save the metapopulation from extinction by bringing the dynamics of the deteriorating quality patch and the good quality patch into synchrony. Alternatively, in the weak-source-patch heterogeneous system, the population dynamics of the poor quality patch are synchronized with that of the deteriorating subpopulation over a short time frame, and both subpopulations simultaneously decrease to the critical threshold. These results suggest that both patches in the system need to be monitored, not just a patch where there is a known deterioration in environmental conditions. Having patch-specific predictions is useful, since population dynamics in both patches will exhibit critical slowing down.
To capture the non-stationarity of local dynamics in the metapopulation, we used a fastslow framework to model gradual changes in environmental conditions in each patch. Singularly perturbed models united with various forms of stochasticity offer a natural framework for modelling non-stationary dynamics that change over long time scales. Understanding the near-critical dynamics of these types of models is an underdeveloped area of mathematical ecology (but see Zhu et al. [51]). We evaluated the leading indicator statistics about the steady state, and then we chose a sufficiently slow rate of change of the intrinsic growth rate in each patch so that the numerical solution of the fast-slow model is sufficiently close to the steady state for each growth rate value. More research is needed to identify at what value of r 0 does the validity of this assumption break down. Fast-slow models are known to exhibit bifurcation delays characterized by scaling laws [28,51]. Obtaining analytical expressions or approximations for the extinction-time distribution is an important problem that needs further research, and in particular, in heterogeneous multi-patch systems.
We used a simple model for a transcritical bifurcation to describe the intrinsic patch dynamics but the framework could be extended in many ways. Saddle-node bifurcations are the deterministic skeleton beneath many critical transitions in ecology (e.g. bistable ecosystems [5,11,32,48]). We expect that the predictions for dampening of the indicator statistics under increased coupling would hold for spatial systems with saddle-node bifurcation dynamics in each patch, but the effects of noise and other heterogeneities on leading indicator predictions is not clear. Our approach did not account for environmental variations that drive seasonality in biotic variables (e.g. recruitment, resource availability) and abiotic variables (e.g. temperature, precipitation). Additionally, environmental noise is often correlated in time, inducing correlated population fluctuations (spatial autocorrelation in ecology [26] or Moran effects [21]). Accounting for spatial structure and movement pathways through networks [41,43] is another natural extension of the 2-patch model presented here. Moreover, early warning signal predictions could be different for alternative coupling patterns such as density-dependent dispersal (e.g. [1,45].
In conclusion, we have developed new theory for early warning systems of critical transitions in metapopulations. We have studied a general model for populations approaching extinction that can be readily adapted to different extinction and elimination situations.
We have shown that coupling between patches and spatial heterogeneity dampen statistical early warning signals of an impending bifurcation. Although the analytical expressions for leading indicators have to be evaluated numerically for the spatially heterogeneous model, they still form part of a useful theory for identification of critical slowing down in multi-patch systems.