Food-web theory · paper in preparation · October 2026

A price rule for species survival in adaptive food webs

Predators that switch between prey help large food webs keep their species. Once the web settles, an adaptive predator holds each prey it eats at a price. At this density the prey is worth as much to the predator as its best alternative. So it cannot eat a prey to extinction while it has other prey left. From this we can predict how many species survive without running a simulation. When predators convert all they eat into growth, we prove that the speed of switching does not change which species survive. It changes only the route.

The question

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

Kondoh (2003) proposed an explanation. Real predators shift their foraging effort towards whichever prey currently gives the best return, a response known as adaptive foraging. In his simulations, more complex food webs were more likely to keep all their species when predators adapted in this way.

Theories of large communities have so far assumed that interaction strengths are fixed. With adaptive foraging they change with the densities of the species. We set out to explain which species survive when the interactions themselves adapt.

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 thousands of random food webs on a computer, from 5 to 1000 species. We ran each one two ways. In one, predators split their effort evenly and never change (fixed diets). In the other, predators adapt (adaptive diets). Then we looked at where each community ends up, and how it gets there.

Kondoh used an extinction line, a threshold below which a species is removed for good. We ran our smaller webs, of 5 to 100 species, with and without it. Without the line, we count the species present at the end point, the state where the run settles (defined below).

We used two settings. In the self-sustaining setting, as in Kondoh's study, every species can grow on its own. In the prey-dependent setting, about half the species need prey to survive. We ran each setting at two conversion efficiencies, which gives four cases. The self-sustaining setting with Kondoh's own values is the original case.

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). The self-limitation si sets how strongly it limits itself, so on its own a species with positive ri settles at ri/si. We set si = 1 for every species. In the self-sustaining setting every ri is positive. In the gain term, fij is the rate at which predator i captures prey j. The effort aij is the share of its foraging effort spent on j. The conversion efficiency 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 fij Nj is the return of prey j to predator i, what it eats of j per unit of effort. The sum is the predator's intake, its average return over its whole diet. Its best return πi is the largest return among its prey. Effort on a prey grows if its return is above the predator's intake and shrinks if it is below. The adaptation rate G sets how fast. 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 potential prey of i, the species it is able to eat.

Proven at e = 1; proven in some webs and tested in simulation below that

A single end point

An end point is a state that meets three conditions. Every species present has stopped changing. No predator can raise its intake by moving effort. And no absent species can invade. Here a species can invade if a few of its individuals, added to the web, would increase in number. The test describes the state only. The model has no immigration.

When predators convert all the food they eat into growth (e = 1), we prove that every web has a single end point. Every run approaches it, at any adaptation rate, from any start in which every species is present and every potential prey gets some effort. The survivors and their densities are therefore set by the web itself. That means which species it contains, who can eat whom, and their growth and feeding rates.

The proof uses a Lyapunov function, a quantity that only ever decreases as the community changes. The system behaves like a ball rolling into a single valley. The construction extends Lyapunov functions that Boukal and Křivan (1999) built for small predator–prey models.

When predators convert less than all they eat (e < 1), the same calculation leaves one term that can push the wrong way. It comes from a predator above its end-point density while its prey is below, the classic predator–prey swing. Crowding damps that swing. Where crowding outweighs feeding, we prove that the end point is again unique and every run reaches it. We also prove it in special webs, such as webs whose potential links form a tree.

Our condition appears stricter than needed. We tested 360 webs of 50 and 100 species, each from four starts and at two adaptation rates. With feeding rates up to 1, as in Kondoh's setup, every web reached a single end point. That includes 40 webs where our condition fails. With feeding rates up to 3 and low efficiency (e = 0.15), 23 of 60 webs reached no end point under fast adaptation. In some, densities kept oscillating. In others, species kept falling to very low numbers and returning. One of these webs reached an end point under slower adaptation. In one further web, three starts reached the end point and the fourth kept oscillating. No web we tested reached end points with different survivors. A web of four species, however, has two end points.

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 point. 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-point diet. This is the standard Lyapunov function for replicator dynamics (Hofbauer & Sigmund 1998), here weighted by the predator's end-point 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 point Several valleys: history matters where you end depends on where you start end point A end point 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. We prove this for adaptive webs at e = 1. At lower efficiency, every web we tested whose runs settled reached a single end point. Right: two valleys, where the same web can end up in different communities depending on where it starts. This is only a sketch, since the real system has one dimension per species.
Tested in simulation in all four cases

