Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Mutualistic networks emerging from adaptive niche-based interactions


Mutualistic networks are vital ecological and social systems shaped by adaptation and evolution. They involve bipartite cooperation via the exchange of goods or services between actors of different types. Empirical observations of mutualistic networks across genres and geographic conditions reveal correlated nested and modular patterns. Yet, the underlying mechanism for the network assembly remains unclear. We propose a niche-based adaptive mechanism where both nestedness and modularity emerge simultaneously as complementary facets of an optimal niche structure. Key dynamical properties are revealed at different timescales. Foremost, mutualism can either enhance or reduce the network stability, depending on competition intensity. Moreover, structural adaptations are asymmetric, exhibiting strong hysteresis in response to environmental change. Finally, at the evolutionary timescale we show that the adaptive mechanism plays a crucial role in preserving the distinctive patterns of mutualism under species invasions and extinctions.


Mutualism, the interaction that joins actors providing reciprocal benefits or services, has a pivotal role in nature and human society1,2,3,4,5. Many mutualistic systems have formed through self-organization rather than through explicit engineering. Still, common structural features describing the relationship of the actors have been observed pervasively in mutualistic systems across many scales and contexts, suggesting a unifying underlying mechanism. Such relations can be captured by a bipartite cooperation network among two distinct guilds of actors where edges between guilds represent a form of cooperation such as the “barter” between plants and pollinators or an industrial partnership between designers and contractors1,2,3,4,5,6,7. The most distinctive features of these networks are the modular and nested patterns that are consistently overexpressed compared with their randomized counterparts4,6,7. A modular organization implies that most mutualistic links can be contained in several clusters, whereas a nested structure implies that more often than not the partners of one species of a lower degree (specialist) are a subset of the partners of another species of a higher degree (generalist).

Potential origins of these pervasive structures have been studied by various approaches. From the perspective of static theories, the network structure is interpreted as a consequence of the appropriate matching of traits or abundances4,8,9,10,11,12,13,14. Among them, the niche model of Saavedra et al.4, which follows along the line of Williams and Martinez8,9, demonstrates a host of mutualistic network structures as proper trait relations in a concise way. Beyond studies of static structural properties, dynamic theories aim to explain the emergence of the network structure and predict its future development. Such theories have been developed for numerous problems from food web assembly to trophic structure to specialization trends15,16,17. Although mutualistic partnerships are also known to be adaptive in nature in both ecological and socio-economic contexts2,4,18,19, most dynamic theories for mutualism focus partially on nestedness13,20,21,22, leaving modularity unexplored. However, the strong correlation between the nestedness and modularity observed in empirical networks suggests they have a common origin. Thus, having a unified, dynamical process that elucidates how both nested and modular patterns emerge in an integrated manner is highly desired.

Here, we propose an adaptive niche model, incorporating the quintessential concept of niches and the adaptive dynamics of connection. An optimal partnership structure exhibiting both nestedness and modularity emerges from a unified optimization mechanism accounting for the participants’ niche relations and population distribution2,18,19,23. Positive feedback of local advantages plays a central role in the co-emergence of the patterns. The dyadic measures of the assembled networks are correlated and comparable to those observed in empirical networks. Key dynamical properties are revealed at different timescales. At the ecological timescale, we show the bidirectional role of mutualism on network stability: enhancing mutualism can either stabilize or destabilize the network, depending primarily on the intensity of competition. We also demonstrate that network adaptation is asymmetric, exhibiting a prominent hysteresis in response to environmental change. Accidents of environmental history may thus be “frozen” in the network structure. Finally, at the evolutionary timescale we show that the adaptive behavior leads to different resilience of generalist and specialist nodes in the presence of species invasions and extinctions that is crucial for preserving the patterns of mutualism during evolution.


Adaptive niche model

We study network assembly using the ecological concept of niche-based interactions, which may extend to a broad range of non-biological contexts where mutual benefits exist such as bipartite partnerships among socio-economic organizations. We concentrate on a pair of fundamental characteristics of each actor (e.g., species, company, or social organization): first its niche, being the living or operating range, and second its fitness, being the abundance or operating status.

For concreteness we explain the model in the context of pollination. Consider a collection of species in two distinct guilds (denoted P and A in analogy with plants and animal pollinators) that are involved in mutualism with selected partners in the opposite guild and competition with all rivals in their own guild (Fig. 1a). The niche profile of a species can be generally formulated by a Gaussian function Hi(s), representing its statistical distribution on a one-dimensional niche axis24,25. We define niche proximity Hij as the joint occupation probability of a pair of interacting actors on the niche axis26,27


For within-guild interactions, niche proximity considers habitat niches capturing trait similarity of rival species in competition with one another (e.g., for similar nesting sites or soil conditions). For cross-guild interactions, niche proximity instead considers partner niches capturing trait complementarity of mutualistic partners.

Fig. 1: Pattern formation from adaptive niche-based interactions.

a Adaptation of niche relation and demographic distribution. An example network of 20 species in mutually interacting guilds (A and P) develops from a random relation (left) to a stable partnership (right). Each species i possesses a pair of characteristics: a niche profile (Gaussian function Hi(s)) randomly scattered on the niche axis, and an individual species abundance (represented by a disk of proportional size). The species abundances are governed by the generalized Lotka-Volterra dynamics (Eq. 5a, Eq. 5b), where the coupling strengths are determined by the proximity of interacting specific niches across the guilds for mutualism and within the guilds for competition. b Rewiring and updating niche proximity. A species rewires to a randomly selected new partner species with updated niche proximity. The rewiring is accepted if the individual species abundance increases and rejected otherwise. The example in the upper panel demonstrates the rewiring of a node i from a partner j with a slightly higher abundance to a new one k with a larger niche proximity, Hij → Hik. In contrast, the lower panel shows that a node rewires to a new partner with a smaller niche proximity but a significantly higher abundance. The gray area represents the niche proximity. c Network patterns in steady state. An assembled network is shown for example, with 100 species in each guild, simulated for C0 = 0.058 and (Ωm, Ωc) = (0.10, 0.05), with significantly higher nestedness and modularity (NODF = 0.1666, Q = 0.6207) than the randomized networks (P ≤ 0.0001; two-sided t test). The adjacency matrix is reordered to express the modular (upper panel) and nested (lower panel) patterns of the same network, with the colors indicating the module memberships.

