Partial privatization and cooperation in biofilms

: The evolution of cooperation in microbes is a challenge to explain because microbes producing costly goods for the benefit of any strain types (cooperators) often withstand the threat of elimination by interacting with individuals that exploit these benefits without contributing (defectors). Here we developed an individual-based model to investigate whether partial privatization via the partial secretion of goods can favor cooperation in structured, surface-attaching microbial populations, biofilms. Whether partial secretion can favor cooperation in biofilms is unclear for two reasons. First, while partial privatization has been shown to foster cooperation in unstructured populations, little is known about the role of partial privatization in biofilms. Second, while limited diffusion of goods favors cooperation in biofilms because molecules are more likely to be shared with genetically-related individuals, partial secretion reduces goods that could have been directed towards genetically related individuals. Our results show that although partial secretion weakens the role that limited diffusion has on fostering cooperation, partial secretion favors cooperation in biofilms. Overall, our results provide predictions that future experiments could test to reveal contributions of relatedness and partial secretion to the social evolution of biofilms.


INTRODUCTION
Research has shown that microbes are highly social (Crespi 2001, Travisano & Velicer 2004, West et al. 2006).This sociality results from individuals producing costly extracellular molecules that benefit producing and non-producing individuals.Additionally, an essential phase of microbial social life cycle occurs in structured, surface-attaching populations called biofilms (Irie et al. 2017).Secretion of metabolites (goods) within biofilms has critical implications for biofilm persistence in medical, industrial, and environmental settings (Davey & O'Toole 2000, Nicolella et al. 2000, Leid et al. 2002, Mah et al. 2003, Hall-Stoodley et al. 2004, Fux et al. 2005, O'Toole & Stewart 2005, Abebe 2020).A challenge is to explain how microbes producing costly goods for the benefit of producers and nonproducers (cooperators) can withstand the threat of elimination by interacting with individuals that exploit these benefits without contributing (defectors).A potential solution to this puzzle might be associated with the partial secretion of molecules (Gore et al. 2009, Morris et al. 2014, Scholz & Greenberg 2015).
Experiments in microbial populations have shown that partial secretion favors cooperation (Gore et al. 2009, Morris et al. 2014, Scholz & Greenberg 2015) whenever the personal (private) benefit arising from partial secretion outweighs the good's cost (Morris et al. 2014, Scholz & Greenberg 2015).One example occurs with iron-scavenging molecules, siderophores.While defectors can exploit the fraction of secreted siderophores in vitro and in vivo microbial populations (Griffin et al. 2004, Diggle et al. 2007, Popat et al. 2012, Rumbaugh et al. 2012), the fraction of goods not secreted is unexploitable (Kümmerli et al. 2014).Hence, the benefits associated with not secreting some goods provide competitiveness for cooperators to withstand defection.Some studies refer to these bacterial functions producing partially privatized goods as leak functions and black queen functions (Morris et al. 2012, 2014, Morris 2015, Estrela et al. 2016).
There is, however, one major challenge in using partial privatization to explain the evolution of cooperation in biofilms.The role of partial privatization on affecting competitions is mostly, or exclusively, focused on non-biofilm populations (Gore et al. 2009, Morris et al. 2012, 2014, Kümmerli et al. 2014, Oliveira et al. 2014, Scholz & Greenberg 2015, Estrela et al. 2016, Jin et al. 2018, Jimenez & Scheuring 2021).Moreover, most research on biofilms considers that goods are fully secreted.Under the premise that goods are fully secreted, kin selection favors cooperation if the benefit gained by helping related individuals (indirect fitness) offsets the good's cost (Hamilton 1964b, Frank 1998, Fletcher & Doebeli 2009, Gardner et al. 2009).The problem is that privatization reduces the number of goods directed to related individuals, consequently weakening the contribution of indirect benefits to the evolution of cooperation (Lehmann & Keller 2006).Therefore, it is unclear whether partial privatization could alone foster cooperation in biofilms and whether the effect of privatization might weaken contributions towards related individuals.
Using individual-based simulations, we model cooperators and defectors in growing biofilms.We studied how partial privatization (via partial secretion of goods) affects the evolution of cooperation in biofilms.In our simulations, defectors do not produce any goods but benefit from goods secreted by cooperators.Cooperators produce costly goods, and a fraction of these goods are secreted, and secreted goods might diffuse away from their production site.

MATERIALS AND METHODS
We describe our individual-based models according to the standard Overview, Design concepts and Details (ODD) protocol (Grimm et al. 2006).

