Skip to main content
  • Loading metrics

The role of competition versus cooperation in microbial community coalescence


New microbial communities often arise through the mixing of two or more separately assembled parent communities, a phenomenon that has been termed “community coalescence”. Understanding how the interaction structures of complex parent communities determine the outcomes of coalescence events is an important challenge. While recent work has begun to elucidate the role of competition in coalescence, that of cooperation, a key interaction type commonly seen in microbial communities, is still largely unknown. Here, using a general consumer-resource model, we study the combined effects of competitive and cooperative interactions on the outcomes of coalescence events. To do so, we simulate coalescence events between pairs of communities with different degrees of competition for shared carbon resources and cooperation through cross-feeding on leaked metabolic by-products (facilitation). We also study how structural and functional properties of post-coalescence communities evolve when they are subjected to repeated coalescence events. We find that in coalescence events, the less competitive and more cooperative parent communities contribute a higher proportion of species to the new community because of their superior ability to deplete resources and resist invasions. Consequently, when a community is subjected to repeated coalescence events, it gradually evolves towards being less competitive and more cooperative, as well as more speciose, robust and efficient in resource use. Encounters between microbial communities are becoming increasingly frequent as a result of anthropogenic environmental change, and there is great interest in how the coalescence of microbial communities affects environmental and human health. Our study provides new insights into the mechanisms behind microbial community coalescence, and a framework to predict outcomes based on the interaction structures of parent communities.

Author summary

In nature, new microbial communities often arise from the fusion of whole, previously separate communities (community coalescence). Despite the crucial role that interactions among microbes play in the dynamics of complex communities, our ability to predict how these affect the outcomes of coalescence events remains limited. Here, using a general mathematical model, we study how the structure of species interactions confers an advantage upon a microbial community when it encounters another, and how communities evolve after undergoing repeated coalescence events. We find that competitive interactions between species preclude their survival upon a coalescence event, while cooperative interactions are advantageous for post-coalescence survival. Furthermore, after a community is exposed to many coalescence events, the remaining species become less competitive and more cooperative. Ultimately, this drives the community evolution, yielding post-coalescence communities that are more species-rich, productive, and resistant to invasions. There are many potential environmental and health implications of microbial community coalescence, which will benefit from the theoretical insights that we offer here about the fundamental mechanisms underlying this phenomenon.


Microbial communities are widespread throughout our planet [1], from the human gut to the deep ocean, and play a critical role in natural processes ranging from animal development and host health [2, 3] to biogeochemical cycles [4]. These communities are very complex, typically harboring hundreds of species [5], making them hard to characterize. Over the last decade, the advent of cost-effective high-throughput DNA sequencing techniques has allowed high-resolution mapping of these communities, opening a niche for theoreticians and experimentalists to collaboratively decipher their complexity and assembly [612].

Entire microbial communities are often displaced over space and come into contact with each other due to physical (e.g., dispersal by wind or water) and biological (e.g., animal-animal or animal-plant interactions, and leaves falling to the ground) factors [1316]. The process by which two or more communities that were previously separated join and reassemble into a new community has been termed community coalescence [17]. Although microbial community coalescence is likely to be common, the effects of both intrinsic and extrinsic factors on the outcomes of such events remains poorly understood [18]. Among extrinsic factors, resource availability, immigration rate of new species, and environmental conditions (especially, pH, temperature, and humidity) are likely to be crucial [1921]. Among intrinsic factors, the role of functional and taxonomic composition and the inter-species interaction structures of parent communities are expected to be particularly important [19, 20]. We focus on the role of species interactions on community coalescence in this study.

Early mathematical models suggested that in encounters between animal and plants communities, species in one community are more likely to drive those in the other extinct (community dominance) [22, 23]. This was explained as being the result of the fact that communities are a non-random collection of species assembled through a shared history of competitive exclusion, and therefore act as coordinated entities. Recent theoretical work [24] has more rigorously established this for microbial community coalescence events, showing that the dominant community will be the one capable of more efficiently depleting all resources simultaneously. Overall, these findings suggest that communities arising from competitive species sorting exhibit sufficient “cohesion” to prevent invasions by members of other communities [25, 26].

However, empirical support for the role of competition alone in coalescence outcomes is circumstantial, and the role of cooperation, which is commonly observed in microbial communities, is yet to be addressed theoretically. For example, during coalescence in methanogenic communities, “cohesive” units of taxa from the community with the most efficient resource use are co-selected [21]; and in aerobic bacterial communities, the invasion success of a given taxon is determined by its community members as a result of collective consumer-resource interactions and metabolic feedbacks between microbial growth and the environment [27]. These microbial communities exhibit cooperation through a typically dense cross-feeding network, where leaked metabolic by-products of one species are shared as public goods across the entire community [2830]. Nonetheless, neither [21] nor [27] addressed the role of competition and cooperation in determining the outcome of coalescence events in microbial communities, which have been suggested as key factors that may influence it [20, 31, 32].

