Food-web theory · work in progress · October 2026

Flexible diets, fragile routes

Predators that switch between prey help complex food webs keep their species. Our simulations show why, and show that the speed of switching matters in a different way from what has been assumed.

The question

Are complex ecosystems more stable than simple ones, or less? Random-network models, starting with May (1972), predict less: adding species and feeding links makes a community less likely to be stable. Yet real ecosystems are very complex, and they persist.

Kondoh (2003) proposed an explanation. Real predators do not eat from a fixed menu; they shift their foraging towards whichever prey currently gives the best return. In his simulations, when predators adapted in this way, more complex food webs were more likely to keep all their species.

Fixed diet effort split equally, whatever the prey are doing predator common medium rare 1/3 1/3 1/3 Adaptive diet effort moves to the prey that pays best right now predator common medium rare most effort some almost none
How a predator adapts. Line width shows how the predator divides its foraging effort. An adaptive predator moves effort towards the prey with the best return, here the common one. Eating that prey down lowers its return, so effort spreads until every prey in the diet returns the same. Shoppers spread across checkout queues by the same logic, until the waits are equal. The rare prey is left alone.

What we did

We built hundreds of random food webs on a computer, with 12 to 500 species, and ran each one two ways: predators that split their effort evenly and never change, and predators that adapt. Then we looked at where each community ends up, and how it gets there.

We also ran them with and without an extinction line, a rule that removes any species whose numbers drop below a tiny value. Kondoh used one, as do most food-web models.

The model in two equations

The model is Kondoh's. Each species i has a population density Ni, which changes as

dNi/dt = Ni ( ri − siNi + e Σj aij fij Nj − Σk aki fki Nk )

Read the bracket left to right. A species grows at its own rate ri, is limited by crowding (−siNi), gains from what it eats and loses to what eats it. Here ri is the species' net growth rate on its own (births minus deaths), and si sets how strongly it limits itself, so on its own it settles at ri/si. In Kondoh's setup every ri is positive and si = 1. In the gain term, fij is the rate at which predator i captures prey j, aij is the share of its foraging effort spent on j, and e is the fraction of eaten food converted into new growth. The loss term is the same interaction seen from the prey's side, summed over its predators k.

The second equation is the adaptation rule:

daij/dt = G aij ( e fij Nj − Σl ail e fil Nl )

Here e fij Nj is the return per unit of effort that predator i gets from prey j, and the sum after it is the predator's average return over its whole diet. Effort on a prey grows if it returns more than average and shrinks if it returns less, at a rate set by G. This is the replicator equation of evolutionary game theory (Hofbauer & Sigmund 1998), applied to each predator's diet. A fixed diet is aij = 1/ki, where ki is the number of prey species that i can eat.

Proven in a special case, seen in every simulation

Each web has one end state

Start an adaptive food web from any populations, any diets and any adaptation speed, and it reaches the same end state: the same species, at the same densities. The end state is set by the web itself (which species it contains, who can eat whom, and their growth and feeding rates), not by its history.

In the special case where predators convert all the food they eat into growth (e = 1), we can prove this. We found a Lyapunov function: a quantity that only ever decreases as the community changes, so the system behaves like a ball rolling into a single valley. The construction extends one that Boukal and Křivan (1999) used for small predator–prey models. For realistic conversion efficiencies we have no proof yet, but every web we tested with Kondoh's parameters behaved the same way, and an independent check of the mathematics and code confirmed the results.

The Lyapunov function

V = Σi ( Ni − Ni* ln Ni ) + (1/G) Σi Ni* Σj aij* ln (aij* / aij)

Starred values are those at the end state. The first sum is the standard Lyapunov function for Lotka–Volterra communities (Volterra 1931; Goh 1977); it is smallest when every population is at its end value. The second sum is the Kullback–Leibler divergence between each predator's diet and its end-state diet, the standard Lyapunov function for replicator dynamics (Hofbauer & Sigmund 1998), weighted by the predator's end-state density and by 1/G. When e = 1, what a predator gains in each interaction exactly matches what its prey loses, the cross terms cancel, and V can only decrease. Every trajectory therefore ends at the same point.