Purpose
We aim to understand how social evolution in 2-dimensional biofilms is affected by competition for space, abiotic nutrients and produced metabolites (goods), the cost of producing goods, the fraction of secreted goods, and the diffusion of secreted goods.

Entities, State Variables, and Scales
The simulation has two entities, agents and patches.Agents are individual bacteria who can either be cooperators or defectors.Each bacterium has a mass (m), which changes throughout time as bacteria grow, reproduce, starve, and produce costly goods in the case of cooperators (Fig. 1a).Patches are each square of the simulated environment that has been subdivided into a regular square lattice.Patches contain the information about the local concentration of abiotic nutrients and produced metabolites (goods) and are occupied by bacteria (details on Process Overview and Scheduling).Using inputs to density and ratio of cells from a previous study (Carvalho et al. 2018), an emerging feature of our model is that a single patch can hold about eight bacteria (Fig. 1b).

Process Overview and Scheduling
The model assumes two types of molecules affecting growth: an abiotic nutrient and a costly produced good.We followed the standard assumption that the abiotic nutrient is inputted at the top and diffused (d A ) throughout the bottom of the simulated environment (Wei et al. 2016, Carvalho et al. 2018).
Only cooperators produce goods.A fraction of the goods escapes to the environment, s, and the complementary fraction is kept within the cell, (1 -s).The good kept intracellularly is only used by individuals who produced it.We assume 0 ≤ s ≤ 1, so when s = 0, the goods are fully privatized, whereas when s = 1, goods are fully secreted (Fig. 2).When 0 < s < 1, goods are partially secreted and those are called mixed goods.Hence, decreasing the fraction of goods secreted increases an individual's direct benefit (Fig. 2).
Goods are secreted at the patch where the producer resides.Goods found in a given patch can be used by any individual located at that patch.A fraction of the goods secreted (1 -d G ) is kept within the location where it was produced, and a complementary fraction of goods d G diffuses to the eight neighbor patches (Moore neighborhood), or to the five neighbor patches if at the bottom of the simulated environment.That is, if the fraction of good diffused is 0.9 (d G = 0.9), the productionpatch keeps 10%, and the resting 90% is equally distributed among the neighboring patches (Fig. 2).In several of our simulations, we explored the range of values of d G from zero to one.The difference between goods kept within a patch and diffused to neighbor patches upon secretion indicates the environmental viscosity or properties of molecules such as molecular density.Hence, a secreted good that is mostly kept within the producer patch while a small proportion spreads to neighbor patches indicates an environment with high viscosity or a molecule with high density.If a secreted good is mostly spread to neighbor patches, it indicates an environment with low viscosity or a molecule with low density.Because reproduction is clonal, individuals within a given patch are probably more related than individuals in nearby neighborhoods.Hence, low diffusion is expected to increase the benefit to related individuals, i.e., to increase indirect benefits (Fig. 2).Cooperators and defectors grow using the available abiotic nutrients and goods.Cooperators' production of goods has a cost c.Cooperators are only producing goods when goods are at low concentrations in the occupying patch.Once reaching a threshold mass, individuals will asexually reproduce via binary fission; cooperators and defectors can only generate cells of the same type they are.Cell division unequally distributes cellular mass between the daughter cells.To avoid division synchronization, daughter cells randomly receive between 40% to 60% of the parental's mass from a uniform distribution (Picioreanu et al. 2004, Ghanbari et al. 2016, Carvalho et al. 2018).In the absence of abiotic nutrients or goods, individuals enter a stage of starvation which could lead to their death (Table I).
Bacteria might overlap due to growth and division.If cells overlap in one or more patches, the shoving algorithm is applied to relieve these overlaps.Overlapping cells move following the direction from the center of the overlapping neighbor to its own center (Carvalho et al. 2018).The shoving algorithm continues until less than five percent of cells are moving or until the maximum number of iterations has been completed to avoid intense computation and decrease running time (Carvalho et al. 2018).After moving, cells might be in their original patch or move to one of the nearby patches.

Design Concepts
The design of this model is based on bacteria growth and shoving.Matching empirical work, simulated individuals closer to the expanding surface have faster-growing rates and higher reproductive rates than bacteria in other locations of the biofilm (Werner et al. 2004, Kim et al. 2014).For each simulation, Figure 2. Schematic representation of how the location of produced metabolites (goods) is affected by the fraction of goods that are secreted and diffused.In our model, a fraction of the goods escapes to the environment, s, and the complementary fraction is not secreted, (1 − s).The non-secreted good can only be used by the individual who produced it (private benefit).We assume 0 ≤ s ≤ 1, so when s = 0, no good is secreted, whereas when s = 1, all goods are secreted.Any individual can consume the secreted good found in the patch that they occupy.A fraction of secreted goods might diffuse to the eight neighbor patches (or five neighbor patches if at the bottom of the simulated environment); e. g., if the fraction of mixed goods diffused is 0.5, the production-patch keeps 50%, and the resting 50% is equally distributed among the neighboring patches.we tracked the defector's population fraction within the biofilm, as well as the counts of cooperators and defectors.The model stopped after 12 hours (720 interactions).