Here, we first use a general consumer-resource model that includes cross-feeding to assemble complex microbial communities having different degrees of competition and cooperation. Thereafter, we focus on determining the relative importance of the two types of interactions on outcomes of coalescence events between the assembled communities. Finally, we quantify the subsequent evolution of the structural and functional properties of coalesced communities.


Mathematical model

Our mathematical model for the microbial community dynamics is based on the work of Marsland et al. [6] (see Section 1 in S1 Text, Table 1, and Fig 1): (1)

Fig 1. Overview of the coalescence modelling methodology.

Step 1. The matrix of resource preferences (C) and the metabolic matrix (D) are sampled for each community. Black polygons are different resource types. Step 2. Dynamics of the system are allowed to play out (Eq 1) until a locally stable equilibrium is reached. Species composition and abundance, along with community-level competition (solid bidirectional arrows, Eq 3), and facilitation (dashed unidirectional arrows, Eq 4) are measured in assembled communities. Step 3. Two of the assembled parent communities are mixed, and the resulting community integrated to steady state. For the random and recursive coalescence procedures, the contribution of each parent community to the final mix is analyzed (S1,2, Eq 7) as a function of their interaction structures ( and ) before they coalesced. In the case of the serial coalescence procedure, the properties of the resident community are tracked after each coalescence exposure.

Table 1. Table of parameters used in our model.

The units Ea and Ba represent arbitrary energy and biomass units, respectively.

Here, Nα (α = 1, …, s) and Rj (j = 1, …, m) are the biomass abundance (measured in arbitrary units of biomass) of the αth microbial (e.g., bacterial) species and the concentration (measured in moles) of the jth resource (e.g., carbon substrate). The growth of species α is determined by the energy it harvests minus its maintenance cost (two terms in the brackets). Energy is obtained through resource consumption, which depends on the resource concentration in the environment, Rj, and on the energy uptake rate per unit of biomass of species α, cαj (here assumed to be binary; either 1 or 0). The leakage term lα determines the proportion of this uptake that species α releases back into the environment as metabolic by-products, with the remainder (1 − lα) being allocated to growth. The energy surplus that remains after subtracting a maintenance cost (zα) is transformed into biomass with a proportionality constant of gα, the value of which does not affect the results presented here.

The change in the concentration of resources in the environment (second line in Eq 1) is determined by four terms. The first and second terms represent the external supply and dilution of resource j, which give the rates at which the jth resource enters and leaves the system. The third term is the uptake of the jth resource from the environment, summed across all s consumers, and the fourth term represents resources entering the environmental pool via leakage of metabolic by-products. By-product leakage of species α is determined by the metabolic matrix Dα (or the “stoichiometric” matrix; [6]), with Dαjk representing the leaked proportion of resource j that is transformed into resource k by species α. Energy conservation dictates that Dα is a row stochastic matrix, meaning that its rows sum to 1. Note that in this model, we allow species to leak metabolites that they also consume (we address this assumption further in the Discussion).

We define the consumer’s maintenance cost to be: (2) where χ0 is the average energetic cost of being able to consume a given resource, the summation represents the total number of resources that species α can process, and ϵα is a small random fluctuation that introduces variation in the cost for species that have identical preferences. Eq 2 ensures that neither generalists nor specialists are systematically favored during community assembly (by imposing a greater cost on species that consume a wider range of resources) and that all species can deplete resources to similar concentrations independently of their leakage level (see Section 1 in S1 Text for rationale, Fig A in S1 Text for results under different cost functions; and Discussion).

The above model entails the following assumptions: (i) all resources contain the same amount of energy (taken to be 1 for simplicity), (ii) a linear, non-saturating consumer functional response, (iii) binary consumer preferences (uptake rates), and (iv) an environment where all resources are externally supplied in equal amounts. We address the implications of these assumptions in the Discussion.

Competition and facilitation metrics

In our model (Eq 1), competition for resources exists because all pairs of consumer species generally share some resource preferences (their metabolic preferences vectors are not orthogonal). We quantify the pairwise competition between a species pair (α, β) by counting the resource preferences they share through the scalar product of their preference vectors, cαcβ. Therefore, community-level competition (denoted as ) can be calculated by taking the average of the competition matrix, which encodes the competitive strength between all species pairs, that is (3) where C is the s × m matrix of metabolic preferences of all the species in the community.

On the other hand, facilitation occurs when a species leaks metabolic by-products that are used by another species. We measure pairwise facilitation from species αβ by calculating the fraction of secreted resources from species α that are consumed by species β per unit of resource abundance, . Similar to competition, we compute community-level cooperation (denoted as ), by taking the average of the facilitation matrix, which encodes the cooperative strength between all species pairs, that is (4) where where is a diagonal matrix with the leakage vector of each species in the community in its diagonal.

Henceforth, we refer to the quantity as “net competition”, which we later show is related to the “cohesion” defined in previous work [24].


In Fig 1 we present an overview of our simulations, which we now describe. For the parameter values used, see Table 1.

Step 1: Parameterization.