Flexible diets keep more species

In the original case, the typical (median) adaptive web keeps 96 percent of its species when each species has 2 potential prey. From 5 potential prey upwards it keeps all of them. Fixed-diet webs lose about 15 percent of their species. The few species that adaptive webs lose are prey of a predator with no other prey left, which cannot switch away.

In the prey-dependent setting with e = 1, fixed-diet webs keep about half of their species, however many links they have. Adaptive webs keep 56 percent when each species has 2 potential prey. This rises to about 71 percent by 14 to 20 potential prey, and then levels off.

In the original case with fast adaptation, the share of webs whose end point keeps every species rises with connectance. In webs of 20 species it rose from 23 percent at the lowest connectance to 93 percent at the highest. In webs of 100 species it rose from 41 to 94 percent.

survives, fixed dietssurvives, adaptive dietslost
Roll call for one 20-species web in the original case, at its end point, with no extinction line. This web is an illustration. Fixed diets lose 4 species, and adaptive diets keep all 20. Species 18 (ringed) is one of the losses under fixed diets. With adaptive diets it survives, although under slow adaptation it first falls to a very low density (see the figure "One species, four runs").
Proved at every end point; checked on 640 webs

Adaptive predators hold their prey at a price

Why do adaptive webs keep more species? Look at what happens to a prey as it becomes rare.

With a fixed diet, a predator keeps the same share of its effort on a prey however rare it gets. If its predators are common enough, the prey can be eaten to extinction.

An adaptive predator moves its effort towards the prey that pay best. As the prey becomes rare it pays less, and the predator moves its effort elsewhere. The pressure on a rare prey therefore falls away, as long as the predator has other prey left. A predator with nothing else to eat keeps its effort on the prey and can still eat it out.

At the end point this becomes an exact rule. Each prey that is eaten is held at a price. This is the density at which the prey is worth exactly as much to a predator as that predator's best return. With several predators present, the lowest of their prices applies:

Nj = min ( (Dj)+,  mink πk / fkj )

Here the minimum runs over the predators k of j that are present, πk is predator k's best return, and fkj is the rate at which it catches j. Dj is the prey's free density. That is the density at which it would be at rest, with all its own effort on its best prey and no predators. The subscript + means that a negative Dj counts as zero. A prey that no predator eats is free and stands at its free density. The rule follows from the end-point conditions alone, with no approximation.

The price is above zero whenever the predator has a positive best return. So an adaptive predator cannot eat a prey to extinction while it has other prey left. Species are lost in only two ways. A species that needs prey can starve, because it cannot get enough food. Or it is kept out by a predator that has no prey left. In our simulated end points, the rule holds to better than one part in a billion. This is true for 99 percent of the about 110 000 species present. This checks our code and the precision of the end points, since the rule itself is proved.

Left: one predator's effort flows to its most valuable prey and eats them down until each is worth its best return. Right: every prey species of a web as a bar, ranked by free density; species below zero starve, species below the common price stay free, species above it are eaten down to the price and held there.
Prey prices. (a) One predator and its potential prey. Bar height is a prey's value to the predator, its feeding rate times its free density. The predator puts its effort (line width) on the most valuable prey. It eats them down to its best return π (hatched: eaten). Prey worth less are left alone. (b) Every prey species in a web, ranked by its free density D. Species with D ≤ 0 starve. Species below the common price p* are free and stand at D. Species above it are eaten down to the price and held there, above zero. Drawn to scale for the prey-dependent case at e = 1 with many potential prey. In that limit we argue that all predators share one price (see "Complexity and stability in one line").
Proved at e = 1; tested in simulation in the original case

Speed changes the route

The adaptation rate G does not appear in the price rule. When predators convert all they eat (e = 1), we prove that speed changes only the route to the end point. In the original case we checked this in simulation. Of 3000 webs of 5 to 20 species, 2984 reached an end point at two or more speeds. Each of them kept the same number of species at every speed.

What speed changes is the route. Under slow adaptation, predators move their effort away from a declining prey only slowly. Species that the end point keeps can then fall to very low numbers before they recover.

