## Abstract

Microbial populations often rely on the cooperative production of extracellular ‘public goods’ molecules. The cooperative nature of public good production may lead to minimum viable population sizes, below which populations collapse. In addition, ‘cooperator’ public goods producing individuals face evolutionary competition from non-producing mutants, or ‘freeloaders’. Thus, public goods cooperators should be resilient not only to the invasion of freeloaders, but also to ecological perturbations that may push their populations below a sustainable threshold. Through a mathematical analysis of the Ecological Public Goods Game, we show that game parameters that improve the cooperating population's stability to freeloader invasion also lead to a low ecological resilience. Complex regulatory strategies mimicking those used by microbes in nature may allow cooperators to beat this trade-off and become evolutionarily stable to invading freeloaders while at the same time maximizing their ecological resilience. Our results thus identify the coupling between resilience to evolutionary and ecological challenges as a key factor for the long-term viability of public goods cooperators.

## 1. Introduction

Populations often require individuals to contribute to their maintenance. Frequently, this involves the production of ‘public goods’ or common pool resources [1]. Public goods may pose a challenge, as their production costs are born only by the contributing or ‘cooperating’ individuals but their benefits apply to the whole population, including ‘freeloaders’ who did not contribute to the public good production. Historically, cooperation has mostly been studied as an evolutionary problem. A vast body of work in the field of evolutionary game theory has been devoted to understanding the conditions that lead to the emergence of cooperation and its stability to invasion by freeloaders, most of which involve some form of self-assortment of cooperators [2–12].

A less appreciated but equally important aspect of social dilemmas is the ecological challenges that cooperation may present [13–16]. Populations that require the expression of cooperative traits for their survival, such as the production of a public good, often require large numbers of cooperating individuals for the positive effects of their contributions to be significant. When population sizes are too small, the overall production of the public good may not be large enough to sustain the population. This may lead to a minimum viable population size, below which the population collapses [13]. Indeed, the presence of an Allee effect (a positive effect of population size on *per capita* population growth) in public goods based communities is both predicted by theory [10,11] and has been observed experimentally in microbial populations [13] (electronic supplementary material, figure S1).

Ideally, a successful public goods cooperator would not only be resilient to the evolutionary challenges presented by the invasion of freeloading mutants, but also to ecological perturbations that would push cooperator populations to dangerously low levels (figure 1*a*). Interestingly, theory [10,11], agent-based simulations [17] and experiment [16] indicate that the ecological and evolutionary dynamics of public goods genes may occur on similar timescales, and they are dynamically coupled in a feedback loop. Given this coupling, it is pertinent to ask whether the resilience to evolutionary challenges and the resilience to demographic perturbations are also coupled, and whether there exist any constraints that make it easy or difficult to simultaneously maximize the resilience to both evolutionary and ecological challenges.

## 2. Results

### 2.1. A trade-off between ecological resilience and stability to freeloader invasion is observed in ecological public goods games

To investigate potential coupling between ecological resilience and stability to freeloader invasion, we studied the behaviour of the Ecological Public Goods Game (EPGG) [10–12]. Hauert *et al.* [10,11] originally formulated this modelling framework in order to incorporate ecological dynamics into the study of public goods evolution [18–25]. In the Public Goods Game, a finite number of *N* players come together to form an interaction group. Each player makes an investment of either 1 (if the player is a cooperator) or 0 (if it is a freeloader). All the investments are pooled together, multiplied by a return factor (*r*) and shared evenly among the *N* participants. The EPGG is a modification of the Public Goods Game, where the identities of the *N* players are chosen by randomly sampling from a population of cooperators, freeloaders and ‘vacancies’, whose frequencies are given by *X*, *Y* and *Z*, respectively. These ‘vacancies’ account for the limited space into which the populations can expand and are treated as players that neither contribute any investment nor take any benefit. The EPGG is described in more detail in the electronic supplementary material, and in full in [10,11].