We first set the parameters of the initial communities (before assembly) such that they span interactions across the spectrum of net competition (). For each parent community, we modulate the structure of the C and D matrices (consisting of the resource preferences cαj’s and secretion proportions Djk’s, respectively) by developing constrained random sampling procedures that guarantee specific levels of competition and facilitation at the community’s steady state. In particular, competition is modulated through the competition factor kc, which is imposed during the sampling of C. When kc = 0 the elements of C are sampled uniformly at random, and as kc → 1 those resources that have been frequently sampled by other species are more likely to be assigned as one of the preferences of the current one (see Section 2 in S1 Text), thus generating hubs of highly demanded resources, which accentuate resource competition in the community. Net competition can alternatively be reduced through the effect of facilitation. We modulate facilitation using the facilitation factor kf, during the sampling of D. When kf → 0 the metabolic matrix has no structure, that is, all resources are released at equiprobable fractions. As kf → 1 the structure of D becomes fully determined by the resource demands of the community so that more demanded resources are released at higher fractions (see Section 2 in S1 Text). This alleviates resource competition by creating a flow of resources from least to most demanded. In addition, we also add structure to C and D to emulate the existence of distinct resource classes and consumer guilds (see Section 4 in S1 Text). In these communities, competition and facilitation between guilds are modulated through the constants Kc (inter-guild competition factor), and Kf (inter-guild facilitation factor) (see Section 2 in S1 Text). Note that we parameterize the initial communities by assuming (i) a shared core metabolism encoded in D, and (ii) a common leakage fraction l for all species (the implications of which we address in the Discussion), but we relax these assumptions in our coalescence simulations (Methods; Step 3).

Step 2: Assembly of parent communities.

After parameterization, we numerically integrate Eq 1 until steady state (a putative equilibrium) is reached. We perform 100 such assembly simulations with random sets of consumers for each combination of competition and facilitation factors (i.e., kc = kf ∈ [0, 0.5, 0.9]), repeating this for three values of leakage (l ∈ [0.1, 0.5, 0.9]). We compare species composition, abundances, and interaction structure of communities before and after assembly. To compare species composition, we calculate the difference, before and after assembly, in the proportion of species with mr metabolic preferences (that is, a species with mr ones and mmr zeros in its vector of metabolic preferences , which we now denote as an m-preferences consumer) as (5)

Here, p(mr) is the probability that a species has mr metabolic preferences (which is exponentially distributed; Section 2 in S1 Text), the 0 denotes before assembly, r is species richness, and is the number of species in the community with mr metabolic preferences. Thus, when Δmr > 0 the proportion of species with mr metabolic preferences increases after assembly and vice versa. To analyze species abundances, we track the abundance fraction of consumers in each group of m-preferences species, calculated as the total abundance of species in the group, divided by the total community biomass, that is (6)

Finally, we address the interaction structure after assembly by quantifying the levels of competition () and facilitation () in the assembled communities (Fig 2A).

Fig 2. Features of assembled parent communities.

A: Facilitation versus competition level in starting (grey dots) and assembled (coloured dots) communities for leakage l = 0.9 and different combinations of competition (kc) and facilitation (kf) factors. Communities assembled for each pair of [kc, kf] values have the same colour. The assembled communities are displaced towards more cooperative states at the end of the assembly than at the start. B: Change in proportion of species m-preferences consumers before and after assembly (Δmr, Eq 5, y axis) as a function of the number of metabolic preferences (x axis), for three different values of kc (legend in panel C), calculated after each simulation, and averaged across simulations. Greater positive values of Δmr for more generalist species indicates that they are less prone to extinction during assembly. Values for mr > 30 had too much uncertainty due to low sampling and therefore have been removed for clarity. Inset: Δmr is weighted by the abundance fraction at equilibrium of each m-preferences consumers group, (Eq 6). C: Abundance fraction of the m-preferences species groups for different values of kc. D: Distributions of species richness values of parent communities assembled under different kc values. Increasing competitiveness tends to decrease species richness.

Step 3: Coalescence.

The coalescence between a pair of assembled parent communities is simulated by setting all resources to their initial concentrations and numerically integrating the new combined system to steady state. To disentangle the effects of competition versus cooperation and study the effect of repeated coalescence events, we simulate three coalescence scenarios: random, recursive, and serial, as follows (further details in Section 3 in S1 Text).

Random coalescence. To address the effects of competition alone in the outcome of coalescence events, here we coalesce pairs of randomly sampled parent communities having the same leakage value l (2 ⋅ 104 pairs for each leakage level, Fig 3C). That is, we fix the leakage level to ensure that the communities have, on average, similar cooperation levels, but leave kc free to vary such that they span a broad range of competition levels.

Fig 3. Community coalescence between pairs of randomly picked communities with same leakage.

A: Example of the secretion matrix with elements (CD)αk representing the total leakage of resource k by species α. B: Community-level competition (dark red) and facilitation (blue) averaged across simulations for each leakage value. Since competition does not depend on the leakage, it remains consistently high throughout. Facilitation, on the other hand, increases linearly with leakage. C: Parent community dominance (S1,2) as function of net competition difference () (solid lines ± 1 standard deviation (shaded)), binned (20 bins) over communities with similar x axis values, for three community-wide leakage levels. The post-coalescence community is more similar to its less net competitive parent. D: Species richness (r) as a function of net competition in parent communities, coloured by total resource concentration at steady state . The observed negative correlation for all values of leakage shows that communities with lower net competition tend to be more speciose and also better at depleting resources (brighter coloured values, corresponding to lower levels of are scattered towards the top left of the plots).

