The Azimuth Project
Invasion fitness in moment-closure treatments (Rev #12, changes)

Showing changes from revision #11 to #12: Added | Removed | Changed

This page is a blog article in progress, written by Blake Stacey. To discuss as it is being written, go to the Azimuth Forum.


Moment closures are a way of forgetting information about a system in a controlled fashion, in the hope that an incomplete, fairly heavily “coarse-grained” picture of the system will still be useful in figuring out what will happen to it. Sometimes, this is a justifiable hope, but in other cases, we are right to wonder whether all the algebra it generates actually leads us to any insights. Here, we’ll be concerned with a particular application of this technology: studying the vulnerability of an ecosystem to invasion. We shall find expressions for invasion fitness, the expected relative growth rate of an initially-rare species or variety.

Chatty Presentation

Consider a lattice, each site of which can occupied by an individual of “resident” type (RR), occupied by a mutant (MM), or empty (00). The difference between the two is encoded in the choice of transition rules representing death, birth and migration. We can get an aggregate measure of the situation by finding the probability that a randomly chosen site will be in state aa, where aa can take values in the set {R,M,0}\{R, M, 0\}. A finer degree of distinction is provided by the conditional probabilities q a|bq_{a|b}, where, for example, q R|Mq_{R|M} denotes the probability that a randomly chosen neighbor site to a randomly chosen mutant is of resident type. Note that if a mutant is injected into a native resident population and its offspring form a geographical cluster, q M|Mq_{M|M} can be much larger than p Mp_M: few individuals are mutants overall, but the probability of a mutant life-form interacting with another mutant is high.

The pair dynamics of the system involves the time evolution of the probabilities p abp_{a b}, that is, the probability that a randomly selected lattice edge will have aa on one end and bb on the other. The differential equation for dp RM/dtd p_{R M}/d t, for example, will have terms reflecting the processes which can form and destroy RMR M pairs: RMRRR M\rightarrow R R is one possibility, and RMMMR M\rightarrow M M is another. Death, which comes for organisms and leaves empty spaces behind, introduces processes like RMR0R M \rightarrow R 0, RM0MR M \rightarrow 0 M and RM00R M \rightarrow 0 0. Reproduction can lead to formerly empty spaces becoming occupied: R0RRR 0 \rightarrow R R and M0MMM 0 \rightarrow M M. In language more like we’ve used in the Azimuth discussions of stochastic Petri net theory, we’ve moved beyond just creating and annihilating residents and mutants, and now we’re dynamically changing the number of “resident–resident” and “resident–mutant” pairs. So, we probably could make a Petri net diagram for these processes, but the labels on the boxes might start looking a little funny.

Each term in our differential equations will have a transition rate dependent upon a conditional probability of the form q a|bcq_{a|b c}, denoting the probability that a bb of a bcb c pair will have a neighbor of type aa. The differential equations for the pair probabilities p abp_{a b} thus depend on triplet probabilities p abcp_{a b c}, which depend upon quadruplet probabilities and so forth. To make progress, we truncate this hierarchy in a manner reminiscent to cutting off the BBGKY hierarchy in statistical mechanics: we impose the pair approximation that

q a|bcq a|b. q_{a|b c} \approx q_{a|b}.

This approximation destroys information about spatial structure and thereby introduces bias which in an ideal world ought to be accounted for.

(It just occurred to me that if a Petri net specifies a symmetric monoidal category, then successive truncations of the moment-dynamics hierarchy yield mappings between categories. Going from a pair approximation to a mean-field approximation, for example, transforms a Petri net whose circles are labelled with pair states to one labelled by site states. Category theory might be able to say something interesting here. Anything which can tame the horrible spew of equations which arises in these problems would be great to have.)

Invasion fitness is judged in the following manner. We start with a lattice devoid of mutants (p Ma=0p_{M a} = 0) and find the equilibrium densities p RR *p_{R R}^* and p R0 *p_{R 0}^* by setting

dp R0dt=dp RRdt=0. \frac{d p_{R0}}{d t} = \frac{d p_{R R}}{d t} = 0.

The exact form of p RR *p_{R R}^* and p R0 *p_{R0}^* will depend upon interaction details which we won’t worry about just yet. We then inject a mutant strain into this situation; as the mutants are initially rare, we can say they do not affect the large-scale dynamics of the resident population. Summarizing the pair probabilities p Map_{M a} with the shorthand p̲\underline{p}, we write the differential equation in matrix form

dp̲dt=T(q a|bc)p̲, \frac{d\underline{p}}{d t} = T(q_{a|b c})\underline{p},

where the matrix T(q a|bc)T(q_{a|b c}) encapsulates the details of our chosen dynamics. The pair approximation, in which we discard correlations of third and higher order, lets us simplify this to

dp̲dt=T(q a|b)p̲. \frac{d\underline{p}}{d t} = T(q_{a|b})\underline{p}.

When people started doing simulations of lattice models like these, they found that the conditional probabilities q a|Mq_{a|M} equilibrate. That is to say, even if the global density of mutants p Mp_M changes, the local statistical structure of a mutant cluster remains constant. This is the key statement which allows us to linearize the dynamics and write the behavior of p̲\underline{p} in terms of eigenvectors and eigenvalues:

p̲(t)=Ce̲ Aexp(λt). \underline{p}(t) = C\underline{e}_A \exp(\lambda t).

The dominant eigenvalue λ\lambda of TT is the “invasion exponent” which characterizes whether an invasion will fail (λ<0\lambda \lt 0) or succeed (λ>0\lambda \gt 0). The eigenvector e̲ A\underline{e}_A associated with λ\lambda describes the vehicle of selection for the mutants’ particular genetic variation, by summarizing the structure of their geographical cluster.

All of this, of course, is only as good as our linearization! If something interesting happens further away from the fixed point, just looking at the eigenvalues we got from our matrix TT won’t tell us about it. In addition, if the actual dynamics of the system tend to form patterns which can’t be represented very well by pairwise correlations, then pair approximation will run into a wall. Minus van Baalen puts the issue in the following way:

The extent to which pair-dynamics models are satisfactory depends on the goal of the modeler. As we have seen, these models do not capture all of the phenomena that can be observed in simulations of fully spatial probabilistic cellular automata. Basically, the approximation fails whenever spatial structures arise that are difficult to “describe” using pairs alone. More technically, the method fails whenever significant higher-order correlations arise – that is, whenever the frequency of parituclar triplets (or triangles, squares, or all sorts of star-like configurations) starts to diverge from what one would expect on the basis of pair densities. Thus, pair-dynamics models satisfactorily describe probabilistic cellular automata in which only “small-scale” patterns arise. Larger, “meso-scale” patterns such as spirals are difficult to capture using this method.

—in Dieckmann et al. (2000), chapter 19.

Example 1: Birth, Death, Movement

We follow van Baalen (in Dieckmann et al. (2000), chapter 19).

(Petri net pictures will go here.)

We write zz for the coordination number of the lattice. Birth:

R0RR, R 0 \rightarrow R R,

with rate b/zb/z.


Ra0a, R a \rightarrow 0 a,

with rate d/zd/z.

Movement or migration:

R00R, R 0 \rightarrow 0 R,

with rate m/zm/z.

dp R0dtdp R0dt = p R0[b/z+d+(11/z)q 0|R0m+(11/z)q R|0R(b+m)] +p 00(11/z)q R|00(b+m) +p RR[d+(11/z)q 0|RRm].=p R0[b/z+d+(11/z)q 0|R0m+(11/z)q R|0R(b+m)]+p 00(11/z)q R|00(b+m)+p RR[d+(11/z)q 0|RRm]. \begin{array}{rcl} \frac{d p_{R 0}}{d t} & = & -p_{R 0}[b/z + d + (1 - 1/z)q_{0|R0}m + (1 - 1/z)q_{R|0R}(b + m)] \\ & & + p_{00} (1 - 1/z) q_{R|00} (b + m) \\ & & + p_{R R} [d + (1 - 1/z) q_{0|R R} m]. \end{array}
dp 00dt=p 002(11/z)q R|00(b+m)+p R02[d+(11/z)q 0|R0m]. \frac{d p_{0 0}}{d t} = -p_{00} 2(1 - 1/z) q_{R|00} (b + m) + p_{R 0} 2 [d + (1 - 1/z) q_{0|R 0} m].
dp RRdt=p R02[b/z+(11/z)q R|0R(b+m)]p RR2[d+(11/z)q 0|RRm]. \frac{d p_{R R}}{d t} = p_{R 0} 2[b/z + (1 - 1/z)q_{R|0 R} (b + m)] - p_{R R} 2[d + (1 - 1/z) q_{0|R R} m].
p i= jp ij. p_i = \sum_j p_{i j}.
dp Rdt=(bq 0|Rd)p R. \frac{d p_R}{d t} = (b q_{0|R} - d) p_R.

If we ignore spatial structure altogether, we can say that

q 0|R=p 0, q_{0|R} = p_0,

which by normalization of probability means

q 0|R=1p R. q_{0|R} = 1 - p_R.


dp Rdt=(b(1p R)d)p R. \frac{d p_R}{d t} = (b(1 - p_R) - d) p_R.

This should look familiar: it’s a logistic equation for population growth, with growth rate bdb - d and equilibrium population 1d/b1 - d/b.

Example 2: Epidemic in an Adaptive Network

(This might spin off into its own page later, depending on whether I decide to emphasize more the idea of invasion fitness or the general relation between stochastic Petri nets and moment closures. Saving it here so I don’t forget about it.)

p S+p I=1. p_S + p_I = 1.
p SS+p SI+p II=k. p_{S S} + p_{S I} + p_{I I} = \langle k \rangle.
ddtp I=τp SIrp I. \frac{d}{d t} p_I = \tau p_{S I} - r p_{I}.

In a mean-field world view, we could say p SIkp Sp Ip_{S I} \approx \langle k \rangle p_S p_I, but this can’t capture rewiring.

ddtp SS=(τ+w)p SIτp SSI. \frac{d}{d t} p_{S S} = (\tau + w) p_{S I} - \tau p_{S S I}.
ddtp II=τ(p SI+p ISI)2rp II. \frac{d}{d t} p_{I I} = \tau(p_{S I} + p_{I S I}) - 2r p_{I I}.

Pair approximation:

p ISI=qkp SI 2p S. p_{I S I} = \frac{\langle q \rangle}{\langle k \rangle} \cdot \frac{p_{S I}^2}{p_S}.

The “mean excess degree” q\langle q \rangle is the number of additional links we expect to find after we follow a random link. It turns out that q=k\langle q \rangle = \langle k \rangle is a reasonable approximation.

Our dynamical system is defined by three equations. First, we have the rule we wrote before,

ddtp I=τp SIrp I, \frac{d}{d t} p_I = \tau p_{S I} - r p_I,

and then the rules we deduced using pair approximation:

ddtp SS=(r+w)p SI2τp SIp SSp S, \frac{d}{d t} p_{S S} = (r + w)p_{S I} - 2 \tau p_{S I} \frac{p_{S S}}{p_S},


ddtp II=τp SI(1+p SIp S)2rp II. \frac{d}{d t} p_{I I} = \tau p_{S I} \left(1 + \frac{p_{S I}}{p_S}\right) - 2r p_{I I}.

Example 3: Evolution of Altruism

One application of this machinery has been to understand how evolution can produce altruistic behaviour. A behaviouristic definition of “altruism” would go something like, “Acting to increase the reproductive success of another individual at the expense of one’s own”. This can be written out using game theory; one defines a parameter bb to stand for benefit, cc to stand for cost and a payoff function which depends on bb, cc and the strategy employed by an organism.

S0SSS 0 \rightarrow S S occur at rate b 0+Bn A/nb_0 + B n_A / n, and A0AAA 0 \rightarrow A A occur at rate b 0+Bn A/nCb_0 + B n_A / n - C.

In the differential equation for dp S0/dtd p_{S 0}/d t, the S0SSS 0 \rightarrow S S transition contributes a term proportional to the density of S0S 0 pairs:

[(1ϕ)b S+(b S+m)ϕq S|0S]p S0, -[(1 - \phi) b_S + (b_S + m) \phi q_{S|0 S}] p_{S 0},

where we have written ϕ\phi for 11/z1 - 1/z, to save a little ink. All things told, the rate of change of p S0p_{S 0} is given by

dp S0dtdp S0dt = (b s+m)ϕq S|00p 00 [d S+mϕq 0|S0]p S0 [(1ϕ)b s+(b S+m)ϕq S|0S]p S0 +[d S+mϕq 0|SS]p SS (b A+m)ϕq A|0Sp S0 +[d A+mϕq 0|AS]p SA.=(b s+m)ϕq S|00p 00[d S+mϕq 0|S0]p S0[(1ϕ)b s+(b S+m)ϕq S|0S]p S0+[d S+mϕq 0|SS]p SS(b A+m)ϕq A|0Sp S0+[d A+mϕq 0|AS]p SA. \begin{array}{rcl} \frac{d p_{S 0}}{d t} = &= (b_s &(b_s + m) \phi q_{S|0 0} p_{0 0} 0}\\ & & - [d_S + m \phi q_{0|S 0}] p_{S 0} 0}\\ & & - [(1 - \phi) b_s + (b_S + m) \phi q_{S|0 S}] p_{S 0} 0}\\ & & + [d_S + m \phi q_{0|S S}] p_{S S} S}\\ & & - (b_A + m) \phi q_{A|0 S} p_{S 0} 0}\\ & & + [d_A + m \phi q_{0|A S}] p_{S A}. \end{array}

