Introduction

Patterns in space and time have sparked the interest of ecologists for decades, if not centuries. In a pattern lies the quiet promise of some underlying, fundamental “truth”. A general mechanism that, if deciphered, will naturally lead to an explanation of the pattern.

Patterns in ecology emerge on a variety of spatial and temporal scales1. The most studied patterns in space are species abundance distributions (SADs), range size distributions (RSDs), similarity decay, and species area relationships (SARs). SADs show the classical feature of few abundant and many rare species, probably following a log-normal or similar function2. RSDs show that range sizes of species are normally small3, in agreement with the shape of the SAD4,5. Related to small ranges is the decay of the similarity of communities. With geographical distance similarity between communities usually decays exponentially6,7. Overlapping species distributions lead to SARs, where species number increases with area as a power-law or a similar function8 with exponents between 0.2 and 0.49.

Temporal patterns are more difficult to obtain, as they require the acquisition of data from the fossil record. Notable are species lifetime distributions that appear to follow a power-law with an exponent around − 1.610, and species range evolution curves that show a “hat-shaped”11 pattern of waxing and waning in the geographic range of a species over its lifetime12,13. An investigation of the causal relation between area and lifetime concluded that the influence is mutual, as species that live longer can spread further, and species that are spread further have a smaller risk of going extinct by local fluctuations13. Recently the relative importance of the impact of the environment and of competition was studied finding that the tip of the curve is more influenced by competition whereas the rising and falling flanks are more influenced by environmental conditions11.

Another “pattern”, or rather a rule, of ecology was formulated as the law of constant extinction14, which says that the extinction probability of a species does not depend on its age because species co-evolve in ever lasting competition and thus can never gain advantage over competitors (“Red Queen hypothesis”). But when taking range expansion into account, the Red Queen hypothesis must be rejected or at least modified because there is a clear indication that species occupying larger ranges have smaller chances of extinction15.

An important challenge for theoretical ecology consists in finding models that unify these various spatial and temporal patterns and explain them by common underlying mechanisms. A model should explain several patterns at once16. The key processes that shape biodiversity patterns have long been identified to be speciation, extinction, and dispersal17, whilst a unified underlying model is still missing. This debate is reflected in a large number of co-existing theories as summarized by McGill16. McGill compares six different models and extracts three ingredients shared by all models, which are needed for a theory on biodiversity patterns to successfully reproduce diversity patterns in space (SAR, distance decay of similarity)16. Those are hollow curve SAD (implying that one empirical pattern is explicitly presupposed in order to obtain other patterns), clumping of populations in space, and a lack of spatial correlation of populations. Those features emerged in a simple assembly model near regional diversity equilibrium that also reproduced spatial ecological patterns, like SAR and range size distributions18. May and coauthors19 showed that these three features are not sufficient to reproduce patterns in empirical data of tropical forests. They found that a model that was fitted to show the features proposed by McGill did well in reproducing the SAR but failed for distance decay and co-occurrence patterns. The authors concluded that the three features are not sufficient and that the requirement of spatial uncorrelatedness might be violated in real systems due to habitat preferences19.

The theories mentioned so far revolve around spatial patterns in diversity. Temporal patterns are often analysed separately, although there is a connection of range and lifetime20,21, (but see22,23 for examples that incorporate both spatial and temporal scales). In our opinion, however, one should aim at unifying spatial and temporal patterns and thus obtain a deeper understanding of mechanisms that shape biodiversity patterns.

Another aspect that is often neglected in studies of biodiversity patterns is the food web character of local communities. Especially for temporal patterns obtaining fossil food web data is nearly impossible, considering how much effort needs to be put into the reconstruction of a single food web from a single lagerstätte24. Models often dodge the challenge of incorporating food web structure by using competitive communities18,25 or neutral models which are valid for only one trophic layer26,27.

One notable example is the model of Rogge and coauthors that analysed SARs and lifetime distributions in an evolutionary food web model in space22. However, as their model did not incorporate biomasses of species they could not analyse SADs. Neither did they provide information on spatial co-occurrence or distance decay of similarity. Evolutionary food web models that incorporate explicit population dynamics run into computational problems (time constrains) when large spatial and temporal scales shall be simulated. As a consequence, previous evolutionary food web models only include a small number of habitats, see for example28,29,30.