Recursive coalescence. To study the effects of cooperation in particular on community coalescence, we repeatedly coalesce a given pair of communities A and B, slightly increasing the leakage of the latter in each iteration (Fig 4A). This allows us to modify the strength of cooperative interactions in the community, because facilitation is proportional to l (Eq 4) while keeping competition levels constant because competition is independent of l (Eq 3), and the remaining parameters are kept fixed.

Fig 4. Recursive coalescence between microbial communities.

A: Sketch of the simulation set up. The same pair of communities (A, B) is recursively coalesced, with the leakage of B gradually increasing after each coalescence event for three levels of leakage of A, and 25 replicates per lA value. B: Parent community dominance after coalescence between communities A and B, as a function of facilitation level of community B, (bottom x axis), and leakage of community B, lB (top x axis). Each curve corresponds to a different value of lA. Shaded regions are ±σ. Dominance of parent community B after coalescence increases with lB, implying that higher cooperation levels enhance coalescence success.

Serial coalescence. To understand how the functional and structural properties of a microbial community evolve under successive coalescence events, we simulate the following scenario. A local (“resident”) community harbouring species with leakage , and metabolism is successively invaded by many other randomly sampled communities (“invaders”), with species of leakage and metabolism (Fig 5A).

Fig 5. Serial coalescence of microbial communities.

A: Sketch of the simulation set up. Resident communities (, upper circles) with leakage are successively coalesced with randomly sampled invader communities (, lower circles) with leakage for all possible combinations of leakage values (arrows) . For each serial coalescence sequence, we examine as a function of number of coalescence events, the following community properties of : (B) community-level competition (, dashed lines) and facilitation (, solid lines); (C) average species maintenance cost; (D) average resource concentration at equilibrium; (E) abundance fraction of each m-preferences species group; and (F) number of successful invasions and species richness. All the measures are averaged across 20 replicates. The standard deviation is decreasing along the x axis and is never more than 40% of the mean for all the curves (not shown to reduce clutter). Abundance fraction of species with mr > 5 was negligible and is not plotted for clarity.

To determine which parent community is more successful after each random and recursive coalescence simulations, we measure the similarity between the post-coalescence community and each of the two parents (indexed by 1 and 2) as: (7) where pf, p1, and p2 are (s1 + s2)–dimensional binary vectors of species presence-absence in the post-coalescent, and parent communities 1 and 2, respectively, with r1 and r2 the species richness values of the parent communities 1 and 2, respectively (calculated as ri = ∑pi). If S1,2 = −1, the coalesced community is identical to parent community 1, and if S1,2 = 1, it is identical to parent community 2. This measure is independent of the species richness. Thus we can mix communities with different species richness while avoiding a bias in similarity towards the richer one. We then analyze how this dominance measure depends on the interaction structure of the parent communities ( and ; Eqs 3 and 4). After each coalescence event in the serial coalescence procedure, we measure competition and facilitation levels of the resident community, along with the average species maintenance cost, average resource abundance at equilibrium, species richness, and number of successful invasions, during the entire sequence of serial coalescence events.

For all assembled parent as well as coalesced communities we confirmed that the steady state was a locally asymptotically stable equilibrium (Section 1 in S1 Text).


Assembly of parent communities

In Fig 2 we show the key features of assembled communities. Fig 2A shows that as expected from Eqs 3 and 4, the levels of community-wide competition and facilitation are positively correlated, mediated by the structure of the C and D matrices. Fig 2B shows that the difference between the proportion of m-preferences consumers before and after assembly (Δmr, Methods; Step 1), increases with mr for all simulated values of kc, indicating that more generalist species are less prone to extinction during assembly. For the lowest value of kc, Δmr is a monotonically increasing function of the number of preferences. This is expected because a species able to harvest energy from multiple resource pools is less likely to go extinct during community dynamics. As kc increases, Δmr displays a minimum (Fig 2B), indicating that in more competitive environments pure specialists become more prevalent than moderate generalists. This is because in a highly competitive environment the resource demands are concentrated on a subset of resources, while others are barely consumed (Section 2 in S1 Text). In these communities, consumers that specialize exclusively in empty niches thrive. Fig 2C shows that specialist consumers are systematically present in higher abundance than generalists for all values of kc. This is because several specialists deplete all resources through their combined action more efficiently than one generalist [25], and as a result, although generalists are more persistent than specialists upon assembly (Fig 2B), they achieve lower abundances at equilibrium (Fig 2C). In Fig 2B (inset) we plot , that is, we weight Eq 5 by the abundance fraction of each m-preferences species group (Eq 6) (Methods; Step 2). This reveals an optimal group of consumers with a number of metabolic preferences that maximizes both survival probability and abundance at equilibrium. This optimal value increases for more competitive environments (as kc increases). Finally, Fig 2D shows that more competitive communities tend to be less species-rich, as expected from general competition theory.