When predators convert all they eat, the Lyapunov function V also sets a floor under every species present at the end point. Since V never increases, a species cannot fall further than the starting value of V allows. The diet term of V is divided by G, so the floor sinks linearly with 1/G. We computed it for 3000 self-sustaining webs of 5 to 20 species at e = 1. The floor is loose, and the typical crash is far shallower. The deepest crashes, however, grow as adaptation slows. In one run in ten, the deepest crash goes beyond about 2 powers of ten under fast adaptation. Under adaptation a thousand times slower it goes beyond about 180.

fixed dietsfast adaptationmediumslowKondoh's extinction line
One species, four runs. An illustration from the 20-species web above, in the original case (e = 0.15). The plot shows the 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. Under slow adaptation (G = 0.02) it first falls to a density of about 10−275. Hover to read values.
Tested in simulation: 3000 webs per treatment

Adaptation speed matters through the extinction line

A real population that fell to a density of 10−275 would be extinct. Models represent this with an extinction line, and that is where adaptation speed matters. We reran Kondoh's protocol in the original case. We used 3000 random and hierarchical (cascade) webs of 5 to 20 species. His line removes a species for good once it falls below 10−13.

With the line, the share of webs that kept every species rose with adaptation speed, from 28 percent under slow adaptation to 72 percent under fast. In webs of 10 or more species it rose with connectance only when adaptation was fast, as Kondoh reported. Without it, we count the species present where each run ends. About 73 percent of adaptive webs then keep every species, at every speed. The difference comes mainly from transient extinctions. These are species removed on the route that the end point would keep. Fixed-diet webs keep every species in about 26 percent of webs either way.

So the extinction line and the end point measure different things. The line asks whether every species survives the whole journey. The end point says where the journey finishes. A population at 10−13 would be lost in practice, so a safe route is part of persistence. In this sense the two measures are complementary.

The original case: 3000 webs of 5 to 20 species for each treatment. Each bar is the share of webs that kept every species. Left: with Kondoh's extinction line, which removes a species for good below 10−13; species are counted at time 100 000. Right: no extinction line; species are counted at the end point. Hover a bar to read values.
Agrees with Kondoh (2003)

Adapted diets get narrow

At the end point, each adaptive predator puts its effort only on the prey that give its best return. It therefore uses only part of its potential prey, as Kondoh (2003) observed. In the web below, 19 of the 20 predators eat only one or two of the species they could eat. The interactions in use are set by the dynamics of the web.

The same 20-species web. Faint lines are all the potential feeding links. Blue arrows are the ones still in use at the end point, pointing from prey to predator. Hover a species to see its links.
New: matches simulations with nothing fitted

Predicting the end point without simulating it

Where a web has one end point, set by the web itself, it should be possible to calculate that end point from a few summary statistics. We built such a calculation using the cavity method. The method comes from the physics of disordered systems such as spin glasses (Mézard & Parisi 2001). It has been used for random communities whose interactions are fixed (Bunin 2017; Barbier et al. 2018). It has also been applied to multi-trophic consumer–resource models (Feng et al. 2024). Adaptive diets needed a new version, because the strength of each link responds to the densities.

The idea is to solve one species at a time, as if it had just been added to a web that has already settled. Its neighbours tell it two things. A predator tells it how hard it would eat this prey at each possible prey density. A prey tells it how much eating it would take to hold that prey at each density. This allows for the prey's other predators easing off. The species then settles its own density and diet, and passes the same kind of message on. Repeated over a large pool of species, this gives the distributions of densities and best returns at the end point. The one approximation is to ignore loops of potential links.

Nothing in the calculation is fitted to the simulations. We compared it with 640 simulated webs of 50 to 500 species, in the four cases with up to 20 potential prey. It predicts the share of species that survive to within 1.3 percentage points. It predicts mean densities and mean best returns to within 3 percent, and the full spread of densities across species. For fixed diets we use the existing cavity theory for random communities with fixed interactions. It is approximate for sparse webs, and close to the simulations in all four cases. So the gain from adaptation can be calculated too.

adaptive diets, simulatedadaptive diets, calculatedfixed diets, simulatedfixed diets, calculatedlimit for many potential prey
Share of species that survive, against the number of potential prey. Dots are medians over simulated webs at their end points, and lines are the calculations. Dots at 2, 5, 10 and 20 potential prey use webs of 50 to 500 species. Dots at 3, 4, 7, 14 and 28 use webs of 500 species, and dots at 40 use webs of 1000 species. Hover a dot to see how many webs. With adaptive diets, survival rises and then levels off near the limit worked out below. With fixed diets it is lower in every case, and it stays flat in three of the four.
Show the numbers
New: closed form for many potential prey, argued and tested in simulation