The model we propose can serve as a valuable tool in exploring the connections between temporal and spatial macroecological patterns for complex trophic networks, as it can be used to model evolutionary time scales for large areas. The model produces a large variety of empirical well studied patterns, like SAD, RSD, SAR, lifetime distributions, and range expansion evolution at once. We further utilise the model to analyse how species range evolution depends on trophic position in the food web. The nature of a food web entails that each species is embedded in a biotic environment spanned by the other species and at the same time competing with species on the same trophic level for resources. So this approach offers the chance to study competition and environmental effects at the same time. We find that basal species that are mainly governed by competition often show a classical waxing and waning pattern whilst consumers that need to deal with competition and environment (need for suitable layer of basal species) show more variance in their range history and have smaller ranges.

Model and methods

We use an evolutionary food web model that merges elements from the classical Webworld model31 with elements from more recent body-mass structured food web models22,32,33,34. The elements from the Webworld model allow us to assign biomasses to all populations without performing time-consuming population dynamics calculations. In this way, we can compute network configurations on many habitats, i.e., on large spatial scales, over evolutionary times. While the Webworld model characterises species by a vector of traits, our model is based on the body mass as the only trait, and on correlated secondary traits such as the preferred prey size.

The body mass has a clear biological meaning and a high importance for almost all processes in biology, for example metabolism35, locomotion36 or prey choice37, which makes it a reasonable choice for a master trait.

Model traits and biomasses

A species i is specified by its body mass, the logarithm of which we denote as \(m_i\), by its feeding center \(f_i\), and its feeding width \(s_i\). The interaction strength \(a_{ij}\) of a predator i with prey j is given by a Gaussian distribution with cutoff,

$$\begin{aligned} a_{ij}= e^{-\frac{(f_i-m_j)^2}{2s_i}} \theta (|f_i-m_j|/s_i)\, \end{aligned}$$
(1)

similar to34, see Fig. 1 for illustration.

As in the Webworld model, the actual feeding rate is obtained by taking competition between predators of the same prey into account. We denote the set of all predators of a single prey j as \(P_j\). The “best” predator (characterised by the highest feeding strength \(a^{*}\)) gets most of the prey. The proportion of prey obtained by each predator depends on its feeding strength difference \(\Delta a_{i} = a^{*} - a_{ij}\) via

$$\begin{aligned} F_{ij} = \exp \left( - \left( \frac{\Delta a_i}{\delta } \right) ^2 \right) . \end{aligned}$$
(2)

After normalising this equation we obtain

$$\begin{aligned} \gamma _{ij} = \frac{F_{ij}}{\sum \nolimits _{k \in P_{j}} F_{k,j}}. \end{aligned}$$
(3)

The parameter \(\delta \) allows a tuning of the competition strength. This expression differs from the Webworld model, where a linear function \(\gamma _{ij} \sim 1 - \frac{\Delta a_i}{\delta }\) was used. This turned out to be a competition function that is not soft enough for a niche space with only one trait (body mass) and lead to mere food chains or to overcrowded basal layers with our feeding rules. So we replaced it by the more smooth Gaussian function, keeping the original idea of comparing predators with the best adapted predator.

Given the interaction parameters \(\gamma _{ij}\), population sizes are calculated in the same way as in the Webworld model. The authors of that model proposed the following self-consistent relation for the equilibrium population sizes B(i):

$$\begin{aligned} B(i) = \gamma _{i, 0} R + \lambda \left( \sum _j \gamma _{ij} B(j) - \gamma _{ii} B(i) \right) . \end{aligned}$$
(4)

The idea is that energy, which is limited and modelled by the resource amount R, is passed from bottom to top through the network in a donor controlled fashion. This means the biomass on the lower level completely determines how much biomass will be in the level above, i.e., there are no top-down effects. The efficiency \(\lambda \) allows us to tune the fraction of biomass transferred to predators. Note that we use the term ‘predator–prey interaction’ even when dealing more generally with consumers and their food source, which may also be a herbivore–plant interaction. Equation (4) permits us also to specify a survival criterion: a species survives if its biomass density lies above the extinction threshold which we choose to be 1 as in the original Webworld publication.

Figure 1
figure 1

Illustration of the food web construction. Species are determined by their body mass and Gaussian feeding kernels. Any species inside this feeding kernel is possible prey for a species. The inset shows the resulting food web.

Speciation and dispersal

New species enter the system locally by variation of existing species. In each time step a habitat is chosen randomly that will be the source of the event. On this habitat a population is randomly chosen that acts as a ‘parent’ for a ‘child’ species.

The logarithm of the body mass of the child, \(m_{\text {child}}\), is chosen randomly from an interval around that of the parent,