Reducing competition increases coalescence success

Fig 3 shows that communities with lower net competition values tend to perform better in coalescence as seen by the positive relationship between parent community dominance (S1,2) and net competition difference () (Fig 3C). That is, communities that emerge following coalescence tend to be more similar to the less net competitive parent. This trend holds at higher values of leakage, where cooperation levels are significant (Fig 3B), but with a clear critical point (the yellow line reverses in direction at extreme values of net competition difference). This pattern is driven by the fact that less net competitive parent communities deplete resources more efficiently and achieve a higher species richness (Fig 3D; Section 1 in S1 Text). All these results also qualitatively hold for microbial communities that have consumer guild structure (Section 4 in S1 Text).

Cooperation further enhances coalescence success

Fig 4 shows that when a community (B) whose leakage fraction increases successively during recursive coalescence events with another (A) with a fixed leakage level, the former becomes increasingly dominant. The result is consistent for a range of leakage values of community A. This shows that increasing cooperation levels enhance coalescence success.

Community evolution under repeated coalescence events

Fig 5 shows that on average, competition level significantly reduces and facilitation level increases during repeated coalescence events. Along with this, the average maintenance cost of species present in the resident community decreases with the number of coalescence exposures, and so does average resource abundance at equilibrium (Fig 5C and 5D), indicating that resource depletion ability improves in the process. In addition, the sub-population of resource specialists (that consume only one resource) increases with the number of coalescence events, while the rest of the species groups decrease in abundance (Fig 5E). Finally, the number of successful invasions into the resident community decreases with the number of coalescence events, while its species richness increases (Fig 5F). Taken together, these results show that communities composed of non-competing specialists that cooperate among themselves (Fig 5B and 5E) and reduce their respective metabolic costs (Fig 5C), improve their overall resource depletion ability (Fig 5D). This, in turn, makes them more resistant to multi-species invasions and therefore more successful in pairwise coalescence events (Fig 5F).


Our findings offer new mechanistic insights into the dynamics and outcomes of microbial community coalescence by explicitly considering the balance between competition and cooperation; two key interactions of real microbial communities [25, 33]. Specifically, we find that communities harboring less competing and more cooperative species (that is, having lesser net competition) dominate after coalescence because they are better at depleting resources and resisting invasions. Therefore, when a community undergoes a series of coalescence events, its competitiveness decreases and cooperativeness increases, along with its species richness, resource use efficiency, and resistance to invasions. These results provide a theoretical foundation for hypotheses suggested recently [17, 20], and mechanistic insights into empirical studies that have demonstrated the importance of cross-feeding interactions on community coalescence [21].

Our result based on coalescence between pairs of random communities at very low leakage (black line in Fig 3C) essentially extends the results of [24] to communities with both competitive and cooperative interactions. Tikhonov showed that coalescence success is predicted by minimizing community-level competition through the optimization of resource niche partitioning, which also guarantees maximization of resource depletion efficacy. Here we show that, similarly, the successful community is the one that achieves lower net competition (), which also predicts community-level resource depletion efficacy as well as species richness (Fig 3D). Thus, simultaneously reducing competition and increasing cooperation together drives the outcome of community coalescence. Therefore, the quantity is also a measure of the “cohesiveness” of a microbial community. However, we also find that at extreme values of leakage (l = 0.9), there is a critical level of net competition difference beyond which coalescence success decreases again (yellow line in Fig 3C). This suggests that in the regime of high cooperation and competition, (high leakage, and tail ends of the curve, respectively) facilitative links become detrimental. A similar result has been reported in [34]. This critical value is not seen when the cost function does not include leakage (Fig B in S1 Text). Interestingly, we also find that this phenomenon is very weak when biologically-realistic guild structure is present (Fig F in S1 Text). These effects of extreme leakage (and facilitation) on coalescence success cannot be predicted by our model analyses (Section 1 in S1 Text), and merit further investigation in future research, provided such high leakage levels are biologically feasible.

In our model systems, species compete not only for resources leaked by other species but also for resources leaked by themselves, i.e., species may leak metabolic by-products that are also encoded in their consumer preferences vector. Leakage of metabolic resources is a pervasive phenomenon in the microbial world [35, 36], and has been shown to exist also in resources necessary for growth, even in situations when those essential metabolites are scarce [37, 38]. Although it may seem counter-intuitive for microbes to secrete metabolites essential for their growth, such leakage can be advantageous, especially in bacteria, as “flux control” or growth-dilution mechanisms, which provide short-term growth benefits in crowded environments [39, 40].