As shown in the analyses by Hauert *et al*. [10,11], the number of equilibria and their stabilities depend on the precise value of the game parameters, such as the investment return *r*, the size of the interaction group *N* and the death rate *d*. To examine whether there exist any type of constraints that would link the stability to invasion by freeloaders and ecological resilience, we explored the space of possible EPGGs by randomizing the parameters of the game and simulating the eco-evolutionary dynamics. For each of the 300 generated sets of randomized parameters, ecological resilience (size of the smallest demographic perturbation capable of driving the cooperating population extinct) and stability to freeloader invasion (frequency of the cooperators at the mixed equilibrium) were determined as described in figure 1*b*. The results show that game parameters where cooperators are highly stable to invasion also tend to have low (ecological) cooperator resilience to demographic shocks, whereas high ecological resilience is accompanied by low stability to invasion.

The existence of this trade-off between ecological and evolutionary stabilities also follows from a simple, qualitative analysis of the model. As discussed by Hauert *et al*. [10–12], small population densities favour cooperators. This is because the benefit that a single cooperator gets from its own investment is spread over fewer individuals, and thus may exceed its cost. By contrast, large population densities lead to fewer vacancies in the interaction groups and more other players that will dilute the benefit accrued by a cooperator's investment; this leads to lower returns from investment and lower cooperator fitness. Hauert *et al.* also found that the population dynamics of pure cooperator populations is characterized by a strong Allee effect [10,11]: at low population sizes the interaction groups have few players and low net investments, and therefore small growth rates that may be lower than the death rate (electronic supplementary material, figure S1). This leads to a minimum ‘critical’ population size below which the net growth rate is negative and populations collapse to extinction. Therefore, game parameters that lead to small population densities at equilibrium will on the one hand benefit cooperators and increase their resistance against mutant freeloader invasions; but on the other hand, these small populations are dangerously close to the critical population size and thus have low ecological resilience.

In the EPGG discussed above, cooperators' investment strategy (their level of investment in the public good) was set to the same value, even while the environment changed. It is pertinent to ask then if, for any given environment, an optimal strategy (defined by the level of investment of a player, which may be different from 0 or 1) exists that simultaneously maximizes a cooperating population's ecological resilience and stability to freeloader invasion.

### 2.2. Fixed investment strategies may beat the ecological resilience and stability to freeloader invasion trade-off

A fixed investment strategy is defined by the fixed amount of investment cooperators make. We start by studying how the equilibrium points and their stability change as we increase or decrease this fixed investment. We do this by plotting, in figure 2*a*, the bifurcation plot representing the population density of cooperators in equilibrium as a function of the fixed investment level. At low investment levels (red region), the payoffs from the public goods game are too small to support any population. As shown in the electronic supplementary material, this is reflected in the equations by the existence of a critical investment threshold (*i _{c}*

_{1}), which depends on the game parameters (

*N*,

*d*and

*r*) in the following way: 2.1

The model indicates that for investments that are slightly larger than *i _{c}*

_{1}, pure cooperator populations are observed (thick solid line in the blue region of figure 2

*a*). The model also shows that when the investment exceeds a second threshold

*i*

_{c}_{2}, cooperators can be invaded by freeloaders. As shown in the electronic supplementary material, the second critical investment

*i*

_{c}_{2}can also be related to the parameters of the game (

*N*,

*d*and

*r*) in the following way: 2.2

In the equation above, *Z** is the zero root of the following equation:
2.3where *F*(*Z*) is equivalent to the difference between the cooperator and freeloader fitness functions (see the electronic supplementary material). While equation (2.3) has *N* − 1 roots in principle, Hauert *et al*. show in [26] that this function has a unique root (for *r* > 2) in the interval (0, 1).

The stable cooperator population in the blue region of figure 2*a* becomes an unstable saddle point in the grey region (figure 2*a*) and a new stable population of cooperators and freeloaders is observed (figure 2*a*). In this region, we find that as investments increase, the relative frequency of cooperators in the stable population decreases.

To investigate whether by adopting different fixed strategies cooperators may beat the trade-off, we plot in figure 2*b* the ecological resilience and stability to freeloader invasion against each other. Consistent with the findings in figure 2*a*, there exist a range of investments *i _{c}*

_{1}<

*i*<

*i*

_{c}_{2}(those in the blue region in figure 2

*a*) for which cooperators are evolutionarily stable against freeloader invasion, while at the same time able to increase ecological resilience by increasing their investment. At the critical investment (

*i*

_{c}_{2}) the trade-off kicks in and if the investment is increased past that point, so