One valley: what we find every start ends in the same place the end state Several valleys: history matters where you end depends on where you start end state A end state B
What "set by the web" means. Height stands for a quantity that always goes down. Left: one valley, so every start ends at the same bottom. That's what we see for adaptive webs. Right: two valleys, where the same web can end up in different communities depending on where it starts. This is only a sketch; the real system has one dimension per species.
Solid for Kondoh's setup

Flexible diets keep more species

In Kondoh's setup, adaptive webs usually kept every species, while fixed-diet webs lost about 5 to 20 percent. The few species that adaptive webs do lose are prey of predators with no alternative food, which cannot switch away.

survives, fixed dietssurvives, adaptive dietslost
Roll call for one 20-species web at its end state, with no extinction line. Fixed diets lose 4 species; adaptive diets keep all 20. Species 18 (ringed) is one of the losses under fixed diets. With adaptive diets it survives, but only just (next figure).
New, preliminary

Speed changes the route, not the destination

If the end state does not depend on speed, what does speed change? The route. Slow adapters keep feeding on a declining prey for too long, so it crashes to very low numbers before predators move on, and only then recovers. The slower the adaptation, the deeper the crash. Fixed-diet webs show no such crashes: species that survive never fall far, and those that are lost decline to extinction.

The Lyapunov function V also limits how deep a crash can be. Since V never increases, the density of a surviving species has a lower bound set by the initial value of V. The diet term of V is divided by G, so slow adaptation gives a large initial V and a weak bound. The bound is far from tight, but it has the observed form: crash depth, in powers of ten, grows roughly in proportion to 1/G.

fixed dietsfast adaptationmediumslowKondoh's extinction line
One species, four runs. Density of species 18 over time; all four runs start from the same state. The scale is logarithmic, with each gridline a factor of 10100 lower. With fixed diets the species goes extinct. With adaptive diets it survives every time, but under slow adaptation it first falls to about one part in 10275 of its usual density. Hover to read values.
New, preliminary

Kondoh's speed effect comes from the extinction line

A real population that fell to one part in 10275 would be extinct. Models represent this with an extinction line, and that is where adaptation speed matters. We reran Kondoh's setup exactly. With his extinction line, the share of webs that kept every species rose steeply with adaptation speed, as he reported. Without it, every adaptive web kept every species at every speed. The end state is the same either way; the extinction line decides which species survive the journey to it.

Kondoh's setup: 12 random webs of 20 species. Each square is one web, filled if every species in it survived. Left: species are removed for good below one part in 1013, as in Kondoh's study. Right: no extinction line. Fixed-diet webs lose species either way.
Known since 1991

Adapted diets get narrow

Each predator could eat many prey, but at the end state it eats only one or two. The links still in use form a tree-like network (a forest, in graph terms) with fewer links than twice the number of species. Matsuda and Namba (1991) proved this for coevolutionarily stable communities. It matters for theory, because calculations that are hard on dense networks are often exact on trees.

The argument is short. If a predator divides its effort between two prey, they must give it the same return:

fij Nj = fil Nl

Each such tie fixes the ratio of two prey densities. A loop of ties would constrain the same ratio along two different routes, which requires an exact coincidence among the feeding rates. So the links in use form no loops, and a network without loops has fewer links than nodes.

The same 20-species web. Faint lines are all the possible feeding links. Blue arrows are the ones still in use at the end, pointing from prey to predator. Hover a species to see its links.

What about rewiring?

Our wider project also studies rewiring, in which a predator that loses its prey adds a new species to its diet (Gilljam et al. 2015). Does rewiring break the one-valley picture?

Gaining and losing links is not the problem in itself. Adaptive predators already drop links, by putting no effort into them, and can take them up again later, and the web still has a single end state. The difference lies in how choices are made. Continuous adaptation keeps every option open and keeps revising. Rewiring makes a one-off choice when a trigger fires, and keeps it. The web then retains a memory of the order in which events happened, so different runs can end differently. An extinction line has the same effect: a species removed during a crash never returns.

Continuous adaptation all options stay open; choices keep being revised any start efforts drift one end Discrete rewiring a choice is made when a trigger fires, then kept a start prey lost: pick a new one picks prey X picks prey Y end A end B
Where history dependence comes from. Which prey looks best depends on exactly when the trigger fires, so runs that differ only in timing can lock in different choices and reach different end states. Our single end state is where rewiring would lead if it were continuous and reversible, which makes it a natural reference against which to measure real rewiring.

Why it matters

What we haven't shown yet

References