$$\begin{aligned} m_{\text {child}} \in \left[ m_{\text {parent}}-\log (q),\, m_{\text {parent}} + \log (q) \right] , \end{aligned}$$
(5)

such that the body mass of the child differs at most by a factor q from that of the parent. The feeding center \(f_{\text {child}}\) of the child, see (1), is chosen randomly from an interval below its body mass,

$$\begin{aligned} f_{\text {child}} \in \left[ m_{\text {child}} - dm_1, \, m_{\text {child}} - dm_2 \right] \, , \end{aligned}$$
(6)

independently of that of the parent. The feeding width \(s_{\text {child}}\), see (1) is chosen randomly from the interval

$$\begin{aligned} s_{\text {child}} \in \left[ s_{\text {min}}, s_\text {max} \right] \, . \end{aligned}$$
(7)

Table 1 summarises all numerical values used in the simulations. The child is added to the habitat of the parent and is taken into consideration for the next calculation of the biomass densities via Eq. (4).

The other process that can bring new species into a habitat is dispersal. For a dispersal event, a species is randomly chosen and copied to an adjacent habitat. We keep the average speciation rate per habitat constant at 1, thus taking it as the reference time scale. Dispersal rate determines how many dispersal events occur on average between two speciation events. The dispersal rate is the most important control parameter of our model.

After each speciation and dispersal event, Eq. (4) is applied to the affected habitat in order to obtain the new population sizes. Over the course of time, the system self-organizes itself, with the resulting food webs and spatial species distribution being an emergent feature of the model. Since the model produces an ongoing turnover of species, it allows us to evaluate the spreading and withdrawal of species in time.

Simulation procedure

Each simulation starts with setting up a spatial set of habitats. We present results for systems with sizes of 100, 400 and 1600 habitats. We use a square lattice with periodic boundary conditions for all of our simulations, which means that there are four neighbours for each habitat. The resource species is available on all habitats. To start the evolutionary algorithm a first species that feeds on the resource is put on each habitat (the same species on all habitats). Then a habitat is randomly chosen that undergoes the first event (speciation or dispersal as described above). The simulation is run for \(10^5\) time steps, i.e., for \(10^5\) times the number of habitats speciation events. The dispersal rate is set to 10 if not indicated otherwise. The simulation is implemented in C/C++ the code is available upon request. Analysis was conducted in python utilising the numpy library. Figures were also made with python, using the matplotlib library.

Evaluated quantities

The following quantities were measured in our computer simulations:

  • Trophic level: Several possible definitions of trophic level exist38. We define the trophic level of a species as the average trophic level of all its prey species, plus one. The resource is assinged the level 0. Thus basal species, which feed on the resource, are assigned the trophic level 1. Species feeding only on basal species will have a trophic level of 2, and so on.

  • Lifetime: The lifetime of a species is defined by the time between its origination by a speciation event and the time of its extinction on the last habitat that it occupied. Lifetimes of species that are still alive at the end of a simulation are not considered for our analysis, as the real lifetime of these species is unknown.

  • Area: The smallest spatial unit in our systems is one habitat. We measure the area in terms of habitats. For obtaining the species-area relationships, increasing areas are sampled in a nested manner. We start counting the number of species on one random habitat, and than increase the area by adding the four neighbouring habitats and counting the number of species in those. Then the next shell of neighbours is added, and so on. We average the result over ten random starting habitats. The shown species-area curves are the time average of ten of those samples (after 10, 20, 30 ...percent of the simulation time).

  • Range: Range refers to the area that one particular species occupies, i.e. the number of habitats on which it is present. This quantity is time dependent because of dispersal. We distinguish the average range of a species, which is its range averaged over its lifetime, and its maximum range, i.e. the largest range that it occupied during its lifetime.

  • Distance: We measure the distance between two habitats as the minimum number of nearest-neighbor steps that is needed to get from one habitat to the other.

  • Similarity: To evaluate the similarity of the food webs on two habitats we use the Jaccard index39. This is the number of species shared between the two habitats, divided by the total number of species on the two habitats. To obtain the similarity for one particular distance we calculate the Jaccard index for all pairs of habitats with this particular distance and then perform an average. This procedure is repeated for ten points during the simulation time (again after 10, 20, 30 ...percent), and the average of those ten values is taken as the data point shown in the similarity-distance analysis.

  • Rank: The rank of a species refers to its index in the list of species that is sorted for decreasing abundance. This means that the most abundant species has rank 1 (smallest possible value) and the least abundant species has a rank equal to the number of species (largest possible value). The rank of a species can differ between the habitats it occupies. The average rank of a species is obtained by averaging the rank over all habitats that it occupies.