Initialization
The model initializes with 49 bacteria.Each initialized bacterium has a random mass and a random starting location across the attaching surface (i.e., the bottom of the simulated environment) from a uniform distribution.At the model initialization, the abiotic nutrient is equally distributed across the simulated environment, while goods are only present at the attaching surface (bottom).

Emergence
Like in previous models, the biofilm structure emerges from the reproduction and shoving functions (Wei et al. 2016, Carvalho et al. 2018).The reproduction is tied to bacterial growth (which depends on the concentrations of abiotic nutrients and goods), and the shoving function pushes bacteria apart.

Functions
Without abiotic nutrients or goods, individuals starve and consequently lose their mass at a rate λ.
Ultimately, cells die if the cellular mass goes under a minimal threshold ( m death ) (Carvalho et al. 2018) (Fig. 1).
If cooperators and defectors are not starving, the growth function increases the mass of each bacterium.The function follows a modified Monod kinetic model (Eberl & Collinson 2009) where abiotic nutrients and the goods are limiting.For defectors, the growth rate function is where parameter μ is the maximum growth rate.Parameter K scales the steepness of the growth rate function.A is the concentration of abiotic nutrients at the local patch and only cells at that patch can consume it.G D is the concentration of goods found in the patch.G D emerges from the concentration of goods secreted s within the same patch that is not diffused away ( 1 -d G ) and from the concentration of goods secreted s that diffused from neighboring patches d G to the focal patch.For cooperators, the growth rate function is where G C is the sum of the concentration of goods found in the environment ( G D ) and concentration of good not secreted.In sum, cooperators and defectors grow based on goods and abiotic nutrients found in the environment, but only cooperators grow due to goods not secreted.
For cooperators and defectors, we assume that the more mass an individual has, the more abiotic nutrients and goods they consume.Moreover, the higher the concentration of abiotic nutrients and goods, the higher the consumption rate.These assumptions are supported by empirical work since bacteria in the interior region of the biofilm have less access to abiotic nutrients and mixed goods, so their growth and reproduction are slower than surface bacteria (Beyenal et al. 2003, Werner et al. 2004).The per capita concentration of abiotic nutrients consumed by a single cooperator or defector is q A (see how it changes in Table II).The per capita concentration of goods consumed by a single cooperator or defector is q G .After growth, cooperators produce goods if these are at a limiting concentration ( G C < T ) at some cost c .The cost is proportional to the mass that a cooperator loses to produce ( 1 − c ) units of mixed goods.The reduction in cooperators' mass due to the production of goods and the concentration of goods produced is: where A t is the concentration of abiotic nutrient found in a patch at time t .β 1 is the conversion factor of mass consumed given a concentration of abiotic nutrients.G t is the concentration of goods at time t . (1− c) A t m t β 2 is the concentration of goods produced by a single individual.∑ (1 − c) A t m t β 2 is the total concentration of goods produced by all cooperators in a given patch.β 2 is the conversion factor of mass to goods.Cells are represented as circles.For cells that decrease or increase their mass due to starvation or growth, respectively, cells change their diameter d i given by d i = √ _ 4 m i / ρLπ .L and ρ are fixed parameter for cell's length, and cells' density, respectively.Cells divide if their cellular mass is above a given threshold, m > m div (Picioreanu et al. 2004, Carvalho et al. 2018).
Finally, changes in cell size and division may create overlaps between cells.The shoving algorithm reduce these overlaps.After moving, cells might be in their original patch or move to one of the nearby patches.