The species abundance ni follows coupled dynamics, where the coupling strength is proportional to the niche proximity {Hij} of interacting species

$$\frac{d{n}_{i}}{dt}={F}_{i}(\{{n}_{i}\},\{{H}_{ij}\})\quad (i=1\ldots M),$$

where M is the total number of species. We use the generalized Lotka-Volterra dynamics, where the mutualistic interactions are described by Holling type II functional response28. This implies that we track the mean fitness of individual species, regardless of intraspecific difference. The mutualistic and competitive interaction strengths are encoded in the coupling matrices {γij} and {βij}, respectively (see Methods).

We assume that the niche relations among the species change adaptively to maximize the fitness of individual species26. At fixed time intervals, a randomly chosen species attempts to rewire to a different mutualistic partner and the niche proximity is updated (Fig. 1b). The rewiring is accepted if the individual species abundance increases and rejected otherwise20,21. In addition, a rewiring probability is used to reflect the situation that link removal from a specialist is harder than from a generalist (see Methods). The population dynamics is relaxed to an equilibrium between the rewiring attempts.

Emergent structures

Our numerical simulations generate an ensemble of extensive network structures, exhibiting a broad range of nestedness and modularity (Fig. 2a). In all realizations, we start from a randomly connected bipartite mutualistic network \({\{{\gamma }_{ij}\}}_{t = 0}\) with a specified connectance C0. The center positions \(\bar{{s}_{i}}\) of niche functions are sampled uniformly at random from the niche axis. We use such random initial structures as the “starting point” of assembly, representing arbitrary partnerships in the beginning. We demonstrate that structured networks can be self-assembled irrespective of such initial arbitrariness.

Fig. 2: Assembled network structure.

a Systematic comparison of dyadic structural measures of real and generated networks. The dyadic measures (nestedness NODF, modularity Q) of an ensemble of 300 generated networks (red) show a significant overlap with those of the 144 empirical networks (blue) from the Web of Life data set and exhibit a similar negative correlation (dashed lines). For each model network, the numbers of animal and plant species and the connectance are taken from a randomly chosen empirical network, covering a large variety of network sizes (ranging from 21 to 1500) and aspect ratios (ranging from 1 to 9.8). The interaction intensities (Ωm, Ωc) are chosen uniformly at random from [0.01, 0.30] × [0.01, 0.30] and niche width σ from [0.01, 0.50]. b Emergent degree distribution showing a truncated power law for relatively low modularity (shown for (Ωm, Ωc) = (0.20, 0.05)) and a single-peaked distribution for relatively high modularity (shown for (Ωm, Ωc) = (0.05, 0.01) and (0.50, 0.01)). The sizes of both guilds are MA = MP = 100 and connectance C0 = 0.058 (same for all panels). c, d Structural measures versus interaction intensities. The nestedness and modularity measures show a convex and concave dependence on the intensity of mutualism Ωm, respectively; whereas the family of colored curves show that enhancing the competition intensity Ωc contributes positively to NODF and negatively to Q. Data are obtained from 50 simulation runs and presented as mean values  ±  SD. The dashed tips represent infeasible equilibria. Note that different combinations of (Ωm, Ωc) can generate networks with the same (NODF, Q) values.

The bipartite niche relations change until reaching a state where all macroscopic structural and demographic measures remain approximately constant with time, which we refer to as the steady state. We measure the nestedness with the metric NODF29 and the modularity with the leading eigenvector algorithm30. The modules are robust in that, except for a few peripheral ones, most of the species are partitioned persistently to only one of the modules once the evolved steady state is reached (see Supplementary Fig. 4a, b for the metric of module stationarity). In this sense, the entire community has settled into a macroscopic order after exploring a landscape of numerous possibilities of niche relations31.

Notably, the generated nested and modular measures are statistically comparable with those of the empirical ecological networks from the Web of Life data set32, which range over a large variety of geographical factors and constituents. As shown in Fig. 2a, the band of dyadic measures (NODF, Q), simulated with the exterior characteristics (size, connectance, aspect ratio) of the empirical networks, cover almost the full range of possible structures and also regenerate a similar negative correlation between NODF and Q as exhibited in the empirical ensemble (note that there is still a systematic difference; see Supplementary Note 5 for the possible cause). The correlation indicates that the two measures cannot be determined independently: one can find networks with very high nestedness (modularity) and very low modularity (nestedness), but not likely with both being high or low. In the case of both nontrivial nestedness and modularity (significantly higher than for the null model), modules may emerge with embedded nested structures33,34, as exemplified in Fig. 1c.

The degree distribution, describing the heterogeneity in the numbers of partners per species, transforms from a Poisson distribution of the initial random network to a stable distribution at the steady state. The stable distribution varies with the modularity (Fig. 2b): a truncated power law is present for a relatively low modularity (corresponding to relatively large module sizes). With the increase of modularity, it converts to a narrower single-peaked distribution owing to the fact that species contained within a smaller-sized module tend to possess comparable numbers of partners.

Cumulative advantage