Table 1 Overview of model parameters with corresponding values used in simulations. Variable m in the feeding center definition refers to body mass of a species.

Results

Time series

Figure 2a shows a time series for a habitat that is part of a system with one hundred habitats. At each point in time the body masses of all species in this habitat are plotted. Species enter the habitat either through speciation or dispersal and can persist only if their biomass according to Eq. (4) is larger than 1 in this habitat. Species that persist longer in the habitat result in longer horizontal lines, while points indicate species that appear only for a short time. The number of species, shown in blue, fluctuates around 22, which is not far from the maximum species number of 25, determined by the combination of resource size and extinction threshold.

Figure 2b shows the food webs and the rank abundance curves for three points in time, which are marked by vertical dashed lines in panel a. The shape of the rank abundance curve resembles the empirical well documented “hollow curve” shape2: most species have small abundances just above the extinction threshold and a few species have large abundances. This is the “most species are rare” observation. The difference in abundances between “rare” and “abundant” species is smaller than in empirical systems. For the first example, the most abundant species has a biomass density that is 2.3 times larger than the least abundant species. The data show also that basal species are less abundant than those on higher trophic levels in our model. Higher trophic species have larger populations because they have less competitors for food than basal species, which are the most numerous.

We think that the difference to empirical findings in the range of abundance values is due to the fact that the trait space of our model is essentially one-dimensional, while real ecosystems allow for a large number of trait combinations and types of niches. Furthermore, if we would group species with the same predator and prey sets together as trophic species, the number of different basal species would be reduced and the biomass densities of these trophic species would increase.

The most important feature of our model is that it, despite its simplicity, produces a continuous species turnover with several persisting trophic levels. The simulation shows no large extinction avalanches, nor does the dynamics freeze into a fixed species configuration. These features are crucial for exploring species-area distributions and the change of species rank and range in time.

Figure 2
figure 2

(a) Time series for one habitat out of a grid of 10 \(\times \) 10 habitats. At each time point the body masses of all species present at this habitat are plotted. The blue curve denotes species number in this habitat. (b) Food web structure and rank abundance curves for the three time points indicated in (a) by dashed vertical lines. Rank is determined by sorting species for their abundance. This results in the most abundant species having the smallest rank. Colors indicate trophic level (blue = basal, yellow = intermediate, red = top).

Lifetimes and areas

Figure 3 shows several relationships involving area and lifetimes for different dispersal rates on a grid with 1600 habitats. The lifetime distributions (Fig. 3a) are broad and fall off in a power-law like manner for longer lifetimes. These broad distributions manifested themselves already in Fig. 2a in the vastly different lengths of the horizontal lines. The slope of the curve is similar for all dispersal rates shown. For visual guidance we plot a slope of \(-2.4\) (black dashed) which is steeper than the slope of \(-5/3\) (grey dotted) that was reported for a simpler spatial food web model22.

The corresponding species-area relationships are shown in Fig. 3b. For visual reference we include a slope of 0.36 (black dashed), which is an empirically reasonable average value9, and a slope of 1 (grey dotted), which is the slope for the limit that the considered area is much larger than the ranges of all species so that the total number of species becomes proportional to the area. With increasing area, all slopes must eventually approach this limit value. With increasing dispersal rate the slope decreases, and the upwards bend moves to larger areas. This is to be expected, as species ranges increase with increasing dispersal rate. SARs are empirically well studied9. As our model does not resolve the location of individuals within a habitat, our SARs show only the regional and the global scale, but not the local scale, where the slope should be again steeper27. The slopes observed for our model in the regional range have empirically reasonable numerical values.

Figure 3c shows the relation between lifetime and the average range of a species, averaged over all species that fall in a small lifetime bin (width in log scale 0.055). The dashed curve has a slope of 1. We observe that species that live longer occupy larger ranges, closely following the slope of 1. This means that the number of habitats occupied by the species increases linearly with time. This trend ends when the area approaches the system size of 1600 habitats. Higher dispersal rate shifts the average range to higher values, as species disperse farther before a competitor replaces them.

Figure 3
figure 3