Simulations
We wrapped the simulated environment along the horizontal orientation but not the vertical one (Fig. 1b).Unless otherwise specified, the horizontal and vertical dimensions have 33 patches each.Default parameter values are in Table II.
We performed a set of simulations for when the initial defector's population fraction was the same or different for all parameter combinations within a statistical analysis.When the initial defector's population fraction was the same for all simulations, we used ~ 25% (i.e., 12 defectors out of 49 individuals), and we covaried the fraction of secreted and diffused goods while keeping the cost constant.We also covaried the fraction of secreted goods and cost while maintaining the diffused good constant.The varying covariates started from the value of zero until reaching one, by increments of 0.1, totalizing 121 parameter combinations, each one replicated ten times.
For simulations where the initial defector's population fraction varied, we also covaried the cost and the fraction of secreted and diffused goods.We selected the parameter's combinations for each simulation following a Latin Hypercube Sampling.We sampled 100 parameter combinations.However, we only used 96 because pure populations of cooperators went to extinction in four parameter combinations.This occurred because benefits acquired by cooperators could not offset the decrease in individual's mass caused by the production of goods, suggesting that these four parameter combinations would be biologically unfeasible.
We developed the individual-based model in the NetLogo language.For graphics and statistical analyses, we used R (4.0.4) (R Core Team 2021).We used Spearman's rank correlation to measure the association between the final defector's population fraction and the % of goods diffused because the final defector's population fraction is heteroscedastic.Moreover, we used partial Spearman's rank correlation for measuring the association between the defector's invasiveness with the % of good privatized, % good diffused, the good's cost, and the initial population fraction of cooperators because of monotonic nonlinear associations.

Social evolution for fully secreted goods
To provide a baseline, we purposely considered the scenario where cooperators fully secrete the produced costly good (i.e., there is no partial privatization).Our goal is to determine how diffusion of the good affects the evolution of cooperation within biofilms.
In our simulations, we varied the fraction of goods diffused, and we assumed an initial defector's population fraction of ~ 0.25 and a good's cost of 0.7.The good's cost of 0.7 implies a 70% fold decrease in the cellular mass conditional to a given concentration of abiotic nutrients that cooperators have available (see Eq. 3).Simulations assumed that goods secreted by cooperators benefit both cooperators and defectors.Diffusion occurs when a fraction of secreted goods within a grid element is transported to the adjacent neighbors (details on Materials and Methods).

How is competition within biofilms affected by diffusion?
According to the mechanism of kin selection, we expect that increasing the fraction of diffused goods should increase the advantage of defection.That is because as reproduction is clonal and there is no mutation, a good with lower diffusion is expected to have its benefits more allocated towards individuals of the same type, i.e., genetically related individuals (Hamilton 1964a, b, Kümmerli et al. 2009, Mund et al. 2017).
To test this hypothesis, we checked how changing the fraction of diffused goods affects the difference between the cooperators' fitness ( w C ) and the defector's fitness ( w D ).The fitness w x of a phenotype x (i.e., cooperator or defector) is (Nadell et al. 2010): where N x,0 , and N x, t end are the total number of individuals of phenotype x present within the biofilm at the start and the end of the simulation.
In agreement with our hypothesis, we found the more a good is diffused, the more likely defectors will outcompete cooperators (Fig. 3).Thus, decreasing the fraction of goods diffused favors cooperators over defectors.
Figure 3.This graph shows that cooperators' advantage over defectors decreases as the fraction of diffused goods increases.The dotted line indicates when cooperators and defectors are equally fit.Above the dotted line, cooperators outcompete defectors; hence, defectors decrease in population fraction.Bellow the dotted line, the opposite occurs; defectors outcompete cooperators; hence, defectors increase their population fraction.In general, this result indicates that when goods are fully secreted, the lower the diffusion is, the more goods are allocated to genetically related individuals.Thus, diffusion is a proxy for indirect benefits.Simulations used an initial defector's population fraction of ~ 0.25, and a cost of 0.7.Simulations also assumed that goods are fully secreted.Each point is the value of an individual simulation.We run 10 simulations for each value of the fraction of goods diffused.

Socio-evolution for partially secreted goods
Above, we investigated how diffusion affected competition within local biofilms by considering the scenario where goods are fully secreted.Here, we investigated how the partial secretion of these goods affects the evolution of cooperation within a local biofilm.Our model assumed that the fraction of goods secreted provides sharable benefits regardless of the strain type, and the fraction of goods not secreted (partially privatized) only benefits those who produced it (i.e., cooperators).

