Lecture 9 Quasi-polynomial systems

Lesson plan:

  1. We discuss a fairly general class of dynamical systems, called “Quasi-Polynomial” (QP-)systems.
  2. We show how any QP-system can be written as a larger-dimensional Generalized Lotka-Volterra model.
  3. This means that the machinery we built for analyzing GLV models can be used to tackle a variety of models that at face value do not seem to fall in this class. We show how to determine global stability in several ecological and epidemiological models using this method.
  4. This also shows that the GLV model is in a way a “universal” model.

9.1 Global stability

Many dynamical models describing ecological, epidemiological and evolutionary systems have equilibria that are globally stable (e.g., SIR, SIS, logistic growth, Levins’ metapopulation model, MacArthur’s consumer-resource model).

By far, the most powerful method to prove the global stability of an equilibrium is the so-called “Lyapunov direct method”, which we’ve encountered several times already. The main drawback of this method is that devising an appropriate Lyapunov function requires ingenuity and—as Strogatz (2018) put it—a good deal of “divine inspiration”. Here we take a different approach: we embed our model of interest into a (possibly larger) GLV model, and then attempt applying the typical Lyapunov function for GLV to our transformed system (an embedding originally proposed by Brenig (1988)). In practice, this will require us to think carefully about how perturbations in the original system translate into the perturbations of the (larger) GLV model.

We first show how systems that are in “Quasi-Polynomial” (QP) form can be embedded into a larger GLV by means of simple matrix operations. Then, we discuss strategies to determine global stability for the embedding. Finally, we show that other models can be turned into QP, and from there into GLV.

9.2 From QP to GLV

We call a Quasi-Polynomial system a system of n ODEs that can be written as:

dxi(t)dt=xi(t)(si+mj=iAijnk=1xk(t)Bjk)

where s is a vector of “growth rates” (not necessarily positive), A is a matrix of interactions, and B a m×n matrix of exponents. Note that if we take m=n and B=In (the identity matrix), we recover the GLV model. If B contains only integers, then we have a polynomial system. Extending this model to real (but not necessarily integer) numbers Bjk, we have a “Quasi-Polynomial” (QP) system (Hernández-Bermejo et al. (1998)).

In general, we assume that A is of size n×m, B is m×n, and that the xi(t) are real and positive (if that’s not the case, one needs to perform a change of variables that ensures positivity). The system has n variables (the xi(t)), and we can identify m “quasi-monomials”:

zj=nk=1xBjkk

Several models in ecology and evolution belong to this class. For example, a model that departs from the GLV family is the so-called Leslie-Gower predator-prey model (Leslie (1948)):