Patterns emerging in a square lattice of 1600 habitats for different dispersal rates d, note the logarithmic scaling of the axes. (a) Lifetime distributions are broad and close to a power law with exponent \(-2.4\) (black, dashed), considerably steeper than the slope of \(-1.67\) reported by22 (grey dotted). (b) SAR reach empirically reasonable values (black dashed, slope of 0.369) for intermediate areas. For large areas curves bend toward a slope of 1 (grey, dotted). Dispersal rate decreases the slope of the SAR. (c) Average area (number of occupied habitats over the lifetime of a species) increases with lifetime. Larger dispersal rate shifts the curve to larger areas. Dashed line has a slope of 1.

Figure 4a shows the distribution of the average and maximum range in a simulation with 400 habitats and a dispersal rate of 10. For orientation the black dashed line indicates a slope of − 3. The data show that most species are only present on a few habitats and that basal species are on average farther distributed than non-basal species. We even see a small fraction of basal species occupying all habitats of the system during most of their lifetime. These species have long lifetimes, as seen in Fig. 3a. Basal species have the advantage that they find resources everywhere in the system. Species from higher trophic levels depend on the species configuration on the layers below, which makes it harder to conquer larger areas and have an extended lifetime. Nevertheless, we see from the distribution of the maximum range that some species from higher trophic levels are present in all habitats at some point in time.

The range distribution does not give information on how the ranges of species look. Inhabited habitats could be clumped together or be patchily distributed across the grid. The right panel of Fig. 4 shows the similarity of the local food webs as a function of distance between habitats. Habitat similarity within the basal layer falls off over the first two habitats and then stabilises for larger distances at around 0.8. This is not unexpected, as we observed already that part of the basal species is present in all habitats during most of its lifetime, and that this lifetime is almost as long as the whole simulation time. The success of basal species is mainly determined by their own trait set (i.e. how well they are adapted to the resource) as this is the basis dividing the resource between consumers.

The habitat similarity on higher trophic levels shows the same shape as for the basal species, but decreases more smoothly over a larger distance and levels off at a similarity of 0.2.

Overall, food webs on neighbouring habitats are similar, which indicates that ranges of species that are not so widely distributed do not contain many holes. This is in line with the shallow slope in the SAR for small areas: the species number increases only slowly with area if surrounding communities are similar. For larger areas the composition of the food web changes and the slope gets steeper.

Figure 4
figure 4

Range distribution and similarity decay with distance in a system with 400 habitats and a dispersal rate of 10. (a) Distribution of maximum and average range for the basal layer (TL1) and all other species (> TL1). Average range refers to the average number of habitats a species occupied during its lifetime. Dashed line has a slope of − 3, so most species have small ranges. (b) Food web similarity, measured by the Jaccard index for the same simulation as in (a), error bars denote standard deviation from the mean (for calculation see “Model and methods”). Similarity decreases with distance. The decrease is small for the basal layer, but steep for the higher trophic levels.

Geographic ranges

We now turn to the waxing and waning of the geographic range over the lifetime of a species. We focus on species that conquered at least half of the spatial grid at some point in their lifetime. This removes the short lived and thus less spread species from the analysis and allows us to focus our examination on larger spatial scales, for which our model was tailored. Figure5 shows a collection of typical time series for geographic range (black) and rank (blue) of species from different trophic levels in a system with 400 habitats. All trajectories share one feature: the geographic range starts to grow right after the emergence of the species. We do not observe a species that resides for a long time in a small range and then suddenly starts to expand. The shape of the range expansion curves can be grouped in two different patterns. (1) The “hat” pattern: a steady increase in range size up to a maximum range, then a steady decrease to extinction. We also count curves that show small peaks of in- and decrease on the back of a hat shape as hat-shaped. This category also includes the cases where the species conquers the whole network and resides for some time on all habitats. In a larger spatial system this species would keep increasing its range and thus show a hat curve. (2) The multiple peak pattern: some range evolution curves show no distinct hat shape. They look more like random walk patterns. Noteworthy are cases in which species can recover from a loss of range and possibly reach their maximum range during a later peak.

The shape of the range expansion curves depends on trophic position. Basal species mostly show the hat pattern. By visually grouping the range curves in hat and non-hat shaped of a simulation run with 400 habitats and a dispersal rate of \(d = 10\) for \(t = 10^4\) time steps, we found that around 80% of the basal species showed a hat-like range curve. The higher trophic layers only showed hat-shapes in 30% (TL2) and 35% (TL3) of the species.