How is competition within biofilms affected by partial privatization and a good's cost?
We expected that decreasing the fraction of goods secreted (i.e., increasing partial privatization) favors the cooperative strain.To test this hypothesis, we analyzed how partial privatization and the good's cost affect the change of defector's population fraction within local biofilms.In our simulations, we varied the good's cost and the fraction of goods privatized, and we assumed an initial defector's population fraction of ~ 0.25 and a fraction of diffused goods of 0.5.
In Figure 4a, % privatized = 0 represents the baseline scenario where partial privatization is absent, and it shows for what costs can indirect benefits (kin selection) inhibit defectors' occupation.Comparing this baseline with a gradually increasing privatization indicates how redirecting public benefits into private ones reshapes the competition within biofilms.We found that as privatization increases, values of cost where defectors outgrow cooperators now become favorable for cooperators (red areas becoming blue in Fig. 4a).Moreover, conditions where cooperators and defectors were equally fit (at the baseline) became more favorable to cooperators (white areas becoming blue in Fig. 4a).In conditions where cooperators already had an advantage over defectors, this advantage was enhanced (light blue areas become dark blue in Fig. 4a).Together, these results elucidate two implications.First, cooperators do not need high personal privatization to persist; rather, a sufficiently high privatization relative to the cost of producing goods.Second, partial privatization could favor producers where kin selection could not have alone.

How is competition within biofilms affected by partial privatization and diffusion?
Here we investigated how partial privatization and diffusion affect the change in defectors' population fraction.We expected that the defectors' increase in population fraction would be disfavored the higher the partial privatization is, and the lower the diffusion is.To test this hypothesis, we calculated the change in defector's population fraction for simulations, assuming an initial defector's population fraction of ~ 0.25 and a cost of 0.7.We varied the fractions of goods diffused and privatized.
As predicted, the defector's population fraction decreases with an increase in privatization and a reduction on diffusion (Fig. 5a).However, our results also showed that the effect of diffusion depends on the fraction of goods privatized.This can be noticed when analyzing the effect of diffusion for when the fraction of goods privatized is 0.2, 0.4 and 0.6 (Fig. 5b-d).
At low partial privatization (0.2), the defector's population fraction increased within biofilms for increasing diffusion values (Fig. 5b, dots above the dotted line).At intermediary to high fractions of partial privatization (i.e., 0.4 and 0.6, respectively), no matter the diffusion, the final defector's population fraction always decreased (Fig. 5c-d, all dots are below the dotted line).Together, our results revealed that the importance of a good's diffusion depends upon the fraction of goods secreted.  .These graphs show that defectors are disfavored for decreasing diffusion and increasing privatization; however, increasing privatization weakens diffusion's effect on strains' competition.(a) The defector's population fraction decreased with increasing privatization and decreasing diffusion of goods.A decrease in the defector's population fraction implies that the cooperator's fitness is larger than the defector's fitness.However, for privatization above 40%, the effect of diffusion can no longer favor one strain over the other.For each quadrant of the heatmap, the change in the defector's population fraction is the average of 10 simulations; the standard deviation in the change of defector's population fraction is in Fig. S2. (b-d).Increasing privatization weakens the impact that diffusion has on the outcome of competition within biofilms.The dotted line indicates the initial defector's population fraction.Thus, dots above the dotted line indicate an increase in the defectos's population fraction, and dots below the dotted line indicate a decrease in defectors' population fraction.Each graph contains the Spearman's rank correlation coefficient (r s ) and its respective p-value (P) for the interaction between the final defector's population fraction and a fraction of diffused goods.Each dot represents the value of an individual simulation.In all graphs, the cost of producing goods is 0.7, and the initial defector's population fraction is ~ 0.25.

Is cooperation favored over long-term evolution?
The above section demonstrated that partial privatization enables cooperators to outcompete defectors within local biofilms.However, to determine the long-term evolutionary outcome, we must also consider the contribution of each subpopulation to the overall defector's population fraction change.Thus, we performed an invasion analysis to determine whether a competing rare defector against a majority cooperative strain would be disfavored in a metapopulation.
To determine the long-term evolution of cooperation, simulations assumed: (1) the existence of a large number of isolated biofilm subpopulations; (2) the great majority of biofilms are of cooperators, and only a minority contained the defectors.After growth in a biofilm, individuals from each biofilm subpopulation go through a phase of random dispersal, such that the more individuals of a strain present, the higher the contribution to subsequent biofilms.
Under these conditions, a rare defector can invade a metapopulation consisting mainly of cooperators if the defector's fitness, w D , in local competition with cooperators is greater than the average fitness of the whole metapopulation.Because almost all biofilms in the metapopulation consist of cooperators, the average fitness of the metapopulation is approximated by the cooperators' fitness when growing without defectors, w C * .Hence, the index for defector's invasiveness evaluates whether the rare defector reproduces more rapidly than an average individual of the majority cooperative strain in the population.As in earlier work (Nadell et al. 2010), we calculated the defector's invasiveness as Defectors invade when I D→C > 0 .Otherwise, I D→C < 0 , defectors cannot invade, consequently indicating that cooperation is favored over the long term (Nadell et al. 2010).To account for the effect of different numbers of strains randomly settling during biofilm initiation, we consider different initial frequencies of the rare mutant.Using Latin hypercube sampling, we selected values for the initial defector's population fraction, the good's cost, privatization, and diffusiveness.
We found that: (1) the defector's invasion is disfavored by high privatization; (2) high costs and a high initial population fraction of cooperators facilitates the defectors' invasion; (3) defector's invasiveness is favored by high diffusion; nevertheless, this association is not statistically significant.Together, defector invasion is associated with very high costs, low-to-intermediate degree of partial privatization, and intermediary-to-high initial population fraction of cooperators (Fig. 6).

