Main

The dynamics of ecological communities are influenced by interspecific interactions occurring at multiple temporal and spatial scales. Earlier studies have focused mainly on long-term effects; specifically those that focus on the timescale of the birth–death process (for example, predator–prey interactions)10,11,12,13 or those that relate community stability to gross properties of the interaction network such as mean interaction strength, preponderance of weak interactions and species diversity10,14,15. However, more recent theoretical and experimental studies have revealed that temporally variable ecological and/or biological responses (including physiological and behavioural responses) can have considerable effects on community dynamics1,2,4. In other words, short-term responses such as adaptive resource choice, inter-habitat movement or physiological metabolic responses can in principle generate rapid changes in interaction strength, influence population dynamics and even reverse the classic relationship between community complexity and stability1.

Although the arguments are compelling, evidence is lacking for whether and how short-term fluctuations in interspecific interactions influence the overall stability of ecological communities in nature. There are two main challenges here: (1) quantifying fluctuating interspecific interactions and (2) evaluating fluctuating community stability. First, there is the practical challenge of measuring rapidly changing multiple interactions as they occur in nature. Traditional approaches such as direct observation and experimental manipulations (for example, species exclusions) have provided insights into species interactions and their consequences for community dynamics2,16,17. For example, manipulative experiments have shown that the interactions of species are often variable and that this variability can strongly influence the dynamics of a local community5,17. However, as has previously been shown6, these approaches are labour-intensive and are not feasible for studying large ecological communities in nature. Second, because interspecific interactions vary over time, the resultant community stability also varies3; this means that evaluating community stability is not at all straightforward. Natural ecosystems do not typically exhibit equilibrium dynamics7,8,9,18 that would accommodate a standard calculation of stability. Thus, for non-equilibrium systems that possess intrinsic variability (that is, systems that exhibit nonlinear dynamics) the magnitude of population fluctuations (for example, coefficient of variation of abundance) may not be a good indicator of community stability or resilience, because there exists the potential for confounding effects. Here we look instead at a measure that accounts for nonlinear dynamics and that tracks community stability as it varies through time. Relating fluctuating interaction networks to community stability is crucial for understanding how natural ecological communities are maintained.

Fluctuating ecological interaction networks can be identified and measured with empirical dynamic modelling6,7,8,9,18,19—tools based on attractor reconstruction that are specifically designed for analysing nonlinear dynamical systems from their time series6,7,8,9,18,19 (see Extended Data Fig. 1, Methods and Supplementary Information section 1).

We begin by applying convergent cross mapping7, an empirical dynamic modelling causality test, to identify the linkages defining the interaction network for the fish community in Maizuru Bay, a 12-year-long monitoring study that collected observations once every two weeks20 (Extended Data Fig. 2). Overall, we identify 14 interspecific interactions among the 15 dominant fish species (Fig. 1, Extended Data Fig. 3 and Extended Data Table 1). Most of the detected interactions are ecologically interpretable (Supplementary Information section 2), and all the species—except Engraulis japonicus—have at least one interaction, which indicates that interspecific interactions have a non-trivial role in the community dynamics.

Figure 1: Reconstructed interaction network of a subset of the Maizuru Bay fish community.
figure 1

Arrows indicating interspecific interactions are assigned on the basis of the results of convergent cross mapping (Extended Data Table 1). Blue and red colours indicate positive and negative interactions, respectively, calculated by the S-map method based on the 12-year average. All fish images by R.M.

PowerPoint slide