*i*

_{c}_{2}<

*i*, the ecological resilience continues to rise but the investment is no longer evolutionarily stable and the stability to freeloader invasion starts to decline. Thus, an optimal investment strategy may be defined in terms of its maximal ecological resilience while remaining evolutionarily stable (i.e.

*i*

_{optimal}=

*i*

_{c}_{2}). Cooperators may beat this trade-off by adjusting their investment to this optimal level (figure 2

*b*).

The value of the optimal investment level, however, depends on the parameters of the game (equations (2.2) and (2.3)). A cooperator employing a fixed strategy that is optimal in one environment may not even survive in a different environment. For instance, if we modulate the death rate in the model, we find that a strategy which is optimal in one set of environmental conditions becomes rapidly sub-optimal if the environment changes, and would collapse if the environment deteriorates past a critical point (figure 2*c*). Therefore, in a changing environment, a fixed investment strategy is unable to remain optimal at all times.

Although the analysis of fixed strategies is helpful from a conceptual standpoint, the use of purely fixed strategies is not biologically realistic nor is it consistent with the way in which microbes express genes. Many genes are up- or downregulated depending on the environment the microbes find themselves in. We decided to investigate whether conditional (or facultative) cooperation strategies would be advantageous towards beating the observed trade-off.

### 2.3. Facultative investment strategies beat the trade-off and are viable over a wide range of environments

Facultative cooperation strategies were modelled using a standard phenomenological model of a gene regulatory input–output function known as the Hill function [27,28]. In particular, we have chosen a Hill function of the form
2.4which describes the expression of SUC, a public good gene, in yeast [16,29]*.* Here, the cooperator's investment level *i*(*X*) depends on the density of cooperators in the population, *X.* When cooperator frequency *X* is low, *i*(*X*) is near its maximum (or ‘amplitude’) *A*; when *X* is equal to the ‘threshold’ *k, i*(*X*) *=* *A*/2; and when cooperator frequency is high, *i(X)* approaches 0. The parameter *n* describes the steepness of the transition from high to low investment. Thus, equation (2.4) describes a strategy which leads to cooperation when cooperator density is low, to avoid collapse, but switches to freeloading when cooperator density is high. We describe how we modified the EPGG model to account for these facultative strategies in the electronic supplementary material. Additionally, we note that we have not included a cost for being facultative in the model. For example, these cells must pay a metabolic cost associated with sensing the number of cooperators around them [30]. Here, we chose to investigate the effects of a facultative investment strategy with negligible costs for being facultative to establish how facultative strategies can outperform unconditional ones in principle. In the electronic supplementary material, we describe how these costs can be incorporated into the model and how sufficiently small costs do not qualitatively change the results presented here.

In order to find how the equilibria change under facultative investment strategies, we found the intersections between the bifurcation diagram and the investment strategy (figure 3*a*). Those cross-over points mark the investment levels required to keep the population in equilibrium. That is, because the facultative cooperators make the same investment across the population, at any given time they look like a population of unconditional cooperators whose investment changes with the populations. Therefore, a population of facultative cooperators at the cross-over points looks like a population of unconditional cooperators in equilibrium. Different strategies, defined by their threshold (*k*) and amplitude (*A*) values, intersect the bifurcation plot at different places. Therefore, we do not necessarily expect to observe the same dynamic behaviour on the phase portrait for different types of strategies. Specifically, an unconditional strategy (a vertical line in figure 3*a*) can intersect the bifurcation plot at most three times, leading to three equilibrium points, the two unstable, homogeneous saddles and the stable mixed equilibrium. The strategy described by equation (2.4) potentially intersects the diagram four times, implying a fourth entirely new equilibrium point. We confirmed this expectation when we analysed the eco-evolutionary phase portrait and the stability of fixed points for different values of *A* and *k* (figure 3*b*). Interestingly, this analysis reveals that for large values of the threshold *k*, the type of dynamics on the phase portrait are identical to those previously reported by Hauert *et al*. for fixed investment levels (grey region).