What facilitates the invasion of defectors?
Above, we identified under which conditions cooperation is evolutionarily stable for a good's cost, privatization and diffusiveness, and an initial cooperator's population fraction.Here, we checked how defectors' invasiveness connects with competition within local biofilms.
Using the same data displayed in Fig. 6, we found defectors can only invade if they outcompete cooperators within local biofilms.This can be graphically noticed because the red violin plot only contains values above 0 (Fig. 7).However, outcompeting defectors within biofilms does not guarantee defectors' invasion (there are values of the yellow violin plot above zero).

DISCUSSION
Here we analyzed whether partial privatization via partial secretion of goods favors cooperation in biofilms.We found that cooperation is favored within local biofilms whenever the privatized benefit outweighs the cost of cooperation.Moreover, in agreement with earlier predictions (Hamilton 1964a, b, Wilson et al. 1992, Fletcher & Doebeli 2009), we also found that limited diffusion favors cooperation by preferentially benefiting genetically related individuals.Nevertheless, our results also indicate that partial privatization might weaken the role that diffusion has in social evolution.This weakening occurs because partial privatization redirects shared goods into private ones.Our results hold for both local biofilms and over long-term evolution.
Our results demonstrated that partial privatization favors cooperation within local biofilms whenever the relative fraction of goods privatized offsets the good's cost.This relative relationship is illustrated in experiments on yeast, where merely 1% of non-secreted goods (monosaccharides created by sucrose hydrolysis) is sufficient to cover the metabolic cost and favor cooperation (Gore et al. 2009).Hence, the absolute fraction of goods privatized is not alone an accurate measure of whether privatization is enough to favor cooperation (Morris et al. 2014, Estrela et al. 2016).
Moreover, our results show that cooperation is favored as privatization increases and the diffusion of goods decreases.A high diffusion of goods disfavored cooperation because the more goods move away from the location where they were produced, the more likely non-related individuals will be able to benefit from them; hence, favoring the spread of defectors (Hamilton 1964a, b, Wilson et al. 1992, Fletcher & Doebeli 2009).Supporting this prediction, microbial experiments reducing metabolites diffusion have shown to favor cooperation (Kümmerli et al. 2009).
Limited diffusion and relatedness favor cooperation if the indirect benefits generated by them outweigh the cost of cooperation (Hamilton 1964a, Nowak & May 1992).Interaction with related individuals also incurs higher competition among them, kin competition.Together, relatedness and kin competition have been found to cancel out each other in mathematical models and simulations assuming a fixed total population density (Wilson et al. 1992, Taylor 1992, Queller 1994), and empirical evidence supporting this prediction is found in humans and wasps (see Queller 1994 andWest et al. 2001).In models incorporating density-dependence effects, relatedness is not canceled out by kin competition (Mitteldorf & Wilson 2000, Xavier & Foster 2007).As growth in biofilms is densitydependent, biofilm simulations and experiments have shown that limited diffusion and positive relatedness favor cooperation (Xavier & Foster 2007, Van Gestel et al. 2014).Other studies have also shown that the less dense the initial biofilm population is, the higher relatedness is, and the more cooperation is favored (Mitri et al. 2011, Van Gestel et al. 2014, Nadell et al. 2016, Steenackers et al. 2016).Consistent with these studies, we found that in competition within biofilms, cooperation is more favored the lower the initial population density is (Fig. S4).
We found that the higher a good's cost is, the larger privatization must be for cooperation to be favored over a long-term evolution.This result agrees with theoretical findings for other types of population structures that are not biofilms (Estrela et al. 2016, Jimenez & Scheuring 2021).Here, defectors can only invade if they outcompete cooperators within local biofilms, which occurred at very high costs and low-to-intermediary fractions of goods privatized.Nevertheless, our results also found cases where defectors outcompeted cooperators locally, and yet defectors could not invade.This occurred because biofilms composed mostly of cooperators produced more individuals, compensating for the cooperators' local disadvantage (Supplementary Material -Table SI).The influence of subpopulations on the overall change of the whole population has been found even in cases where cooperators are always outcompeted within local populations (Griffin et al. 2004, Diggle et al. 2007, Harrison 2013).
Our results also revealed that privatization weakens the effect of diffusion and relatedness on competition within biofilms (Fig. 5b-d).This weakening occurs because the higher privatization is, the fewer goods are available to diffuse, and the more likely privatized benefits will be able to offset a goods' cost; hence, the less diffusibility of goods will influence social evolution (Lehmann & Keller 2006).Moreover, our simulations showed that high diffusion favors the defector's invasiveness; nevertheless, this association is not statistically significant (Fig. 6d).On the one hand, a higher diffusion favored the defector's invasion because the higher diffusibility is, the more likely benefits reach defectors.On the other hand, diffusion did not significantly affect the defector's invasion for two reasons.First, the higher the fraction of goods privatized, the fewer secreted goods there are for diffusion, and the lower the effect of diffusion is expected to be.Second, within the various degrees of privatization, the fraction of goods diffused did not significantly affect the competition within local biofilms (Table SII).Together, the role of diffusion (used as a proxy for kin selection) is central, peripheral, or negligible depending on how high privatization is.
The relative importance of partial privatization and its weakening effect on kin selection requires further studies because our conclusion solely arises from simulations and experimental research on partial privatization focused on unstructured, non-biofilm populations (Gore et al. 2009, Jin et al. 2018, Morris 2015, Morris et al. 2014, Scholz & Greenberg 2015).Moreover, a meta-analysis of over 124 bacterial species secreting siderophores suggests that partial privatization is primarily common in unstructured populations (Kümmerli et al. 2014), thus, suggesting a limited role of privatization in biofilms.A theoretical explanation of why privatization might be more common in unstructured populations relative to biofilm populations proposes that privatization is favored whenever the cost of privatization is sufficiently low relative to relatedness (Dionisio & Gordo 2007).Since relatedness is high in biofilms (Nadell et al. 2009, Xavier et al. 2009), and privatization might be relatively costly (Morris et al. 2014), the importance of partial privatization in biofilms requires further research.
While we focused on partial privatization and kin selection, four major mechanisms are known to favor cooperation: direct reciprocity, indirect reciprocity, network reciprocity, and group selection (Nowak 2006).As in kin selection, the other four mechanisms have in common the existence of a benefit b to a recipient and a cost to c to the producer.These mechanisms differ in the biological phenomenon affecting b: (1) kin selection focuses on whether the interaction between b and relatedness outweighs c; (2) direct reciprocity focuses on whether the interaction between b and the probability of future interaction outweighs c; (3) indirect reciprocity focus on whether the interaction between b and social acquaintanceship outweighs c; (4) network reciprocity focuses on whether the interaction between b and the number of neighbors sharing b outweighs c; (5) group selection focuses on whether the interaction between b, group size, and the number of groups outweighs c (for an extended explanation see Nowak 2006).In all these cases, partial privatization represents a reallocation of shared benefits to private use.We conjecture that such reallocation of benefits carries two implications.First, partial privatization and the other mechanism would act alongside favoring cooperation.Second, the higher privatization is, the weaker will be the contribution of other mechanisms favoring cooperation, because the lesser shared benefit there will be.The robustness of these conjectures needs validation by future research.
Evolution in biofilms involves many intricated factors, including relatedness among individuals, partial secretion of goods, and metabolite chemical properties that affect its movement in the environment.Earlier research has untangled some of these complexities under the assumption that goods are fully secreted, and that relatedness is critical in explaining social evolution in biofilms.
Here, however, we demonstrated that partial secretion of goods cannot be ignored in biofilms and often, if not always, weaken the effects of diffusion.With the increasing number of reports showing that many goods are only partially secreted (Gore et al. 2009, Jin et al. 2018, Morris 2015, Morris et al. 2014, Scholz & Greenberg 2015, Schuster et al. 2017), future research might need to investigate what consequences partial secretion might carry to the social dynamics of biofilms.