Yuck! After writing a few equations like that, it’s easy to wonder if maybe we should look for new mathematical ideas which could help us better organise our thinking.

The next steps follow the general plan we laid out above. We write differential equations for the pairwise probabilities p abp_{a b}, which depend on triplet quantities q a|bcq_{a|b c}. Then, we impose a pair approximation, declaring that q a|bc=q a|bq_{a|b c} = q_{a|b}, which gives us a closed system of equations. Next, we find the fixed point with p A=0p_A = 0, and we perturb around that fixed point to see what happens when a strain of altruists is introduced into a selfish population. The dominant eigenvalue λ\lambda of the time-evolution matrix TT tells us, in this approximation, whether the altruistic strain will invade the lattice or wither away. The condition λ>0\lambda \gt 0 can be written in the form

Bϕq˜ A|AC>0. B \phi \tilde{q}_{A | A} - C \gt 0.

That is to say, an attempted invasion by altruists will succeed if a measure of benefit, BB, multiplied by an indicator of “assortment” among genetically similar individuals, is greater than the cost of altruistic behaviour, CC. After all our mucking with eigenvalues, we have found a condition which is strongly reminiscent of a classic and influential idea from mid-twentieth-century evolutionary theory. In biology, the inequality

(benefit)×(relatedness)>(cost) (benefit) \times (relatedness) \gt (cost)