To test whether facultative strategies would be better at beating the trade-off than fixed strategies, we measured the ecological resilience and stability to freeloader invasion for 100 random pairs (*A*, *k*) from the space mapped out in figure 3*b*. The results are plotted on figure 3*c*. The dashed black line on top represents the same results from the fixed strategy. Strikingly, we find that for a range of facultative cooperation strategies (light green region in figure 3*b*), cooperators can avoid the trade-off and achieve high ecological resilience while remaining evolutionarily stable to freeloader invasion.

This result can be explained by looking at the location of the intersections between the fixed and facultative strategy lines, and the line of pure cooperator unstable equilibria in the bifurcation diagram (figure 3*a*). As shown in figure 3*a*, the fixed strategy cuts the line of unstable equilibria at a different (and higher) cooperator density than the facultative strategy. This leads to a lower ecological resilience for the fixed strategy, even though both strategies have perfect evolutionary stability against mutant freeloaders, and both reach the same population sizes in equilibrium (figure 3*a*).

Furthermore, when we explored the viability of facultative strategies over a range of environmental conditions, we found that they can survive (even if they can be invaded by freeloaders) over a much wider range of environments, including those for which fixed strategies would go extinct (figure 3*c*, inset). Thus, the overall resilience of facultative strategies greatly exceeds that of fixed strategies.

## 3. Discussion

Microbes relying on the production of public goods for their survival face two different types of challenges. On the one hand, evolutionary emergence of freeloaders may cause a steep decline in the numbers of cooperative alleles, which code for the expression of the public goods. On the other hand, even when this invasion does not take place, cooperator populations may undergo catastrophic collapses when environmental perturbations push their populations to low levels. Ideally, to ensure their long-term survival, public goods producing microbes should be resilient to both types of challenges.

The work presented in this paper demonstrates that for unconditional cooperators the resiliencies to ecological and evolutionary challenges are anti-correlated with each other and exhibit a trade-off: environments that favour one diminish the other. This trade-off is not only predicted by the EPGG theory, but also can be seen by re-analysing recent experiments with laboratory populations of budding yeast growing in sucrose [13,14] (electronic supplementary material, figure S2).

Our analysis suggests that microbes employing facultative cooperation strategies similar to those that have been observed experimentally may have an enhanced long-term survival as they can maintain their evolutionary stability to freeloader invasion while maximizing their ecological resilience when compared with unconditional investment strategies. This ability to regulate their investment also makes them able to colonize more challenging environments than unconditional cooperators. These findings are consistent with previous agent based simulations of the public goods game in discrete populations [17]. Therefore, we establish that in principle there can be a direct relationship between gene regulation and the employment of smart strategies in public goods games, which may be selected over evolutionary timescales. Additionally, it will be interesting to investigate how other factors, such as multiple cooperating strategies in a community or multiple simultaneous public goods games, alter the eco-evolutionary trade-off.

Different models of the public goods interaction from the one chosen here could be explored in a similar way to determine if the same trade-off is present. In fact, we suspect that the reported trade-off will occur in any public goods game in which the population density decreases with decreasing level of investment of the public good. The presence of the trade-off also opens the possibility of using the stability to freeloader invasion as a measure for predicting which communities are close to collapse; similar measures of population collapse were proposed previously [31].

### 3.1. Methods

All numerical integrations for the EPGG were conducted and analysed using standard stability analysis and functions from the Python package scipy. The code producing the figures is located at https://github.com/jwrauch/Cooperators-trade-off-ecological-resilience-and-evolutionary-stability-in-public-goods-games.git.

## Authors' contributions

J.R. carried out the modelling work, data analysis and wrote the paper. J.K. provided guidance and wrote the paper. A.S. conceived of the research and wrote the paper.

## Competing interests

We declare we have no competing interests.

## Funding

J.R. and J.K. received funding from NSF grant no. NSF-DMR-1206146. A.S. was supported by a Rowland Junior Fellowship from the Rowland Institute at Harvard University.

## Acknowledgements

The authors wish to thank members of the Sanchez and Kondev groups for enlightening discussions. The authors also wish to thank Juan Poyatos for his comments on the manuscript and many helpful discussions.

## Footnotes

Electronic supplementary material is available online at https://dx.doi.org/10.6084/m9.figshare.c.3670198.

- Received November 30, 2016.
- Accepted January 9, 2017.

- © 2017 The Author(s)

Published by the Royal Society. All rights reserved.