The lifetime and range distributions already indicated that some basal species live long and prosper, some can retain a viable population on all habitats for a very long time, for which we see an example in Fig. 5c. Intermediate species as well as top species show a large variety of hat and non-hat patterns. Those species also show more frequently the described recovery from a very small range to an even higher range (bottom right panel). We also observe that the higher the trophic level the smaller the maximum range (peak), which is in line with the range distributions (see Fig. 4 above). Regarding the rank evolution of species we observe a large variety of curves. Basal species often show a constant or steadily decreasing rank over time. A decrease of rank means that the average biomass density decreases. Such a steady decrease can be used as an early warning sign that indicates the chance of extinction of those species. Intermediate species and top species show a less predictable rank evolution, consistent with the more diverse range evolution plots. Large fluctuations in rank indicate that species have vastly different ranks in different habitats. When species loose habitats where they are strongly present, the average rank changes considerably. Here, the time evolution of the rank cannot be used as an early warning sign, as it does not follow a predictable pattern before extinction.

What distinguishes basal species from higher trophic species in our model is food availability. Basal species incur no risks related to their food source—the resource is present in the same amount in all habitats. This means that basal species are mainly regulated by competition. Figure 6 illustrates this. It shows the extent of various causes of extinction for the different trophic levels. Basal species mainly go extinct because of local emergence of a competitor or the incoming of a competitor from neighbouring habitats. Higher-level species have to overcome another obstacle. They need to find a suitable prey, which is not the same in all habitats. So predators depend strongly on their trophic environment. The higher the trophic position of a species the less prey species are present. This enhances the influence of the biotic environment. A look at the extinction reasons for higher trophic levels in Fig. 6 shows that the chance of going extinct due to a non-competitive reason increases with trophic level.

Figure 5
figure 5

Collection of time evolution examples for range (black) and abundance-based rank (blue) of exemplary species from different trophic levels. Simulation set up was 400 habitats and a dispersal rate of 10. (ac) Trophic level \(\ge \) 3, (df) trophic level 2, (gi) trophic level 1. Range evolution shows a triangular shape in some cases, especially often in the basal layer, whilst other species have large fluctuations in their range and rank over time.

Figure 6
figure 6

Extinction causes for species on different trophic levels, again for a system of 400 habitats and a dispersal rate of 10. Blue shades refer to local processes, i.e., to speciation events, red shades refer to processes triggered by immigrants from neighbouring habitats. We sort events into classes depending on whether the change occurs in the same trophic level (competition) or in the trophic level below or above. ‘Sec’ denotes secondary extinctions, which occur as the result of a preceding extinction in the same simulation step. Basal species are mostly affected by incoming competitors, whilst higher trophic species are more sensitive to all kind of changes in the network, e.g. a rearrangement in the lower trophic level.

Discussion

We have introduced and investigated a spatially explicit evolutionary food web model that allows us to explore the distribution of species in space and time, as well as the waxing and waning of species ranges with time. This is the first model that makes it possible to explore these features in the context of trophic networks, showing how they are influenced by competition as well as by predators and prey. Indeed, our model produces empirically well-known patterns in space and time, such as lifetime distributions, species-area relationships, distance decay of similarity, and temporal change of geographic range. On top, we obtain a variety of additional result and gain insights into the mechanisms that generate these patterns. While one might argue that some patterns must emerge trivially in a model like ours, the multitude of patterns emerging together is remarkable.

We find that most species only appear for short times and have small ranges. For species that conquer larger portions of the web we analysed the shape of the range evolution and found that basal species show the empirically observed “hat” pattern more often than species in higher trophic levels. This indicates that the trophic position of a species plays a major role for its range expansion success as well as the shape of its range expansion trajectory over time. To our knowledge, this has not been discussed in the literature so far.

Recently Zliobaite et al.11 analyzed which factors are more correlated to the rise and fall of the range expansion trajectory in fossil data sets of basal mammals. The range expansion follows the so called “hat pattern” that consists of five phases in a species lifetime: origination, expansion, peak, decline and extinction. They found that the temporal location of the peak of the hat pattern is more impacted by competition while the brims are more influenced by abiotic environmental factors. They also compared the range curves of different random walk models with the shape of empirical data and found that a random walk model with competition and environmental factor provides the most realistic looking curves.