is known as Hamilton’s rule (Van Dyken et al., 2011). We can say that we have “recovered Hamilton’s rule as an emergent property of the spatial dynamics” — if we are willing to draw a circle around the middle of our formula and declare those terms to be the “relatedness”.

Knowing where our invasion condition came from, we can appreciate some of the caveats which scientists have raised in connection with Hamilton’s rule.

Simon et al. (2011):

In particular, rr is often taken to be the average relatedness of interacting individuals, as compared to the average relatedness in the population, in which case inequality (1) [rB>C][r B \gt C] is referred to as Hamilton’s rule. It is important to note that inequality (1) is only a description of whether the current level of assortment as subsumed in the parameter rr is sufficient to favour cooperation, but not a description of the mechanisms that would lead to such assortment. It has been suggested repeatedly that the problem of cooperation can be understood entirely based on Hamilton’s rules of the form (1). Even though often taken as gospel, this claim is wrong in general, for two reasons.

First, and foremost, even if a rule of the form (1) predicts the direction of selection for cooperation at a given point in time, the long-term evolution of cooperation cannot be understood without having a dynamic equation for the quantity rr, i.e., without understanding the temporal dynamics of assortment. The dynamics of rr in turn cannot be understood based solely on the current level of cooperation, and hence expressions of type (1) are in general insufficient to describe the evolutionary dynamics of cooperation. Second, the quantity rr, which measures the average relatedness among interacting individuals, is insufficient to construct Hamilton’s rule in models that account for variable individual-level death rates and/or group-level events.