The attractor for a set of causally related fish species is constructed by plotting their abundances as a point in a coordinate space in which the axes are the set of causally related species (see Methods), and tracing the position forward in time to delineate a trajectory7 (https://youtu.be/fevurdpiRYg). As the system travels along its attractor, S-maps (sequential locally weighted global linear maps) can be used to compute sequential Jacobian matrices9, the elements of which are partial derivatives that describe the changing interactions between species6; this is known as the multivariate S-map method6,9,18 (see Methods).

Figure 2a shows that interactions in the Maizuru Bay fish community are not static; this contradicts a common assumption of ecological research. Instead, they change over time, as expected for a system with nonlinear dynamics (Extended Data Table 2). Of the 14 interspecific interactions, on average 8 are negative and 6 are positive. The right-skewed distribution of mean interaction strengths in Fig. 2b shows that the interaction network is dominated by weak links; this domination is hypothesized to be a stabilizing property14,15. There is also a clear seasonal pattern at the community level; weak interactions become more dominant during summer months than during winter months (Fig. 3), with a lower median:maximum interaction strength ratio (as this index decreases, weak interactions become more dominant). These fluctuations in interaction strengths could be driven by a number of mechanisms acting independently or together; these include time-varying behavioural and/or physiological responses1,2,3, fluctuations in species diversity21, or a weakening of interactions among fish species due to higher primary productivity during the summer that results in higher fish abundance20.

Figure 2: Time-varying interspecific interactions in a subset of the Maizuru fish community.
figure 2

a, Fourteen interspecific interactions quantified by the S-map method. The x axis indicates the sampling time (2-week intervals) from 2002 to 2014. b, The distribution of average interaction strengths over the 12-year sampling period.

PowerPoint slide

Figure 3: Time-varying stability, interaction strength and Simpson’s diversity index.
figure 3

a, The dynamic stability of the fish community. Dynamic stability is computed as the absolute value of the real part of the dominant eigenvalue of the interaction matrix at each time point. The fish community tends to recover from perturbations if the dynamic stability is lower than 1 (dashed line). bd, Mean interaction strength (b), weak interaction index (median interaction strength:maximum interaction strength ratio; a lower ratio indicates increasing dominance of weak interactions) (c) and Simpson’s diversity index (d) of the fish community. White or grey shading delineate each 1-year interval (from January to December).

PowerPoint slide

Community stability at each time point is evaluated by computing the dominant eigenvalue of the time-varying interaction matrix: this sequentially computed ‘local Lyapunov stability’ is hereafter referred to as ‘dynamic stability’ (see Methods). Our analysis reveals that dynamic stability varies in a non-random way (Extended Data Table 2); community dynamics are mainly stable in the summer (that is, the dynamic stability is less than 1.0; Fig. 3a), and unstable in the winter (that is, the dynamic stability is more than 1.0; Fig. 3a). Sensitivity analyses show that dynamic stability is robust when including less abundant species in the analysis, as well as when incorporating observation errors in the census data (Extended Data Fig. 4 and Supplementary Information sections 3, 4). Finally, we find that the stable time period (dynamic stability < 1.0) contains smaller variations in population abundances than the unstable period (Extended Data Fig. 5 and Supplementary Information section 5), and this supports the proposition that population fluctuations reflect community stability in the Maizuru Bay fish community, given that the level of stochastic noise through time is relatively constant.

We identify two large-scale properties as being responsible for the fluctuation in dynamic stability (Fig. 4a–c; see also Extended Data Figs 6, 7): overall interspecific interaction strength and species diversity. Figure 4d shows that the dominance of weak interactions is the strongest driver of dynamic stability, with the largest absolute effect. Therefore, the co-occurrence of weaker interactions and stable conditions during summer (Fig. 3a, c) seems to reflect a true causal relationship. This provides empirical support for the theory that weak interactions are stabilizing14,22. The analysis also identifies species diversity (Simpson’s diversity index) as a stabilizing factor (Fig. 4c), supporting recent findings from manipulative experiments23 and addressing the long-standing question of how species diversity influences community dynamics1,11,23,24. Our results show that the Maizuru Bay fish community tends to recover faster from perturbations when species diversity is higher. In fact, higher species diversity seems to be a necessary condition for the dominance of weak interactions (Extended Data Fig. 8) and more stable communities (Fig. 4d). Because diversity seems to be a weaker driver of stability than interaction strength, it is likely that the latter is a more proximate driver of dynamic stability. Further investigations drawing on additional observational time series could reveal whether and how different interspecific interactions—for example, diet choice, anti-predator defence and inter-habitat movement—are involved in the maintenance of the Maizuru Bay fish community.

Figure 4: Causal influences between dynamic stability, interaction strength and Simpson’s diversity index.
figure 4

ac, Convergent cross mapping between dynamic stability and properties of the interspecific interaction network (a, b), and Simpson’s diversity index (c). Solid lines indicate cross-map skill (ρ) from dynamic stability to another variable, which represents the causal influence of that variable on dynamic stability. Shaded regions indicate 95% confidence intervals of 100 surrogate time series. Cross-map skills (ρ) reported in ac were all significant. d, Influences of mean interaction strength, weak interaction index and diversity on dynamic stability (n = 240 calculated partial derivatives for each index). Midline, box limits, whiskers and points indicate median, upper and lower quartiles, 1.5× interquartile range and outliers, respectively. Note that smaller values of dynamic stability are indicative of stability (see Fig. 3 and Methods).

PowerPoint slide

Here we present a framework based on attractor reconstruction from observational time series that quantifies the dynamic nature of the community interaction network and provides an estimate of dynamic stability. Although the exact individual-level behaviour that gives rise to the interspecific effect cannot be addressed by this analysis, the analysis does enable quantitative identification of the essential interactions that influence community dynamics. Further applications of this framework to ecological time series in different geographical regions—for example, Arctic and tropical regions3—will enable tests of the generality of the present results, and aid in identifying other critical patterns in the dynamic stability of natural ecological communities. Such applications of empirical dynamic modelling could also clarify the relationships between interaction strengths, properties of the distribution (for example, the dominance of weak interactions, skewness and standard deviations), network structure (for example, arrangements and topologies) and community dynamics (such as the relationship between dynamic stability and population variation observed in this study), enabling a more in-depth investigation of the mechanisms by which dynamic interactions and species diversity govern the behaviour of a wide range of natural ecosystems.

Methods

Fish community time-series data

Long-term time-series data of the fish community were obtained by underwater direct visual census conducted approximately once every two weeks along the coast of the Maizuru Fishery Research Station of Kyoto University (Nagahama, Maizuru: 35° 28′ N, 135° 22′ E) from 1 January 2002 to 2 April 2014 (285 time points during approximately 12 years)20. This high-frequency census enables the detection of short-term interspecific interactions. The area was within 50 m of the shore and at a water depth of 1–10 m. A 600-m visual transect line, composed of three parts, was set: each transect line was 200 m long with a 2-m-width survey area. Each transect included a rocky reef, brown algae macrophyte and filamentous epiphyte vegetation, live oysters (Crassostrea gigas) and their shells, a sandy or muddy silt bottom and an artificial vertical structure that functioned as a fish reef. The vegetation in the area was dominated by Sargassum tortile and Sargassum thunbergii on the rocky substrate and patches of Zostera marina on the shallow (1–2 m) sandy bottom substrate.

Species and sizes of individual fish observed within 1 m of each census line (thus triplicated in the survey area) were recorded on waterproof paper. Each census was conducted on a sunny day and commenced around 12:00 with high tide of 2–3 h. The census was undertaken by diving using scuba equipment. Water temperature was measured near the surface and at the deepest point of the census line (10-m depth) during the diving. Visibility ranged from 1 to 15 m but was normally 3–5 m. Daily observations at 10:00 revealed that surface water temperature and salinity in the area ranged from 1.2 to 30.8 °C and from 4.14 to 34.09 parts per thousand, respectively. The mean ± s.d. surface salinity was 30.0 ± 2.9 (n = 1,753) and did not show clear seasonality. Importantly, the same scientist conducted this field survey throughout the 12-year research term. Thus, inconsistency in fish identification and counting is diminished in the time series.

We selected dominant fish species (that is, with a total observation count that was larger than 1,000) for analyses, because rare species that were not observed during most of the census term (that is, with many zero values) were not suitable for the time-series analysis. We used time series of 14 fish species and 1 jellyfish species (Extended Data Fig. 2). Jellyfish data were included because jellyfish are abundant in this region, and are thought to have notable influences on the community dynamics of fishes25. Including less abundant species in the analyses does not change the conclusion (see Extended Data Fig. 4). Before the analyses, the time series were normalized to unit mean and variance26.

Convergent cross mapping

Convergent cross mapping (CCM) was performed to determine the causal relationships among the 15 dominant species in Maizuru Bay. CCM is based on Takens’s theorem for nonlinear dynamical systems. For multi-variable dynamical systems in which only some of variables are observable, Takens’s theorem27—with several extensions (for example, ref. 28 and references therein)—proves that it is possible to represent the system dynamics in a state space by substituting time lags of the observable variables for the unknown variables. The information in the unobserved variables is encoded in the observed time series, and a single time series can therefore be used to reconstruct the original state space. This gives a time-delayed coordinate representation (or embedding) of the system trajectories, and this operation is sometimes referred to as state space reconstruction.

An important consequence of the state space reconstruction theorems27 is that if two variables X and Y are part of the same dynamical system, then the reconstructed state spaces of X and Y will topologically represent the same attractor (with a one-to-one mapping between the reconstructed attractors of X and Y). Therefore, it is possible to predict the current state of variable X using time lags of variable Y. We can look for the signature of a cause variable (for example, X) in the time series of an effect variable (for example, Y) by testing whether there is a correspondence between their reconstructed state spaces (that is, cross mapping)7. In this study, cross mapping from one variable to another was performed using simplex projection8. In the simplex projection, a set of neighbouring points of Y(t) that have similar historical processes to those of Y(t) can find their time-corresponding points of X. If the time-corresponding set in X is also the neighbouring points of X(t), then it is possible to estimate X(t) accurately by cross-mapping. The cross-mapping skill (that is, predictability) can be evaluated using the correlation coefficient (ρ) between cross-map estimates and observations. Significant skill of the cross mapping is one necessary condition for the detection of causality (see the test for significance in ‘Phase-lock twin surrogate method’).

In addition, the cross-map skill will increase as the library length (that is, the number of points in the reconstructed state space of an effect variable) increases if two variables are causally coupled7 (that is, convergence). As the number of points in the state space increases (that is, the time series becomes longer), the trajectory defining the attractor fills in, which results in closer nearest neighbours and declining estimation error (a higher correlation coefficient). Therefore, convergence is another necessary condition for the detection of causality. Practical criteria for the causality are described later (see ‘Phase-lock twin surrogate method’).

CCM results are sensitive to the choice of embedding dimension (that is, how many time-lag coordinates are used for state space reconstruction). Therefore, the embedding dimension (E) should be carefully determined. In this study, E was determined by evaluating out-of-sample predictability through trials of different embedding dimension, using univariate simplex projection8 as previously described29. In brief, the value for E that gives maximum predictability was chosen, which ensured that E was sufficiently large to capture the dynamics of the system without including extraneous dimensions. Predictability can be measured using mean absolute error, root mean squared error or correlation (ρ) between predictions and observations. To determine the best E value we used mean absolute error, as described previously29. The best E value was examined from 1 to 24, as our dataset came from a census conducted once every two weeks (24 points per year), which allows for the influence of previous populations (up to one year prior). After the determination of the best E value, CCM was applied to the normalized abundance time-series data of the dominant fishes.

Phase-lock twin surrogate method

Most of our data show strong seasonality (Extended Data Figs 2, 6), and time-series data with strong seasonality often exhibit a high cross-map skill even when there is no causal relationship between variables (Extended Data Fig. 3). This means that synchronization driven by seasonality can lead to misidentification of causality (that is, false positives). To deal with this problem, we developed the phase-lock twin surrogate method, which takes seasonality into account. This new method is modified from the twin surrogate method30, which generates time series that preserve the shape of an attractor but exhibit no causal relationship with a target time series.

The twin surrogate time series is generated by the following steps: (1) construction of a recurrence matrix, (2) identification of twin points on the recurrence matrix, (3) selection of the starting point of the surrogate, and (4) generation of the surrogate time series by switching trajectories at the twin points. In brief, the recurrence matrix is constructed using the following equation:

in which Θ denotes the Heaviside function (Θ(a) is 1 if a is positive and 0 otherwise), ||∙|| indicates the maximum norm, δ is a predefined threshold and x(i) denotes the system state at time i. We initially set δ = 0.125. Results do not change significantly for δ values between 0.05 and 0.2030. By coding Ri,j = 1 in the matrix as black dots and Ri,j = 0 as white dots, we obtained recurrence plots. The recurrence plot contains all topological information about the attractor. In the recurrence plot there can be identical columns; that is, , called twins. These two points are not only neighbours but also share the same neighbourhood. Twins are special points of the time series that are indistinguishable in the recurrence plot, but have different pasts and futures in time series. After identifying the twins in the recurrence plot, we randomly chose an entry (l) of the original time series (x(l)), as the starting point of the surrogate time series, xs(1). Then, we followed the trajectory in the state space—xs(1) = x(l), xs(2) = x(l + 1), xs(3) = x(l + 2) and so on—in order to generate the surrogate. If we suppose that entry m of the surrogate xs(m) may be given by entry j of the original time series (x(j)), if x(j) has no twins we set xs(m + 1) = x(j + 1). If x(k) is a twin of x(j), we set xs(m + 1) = x(j + 1) or xs(m + 1) = x(k + 1) with equal probability. This step is iterated until the surrogate time series reaches the same length as the original time series. By performing the above steps, the twin surrogate time series preserves only the nonlinearity (that is, the shape of the attractor), but not any of the remaining causal influences.

To take seasonality into account, we added another constraint to the twin surrogate method: twins in the recurrence plot must also be from the same season (that is, phase-locking). In our dataset, there are 24 points per year; therefore, if a reconstructed state represents an observation in early January, only observations in early January (from a different year) can be considered for switching of the trajectory. With this constraint, the surrogate time series preserves both the seasonality and the shape of the attractor (Extended Data Fig. 3b).

To evaluate the phase-lock twin surrogate method, we generated artificial time series with seasonality by using the following equations:

in which βxy and βyx indicate interspecific interactions, and αx and αy indicate the strength of the seasonality. ‘Seasonality’ is defined by a sine curve. In this analysis, the time-series length is 288 (that is, equivalent to a 12-year census with 24 observations per year). To examine the effects of seasonality on the cross-map skill (ρ) and convergence, we set βxy = βyx = 0 (no causality between X(t) and Y(t)) and ax = ay = 0.3 (moderate seasonality). We found that even a moderate strength of seasonality resulted in a relatively high predictability and convergence of cross-map skill (a false positive) (Extended Data Fig. 3a).

The phase-lock twin surrogate method generates time series with the same nonlinearity and seasonality (Extended Data Fig. 3b). Intuitively, αx = αy = 1.0 indicates strong seasonality in the time series (Extended Data Fig. 3b and Supplementary Information section 6). By changing αx and αy from 0 to 2.0, we examined the performance of the new surrogate method under various strengths of seasonality. We examined conditions of no interaction between X and Y (βxy = βyx = 0), unidirectional interaction from X to Y and bidirectional interactions between X and Y (Extended Data Fig. 3e–h).

Analyses of model simulations show that the phase-lock twin surrogate method gives a conservative criteria (that is, low possibility of false positives) for detecting causality among time series that exhibit seasonality (Extended Data Fig. 3). In this study, the CCM was regarded as significant if the following two criteria were satisfied: (1) cross-mapping for the real time series showed higher skill (ρ) than 95% confidence intervals of phase-lock twin surrogate data (that is, significant predictability), and (2) the difference between the cross-map skill at the smallest and largest library sizes (Δρ) was larger than 0.1 (that is, convergence). Although Δρ > 0 is a minimum and simpler criterion for convergence, observation error can cause fluctuations in ρ and Δρ, and we therefore used a more conservative criterion instead.

The multivariate S-map method

The multivariate S-map method enables quantification of dynamic (that is, time-varying) interactions6,9. If we consider a system that has E different interacting species, and the state space at time t is given by x(t) = {x1(t), x2(t), …, xE(t)}, for each target time point t*, the S-map method produces a local linear model C that predicts the future value x1(t* + p) from the multivariate reconstructed state-space vector x(t*). That is,

The linear model is fit to the other vectors in the state space. However, points that are close to the target point x(t*) are given greater weighting. The model C is the singular value decomposition solution to the equation B = AC, in which B is an n-dimensional vector (n is the number of observations) of the weighted future values of x1(ti) for each historical point ti, given by

A is then the n × E dimensional matrix given by

The weighting function w is defined by

which is tuned by the nonlinear parameter θ 0 and normalized by the average distance between x(t*) and the other historical points,

The Euclidian distance between two vectors in the E-dimensional state space is given by ||x − y||. Note that the model C is separately calculated (and thus potentially unique) for each time point t. The coefficients of the local linear model (C) are a proxy for the interaction strength between variables6; these interaction strengths, defined as partial derivatives in a multidimensional state space, quantify the population-level interaction between two species and do not assume any particular form of interaction, such as mutualism or competition. Instead, one might be able to infer the type of interactions after calculating the interaction strength.

Evaluations of the multivariate S-map method

Here we also show that the long-term averaged interaction strength estimated from the multivariate S-map method is equivalent to the interaction coefficient, βij in the following equations (Extended Data Fig. 1). These equations provide the explicit system of equations for the two-species model:

in which rx and sx (for species x) or ry and sy (for species y) represent an intrinsic growth rate and a self-regulation term, respectively. βyx is an effect of Y on X and βxy is an effect of X on Y.

In a unidirectional two-species model, βyx was set to 0 and βyx was set to −0.31. Other parameters were set as follows: rx = 4, sx = −3, ry = 3.1 and sy = −3.1. The length of the time series was 1,000 and the initial abundances of X and Y were set at 0.5. Before the multivariate S-map analysis, the time series were normalized to unit mean and variance. We used a fully multivariate embedding, {X(t), Y(t)}, to reconstruct the attractor.

In a bidirectional two-species model, βyx was changed from −0.5 to 0.2, with an interval of 0.1. βxy was changed from −0.5 to 0.25, with an interval of 0.005. Other parameters were set as follows: rx = 3.8, sx = −3.8, ry = 3.5 and sy = −3.5. The length of the time series was 1,000 and the initial abundances of X and Y were set at 0.5. The attractor was reconstructed using a fully multivariate embedding.

To further test the effectiveness of the S-map method, we applied it to experimental systems in which signs of interactions were known on the basis of biological background knowledge about organisms. We applied the S-map method to two experimental systems; one was a classic predator–prey system, and the other was a more complex rotifer–algae system.

The data of the classic ParameciumDidinium protozoan prey–predator system have previously been published31 and can also be found at http://robjhyndman.com/tsdldata/data/veilleux.dat (Extended Data Fig. 1e). A previous study32 identified conditions that produced sustained oscillations in predators (Didinium nasutum) and prey (Paramecium aurelia). Initial densities of Paramecium and Didinium in medium were 15 and 5 individuals per millilitre, respectively. Abundance measurements were taken every 12 h. The first 10 data points were removed to eliminate transient behaviour in the initial period of the experiment. The time series were then normalized to unit mean and variance before analysis.

The data of the rotifer–chlorella system were from an experimental predator–prey system33. The predator–prey system consisted of Brachionus calyciflorus (an asexually reproducing predatory rotifer) and Chlorella vulgaris (an asexually reproducing algal prey) (Extended Data Fig. 1g). One type of algal clone has a higher population growth rate, whereas another type of algal clone is more defensive against rotifer predation (hereafter algae r and algae K, respectively). The changes in clonal frequency in the algal population (that is, natural selection in the population) were quantified using the allele-specific quantitative PCR technique. Detailed experimental protocols were as described33.

Among the 63 data points, 7 were not available (days 10, 14, 17, 18, 26, 57 and 59). The missing data were estimated using simple linear interpolation. Before quantifying interaction strengths between the species, CCM was performed to detect causality. CCM detected causalities between all pairs in the system; thus, there are six causal relationships in the system. We then quantified interaction strength using the S-map method. The S-map method was performed using full multivariate embedding that is, {Rotifer(t), Algae_r(t), Algae_K(t)}. To forecast the abundance of the rotifer, algae r and algae K, nonlinear parameters (θ) were set as 0.1, 1.8 and 1.2, respectively.

Reconstruction of the dynamic interaction matrix of the fish community

CCM with the phase-lock twin surrogate method identified 14 causal links among the fish species (Fig. 1 and Extended Data Table 1). To approximate the interaction matrix (Jacobian matrix) of the fish interaction network at each time point, we used the multivariate S-map method6,9.

The estimation of interaction strengths by the multivariate S-map method is sensitive to the choice of variables included in state space reconstruction, and these variables should therefore be determined carefully. In the analysis of the Maizuru fish community, variables included in the state space reconstruction were as follows: if species x1 is causally influenced by x2 and x3, and if the best E of x1 is 5 (determined by the simplex projection; see ‘Convergent cross mapping’), the state space is reconstructed by {x1(t), x2(t), x3(t), x1(t − 1), x1(t − 2)}. That is, the number of variables used to reconstruct the attractor must be equal to the best E: to fulfil this requirement, the time lags of the target variable were included in the embedding space when the number of candidate species was smaller than E. This was done to capture fully the dynamics of the system without including extraneous dimensions. The best nonlinear parameter (θ) was chosen for the multivariate embedding on the basis of the mean absolute error, as previously described29. In this study, the coefficients of the local linear model for x2(t) and x3(t) were regarded as interspecific interaction strengths, and other coefficients (that is, for x1(t), x1(t − 1) and x1(t − 2)) were not interspecific and thus excluded from the calculations for indices of interspecific interactions (see later).

Dynamic stability of the fish community and indices of interspecific interactions

The interaction strength quantified by the multivariate S-map method is an approximation of the partial derivative for each time point. Thus, using the multivariate S-map method, population dynamics including time-lag effects are described as

in which indicates the predicted abundance of species i in the community ( for species 1, in this example), and C0 indicates the intercept. Note that the partial derivatives and intercept are calculated using the S-map method as described earlier6. For simplicity, here we describe a case in which includes only one time lag (x1(t − 1)), but the following descriptions can easily be extended to cases that include more time-lag terms. In a matrix notation, the community dynamics are described as

in which X indicates the n-dimensional vector of the abundance of n species, Ji is the n × n-dimensional matrix of partial derivatives (interaction strengths), and C is the n-dimensional vector of the intercepts. If we write the unity matrix, zero matrix and zero vector as I, O and O, respectively, then we can describe X(t) as

By combining equations (1) and (2), we get the following:

If we write

Then equation (3) can be written as:

Assuming that W* is the abundance of the steady state (note that assuming W* here does not assume the existence of the local stable equilibrium of the community dynamics), equation (4) can be written as

By substituting equation (5) from equation (4), we get

For the purpose of convenience, we write W(t + 1) − W* as Z(t + 1), and then equation (4) can be written as:

Therefore, the stability of this system can be examined by investigating eigenvalues of the interaction matrix A, which correspond to the Lyapunov exponents. In this study, for the purpose of convenience, we describe the local Lyapunov stability as the absolute value of the real part of the dominant eigenvalue of the interaction matrix A, and this stability is called ‘dynamic stability’. A dynamic stability value of less than 1 indicates that the community tends to recover faster from perturbations, if the interspecific interaction strengths (off-diagonal elements in the interaction matrix J1) and self-regulation effects (diagonal elements in the interaction matrix J1 and J2) are kept constant. Although our analysis may be analogous to local stability analyses, the calculation of dynamic stability does not require an assumption of a locally stable equilibrium: because the multivariate S-map method actually generates a state-dependent (and hence time-varying) interaction matrix, it is applicable to non-equilibrium systems and reflects whether the trajectories at any particular time are converging or diverging6. In addition, we computed several properties of the interaction network structure including mean, weak interaction index (indicated by the median interaction strength:maximum interaction strength ratio), standard deviations and skewness, using the absolute value of off-diagonal elements in J1. Previous theoretical studies have suggested that these indices are potential drivers of community stability10,15,16.

Sensitivity of the dynamic stability to the inclusion of subdominant species

In the main analyses, we included only a subset of the whole community; only dominant species were selected. To test the robustness of our analysis to the inclusion of a less abundant species, we performed a sensitivity analysis to look at how the dynamic stability is affected. In this sensitivity analysis, four subdominant species were chosen. These were Ditrema temminckii, Pseudoblennius cottoides, Takifugu niphobles and Takifugu poecilonotus. The total abundance of each of these species during the census term is between 1,000 and 100; furthermore, they do not show too many ‘0’ observations during the census period. Each of the subdominant species was added separately in reconstructing an interaction network. The same procedure described in the above sections was applied to the network reconstruction, quantification of interaction strength and calculation of the dynamic stability.

Sensitivity of the dynamic stability to observation errors

To test the sensitivity of the dynamic stability to observation errors in the visual census data, we calculated the dynamic stability after artificial observation errors were added to the visual census data. In this analysis, we assumed that observation errors are proportional to the number of observed fish individuals. More specifically, observation errors were added using the following R script: error <- rnorm(1, mean = 0, sd = error_percent * data). Error_percent represents the magnitude of observation errors added to the original value, and data indicates the number of fish individuals at a particular time point.

Calculations of coefficient of variation

To compare the dynamic stability in this study and coefficient of variation (CV) of the fish community, we calculated mean values of CV of fish populations (that is, 15 fish species). First, we determined a target time point and selected three time points before and after the target point, which generated a three-month window. Then, we calculated the mean value, standard deviations and CV for each species within the window. The mean CV was calculated at each window by taking the average of the CVs of the 15 fish species. This procedure was repeated throughout the census period.

Relationships between dynamic stability and other variables

Using CCM and the phase-lock twin surrogate method, we investigated the following possible causal drivers of dynamic stability: (1) measures of the strength of interspecific interactions such as mean interaction strength and weak interaction index (Fig. 4a, b); (2) diversity indices (such as species richness and Simpson’s diversity index) (Fig. 4c and Extended Data Fig. 6); (3) water temperature and total fish abundance (Extended Data Fig. 6); and (4) measures of the distribution of interspecific interactions such as s.d. and skewness (Extended Data Fig. 6).

Abundance-based stability index

An alternative and more intuitively understandable measure of stability of the community dynamics would be the Euclidean distance of the species abundance between time point t and t + 1, ||W(t + 1) − W(t)||. Here we show that this abundance-based stability index is directly related to the eigenvalue-based stability (that is, dynamic stability). From equation (4), the abundance-based stability can be written as

Using equation (6), equation (7) can be written as

Equation (8) indicates that the abundance-based stability can be expressed as the product of (A − I) and (W(t) − W*); this (W(t) − W*) describes the difference between the steady state and the abundance at time t. It is important to note that assuming W* does not assume the existence of the local stable equilibrium of the community dynamics. Equation (8) indicates how the difference between the steady state and the abundance at time t will be amplified in the next time step. In other words, (W(t  + 1) – W(t)), (A – I) and (W(t) – W*) indicate the community-level fluctuation, the potential to change the abundance of each population and how the present state differs from the steady state, respectively. The interspecific interactions caused an abundance-based stability index (W(t + 1) – W(t)) (Extended Data Fig. 7), which suggests that interspecific interactions also drive fluctuations in the realized population abundance.

Effects of interspecific interactions and species diversity on the dynamic stability

To determine how interspecific interactions and species diversity affect dynamic stability, we quantified the causal effect using the multivariate S-map method (Fig. 4d), which is described above. Before the analysis, all data were normalized. When using the multivariate S-map method, we used fully multivariate embedding (reconstructed state space = {DynamicStability(t), MeanInteractionStrength(t), WeakInteractionIndex(t), Simpson’sDiversity(t), and time-lag terms}), and the partial derivatives were then calculated.

Computation

Simplex projection, the S-map method and CCM were performed using the ‘rEDM’ package (version 0.2.4)19, and all statistical analyses were performed in the statistical environment R v.3.2.134.

Code availability

The R scripts used for the main analyses are available at https://doi.org/10.5281/zenodo.1039387.

Data availability

Time-series data of the Maizuru fish community are available at https://doi.org/10.5281/zenodo.1039387. All other data are available from the corresponding author(s) upon reasonable request.