Our recursive coalescence simulations (Fig 4A) allowed us to establish that coalescence success is enhanced by cooperative interactions. This result is consistent with past theoretical work showing that mutualistic interactions are expected to increase structural stability by decreasing effective competition [41]. It is also consistent with recent in silico results on single species invasions in microbial communities [42]. Nonetheless, this finding hinges on our choice of the cost function (Eq 2; Section 1 in S1 Text). This cost function, which was motivated by biological considerations, imposed an efficiency cost to species with lower leakage, ensuring that all consumers, independently of their leakage fraction, depleted resources to the same concentration on average (see Section 1 in S1 Text). This allowed us to perform coalescence events between communities harboring species with different leakage without introducing a bias towards the more efficient species. This choice corresponds biologically to the interpretation of leakage as an efficiency factor in the conversion from energy to biomass (Eq S2 in S1 Text). As a consequence, higher leakage species reach, in general, lower abundances at equilibrium [43].

Our findings regarding the evolution of community-level properties in response to repeated community-community encounters (Fig 5) suggest that it might be possible to identify functional groups of microbes or microbial traits that are a “smoking gun” of past coalescence events experienced by a given community [17]. Additionally, our finding that members of communities with a history of coalescence are likely to become increasingly resistant to further community invasions suggests a novel and potentially economical way to assemble robust microbial communities. We also found that repeated coalescence events contributed to increasing species richness, offering another mechanism that may help explain differences in microbial diversity across locations and environments [17].

Our finding that resident communities exposed to repeated community invasions were mainly composed of cooperative specialists (Fig 5B and 5E) is due to our assumption that all resources were supplied, and at a fixed rate. This allowed specialists to survive because their only source of energy was always provided. This property may not be as commonly seen in real communities, where fluctuations in resource supply are common. Ignoring environmental fluctuations allowed us to focus on coalescence outcomes in terms of the species interaction structure alone. While this assumption may be sensible in some cases [44], it is an oversimplification in others [32]. Therefore, studying the complex interplay between biotic interactions and environmental factors, e.g., by allowing substrate diversification from a single supplied resource [6, 7], or perturbing the resource supply vector periodically to simulate some form of seasonality, is a promising direction for future research. In such cases, we expect a more balanced mix of generalists and specialists, such that only the competitive interactions necessary to diversify the available carbon sources will persist upon coalescence events, but above that threshold, the results presented here (Figs 3, 4 and 5) would be recovered.

Assuming a core leakage and metabolism common to the whole community, made the assembly dynamics computationally tractable while ensuring that the system was not far away from the conditions of real communities [6, 26]. However, the assumption of common leakage was relaxed in the recursive coalescence procedure. In addition, both the community-wide fixed leakage and core metabolism assumptions were relaxed in the serial coalescence simulations, thus using the model in its fully general form as seen in Eq 1. Finally, to retain an analytically tractable theoretical setting for an otherwise complex system, we assumed binary consumer preferences, linear consumer functional responses, and resources of equal energetic value throughout. While this is a promising avenue for future work, we expect our results to be qualitatively robust to relaxation of these constraints, based on recent work on microbial community assembly dynamics using the same general model [6, 26].

Encounters between microbial communities are becoming increasingly frequent [45], and mixing of whole microbial communities is gaining popularity for bio-engineering [46], soil restoration [47], fecal microbiota transplantation [48, 49], and the use of probiotics [50]. We present a framework that relates the structure of species interactions in microbial communities to the outcome of community coalescence events. Although more work is required to bridge the gap between theory and empirical observations, this study constitutes a key step in that direction.

Supporting information

S1 Text.

Section 1: Further details of the mathematical model. Section 2: Modulating net competition levels. Section 3: Further details of the community coalescence simulations. Section 4: Adding consumer guild structure. Fig A: Consequence of relaxing the assumption of leakage dependence. Fig B: Results of random coalescence procedure without imposing the efficiency cost (leakage dependence). Fig C: Eigenvalues of J when evaluated at equilibrium for two example communities. Fig D: Examples of differently-structured preference (C) and metabolic (D) matrices. Fig E: Auto-correlation of vector of species abundances in community B for consecutive re-assemblies of this community, along the studied leakage range. Fig F: Community coalescence with consumer guilds present.