Heuristically, the nested and modular patterns are formed coherently through a positive feedback of local advantages. Driven by the incentive of increasing individual species fitness, a preponderance in the abundance of a certain species tends to attract more partner species within a larger range of niche proximity, which in turn enhance its own abundance (as indicated by the positive correlations of species abundance, degree and broadness of partnership in Supplementary Fig. 5c, d). The modular and nested structure is hence formed by the aggregation of links around separate hubs as “seeds” consisting of generalists (see network assembly in Supplementary Fig. 1). Both patterns are thus formed along the same path of development and exhibit a negative correlation. This optimization dynamics belongs to a broad class of localized preferential attachment processes, whereby “the rich get richer”, but under the local constraints on the potential linkage35,36,37. This effect known as cumulative advantage38,39, prevailing in socio-economic systems, thus also underlies the formation of mutualistic relationship.

Inadvertently this process can also reduce competition. While direct competition (associated with habitat niches) and direct mutualism (associated with partner niches) are explicit in the population dynamics, indirect mutualism can also emerge between competing species. Competitors in close habitat niches can affect each other positively by contributing to the abundance of shared mutualistic partner species (thus minimizing competition or the dilution of resources)28,40.

At the steady state, the network achieves a structure that optimizes the inherent tradeoffs. We examine the assembled structure under different intensities Ωm and Ωc of mutualism and competition. These parameters represent the interaction intensity per unit of niche proximity (see Methods). In this adaptive framework, changes in the interaction intensities can alter the network structure: the measures of nestedness NODF and modularity Q show a convex and concave dependence on the intensity of mutualism Ωm (Fig. 2c, d), respectively. This corresponds to an adaptive linking strategy: modules tend to merge with enhanced mutualism (thus, lower modularity for larger module sizes and more intermodule links, and higher nestedness for more overlaps of partnership), but tend to split beyond a turning point Ωm,T (see Supplementary Fig. 10a). These relations are generally robust regarding network size and aspect ratio of numbers of animals against plants (see sensitivity analyses in Supplementary Note 2).

On the other hand, enhancing the intensity of competition Ωc contributes positively to the nestedness while suppresses the modularity (colored differently in Fig. 2c, d). This is due to competitive repulsion26,27: merging modules may counteract intensified competition by enlarging the separation between module hubs (Supplementary Fig. 10b). Thus, the so far underestimated within-guild competition actually acts as a crucial determinant for the cross-guild partnerships23.

Transition in network stability

The adaptive niche model network reaches an asymptotically constant link structure and a balanced demographic distribution at the steady state (Supplementary Figs. 4c and 5a). It is useful to examine whether this population distribution on the evolved network can withstand transitory external interference. Here we characterize the stability of the assembled network by calculating the real part of the leading eigenvalue of the Jacobian of the population dynamics (Eq. (5)), S = −Re(λ)max (Supplementary Note 3). This local stability measure considers the response to small perturbations on species abundances at a typical ecological timescale. In static theories, network stability calculations usually assume an fixed network topology under all external conditions12,41,42,43,44. An ecological network, however, typically changes its structure with the environment, resulting in changes in stability.

We examine the stability of the assembled network that has adapted to the interaction intensities (Fig. 2c, d). It shows both stabilizing and destabilizing roles of mutualism on the network stability. Most evidently, we identify two types of transitions in the stability induced by the overall intensity of competition at marked thresholds. The first threshold \({\Omega }_{c,T}^{I}\) differentiates the regimes of competition intensity, where the relative stability of the assembled network is persistently positive or negative compared with the randomized network (Fig. 3a, b). Hence, the network stability relative to random networks is predominantly subject to the competition level. The second threshold \({\Omega }_{c,T}^{II}\) separates the contrasting situations where enhancing mutualism by Ωm would stabilize or destabilize the network (Fig. 3c). The comparative scenarios are shown for typical values of Ωc in three intervals in Fig. 3a–c. The situations are blended in a narrow intermediate interval \({\Omega }_{c,T}^{II}\,<\,{\Omega }_{c}\,<\,{\Omega }_{c,T}^{I}\) where the network is more stable than the null model but enhancing mutualism still has a destabilizing role (Fig. 3b). Thus, whether enhancing mutualism stabilizes or destabilizes the evolved network is regulated by the competition intensity. Such bidirectional role of mutualism is persistently observed for different network sizes and aspect ratios (Supplementary Note 3).

Fig. 3: Stability of assembled network.

ac Transitions of stability induced by competition intensity. The relative stability is persistently negative or positive compared with the randomized network for the competition intensity Ωc above or below the first threshold \({\Omega }_{c,T}^{I}\approx 0.025\) (between a and b). At the second threshold \({\Omega }_{c,T}^{II}\approx 0.015\), the regimes of competition intensity are separated where enhancing mutualism by Ωm would stabilize or destabilize the network (between b and c). The scenarios are shown for typical values at Ωc = 0.05, 0.017, and 0.01 in the three intervals. The stability measures of the null model are shown by blue curves. Data are obtained from 50 simulation runs and presented as mean values ± SD. df Demographic distributions. The network stability is associated with the lower bound of the population of all species. The relative position of the population distributions of the assembled network (red area) to the random counterpart (blue area) changes with the competition intensity, which reverses the relative stability (compare d and e). On the other hand, enhancing mutualism is detrimental to the low-populated species at a relatively high competition level (e). Only at a sufficiently low competition level, the entire population and the stability rises with Ωm (f). The average population per species 〈n〉 is marked by black and white dashed lines for the assembled and random network, respectively.

The transitions are consistent with the change of demographic distribution. The network stability is related to the lower bound of the population of all species through their close relation \(S=-Re({\lambda }_{m})\approx \min _{i}({n}_{i})\)21. The relative stability of the evolved network as compared with its random counterpart can hence be considered as the relative position of their population distributions, which changes with the competition intensity. By intensifying the competition over the threshold \({\Omega }_{c,T}^{I}\), the lower bound of the population falls below that of the null model, which renders a negative relative stability (Fig. 3d, e). On the other hand, mutualism is prone to increasing the “rich” species but suppressing the “poor” at a high competition level. Only at a sufficiently weak competition level \({\Omega }_{c}\,<\,{\Omega }_{c,T}^{II}\) does enhancing mutualism boost the entire population, which contributes positively to the network stability (Fig. 3e, f). The bidirectional role of mutualism is exhibited on the stability mainly through the underpopulated species.