{dHdt=H(ρhαhPβhH)dPdt=P(ρpαpPH)

The equation for the prey (H) is in GLV form. However, the rate of increase (decrease) of the predator depends on the ratio between predators and prey: when prey are abundant, predators grow with rate close to ρp; if prey are scarce, on the other hand, predators decline.

History: Patrick H. Leslie (1900-1972)

Born in Scotland, he studied physiology at Oxford University (Christ Church College). He worked for a few years in the department of pathology, and in 1935 he joined the Bureau of Animal Population, a new center led by Charles Elton. There, he worked on population dynamics mergin theoretical work and applications.

In 1945 he published in Biometrika his masterpiece, On the use of matrices in certain population mathematics (Leslie (1945)). In this paper, he developed models for structured populations, which were then extended in several ways, and are still in use today. The so-called Leslie-Gower predator-prey model is developed in a follow-up paper in the same journal (Leslie (1948)).

Solving for the coexistence equilibrium, we find:

{H=αpρhαpβh+αhρpP=ρpρhαpβh+αhρp

Note that the model is in QP-form. We recognize three monomials:

(HPPH)=(H1P0H0P1H1P1)

And the associated parameters:

s=(ρh,ρp)A=(βhαh000αp)B=(100111)

Now we want to turn this models into a Generalized Lotka-Volterra model. We take the new variables to be our monomials:

z=(z1z2z3)=(H1P0H0P1H1P1)

and transform the growth rates:

r=(r1r2r3)=Bs=(ρhρpρpρh)

and the matrix of interactions:

M=BA=(βhαh000αpβhαhαp )

The GLV system is clearly equivalent (topologically) to the original system, but has now three equations instead of two. Using the transformation r=Bs, M=BA, we can embed any QP system into a (typically, larger) GLV.

9.3 Stability of GLV

Before proceeding to prove the stability of the coexistence equilibrium for the Leslie-Gower model, we need to revisit the Lyapunov function for the GLV introduced by Goh (1977), which we have encountered before. Take a GLV:

dzdt=D(z)(r+Mz)=D(z)(M(zz))=D(z)MΔz

where Δz is a vector of deviations from the equilibrium. Suppose that all species densities remain positive through the dynamics; then, we can write the dynamics of the logarithm of the species densities (where logz is a vector containing the logarithms of the densities):

dlogzdt=r+Mz=MΔz

We can take the “candidate Lyapunov function”:

V=1TD(c)(zzD(z)log(z/z))

where D(c) is a diagonal matrix with positive diagonal coefficients. Deriving w.r.t. time, we find:

dVdt=1TD(c)(dzdtD(z)dlogzdt)

substituting:

dVdt=1TD(c)(D(z)MΔzD(z)MΔz)=1TD(c)D(Δz)MΔz

Because diagonal matrices commute (i.e., D1D2=D2D1), we can write:

dVdt=1TD(Δz)D(c)MΔz

Finally, we absorb the D(Δz):

dVdt=ΔzTD(c)MΔz

If a matrix K is negative definite (semi-definite), then xTKx<0 (0) for any x0. As such, if we were to find a positive definite, diagonal matrix D(c) such that D(c)M is negative semi-definite, we would have proved the global stability of the equilibrium (V is positive whenever z>0 and zz, and if D(c)M is negative definite V decreases in time). Because it is typically easier to work with symmetric matrices, w.l.o.g. we can take K=12(D(c)M+MTD(c)), which yields exactly the same result: ΔzTD(c)MΔz=ΔzTKΔz.

The expression above has been used countless times to prove the stability of GLV models. Note that when our model is indeed a GLV, the Δzi are radially unbounded: Δzi[zi,) (where the left bound is given by the fact that zi must be positive). In this case, it therefore makes much sense to try to make K negative definite.

9.4 Stability for GLV embeddings

This is however not the case when our equations have obtained by embedding a lower-dimensional system into a larger GLV. Because we have created new “species” by combining the original species, the perturbations of the “new species” are set by the perturbations of the original species. For example, in the Leslie-Gower embedding we have that z3=P/H=z2/z1, and therefore:

Δz=(Δz1Δz2Δz3)=(Δz1Δz2Δz2+z2Δz1+z1z2z1)=(Δz1Δz2Δz2z2z1Δz1z1)

showing that the third perturbation is a function of the first two.

Computing the matrix K for this system, we obtain:

K=12(D(c)M+MTD(c))=12(2c1βhc1αhc3βhc1αh0c2αp+c3αhc3βhc2αp+c3αh2c3αp )

and taking ΔzTKΔz, we obtain:

dVdt=ΔzTKΔz=c1Δz1(βhΔz1+αhΔz2)+(c3βhΔz1+(c3αhc2αp)Δz2)Δz3c3αpΔz23

Note that the last term is negative for any choice of c3>0, which is a good start. We can also make c1=0, thereby killing the first term. What remains to be determined is how to handle (c3βhΔz1+(c3αhc2αp)Δz2)Δz3. Because we know that Δz3 is a function of Δz1 and Δz2, we can try to choose appropriate constants to make (c3βhΔz1+(c3αhc2αp)Δz2) proportional to Δz3, thereby obtaining a function that decreases in time, with form θΔz23 and θ positive.

We have shown above that Δz3z2z1Δz1Δz2=ρpαpΔz1Δz2. Take:

(c3βhΔz1+(c3αhc2αp)Δz2)

extract the term (c2αpc3αh):

(c2αpc3αh)(c3βhc2αpc3αhΔz1Δz2)

To recover the right form, we need to make c3βhc2αpc3αh=ρpαp. Clearly, there are infinitely many choices.

A convenient choice is c1=0, c2=αpβh+αhρp, and c3=αpρp. In this case, we have:

dVdt=αpΔz3(αpβhΔz2βhρpΔz1+αpΔz3)

Which can be rewritten as:

dVdt=α2p(z1βh+ρp)Δz23

which is clearly always negative whenever Δz30, given that z1>0 and all parameters are positive. We can write the Lyapunov function directly for the original system:

W=c2(PPPlog(P/P))+c3(P/HP/H(P/H)log(PH/HP))

yielding:

dWdt=ρp+βhHH2(ρpHαpP)2

which again is negative when we are not at equilibrium, proving global stability.

9.5 Numerical analysis

The derivation above is quite complex, and as always it is easier to find an answer when we know that an answer exists. One of the great advantages of the GLV embedding is that one can quite easily search for the constants numerically. The algorithm is as follows:

  • Randomly generate Δzi by choosing random values between 0 and a sufficiently large number (say 10 times their respective equilibria) for each of the original species; from these random numbers, compute the corresponding Δz for the new “species”;
  • Build the matrix M;
  • For each choice of D(c), compute K=(1/2)(D(c)M+MTD(c)), and then the value of dV/dt for each of the randomly determined Δz: dV/dt=ΔzTKΔz.
  • If the value is negative for every choice of Δz, then the constants in D(c) are appropriate; if not, modify D(c), trying to minimize the number of Δz leading to a positive result.

For example, this code finds a set of constants for the Leslie-Gower model:

set.seed(1)
# choose random parameters 
# (of course the same can be done for specific parameters)
rh <- runif(1)
ah <- runif(1)
bh <- runif(1)
rp <- runif(1)
ap <- runif(1)
# compute equilibria
z1s <- ap * rh / (ap * bh + ah * rp)
z2s <- rp * rh / (ap * bh + ah * rp)
# this is the equilibrium for "z3"
z3s <- z2s / z1s
# now choose random values 
npoints <- 1000
# for each zi
z1 <- runif(npoints, 0, 10 * z1s)
z2 <- runif(npoints, 0, 10 * z2s)
z3 <- z2 / z1
# now compute delta z
deltaZ <- cbind(z1 - z1s, 
                z2 - z2s,
                z3 - z3s)
# compute M
A <- matrix(c(
  -bh, -ah, 0,
  0, 0, -ap), 2, 3, byrow = TRUE)
B <- matrix(c(
  1, 0,
  0, 1,
  -1,1), 3, 2, byrow = TRUE)
M <- B %*% A

# this is the function we want to minimize
LG_to_minimize <- function(const){
  # keep constants positive, and 
  # with mean of 1 (for numerics)
  const <- abs(const) / mean(abs(const))
  Dc <- diag(const)
  K <- (Dc %*% M)
  K <- 0.5 * (K + t(K))
  # now compute dVdt for each deltaZ
  target <- apply(deltaZ, 1, 
                  function(dz) dz %*% K %*% dz)
  # solution found
  if (all(target < 0)) return(-1)
  # otherwise, try to minimize
  return(sum(target[target > 0]))
}

# use optim to find a solution
tmp <- optim(par = runif(3), fn = LG_to_minimize)
if(tmp$value == -1) {
  print("Found a set of constants")
  solution <- tmp$par
  print(round(abs(solution) / mean(abs(solution)),3))
}

[1] “Found a set of constants” [1] 0.573 1.902 0.525

Which shows that a solution indeed exists. Note that, provided that the choice of Δz is extensive enough, the constants found in this way indeed determine the global stability of the equilibrium. Typically, infinitely many choices are possible—but certain choices of constants are better than others, for example allowing for a clean analytical derivation.

Naturally, the constants we have derived analytically are also appropriate:

c1 <- 0
c2 <- ap * bh + ah * rp
c3 <- ap * rp
LG_to_minimize(c(c1, c2, c3))

[1] -1

9.6 Systems with many equations

The same type of embedding can help derive Lyapunov functions for systems with many equations. For example, let’s examine a MacArthur consumer resource model in which resources are supplied externally. There are n resources, with dynamics:

dxidt=kidixixijCijyj

where ki>0 is the external input to resource i, di0 models the degradation of the resource, and C is a matrix containing the consumption rates for the consumers yj.

The dynamics of the consumers are governed by:

dyidt=miyi+yiϵijCjixj

where mi>0 is the mortality, and for simplicity the transformation efficiency ϵi>0 is set to be predator-specific, but equal for all resources. Our goal is to show that if a feasible coexistence equilibrium exists, it is globally stable.

We rewrite the system in matrix form as:

{dxdt=D(x)(dCyD(k)x1)=D(x)(dCyD(k)v)dydt=D(y)(m+D(ϵ)CTx)

which is a QP system. To higlight the monomials that will give rise to new equations, we have defined vi=1/xi. Using the GLV embedding, we recover a system of 3n equations:

s=(d,m)TA=(0nCD(k)D(ϵ)CT0n0n)B=(In0n0nInIn0n)

Where In is the n×n identity matrix, and 0n is an n×n matrix of zeros.

The GLV is therefore defined by the vector of growth rates:

r=Bs=(m,d,m)T

and the matrix of interactions:

M=BA=(0nCD(k)D(ϵ)CT0n0n0nCD(k))

Now compute K; taking as constants c=(1n,ϵ1,0n) makes K very sparse:

K=12(D(c)M+MTD(c))=12(0n0nD(k)0n0n0nD(k)0n0n)

Now define z=(x,y,v)T, and compute dV/dt:

dVdt=ΔxTD(k)Δv

Finally, notice that v=1/x, and therefore:

Δvi=1xi1xi=1Δxi+xi1xi=Δxixixi

This proves the stability of the equilibrium, given that

dVdt=ΔxTD(k)Δv=kTΔx2xx

9.7 GLV embedding for non-QP systems

Finally, we consider a simple case in which the original system is not already in QP form. Consider a very simple model for facultative mutualism:

{dx1dt=x1(1x1+αx21+x2)dx2dt=x2(1x2+αx11+x1)

In the absence of the mutualist, each species grows logistically. However, they can coexist at higher abundance–though the beneficial effect eventually saturates. Again, our task is to prove the global stability of the coexistence equilibrium.

This model is not in QP form. To turn it into QP form, we need to define v1=x1/(1+x1) and v2=x2/(1+x2). We write two new equations for v1 and v2, resulting in a system of four equations:

{dx1dt=x1(1x1+αv2)dx2dt=x2(1x2+αv1)dv1dt=v1(12v1+αv2αv1v2)dv2dt=v2(12v2+αv1αv1v2)

which is in QP form. Now we can perform the GLV embedding, resulting in a new equation for p=v1v2:

z=(x1,x2,v1,v2,p)T s=(1,1,1,1)TA=(100α001α00002αα00α2α)B=(10000100001000010011)

We have:

M=(100α001α00002αα00α2α00α2α+22α)

and

r=(1,1,1,1,2)T

Setting c=(1,1,0,0,0), we obtain

dVdt=Δz21Δz22+α(Δz1Δz4+Δz2Δz3)

Note however that Δz3 and Δz4 are defined by Δz1 and Δz2:

Δz3=x11+x1x11+x1=11+x111+x1+Δz1

and

Δz4=x21+x2x21+x2=11+x211+x2+Δz2

Plugging in the values for the equilibrium, and simplifying, we finally obtain:

dVdt=Δz21Δz22+8αΔz1Δz2(α2+4+α+Δz1+Δz2+2)(α2+4+α+2)(α2+4+α+2Δz1+2)(α2+4+α+2Δz2+2)

which is never positive if Δz1>x1, Δz2>x2 and α>0. This proves the stability of the coexistence equilibrium.

References

Brenig, L. 1988. Complete factorisation and analytic solutions of generalized lotka-volterra equations. Physics Letters A 133:378–382.
Goh, B. S. 1977. Global stability in many-species systems. The American Naturalist 111:135–143.
Hernández-Bermejo, B., V. Fairén, and L. Brenig. 1998. Algebraic recasting of nonlinear systems of ODEs into universal formats. Journal of Physics A: Mathematical and General 31:2415.
Leslie, P. H. 1945. On the use of matrices in certain population mathematics. Biometrika 33:183–212.
Leslie, P. H. 1948. Some further notes on the use of matrices in population mathematics. Biometrika 35:213–245.
Strogatz, S. H. 2018. Nonlinear dynamics and chaos: With applications to physics, biology, chemistry, and engineering. CRC Press.