We want to acknowledge Mikhail Tikhonov, Stefano Allesina, members of the Allesina Lab; Zachary Miller, Paulinha Lemos-Costa, and Katja Della Libera, and colleagues; Kiseok Lee, Will Koval, Yolanda Lechón and Maryn Carlson, for their valuable input on early versions of the manuscript.


  1. 1. Fierer N, Jackson RB. The diversity and biogeography of soil bacterial communities. Proceedings of the National Academy of Sciences of the United States of America. 2006;103(3):626–631. pmid:16407148
  2. 2. Huttenhower C, Gevers D, Knight R, Al E. Structure, function and diversity of the healthy human microbiome. Nature. 2012;486(7402):207–214.
  3. 3. McFall-Ngai M, Hadfield MG, Bosch TCG, Carey HV, Domazet-Lošo T, Douglas AE, et al. Animals in a bacterial world, a new imperative for the life sciences. Proceedings of the National Academy of Sciences of the United States of America. 2013;110(9):3229–3236. pmid:23391737
  4. 4. Falkowski PG, Fenchel T, Delong EF. The microbial engines that drive earth’s biogeochemical cycles. Science. 2008;320(5879):1034–1039. pmid:18497287
  5. 5. Gilbert JA, Jansson JK, Knight R. The Earth Microbiome project: Successes and aspirations. BMC Biology. 2014;12(69):12915–014. pmid:25184604
  6. 6. Marsland R, Cui W, Goldford J, Sanchez A, Korolev K, Mehta P. Available energy fluxes drive a transition in the diversity, stability, and functional structure of microbial communities. PLoS Computational Biology. 2019;15(2):e1006793. pmid:30721227
  7. 7. Goldford JE, Lu N, Bajić D, Estrela S, Tikhonov M, Sanchez-Gorostiaga A, et al. Emergent simplicity in microbial community assembly. Science. 2018;361(6401):469–474. pmid:30072533
  8. 8. Goyal A, Maslov S. Diversity, Stability, and Reproducibility in Stochastically Assembled Microbial Ecosystems. Physical Review Letters. 2018;120(15):158102. pmid:29756882
  9. 9. Friedman J, Higgins LM, Gore J. Community structure follows simple assembly rules in microbial microcosms. Nature Ecology and Evolution. 2017;1(5):41559–017. pmid:28812687
  10. 10. Costello EK, Stagaman K, Dethlefsen L, Bohannan BJM, Relman DA. The application of ecological theory toward an understanding of the human microbiome. Science. 2012;336(6086):1255–1262. pmid:22674335
  11. 11. Vila JCC, Jones ML, Patel M, Bell T, Rosindell J. Uncovering the rules of microbial community invasions. Nature Ecology and Evolution. 2019;3(8):1162–1171. pmid:31358951
  12. 12. Coyte KZ, Rao C, Rakoff-nahoum S, Foster KR. Ecological rules for the assembly of microbiome communities. PLOS Biol. 2021;19(2):e3001116. pmid:33606675
  13. 13. Luo X, Xiang X, Yang Y, Huang G, Fu K, Che R, et al. Seasonal effects of river flow on microbial community coalescence and diversity in a riverine network. FEMS Microbiology Ecology. 2020;96(8).
  14. 14. Vass M, Székely AJ, Lindström ES, Osman OA, Langenheder S. Warming mediates the resistance of aquatic bacteria to invasion during community coalescence. Molecular Ecology. 2021;. pmid:33448073
  15. 15. Kort R, Caspers M, van de Graaf A, van Egmond W, Keijser B, Roeselers G. Shaping the oral microbiota through intimate kissing. Microbiome. 2014;2(1):1–8. pmid:25408893
  16. 16. Evans SE, Bell-Dereske LP, Dougherty KM, Kittredge HA. Dispersal alters soil microbial community response to drought. Environmental Microbiology. 2020;22(3):905–916. pmid:31173453
  17. 17. Rillig MC, Antonovics J, Caruso T, Lehmann A, Powell JR, Veresoglou SD, et al. Interchange of entire communities: Microbial community coalescence. Trends in Ecology and Evolution. 2015;30(8):470–476. pmid:26111582
  18. 18. Rillig M, Tsang A, Roy J. Microbial community coalescence for microbiome engineering. Front. Microbiol. 2016;7:1967. pmid:27999571
  19. 19. Rillig MC, Lehmann A, Aguilar-Trigueros CA. Soil microbes and community coalescence. Pedobiologia. 2016;59(1-2):37–40.
  20. 20. Castledine M, Sierocinski P, Padfield D, Buckling A. Community coalescence: An eco-evolutionary perspective. Philosophical transactions of the Royal Society of London Series B, Biological sciences. 2020;375(1798):20190252. pmid:32200752
  21. 21. Sierocinski P, Milferstedt K, Bayer F, Großkopf T, Alston M, Bastkowski S, et al. A single community dominates structure and function of a mixture of multiple methanogenic communities. Current Biology. 2017;27(21):3390–3395. pmid:29107553
  22. 22. Gilpin M. Community-level competition: Asymmetrical dominance. Proceedings of the National Academy of Sciences of the United States of America. 1994;91(8):3252–3254. pmid:8159734
  23. 23. Toquenaga Y. Historicity of a simple competition model. Journal of Theoretical Biology. 1997;187(2):175–181.
  24. 24. Tikhonov M. Community-level cohesion without cooperation. eLife. 2016;5:e15747. pmid:27310530
  25. 25. Pascual-García A, Bonhoeffer S, Bell T. Metabolically cohesive microbial consortia and ecosystem functioning. Philosophical Transactions of the Royal Society B: Biological Sciences. 2020;375(1798):0190245. pmid:32200744
  26. 26. Marsland R., Cui W. and Mehta P. A minimal model for microbial biodiversity can reproduce experimentally observed ecological patterns. Sci Rep. 2020;10, 3308. pmid:32094388
  27. 27. Lu N, Sanchez-gorostiaga A, Tikhonov M, Sanchez A. Cohesiveness in microbial community coalescence. bioRxiv. 2018; p. 282723.
  28. 28. Hansen SK, Rainey PB, Haagensen JAJ, Molin S. Evolution of species interactions in a biofilm community. Nature. 2007;445(7127):533–536. pmid:17268468
  29. 29. Lawrence D, Fiegna F, Behrends V, Bundy JG, Phillimore AB, Bell T, et al. Species interactions alter evolutionary responses to a novel environment. PLoS Biology. 2012;10(5):e1001330.
  30. 30. Embree M, Liu JK, Al-Bassam MM, Zengler K. Networks of energetic and metabolic interactions define dynamics in microbial communities. Proceedings of the National Academy of Sciences of the United States of America. 2015;112(50):15450–15455. pmid:26621749
  31. 31. Rivett DW, Jones ML, Ramoneda J, Mombrikotb SB, Ransome E, Bell T. Elevated success of multispecies bacterial invasions impacts community composition during ecological succession. Ecology Letters. 2018;21(4):516–524. pmid:29446215
  32. 32. Albright MBN, Sevanto S, Gallegos-Graves LV, Dunbar J. Biotic interactions are more important than propagule pressure in microbial community invasions. mBio. 2020;11(5):1–16. pmid:33109758
  33. 33. Machado D, Maistrenko OM, Andrejev S, Kim Y, Bork P, Patil KR, et al. Polarization of microbial communities between competitive and cooperative metabolism. Nature Ecology and Evolution. 2021;5(2):195–203. pmid:33398106
  34. 34. Pascual-García A, Bastolla U. Mutualism supports biodiversity when the direct competition is weak. Nature Communications. 2017 8:14326. pmid:28232740
  35. 35. Morris JJ. Black Queen evolution: The role of leakiness in structuring microbial communities. Trends in Genetics. 2015;31(8):475–482. pmid:26078099
  36. 36. Kallus Y, Miller JH, Libby E. Paradoxes in leaky microbial trade. Nat. Comms. 2017;8(1): 1361. pmid:29118345
  37. 37. Silva LP, Northen TR. Exometabolomics and MSI: Deconstructing how cells interact to transform their small molecule environment. Current Opinion in Biotechnology. 2015;34:209–216. pmid:25855407
  38. 38. Paczia N, Nilgen A, Lehmann T, Gätgens J, Wiechert W, Noack S. Extensive exometabolome analysis reveals extended overflow metabolism in various microorganisms. Microbial Cell Factories. 2012;11:1–14. pmid:22963408
  39. 39. Yamagishi JF, Saito N, Kaneko K. Advantage of Leakage of Essential Metabolites for Cells. Physical Review Letters. 2020;124:048101. pmid:32058757
  40. 40. Yamagishi JF, Saito N, Kaneko K. Adaptation of metabolite leakiness leads to symbiotic chemical exchange and to a resilient microbial ecosystem. PLOS Comp. Bio. 2021;17(6): e1009143. pmid:34161322
  41. 41. Bastolla U, Fortuna MA, Pascual-García A, Ferrera A, Luque B, Bascompte J. The architecture of mutualistic networks minimizes competition and increases biodiversity. Nature. 2009;458(7241):1018–1020. pmid:19396144
  42. 42. Kurkjian HM, Javad Akbari M, Momeni B. The impact of interactions on invasion and colonization resistance in microbial communities. PLoS Computational Biology. 2021;17(1):1–18. pmid:33481772
  43. 43. Wieser W. Cost of growth in cells and organisms: General rules and comparative aspects. Biol. Rev. Camb. Philos. Soc. 1994 69(1):1–33. pmid:8193215
  44. 44. Acosta F, Zamor RM, Najar FZ, Roe BA, Hambright KD. Dynamics of an experimental microbial invasion. Proceedings of the National Academy of Sciences of the United States of America. 2015;112(37):11594–11599. pmid:26324928
  45. 45. Seebens H, Blackburn TM, Dyer EE, Genovesi P, Hulme PE, Jeschke JM, et al. No saturation in the accumulation of alien species worldwide. Nature Communications. 2017;8:1–9. pmid:28198420
  46. 46. Rillig MC, Tsang A, Roy J. Microbial community coalescence for microbiome engineering. Frontiers in Microbiology. 2016;7:1967. pmid:27999571
  47. 47. Calderón K, Spor A, Breuil MC, Bru D, Bizouard F, Violle C, et al. Effectiveness of ecological rescue for altered soil microbial communities and functions. ISME Journal. 2017;11:272–283. pmid:27341455
  48. 48. Wang JW, Kuo CH, Kuo FC, Wang YK, Hsu WH, Yu FJ, et al. Fecal microbiota transplantation: Review and update. Journal of the Formosan Medical Association. 2019;118(1):S23–S31. pmid:30181015
  49. 49. Wilson BC, Vatanen T, Cutfield WS, O’Sullivan JM. The super-donor phenomenon in fecal microbiota transplantation. Frontiers in Cellular and Infection Microbiology. 2019;9(2). pmid:30719428
  50. 50. Lindemann SR, Bernstein HC, Song HS, Fredrickson JK, Fields MW, Shou W, et al. Engineering microbial consortia for controllable outputs. ISME Journal. 2016;10(9): 2077–2084. pmid:26967105