Complexity and stability in one line

As each species gets more potential prey, the calculation simplifies to a single equation. Every predator finds prey it catches efficiently. We argue that all predators then end up with the same best return, a single price p*. This step is heuristic, and we test it in simulation. A species' density is then the lower of its free density, D = r + e p*, and the price. The price is fixed by a balance. Summed over the web, the load that predators put on their prey equals the total density. That balance reads

E [ (D − p*)+ ] = ½ E [ D+ ]

where E is an average over species and the subscript + means "only where positive". In words, predation holds the total density at half the total free density. Within this limit the consequences follow exactly.

The share of species that survive then follows. A species survives if it can live on prey at the going price, r + e p* > 0. In the prey-dependent setting with e = 1, adaptive webs keep 1/√2, about 71 percent. Fixed diets keep 50 percent at any number of links. Simulated webs of 1000 species keep 70.9 percent with 40 potential prey and 70.8 percent with 80, against 70.7.

Five panels of density against free density, for 2, 5, 20, 40 and 80 potential prey. Free species lie on the diagonal; held species lie below it and gather onto the horizontal price line as the number of potential prey grows.
Density against free density. Every species present at the end points of adaptive webs in the prey-dependent case at e = 1. Shading is the share of species (log scale). Free species lie on the diagonal N = D, and held species lie below it. As the number of potential prey k̄ grows, the held species gather onto the price. Red line: the limit for many potential prey, N = min(D, p*), with nothing fitted. (a–c) Webs of 50 to 500 species. (d, e) Twenty webs of 1000 species.

This is the end-point form of Kondoh's result. More potential feeding links mean more survivors when diets adapt, until survival levels off. With fixed diets survival stays flat in three of the four cases. In the self-sustaining case at e = 1 it rises from 92 to 98 percent, but stays below adaptive diets.

The "half and half" comes from two choices in the model. The fastest feeding rate equals the strength of crowding (both 1). In general the eaten share is the fastest feeding rate divided by that rate plus crowding. With feeding rates up to 0.5 the predicted share is a third, and simulated webs came close (31 percent at 40 potential prey). A single price needs feeding rates that are bounded above and often come close to the bound. Our tests, with a spread of conversion efficiencies and with a smaller largest feeding rate, suggest that it needs nothing more.

The calculation also shows where adaptation matters most. When every species can live alone and conversion is efficient, fixed diets already keep almost every species, and the gain is small. With many potential prey and e = 1, the gain is largest, about 29 percentage points, when 1 − 1/√2 (about 29 percent) of species need prey. At lower efficiency the gain peaks at a smaller share. At low efficiency most of the gain comes from protecting prey, because a best return adds only eπ to a species' growth.

Tested in simulation

Hierarchical webs

Our random webs allow feeding loops, such as A eats B, B eats C and C eats A. In cascade webs (Cohen & Newman 1985), species are ranked and each can eat only species ranked below it. There the price rule still holds, and survival with adaptive diets still rises with the number of potential prey. In the prey-dependent case at e = 1, survival is lower than in random webs and rises more slowly. At 40 potential prey it is 66 percent, against 71 percent in random webs. The prices of held prey spread with rank and do not converge to one value. A version of the calculation that takes the ranks into account matches these webs.

Expected, not yet tested

What if predators get full?

Real predators cannot eat without limit. Each catch takes handling time, so intake levels off when prey are plentiful. At an end point, a full predator's intake still equals its best return. Handling time then scales the predator's gain, and its loads on its prey, by one factor, and it ranks its prey the same way. So the price rule keeps its form. We expect the calculation to carry over, with one such factor per predator.

Saturation caps what a predator can gain, so we expect fewer of the species that need prey to survive. Saturation can also stop a web from reaching an end point. Our proofs of a single end point assume linear feeding.

Wider project, beyond the paper

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?

Adaptive predators already drop links, by putting no effort into them, and can take them up again later. At e = 1 the web still has a single end point. We expect history dependence to come from 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 could end differently. An extinction line has the same effect, because 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 could come from. Which prey looks best depends on exactly when the trigger fires. Runs that differ only in timing could then lock in different choices and reach different end points. This sketch belongs to our wider project; the paper does not study rewiring.

Why it matters

What we haven't shown yet

References