Our results for basal species provide an illustration of the mechanism that might lead to these findings. There is one major difference in assumptions: the “environment” in our case is the trophic environment (network structure and abundance distribution). We do not model an abiotic surrounding, yet basal range curves look strikingly hat shaped. A species needs to fit into this trophic environment (network) to first establish a viable population (origination). To successfully increase its range it needs to disperse to neighbouring habitats and be a viable competitor there as well. This leads to the extinction of another species as the dispersing competitor takes its place. As neighbouring basal communities are similar in our systems, the chances are high that the species can spread on a large portion on the grid replacing other species (expansion). This continues until the species has reached the maximum range (peak). It is only a matter of time then until this process is repeated with the species having become the inferior competitor. The species is then successively replaced by a better adapted species (decline). The species thus ages as the network structure changes. At some point the species has vanished on all habitats (extinction). This means that we observe the same dynamics as suggested by Zliobaite et al., but with the trophic and not the abiotic environment as the main driver of the initial increase and later decrease of the range. The truth is probably that both the trophic and abiotic environment are important, as both play an important role in real ecosystems.

Regarding higher trophic species in our system the range expansion curves look more diverse and often do not resemble the hat shape. These species depend on the composition on the layer below. As this layer changes the fate of the higher species changes as well. The emergence of a new prey species that spreads over the network can save a consumer species from extinction. This cannot happen for basal species as these are more or less completely controlled by competition. The studies that we know often deal with basal species, so we are not convinced that the hat pattern is ubiquitous for all species. Future empirical work could focus on predator range expansion and try to find a case where a predator species could regain its range after the emergence of a new prey.

A qualitative difference between the basic trophic layer and higher layers occurred in our data also with respect to the similarity of networks in nearby habitats. The similarity index decays particularly slowly for the basal layer. Theory on distance decay suggests that spatial heterogeneity is a main driver in community turnover in two ways: (1) competitive species sorting along environmental gradients and (2) topological influences that let species with different dispersal abilities experience different landscapes6. As we use a homogeneous landscape we expect the first driver to be non-existent for the basal layer, as all habitats hold the same type and amount of resource. As species do not fundamentally differ in their dispersal abilities and we do not have a heterogeneous spatial topology, the second point is only weakly relevant for the basal species. They have slightly different chances of being chosen for dispersal as we choose the next disperser depending on the biomass density. As we have seen, biomass densities are quite similar for basal species. What remains is a temporal aspect: species that are older can reside on more habitats and have thus a higher chance of being chosen to disperse. To put the cart before the horse, this confirms the theory on distance decay: we expect a much faster decay in a heterogeneous environment, and this is exactly what we observe for higher trophic layers, which experience heterogeneity due to the spatial turnover in basal species composition. A trend to faster decay rates in higher trophic levels was also found in a meta-study7.

A model is always a simplification of reality. Some of the assumptions underlying our model are worth discussing. Species in nature are not restricted to the one-dimensional niche space that we assume. In fact, the original Webworld model characterised species by a large vector of traits31. We, in contrast, characterized species by three traits, all of which are based on body mass. We think that this is the reason why we do not observe super abundant species, but species densities are all of a similar order of magnitude. With a higher-dimensional trait space there must exist more diverse species types and probably also super abundant species, which have a globally optimal trait vector. Nevertheless, our simplification leads to an overall shape of the rank abundance curves that is realistic, as one would expect from a niche apportionment model40. Harpole and Tilman showed that diversity and evenness of grassland communities decreased when niche dimensionality was reduced by adding limiting nutrients to plot experiments41. In turn this indicates that rank abundance curves for less dimensional communities will be flatter. This is in line with the shape of our rank abundance curves.

The probably most interesting trait to add to each species would be its dispersal rate, and to let the dispersal rate evolve. We would expect that this would lead to higher-level species dispersing faster than lower-level species, thus making the differences in range between the different trophic levels smaller. In fact, a previous predator-prey model showed that the predator’s dispersal ability evolved in accordance to spatio-temporal fluctuations of the prey; with higher dispersal rates evolving for larger fluctuations in prey42. However, in the context of food webs the evolution of dispersal is poorly understood and a model like ours would be a good starting point.

Our choice of parameters is guided by the aim to make the model feasible. To be able to perform computer simulations on a large number of habitats we chose a relatively small value for the amount of resource R, so that the number of species of a local food web remained below 25. As we wanted to simulate food webs and not only basal communities we needed to choose a value of the efficiency \(\lambda \) that allows for the emergence of several trophic layers. In the original Webworld Model, \(\lambda \) was identified with the proportion of biomass that is passed from one trophic layer to the next. The value of 0.65 that we use here is much larger than the empirically established value of 0.143. However, in the original Webworld model no distinction was made between resident biomass and biomass fluxes. Therefore the variable B was identified with biomass, while its occurrence in Eq. (4) in fact suggests that it represents biomass flux. A further reason for the difference between the model value and the empirical value of \(\lambda \) is that the model does not take into account energy input due to the below-ground ecological processes. Due to all these simplifications of the model, we do not consider it important to provide an empirical justification of the precise value of the parameter \(\lambda \), but base its value on the condition that the model yields food webs with several trophic levels.