Hysteresis in adaptation

We further examine the resilience of the network structure under slow environmental changes. We found that such long-term changes may cause systematic alteration of the assembly that are irreversible even if the external environmental condition is restored2,31,45. Numerically, we track the structural measures of an assembled network by raising and restoring the mutualistic intensity Ωm, mimicking the impact of a gradually changing environment over a large time span. A slow change rate of Ωm(t) is used so that the entire process is guaranteed to be at quasi-steady-states. Strikingly, the trajectories of both nestedness and modularity show an unclosed hysteresis with the control parameter (Fig. 4a, b).

Fig. 4: Asymmetric structural adaptation.

a, b The nestedness and modularity measures show hysteretical trajectories with the intensity of mutualism Ωm, demonstrating asymmetric adaptation in opposite directions. A very slow change rate (ΔΩm = 10−6 per time interval) is used during the reciprocation of Ωm so that the system is guaranteed to be always at quasi-steady-states. In contrast, the same population 〈n〉 (inset of upper panel) and stability S (inset of lower panel) are recovered on the altered network structure when Ωm is restored. c, d Long-term response to cyclic change. The asymptotic behavior of the nestedness settles to a stable closed hysteresis loop. In contrast, the variation of modularity becomes narrowly constraint and more symmetric along both directions. Data are obtained from 50 simulation runs and presented as mean values ±  SD.

It shows an asymmetry in the adaptation: the process proceeds preferably in the direction of merging (when Ωm increases) rather than splitting modules (when Ωm decreases). Consequently, species engaged in cooperation may adopt alternative niche relations even under the same environmental condition. Such hysteresis implies that accidents of environmental history would be frozen in the mutualistic network structure31,45. (Such memory effect becomes less prominent for smaller-sized networks, see Supplementary Fig. 19).

However, this path-dependency affects only the structural properties. In the same process, the average community population 〈n〉 and the stability measure S are well recovered along the same path when the influenced variable Ωm is restored (see insets of Fig. 4a, b). Hence, neither the overall population level nor local stability shows traces of environmental change, despite the drastically altered underlying structure.

The response to the long-term cyclic external change settles into a stable trajectory. The asymptotic behavior of the nestedness measure approaches a closed hysteresis loop with the continuously altering Ωm after multiple cycles (Fig. 4c), remaining an asymmetry along the bidirectional paths. The change of modularity, in contrast, becomes more symmetric and narrowly constrained after the initial cycles (Fig. 4d), which infers the network has settled to a relatively robust modular structure.

Invasion to mutualistic networks

At last, we demonstrate that the adaptive mechanism plays a crucial role in maintaining the patterns of mutualism during long-term evolution. We analyze the impact that invading mutant species have on the network structure. We adopt elements from the classical theory of “Adaptive Dynamics”46,47,48 and introduce an adaptive-evolutionary process based on two timescales: at large time intervals, mutant species, with a slightly different niche (trait) and a small proportion of the resident’s total abundance, attempt to invade a randomly chosen resident49. Between invasion attempts, the network undergoes a large number of short-timescale adaptive rewiring steps (see Methods and Supplementary Note 4) playing out whether the mutant survives, goes extinct, replaces, or coexists with the resident. Regardless, we show that a nontrivial nested and modular architecture persists in the presence of repeated invasions and extinctions.

Starting from a small core of resident species, the number of existing species initially increases, saturating at a level referred to as the maximal capacity of the network, which decreases with the competition intensity (Fig. 5a). The nestedness initially decreases while modularity increases and both quickly saturate (Fig. 5b). Notably, the evolving structural measures show a distribution in the (NODFQ) plane that overlaps with that of the empirical networks from the Web of Life data set (Supplementary Fig. 21b). Numerical simulations show that the invading mutants explore the entire niche space with wide-stretching phylogenetic trees rooted on the initial species (Supplementary Fig. 20).

Fig. 5: Invasions to mutualistic networks.

a Starting from a small core of species (M = 4), the total number of species M increases and eventually saturates at a level that decreases with the competition intensity Ωc. b As M increases and stabilizes, the nestedness NODF decreases and modularity Q increases shown here explicitly for Ωc = 0.4. c Starting from a large mutualistic network (M = 112) the relative probabilities for the survival of a mutant, the extinction of an invaded resident, and the coexistence of resident and mutant, as a function of resident degree k, measured Δm = 500 time steps after the invasion.

The adaptive behavior is crucial for preserving nestedness. Without it, the nestedness would quickly disappear and the network size would grow in an unbounded way with repeated invasions (Supplementary Fig. 24). Adaptive rewiring leads to a strong degree-based bias in the mutants’ survival and removal chances due to extinction. Figure 5c shows the relative probabilities50 Prel(k) that the mutant has survived, that the mutant has coexisted with the resident, and that the invaded resident has gone extinct, examined at Δm = 500 time steps after the invasion. These probabilities show a clear tendency that generalists are more robust against invasions, whereas specialists are more likely to succumb (Supplementary Fig. 23). Thus, the cores of the modules are seldom affected by invasions and it is only specialists that are often substituted, which makes the nested and modular structure unaltered under repeated invasions.


We have developed an adaptive-network framework for the assembly of mutualistic networks, linking the structure of a network to the processes unfolding on it. By combining the concepts of niche structure and adaptive rewiring, the pervasively observed nested and modular patterns of mutualism emerge from an integrated underlying mechanism. Both patterns are complementary facets of optimal niche structure as was previously conjectured from heuristic arguments51. This integrated mechanism also provides an underlying explanation for the negative correlation between nestedness and modularity observed in empirical networks.