Damore and Gore (2011):

Contrary to the popular use of the word, “relatedness” describes a population of interacting individuals, where rr refers to how assorted similar individuals are in the population.

And in more detail:

every definition of relatedness must take into account the population. Therefore, relatedness is not the percent of genome shared, genetic distance, or any extent of similarity between two isolated individuals in a larger population. Also, because horizontal gene transfer is commonplace between microbes and selection is strong, phylogenetic distance or any other indirect genetic measure is likely to be inaccurate. Many of these false definitions live on partly because ambiguous heuristics like “12\frac{1}{2} for brothers, 18\frac{1}{8} for cousins,” which require very specific assumptions, are repeated in the primary literature. Also, most non-theoretical papers simply define relatedness as “a measure of genetic similarity” and do not elaborate or instead leave the precise definition to the supplemental information …. Unfortunately, scientists can easily misinterpret this “measure of genetic similarity” to be anything that is empirically convenient such as genetic distance or percent of genome shared. Largely because of this confusion, we support the more widespread use of the term ‘‘assortment,’’ which is harder to misinterpret …. For similar reasons of reader understanding, we also encourage authors to make calculations more explicit, either in the main or supplemental text, and to avoid repeating previous results without giving the assumptions that went into deriving them.


  • H. Matsuda, N. Ogita, A. Sasaki, and K. Sato (1992), “Statistical mechanics of population”, Progress of Theoretical Physics 88, 6: 1035–49 (web).
  • U. Dieckmann, R. Law, and J. A. J. Metz, eds., The Geometry of Ecological Interactions: Simplifying Spatial Complexity. Cambridge University Press, 2000.
  • T. Gross, C. J. Dommar D’Lima and B. Blasius (2006), “Epidemic dynamics on an adaptive network”, Physical Review Letters 96, 20: 208701 (web). arXiv:q-bio/0512037.
  • A.-L. Do and T. Gross (2009), “Contact processes and moment closure on adaptive networks”, in T. Gross and H. Sayama, eds., Adaptive Networks: Theory, Models and Applications. Springer.
  • B. Allen (2010), Studies in the Mathematics of Evolution and Biodiversity. PhD thesis, Boston University (web).
  • J. A. Damore and J. Gore (2011), “Understanding microbial cooperation”. Journal of Theoretical Biology DOI:10.1016/j.jtbi.2011.03.008 (pdf).
  • B. Simon, J. A. Fletcher and M. Doebeli (2011), “Hamilton’s rule in multi-level selection models” Journal of Theoretical Biology. PMID:21820447.
  • B. C. Stacey, A. Gros and Y. Bar-Yam (2011), “Beyond the mean field in host-pathogen spatial ecology”, arXiv:1110.3845 [nlin.AO].
  • J. D. Van Dyken, T. A. Linksvayer and M. J. Wade (2011), “Kin Selection–Mutation Balance: A Model for the Origin, Maintenance, and Consequences of Social Cheating” The American Naturalist 177, 3: 288–300. JSTOR:10.1086/658365 (pdf).

category: blog