In contrast to other models, the model used here does not rely on an extrinsic extinction rate that randomly extirpates species that might be well adapted to the network. All extinction events are driven by the trophic dynamics, yet we observe an ongoing species turn over. We thus study the pure food web dynamics without a heterogeneous or fluctuating environment and still observe ecological reasonable species distributions. This indicates that incorporating abiotic environments and their fluctuations is not necessarily needed to study food web dynamics.

Rogge et al. analysed lifetime distributions and SAR curves in a model that is simpler than ours as it does not include population sizes22. The lifetime distributions that we find are considerably steeper (slope \(-2.4\)) compared to their value around \(-1.7\). It is also larger than the values reported for empirical findings, which lie between 1 and 2; Newman and Palmer pin them down to \(1.7\pm 0.3\)10. Data for contemporary lifetime distributions show a power-law like shape23,44 with exponents that are in agreement with the exponent of paleological data10. It is noteworthy that there is no consensus whether lifetime distributions follow a power-law or an exponential law, as data often allow for both types of fit, due to (large) uncertainties in fossil data10,45. Exponentials, of course, have a changing slope in a double-logarithmic plot and can thus also be compatible with the exponent observed by us.

Curiously, our model shows steep lifetime distributions even though there is no external random extinction implemented as in other models22. One implication of our value \(\alpha > 2\) is that our distribution has a well-defined mean. This features is shared with exponential distributions.

McPeek argues that lifetime distributions depend on the number and survival time of “transient” species, i.e. species that are on their way to extinction25. He reasons that the time to extinction is elongated for species that are similar, because the inferior competitor holds out longer when it competes with more similar species. If this applies to our type of model, this indicates that species in our system are, despite the one-dimensional niche axis, not as similar as species in the model of Rogge et al.22 that uses the same niche axis, as we observe shorter lifetimes. The difference is that interaction links in22 are binary (presence versus absence), whilst we use Gaussian feeding kernels. The fact that this difference affects the lifetime distributions emphasises the importance of considering details of the trophic interactions. The SAR curves on the contrary are flatter in our model than in the model by Rogge et al.  and in better agreement with empirical data.

O’Sullivan et al.18 found in a competitive metacommunity assembly models a similar collection of macroecological patterns (SAD, range size distribution RSD and SAR) as we did, when regional diversity was near equilibrium. They refer to the work of McGill16 who analysed the assumptions underlying models of macroecological patterns and found that three key ingredients seem to be sufficient for such patterns to emerge. Those are a left skewed SAD, clumping of populations in space, and species distributions in space that are uncorrelated from other species spatial distributions. O’Sullivan et al.18 report that all three ingredients occur in their model and are shaped by regional diversity equilibrium. The closer the system to regional equilibrium the stronger are the observed key patterns (SAD, RSD, Spatial non-correlation). They relate their finding with the theory of ecological structural stability, which revolves around the dynamics on a regional scale. Our communities, in contrast, are trophic communities, operate always near local and regional species equilibrium, i.e. in the regime where O’Sullivan and coauthors18 find the most prominent form of the basic patterns. Comparing the patterns we observe, we also see SADs that are left skewed, and a local clumping of species. We did not analyse the spatial correlation between species. As we have trophic layers of species there will be some correlation between predators and their prey as they can only persist in a habitat if prey is present. In addition to the results obtained by O’Sullivan et al.18, we also derive liefetime distributions, i.e., a paleoecological pattern that also seem to be connected to the metacommunity dynamics. This might indicate that spatial non-correlation is not the most important factor in the mechanisms producing macroecological patterns.

To conclude, our evolutionary food web model produces empirically well studied ecological and paleological patterns. We thus are armed with a valuable tool to broaden our understanding of the mechanisms behind those patterns. Our findings that trophic position influences geographic range and lifetime of a species might motivate further work regarding the interplay of abiotic and trophic factors on range expansion on evolutionary time scales.

More generally, evolutionary models can assist us in forming a deeper knowledge of the processes that lead to what is remnant in fossils. As recently pointed out by Marshall46 in his fifth law of paleobiology, extinction erases information. It is a strength of evolutionary food web models that they allow us to study processes whose extent eludes direct observations.