The proposed adaptive niche model extends the classical niche theory of Williams and Martinez8,9 (typically used for food webs) to a dynamical framework, using the original concept of niche interactions from MacArthur and Levin26. Although the classical niche theory is able to address the structure in a concise way, our model, at the cost of introducing more variables to describe niche-based interactions, can reveal a host of fundamental dynamical properties at different timescales. At the ecological timescale, the stability analysis demonstrates both stabilizing and destabilizing effects of mutualism, reconciling the contradictory conclusions of different theories12,41,42,43,44, in most of which the critical impact of competition has hitherto been largely ignored23. Counter-intuitively, it suggests that for a highly competitive community, enhancing mutualistic strength may detriment the low-fitness actors and reduce the network resilience, which is a side effect of cumulative advantage38. Furthermore, the striking hysteresis in structural adaptation suggests alternative stable structures can exist under the same external conditions31,45, implying that the traces of environmental history would be “frozen” in the ecological relationship or organizational partnership.

At the evolutionary timescale, the adaptive dynamics plays a crucial role in preserving network architecture under repeated invasions and extinctions. The invasion tests, based on a two-timescale adaptive-evolutionary dynamic process, suggest that successful surviving invaders can only enter the network at the “right” entry point, owing to the different resilience of resident nodes endowed by the architecture46,47,48. This may explain why the patterns of mutualism are persistently observed in nature in spite of repeated invasions and extinctions. Also, it suggests that the combination of processes at both timescales is an important scenario for network evolution52. Further results from the invasion tests show a tendency of trait convergence and complementarity (Supplementary Note 4). This is supported by strong evidence of selection favouring complementarity in mutualism53 and is consistent with theories assuming explicit coevolutionary mechanisms54.

Hence, this adaptive systems formulation has demonstrated a mechanism by which fundamental interactions can shape the global mutualistic network structure, providing a bottom–up perspective on mutualism. Indeed, from the network theoretical point of view, this mechanism has demonstrated that processes involving cumulative advantage or preferential attachment with local rules can be responsible not only for hierarchy formation but also for modularization35,36,37. In this manner, many general properties of mutualism that are nonspecific to constituents can be understood from the perspective of network dynamics. We anticipate that further investigations into questions about invasion and diversity55,56,57,58, cascading extinctions and resilience59,60,61,62,63,64, and restoration of mutualistic networks65,66 would be particularly revealing in this framework. The adaptive nature of niche relations should even underpin a broad category of interactions in socio-economic systems4,67,68.


Adaptive niche model

We consider a bipartite ecological network that contains interacting species of two guilds (denoted P and A, in analogy with plants and animal pollinators). We assign a pair of characteristics to each species: its niche and its abundance (individual species fitness). The niche profile is formulated as a Gaussian function Hi(s) with uniform width σ and its center position \(\bar{{s}_{i}}\) randomly chosen from the interval [0, 1] on a niche axis (Supplementary Note 1). Each species is involved in cross-guild mutualistic interactions with selected partners (represented by a matrix {γik}), in addition to competitive interactions with all rival species in its own guild ({βij} for A or P). We define the niche proximity Hij of a pair of interacting species i and j as

$${H}_{ij}=\int{H}_{i}(s){H}_{j}(s)ds=\exp \left(-\frac{{\left(\bar{{s}_{i}}-\bar{{s}_{j}}\right)}^{2}}{4{\sigma }^{2}}\right).$$

which refers to the total joint probability of possessing the same niche position for either competing species within the same guild26,27 or partner species across the guilds. The intensity of either type of pair-wise interaction is assumed to be proportional to the niche proximity Hij