Figure 1 .
Figure 1.Individual scale (a) and biofilm scale (b) in a 2-D biofilm model.There are only two types of individuals: cooperators and defectors, represented as yellow and red circles, respectively.Cooperators and defectors might cohabit the same patch; in the zoomed patch, cooperators and defectors cohabit the same patch.An individual inhabits the patch in which its center is contained within a patch.
abiotic nutrients ( A ) and produced metabolites, i.e., goods ( G ) Initial microbial cells type (cooperator or defector), mass and size Initial distribution of microbial cells at the attaching surface II.Time-stepping do A. Dynamics of microbial cells (section Functions) For cooperator [starvation, death, metabolism (consumption of A, production of G and reproduction)] If ( A = 0 or G C = 0 ) {cells starve, i.e., cells lose their mass to maintain alive and decrease their size} If (cell's < mass threshold) {cells die} Else { The cell increases its mass proportionally to the concentration of A and G C Decrease the concentration of A in the patch If ( G C < scarcity threshoold ) { The cell reduces its mass to produce mixed goods; From the mixed good produced, a fraction s is secreted and a fraction ( 1 − s ) is keep private } Decrease the concentration of mixed good in the patch and decrease the concentration of mixed good not secreted If (cell mass > threshold) {reproduction} Resize cell } Shove For defector [starvation, death, metabolism (consumption of A and G, and reproduction)] If ( A = 0 or G D = 0 ) {cells starve, i.e., cells lose their mass and decrease their size} If (cell's < mass threshold) {cells die} Else { The cell increases its mass proportionally to the concentration of A and G D Decrease the concentration of A in the patch Decrease the concentration of mixed good in the environment If (cell size > size threshold) {reproduction} Resize cell } Shove B. Dynamics of molecules (section Process Overview and Scheduling)

Figure 4 .
Figure 4.While high good's cost favors an increase in defector's population fraction and a decrease in biofilms' growth, high privatization disfavors an increase in defector's population fraction and favors an increase in biofilm growth.(a) The defector's population fraction decreased with increasing the fraction of goods privatized and decreasing a good's cost.A decrease in the defector's population fraction implies that the cooperator's fitness is larger than the defector's fitness.The values in each quadrant of the heatmap are the average of 10 simulations for the change in the defector's population fraction; the standard deviation in the change of defector's population fraction is in Fig. S1.(b) Higher costs favor an increase in the defector's population fraction and decrease biofilm growth.In (a) and (b), simulations assumed an initial defector's population fraction of ~ 0.25 and that the fraction of goods diffused is 0.5.

Figure 5
Figure5.These graphs show that defectors are disfavored for decreasing diffusion and increasing privatization; however, increasing privatization weakens diffusion's effect on strains' competition.(a) The defector's population fraction decreased with increasing privatization and decreasing diffusion of goods.A decrease in the defector's population fraction implies that the cooperator's fitness is larger than the defector's fitness.However, for privatization above 40%, the effect of diffusion can no longer favor one strain over the other.For each quadrant of the heatmap, the change in the defector's population fraction is the average of 10 simulations; the standard deviation in the change of defector's population fraction is in Fig.S2.(b-d).Increasing privatization weakens the impact that diffusion has on the outcome of competition within biofilms.The dotted line indicates the initial defector's population fraction.Thus, dots above the dotted line indicate an increase in the defectos's population fraction, and dots below the dotted line indicate a decrease in defectors' population fraction.Each graph contains the Spearman's rank correlation coefficient (r s ) and its respective p-value (P) for the interaction between the final defector's population fraction and a fraction of diffused goods.Each dot represents the value of an individual simulation.In all graphs, the cost of producing goods is 0.7, and the initial defector's population fraction is ~ 0.25.

Figure 6 .
Figure 6.These graphs show that the defector's invasiveness (a) decreases at high privatization, (b and c) increases at high costs and high initial population fraction of cooperators and (d) is uncorrelated with diffusion.Graph (a) indicates that the defector's invasion is disfavored by increasing fractions of goods privatized.Graph (b) indicates that increasing a good's cost facilitated the defectors' invasion.Graph (c) indicates that increasing the initial cooperator's population fraction facilitates the defector's invasion, i.e., negative frequency-dependent selection occurs.Graph (d) indicates that diffusion did not affect the defectors' invasion.Points above the dotted line indicate that defectors can invade.Points below the dotted line indicate that defectors cannot invade.These different plots are different ways to visualize the same data.Each graph contains the Partial Spearman's rank correlation (r S ) and corresponding p-values (P).We used Latin Hypercube Sampling to sample 96 parameter combinations of cost, the initial cooperator's population fraction, the fraction of goods secreted, and the fraction of goods diffused for the interval between zero and one.

Table I .
Pseudocode for the whole model.G c and G D are the concentration of produced metabolites (goods) accessible to cooperators and defectors, respectively.

Table II .
Summary of our model parameters, variables, ranges, units, and source.For justification of parameter values assumed, see TableSIV.