$${\text{mutualistic}}\!\!:\,\quad {\gamma }_{{ik}}={\Omega }_{m}\cdot {\theta }_{{ik}}\cdot {H}_{ik}$$
$$\,{\text{competitive}}\!\!:\,\quad {\beta }_{ij}=\left\{\begin{array}{ll}1,&i=j\\ {\Omega }_{c}\cdot {H}_{ij},&i\,\ne\, j\end{array}\right.$$

where ij G = (A or P) and \(k\in \bar{G}=\)(P or A). {θik} is the adjacency matrix, with the entries equal to 1 if i and k interact, and 0 if not. The mutualistic interaction strength is thus higher for partners located at similar positions across the guilds, corresponding to higher trait complementarity, whereas the competitive interaction strength is higher for rivals located at similar positions within the same guild, owing to higher trait similarity. The proportionality coefficients Ωm and Ωc are the interaction factors for mutualistic and competitive interactions, respectively, which capture the overall environmental influence.

The species abundances evolve according to a set of Lotka-Volterra equations with Holling Type II mutualistic functional response1,12,21:

$$\frac{d{n}_{i}^{A}}{dt}={n}_{i}^{A}\left({\rho }_{i}^{A}-\sum _{j}{\beta }_{ij}^{A}{n}_{j}^{A}+\frac{\sum _{k}{\gamma }_{ik}^{AP}{n}_{k}^{P}}{1+h\sum _{k}{\theta }_{ik}^{AP}{n}_{k}^{P}}\right)$$
$$\frac{d{n}_{i}^{P}}{dt}={n}_{i}^{P}\left({\rho }_{i}^{P}-\sum _{j}{\beta }_{ij}^{P}{n}_{j}^{P}+\frac{\sum _{k}{\gamma }_{ik}^{PA}{n}_{k}^{A}}{1+h\sum _{k}{\theta }_{ik}^{PA}{n}_{k}^{A}}\right)$$

where the coupling strengths {γik} and {βij} are defined above. Note that k actually spans only species interacting with i.

Rewiring and update of niche proximity: all species are assigned uniform abundances ni = n0 and connected to partner species across the guilds uniformly at random with a specified connectance C0 in the initial condition. The system evolves according to Eq. (5) and at each time interval t = mT (m is a positive integer), a species i is chosen uniformly at random and one of its existing links γij is rewired to a randomly selected different mutualistic partner species k with probability pij. The niche proximity across the guilds and the mutualistic coupling strength are updated: Hij → Hik and γij → γik. T is chosen to be sufficiently large to guarantee that the population dynamics reaches equilibrium between subsequent rewiring attempts. At the end of the time interval \(t^{\prime} =(m+1)T\), the abundance of species i is compared with the previous value20,21. If \({n}_{i}(t^{\prime} )\,> \,{n}_{i}(t)\), the rewiring is accepted; otherwise the previous link ij is restored and the niche proximity is recovered. The rewiring probability for the link ij is \({p}_{ij}=1-{k}_{j}^{-\eta }\) (η > 0), with kj being the degree of the partner species, so that a species with a lower degree is prone to keeping its link(s). This guarantees that any species interacts with at least one mutualistic partner species, so that the connectance of all interacting species remains constant during rewiring.

We use random networks as the null model, where the probability of each entry of the adjacency matrix being occupied is the average of the occupation probabilities of the row and column6.


We use a two-timescale process: at large time intervals (Tm = RT \(*\) T), a resident species is randomly chosen with a probability proportional to its abundance ni and a mutant species is created which inherits all the mutualistic links and a small proportion of the resident’s total abundance (1%) (Supplementary Note 4). The mutant deviates from the resident by a displacement on the niche axis, drawn from a normal distribution. Extra links are randomly deleted to stay in accords with the empirical relation between connectance and network size C0 = 4/M0.8. At short time intervals (T), adaptive rewiring, as detailed above, occurs. Invasions to two types of initial networks are analyzed: (1) a small core of resident species, consisting of two pairs of species (one in each guild) with all cross-guild connections; (2) an assembled network of a relatively large size (112 species).

Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability

The Web of Life data set used in this study is available at

Code availability

The codes for simulating the core model are available at: (


  1. 1.

    Bascompte, J. & Jordano, P. Mutualistic Networks (Princeton Univ. Press, 2013).

  2. 2.

    Ollerton, J. in Plant-Pollinator Interactions: From Specialization to Generalization Ch. 18 (eds Waser, N. M. & Ollerton, J.) 411–435 (Univ. Chicago Press, 2006).

  3. 3.

    Bronstein, J. L. in Mutualism (ed. Bronstein, J. L.) 1–19 (Oxford Univ. Press, 2015).

  4. 4.

    Saavedra, S., Reed-Tsochas, F. & Uzzi, B. A simple model of bipartite cooperation for ecological and organizational networks. Nature 457, 463–466 (2009).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  5. 5.

    Toju, H., Guimarães, P. R., Olesen, J. M. & Thompson, J. N. Assembly of complex plant-fungus networks. Nat. Commun. 5, 5273 (2014).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  6. 6.

    Bascompte, J., Jordano, P., Melian, C. J. & Olesen, J. M. The nested assembly of plant? animal mutualistic networks. Proc. Natl Acad. Sci. USA 100, 9383–9387 (2003).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  7. 7.

    Olesen, J. M., Bascompte, J., Dupont, Y. L. & Jordano, P. The modularity of pollination networks. Proc. Natl Acad. Sci. USA 104, 19891–19896 (2007).

    ADS  CAS  PubMed  MATH  Article  PubMed Central  Google Scholar 

  8. 8.

    Williams, R. J. & Martinez, N. Simple rules yield complex food webs. Nature 404, 180–183 (2000).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  9. 9.

    Cattin, M. F. et al. Phylogenetic constraints and adaptation explain food-web structure. Nature 427, 835–839 (2004).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  10. 10.

    Santamaría, L. & Rodríguez-Gironés, A. Linkage rules for plant-pollinator networks: trait complementarity or exploitation barriers? PLoS Biol. 5, 354–362 (2007).

    Article  CAS  Google Scholar 

  11. 11.

    Krishna, A., J. Guimarães Jr, P. R. P. & Bascompte, J. A neutral-niche theory of nestedness in mutualistic networks. Oikos 117, 1609–1618 (2008).

    Article  Google Scholar 

  12. 12.

    Thébault, E. & Fontaine, C. Stability of ecological communities and the architecture of mutualistic and trophic networks. Science 329, 853–856 (2010).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  13. 13.

    Campbell, C., Yang, S., Réka, A. & Sheab, K. A network model for plant-pollinator community assembly. Proc. Natl Acad. Sci. USA 108, 197–202 (2011).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  14. 14.

    Solé-Ribalta, A., Tessone, C. J., Mariani, M. S. & Borge-Holthoefer, J. Revealing in-block nestedness: detection and benchmarking. Phys. Rev. E 97, 062302 (2018).

    ADS  PubMed  Article  PubMed Central  Google Scholar 

  15. 15.

    Loeuille, N. & Loreau, M. Evolutionary emergence of size-structured food webs. Proc. Natl Acad. Sci. USA 101, 5761–5766 (2005).

    ADS  Article  CAS  Google Scholar 

  16. 16.

    Guill, C. & Drossel, B. Emergence of complexity in evolving niche-model food webs. J. Theor. Biol. 251, 108–120 (2008).

    MathSciNet  PubMed  MATH  Article  PubMed Central  Google Scholar 

  17. 17.

    Allhoff, K. T., Ritterskamp, D., Rall, B. C., Drossel, B. & Guill, C. Evolutionary food web model based on body masses gives realistic networks with permanent species turnover. Sci. Rep. 5, 10955 (2015).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  18. 18.

    Armbruster, W. S. & Baldwin, B. G. Switch from specialized to generalized pollination. Nature 394, 632–632 (1998).

    ADS  CAS  Article  Google Scholar 

  19. 19.

    Guimaraẽs, P. R. et al. Interaction intimacy affects structure and coevolutionary dynamics in mutualistic networks. Curr. Biol. 17, 1797–1803 (2007).

    PubMed  Article  CAS  PubMed Central  Google Scholar 

  20. 20.

    Zhang, F., Hui, C. & Terblanche, J. S. An interaction switch predicts the nested architecture of mutualistic networks. Ecol. Lett. 14, 797–803 (2011).

    PubMed  Article  Google Scholar 

  21. 21.

    Suweis, S., Simini, F., Banavar, J. R. & Maritan, A. Emergence of structural and dynamical properties of ecological mutualistic networks. Nature 500, 449–452 (2013).

    ADS  CAS  PubMed  Article  Google Scholar 

  22. 22.

    Nuismer, S. L., Jordano, P. & Bascompte, J. Coevolution and the architecture of mutualistic networks. Evolution 67, 338–354 (2012).

    PubMed  Article  Google Scholar 

  23. 23.

    Gracia-Lázaro, C., Hernández, L., Borge-Holthoefer, J. & Moreno, Y. The joint influence of competition and mutualism on the biodiversity of mutualistic ecosystems. Sci. Rep. 8, 9253 (2018).

    ADS  PubMed  PubMed Central  Article  CAS  Google Scholar 

  24. 24.

    Hutchinson, G. E. Concluding remarks. Cold Spring Harb. Symp. Quant. Biol. 22, 415–427 (1957).

    Article  Google Scholar 

  25. 25.

    Cohen, J. Food Webs and Niche Space (ed. Vandermeer, J. H.) 190 (Princeton Univ. Press, 1978).

  26. 26.

    MacArthur, R. & Levin, R. The limiting similarity, convergence, and divergence of coexisting species. Am. Nat. 101, 377–385 (1967).

    Article  Google Scholar 

  27. 27.

    Scheffer, M. & van Nes, E. Self-organized similarity, the evolutionary emergence of groups of similar species. Proc. Natl Acad. Sci. USA 103, 6230–6235 (2006).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  28. 28.

    Bastolla, U. et al. The architecture of mutualistic networks minimizes competition and increases biodiversity. Nature 458, 1018–1020 (2009).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  29. 29.

    Almeida-Neto, M., Guimarães, P., Guimarães, P. R., Loyola, R. D. & Ulrich, W. A consistent metric for nestedness analysis in ecological systems: reconciling concept and measurement. Oikos 117, 1227–1239 (2008).

    Article  Google Scholar 

  30. 30.

    Newman, M. E. J. Modularity and community structure in networks. Proc. Natl Acad. Sci. USA 103, 8577–8582 (2006).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  31. 31.

    Levin, S. A. Ecosystems and the biosphere as complex adaptive systems. Ecosystems 1, 431–436 (1998).

    Article  Google Scholar 

  32. 32.

    Ortega, R., Fortuna, M. A. & Bascompte, J. The Web of Life: ecological networks database. Web of Life (2020).

  33. 33.

    Lewinsohn, T. M., Prado, P. I., P., J., Bascompte, J. & Olesen, J. M. Structure in plant-animal interaction assemblages. Oiko 113, 174–184 (2006).

    Article  Google Scholar 

  34. 34.

    Palazzi, M. J., Borge-Holthoefer, J. C., Tessone, J. & Solé-Ribalta, A. Macro- and mesoscale pattern interdependencies in complex networks. J. R. Soc. Interface 16, 20190553 (2019).

  35. 35.

    Álbert, R. & Barabàsi, A. L. Statistical mechanics of complex networks. Rev. Mod. Phys. 74, 47–97 (2002).

    ADS  MathSciNet  MATH  Article  Google Scholar 

  36. 36.

    D’Souza, R. M., Borgs, C., Chayes, J. T., Berger, N. & Kleinberg, R. D. Emergence of tempered preferential attachment from optimization. Proc. Natl Acad. Sci. USA 104, 6112–6117 (2007).

    ADS  PubMed  Article  CAS  PubMed Central  Google Scholar 

  37. 37.

    Poncela, J., Gómez-Gardeñes, J., Floría, L. M., Sańchez, A. & Moreno, Y. Complex cooperative networks from evolutionary preferential attachment. PLoS ONE 3, e2449 (2008).

    ADS  PubMed  PubMed Central  Article  CAS  Google Scholar 

  38. 38.

    de Solla Price, D. A general theory of bibliometric and other cumulative advantage processes. J. Assoc. Inf. Sci. Technol. 27, 292–306 (1976).

    Google Scholar 

  39. 39.

    Perc, M. The Matthew effect in empirical data. J. R. Soc. Interface 11, 20140378 (2014).

    PubMed  PubMed Central  Article  Google Scholar 

  40. 40.

    McPeek, M. A. Mechanisms influencing the coexistence of multiple consumers and multiple resources: resource and apparent competition. Ecol. Monogr. 89, e01328 (2019).

    Article  Google Scholar 

  41. 41.

    Okuyama, T. & Holland, J. N. Network structural properties mediate the stability of mutualistic communities. Ecol. Lett. 11, 208–216 (2008).

    PubMed  Article  PubMed Central  Google Scholar 

  42. 42.

    Allesina, S. & Tang, S. Stability criteria for complex ecosystems. Nature 483, 205–208 (2012).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  43. 43.

    Staniczenko, P. P., Kopp, J. C. & Allesina, S. The ghost of nestedness in ecological networks. Nature 4, 1391 (2013).

    Google Scholar 

  44. 44.

    Grilli, J., Rogers, S. & Allesina, T. Modularity and stability in ecological communities. Nat. Commun. 7, 12031 (2016).

    ADS  CAS  PubMed  PubMed Central  Article  Google Scholar 

  45. 45.

    Kauffman, S. A. The Origins of Order (Oxford Univ. Press, 1993).

    Google Scholar 

  46. 46.

    Metz, J. A. J., Geritz, S. A. H., Meszéna, G., Jacobs, F. J. A. & van Heerwaarden, J. S. in Stochastic and Spatial Structures of Dynamical Systems (eds van Strien, S. J. & Verduyn Lunel, S. M.) 183–231 (Elsevier, 1996).

  47. 47.

    Geritz, S. A. H., Kisdi, E., Meszéna, J. A. J. & Metz, G. Evolutionarily singular strategies and the adaptive growth and branching of the evolutionary tree. Evol. Ecol. 12, 35–57 (1998).

    Article  Google Scholar 

  48. 48.

    Dieckmann, U. & Doebeli, M. On the origin of species by sympatric speciation. Nature 400, 354–357 (1999).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  49. 49.

    Taper, M. L. & Case, T. J. Models of character displacement and the theoretical robustness of taxon cycle. Evolution 46, 317–333 (1992).

    PubMed  Article  PubMed Central  Google Scholar 

  50. 50.

    Newman, M. Clustering and preferential attachment in growing networks. Phys. Rev. E 64, 025102 (2001).

    ADS  CAS  Article  Google Scholar 

  51. 51.

    Ponisio, L. et al. A network perspective for community assembly. Front. Ecol. Evol. 7, 103 (2019).

  52. 52.

    Minoarivelo, H. O. & Hui, C. Trait-mediated interaction leads to structural emergence in mutualistic networks. Evol. Ecol. 30, 105–121 (2016).

    Article  Google Scholar 

  53. 53.

    Thompson, J. N. The Geographic Mosaic of Coevolution (Univ. Chicago Press, 2005).

  54. 54.

    Guimaraes, J., Jordano, P. & Thompson, J. Evolution and coevolution in mutualistic networks. Ecol. Lett. 14, 877–885 (2011).

    PubMed  Article  PubMed Central  Google Scholar 

  55. 55.

    Memmott, J. & Waser, N. M. Integration of alien plants into a native flower-pollinator visitation web. Proc. Biol. Sci. 269, 2395–99 (2002).

    PubMed  PubMed Central  Article  Google Scholar 

  56. 56.

    Morris, W. F. in The Importance of Species (eds Kareiva, P. & Levin, S.) 260–280 (Princeton Univ. Press, 2003).

  57. 57.

    Melbourne, B. A. & Hastings, A. Extinction risk depends strongly on factors contributing to stochasticity. Nature 454, 100–103 (2008).

    ADS  CAS  PubMed  Article  PubMed Central  Google Scholar 

  58. 58.

    Campbell, C., Yang, S., Réka, A. & Sheab, K. Plant-pollinator community network response to species invasion depends on both invader and community characteristics. Oikos 124, 406–413 (2015).

    Article  Google Scholar 

  59. 59.

    Memmott, J. & Price, N. M. Tolerance of pollination networks to species extinctions. Proc. Biol. Sci. 271, 2605–2611 (2004).

    PubMed  PubMed Central  Article  Google Scholar 

  60. 60.

    Brodie, J. F. et al. Secondary extinctions of biodiversity. Trends Ecol. Evol. 29, 664–672 (2014).

    PubMed  Article  Google Scholar 

  61. 61.

    Dakos, V. & Bascompte, J. Critical slowing down as early warning for the onset of collapse in mutualistic communities. Proc. Natl Acad. Sci. USA 111, 17546–17551 (2014).

    ADS  CAS  PubMed  Article  Google Scholar 

  62. 62.

    Brummitt, C., Barnett, G. & D’Souza, R. Coupled catastrophes: sudden shifts cascade and hop among interdependent systems. J. R. Soc. Interface 12, 20150712 (2015).

    PubMed  PubMed Central  Article  Google Scholar 

  63. 63.

    Turalska, M., Burghardt, K., Rohden, M., Swami, A. & D’Souza, R. Cascading failures in scale-free interdependent networks. Phys. Rev. E 99, 032308 (2019).

    ADS  CAS  PubMed  Article  Google Scholar 

  64. 64.

    Snyder, J., Cai, W. & D’Souza, R. Degree-targeted cascades in modular, degree-heterogeneous networks. Preprint at arXiv (2020).

  65. 65.

    Kiers, E. T. Mutualisms in a changing world: an evolutionary perspective. Ecol. Lett. 13, 1459–1474 (2010).

    Article  Google Scholar 

  66. 66.

    Winfree, R., MacLeod, M., Harrison, T. & Cariveau, D. P. in Mutualism (ed. Bronstein, J. L.) 1–19 (Oxford Univ. Press, 2015).

  67. 67.

    May, R. M., Levin, S. A. & Sugihara, G. Complex systems: ecology for bankers. Nature 451, 893–895 (2008).

    ADS  CAS  PubMed  Article  Google Scholar 

  68. 68.

    Posnett, D., D’Souza, R., Devanbu, P. & Filkov, V. Dual ecological measures of focus in software development. in 35th Int. Conf. Softw. Engineer. 452–461 (IEEE, 2013).

Download references


The authors are in debt to Jordi Bascompte for very useful comments on the manuscript. This work is supported by US Army Research Office MURI award no. W911NF-13-1-0340 and Cooperative Agreement No. W911NF-09-2-0053, by NSF grant DMS-1817124, and by DARPA award W911NF-17-1-0077.

Author information




W.C., J.S., A.H., and R.D. designed research, W.C. and J.S. performed research; W.C., J.S., A.H., and R.D. analyzed data and wrote the paper.

Corresponding authors

Correspondence to Weiran Cai or Raissa M. D’Souza.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review information Nature Communications thanks the anonymous reviewer(s) for their contribution to the peer review of this work.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Cai, W., Snyder, J., Hastings, A. et al. Mutualistic networks emerging from adaptive niche-based interactions. Nat Commun 11, 5470 (2020).

Download citation


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing