Ecologists are fascinated by the prevalence of nestedness in biogeographic and community data, where it is thought to promote biodiversity in mutualistic systems. Traditionally, nestedness has been treated in a binary sense: species and their interactions are either present or absent, neglecting information on abundances and interaction frequencies. Extending nestedness to quantitative data facilitates the study of species preferences, and we propose a new detection method that follows from a basic property of bipartite networks: large dominant eigenvalues are associated with highly nested configurations. We show that complex ecological networks are binary nested, but quantitative preferences are non-nested, indicating limited consumer overlap of favoured resources. The spectral graph approach provides a formal link to local dynamical stability analysis, where we demonstrate that nested mutualistic structures are minimally stable. We conclude that, within the binary constraint of interaction plausibility, species preferences are partitioned to avoid competition, thereby benefiting system-wide resource allocation.
Nestedness has been studied in a wide range of ecological systems. The concept was first proposed in the early twentieth century but only became popular among ecologists with its application to the biogeographic pattern of species occurrence in islands and other fragmented landscapes1,2. More recently, nestedness in species interaction networks has received significant attention3,4,5,6,7, where it has been suggested that a nested pattern of interactions leads to greater biodiversity in mutualistic systems such as plant–pollinator networks8,9. In a nested bipartite network or graph, interactions are organized such that specialists (for example, pollinators that visit few plants) interact with subsets of the species with whom generalists (for example, pollinators that visit many plants) interact. A nested structure corresponds to a systematic arrangement of non-zero entries in the binary matrix used to represent a network, and existing detection methods are based on distinguishing the nested pattern from other possible arrangements of matrix elements10,11. However, these methods are often computationally expensive for large matrices and are not applicable to quantitative networks (binary metrics extended to work with quantitative data, such as WNODF12, do not make full use of the available quantitative information).
Quantitative networks contain the number or frequency of pairwise interactions between species, and we show how empirical data can be rescaled to permit investigation of feeding or visitation preferences in addition to the basic presence–absence structure. If preferences are quantitatively nested, then the most generalist resources are preferred by all consumers—most strongly by generalist consumers, closely followed by specialist consumers—and specialist resources are neglected. We formally extend the definition of nestedness to include quantitative networks and propose a new and robust detection method based on the eigenvalue spectrum of a graph’s adjacency matrix. The spectral properties of perfectly nested graphs were first discussed in the mathematical literature, where they are known as double-nested graphs (DNGs)13 or chain graphs14, and we show that large dominant eigenvalues are associated with highly nested structures (for both binary and quantitative matrices). A spectral method is advantageous because the eigenvalues of a matrix can be computed extremely quickly—even for large matrices—and results are invariant to matrix permutation15. Of 52 bipartite ecological networks from the literature, including plant–pollinator, parasitoid–host, and seed dispersal types, 51 (98%) were binary nested; however, only 3 (6%) had preference structures that were quantitatively nested. These results agree with our analysis of the dynamical (local) stability of nested graphs, where we demonstrate that perfectly nested configurations are minimally stable. Within the restriction of interaction plausibility—whether an interaction is forbidden or not, and identifiable with a binary structure16—species preferences are partitioned to avoid competition. Thus, ecological systems are organized such that niches are exploited and the efficient use of available resources is promoted.
Nestedness and bipartite graphs
Before explicitly considering ecological systems and empirical data, we begin by formally defining nestedness for both binary and quantitative bipartite networks, and present a general detection method that follows naturally from the matrix properties of nested graphs.
A bipartite network or graph contains S nodes (species) that can be partitioned into two disjoint sets, A (animals in pollination networks) and P (plants), such that each of the E undirected edges (an animal–plant interaction) connects a node in the set A with another in the set P. For the binary case, the adjacency matrix is a square matrix in which if i and j are connected and is 0 otherwise; for quantitative networks can take positive non-zero values other than 1. The set of eigenvalues is an invariant property of a matrix (they do not change if rows and columns are permuted). Because is a symmetric matrix, all of its eigenvalues are real, and because the graph is bipartite, the eigenvalues are distributed symmetrically about 0. The largest eigenvalue of , the dominant eigenvalue, is known as its spectral radius , and for binary matrices its value is bounded from above by (13,15).
Since matrix is symmetric and the graph bipartite, we need draw only the |P| × |A| incidence matrix (for example, Fig. 1). Nestedness can be defined as a property of the matrix . If is a perfectly nested binary matrix then there exists a permutation of rows and columns such that the set of edges in each row i contains the edges in row i+1, while the set of edges in each column j contains those in column j+1. More formally, the rows and columns of can be sorted (with ∀j and ∀i) such that . This definition of perfect nestedness extends to quantitative as well as binary matrices. Matrices A, C, D, I, K and N in Fig. 1 are perfectly nested, as is matrix C in Fig. 2, while the others are not. An example of perfect binary nestedness and the corresponding DNG notation used in graph theory is given in Supplementary Fig. S1.
In the mathematical literature regarding DNGs, Bell et al.17 provide a theorem that states: among all the connected bipartite graphs with |S| nodes and |E| edges, the one yielding the largest spectral radius is a perfectly nested graph. It was subsequently proved that the same holds if the number of nodes in each set P and A are fixed18, rather than choosing among all possible sizes such that |P|+|A|=|S| as in the original theorem. We confirm numerically that among all the bipartite graphs with |P| plants, |A| animals and |E| edges, the configuration leading to the largest spectral radius is a perfectly nested graph, with all other perfectly nested graphs having spectral radii close to this maximum value (Fig. 1 and Supplementary Figs S2–S4). This finding extends to quantitative matrices and quantitative nestedness (Fig. 2). The right tail of the spectral radius distribution contains either perfectly nested graphs—of which there can be many configurations (see Supplementary Methods)—or graphs that are very close to being perfectly nested, while the left tail contains graphs that are far from being perfectly nested.
The spectral radius therefore represents a natural scale for nestedness, with larger obtained for more nested matrices with the same size and number of edges, and we have developed a set of statistical tests to determine the significance of nestedness for matrices that are not necessarily perfectly nested (see Methods and Supplementary Fig. S5). Matrices that are significantly non-nested in their binary form can become significantly nested when a sufficiently strong nested quantitative pattern is overlaid. This suggests that the quantitative structure of a network can dominate its underlying binary pattern (Supplementary Fig. S6).
The eigenvector associated with the spectral radius, besides being of interest in its own right19, provides a natural way of ordering nodes that best illustrates matrix nestedness. This follows from the standard eigenvalue equation : Because any eigenvector multiplied by the original adjacency matrix yields a vector parallel to the original adjacency matrix, the spectral radius (dominant eigenvalue) represents a scale factor λ for the dominant eigenvector. Conversely, if the spectral radius is understood to be a measure of nestedness, then the entries of the dominant eigenvector (of size the number of species) provide a way of ordering the species with respect to nestedness.
Nestedness and ecological networks
We now turn our attention to the specific case of ecological systems. In general, interactions among species can be described by a set of dynamical equations: , where xi is the density of a given species i, f(xi) describes the effect of its density on population growth and is the contribution to growth from interactions with other species in the system20,21,22. We can divide the interaction term between two species, , into two parts: the frequency of interactions γi,jxixj, and the effect of each interaction , and so . Typically, takes the form of a functional response that captures the effect of an interaction between i and all of its partners (for example, Holling’s Type II23). For each pair of species, xixj is a mass action term, and γi,j indicates the relative frequency or probability of interaction compared to mass action. Under the mass action hypothesis, the basic affinity between two species—the expected magnitude of encounters—is directly proportional to the product of their densities, and factors such as the spatial layout of the environment, consumer search efficiency or handling time are not accounted for. These additional factors are aggregated in γi,j. For each plausible (γi,j≠0) interaction, γi,j can be thought of as a preference parameter: if γi,j>1 then the interaction is more likely to occur than expected and is therefore favoured, γi,j<1 indicates that the interaction is less favourable and γi,j=1 is exactly the expectation based on mass action. When we record ecological data such as the number of pollinator–plant visits—data that can be organized in the form of a quantitative incidence matrix —we implicitly record . So in practice, empirical data must be adjusted for mass action (xixj) to isolate species preference γi,j.
We are particularly interested in whether the pattern of nestedness observed in binary bipartite ecological networks4 is maintained in the quantitative preference structure represented by the γ-matrix. In a nested quantitative network, generalist–generalist species interactions are strongest, followed by generalist–specialist interactions, whereas specialist–specialist interactions are much weaker (and may be absent altogether).
Before applying the tests for nestedness to empirical data, we first remove the effect of mass action in order to isolate species preferences. As interaction data are rarely accompanied by independent measures of species density, we use a method based on solving overdetermined sets of equations24 to infer effective species abundances from quantitative interaction networks. These effective abundances should not be interpreted as field-measurable equivalents; rather, they are best-fit abundances under the mass action hypothesis. In some regards their use is more appropriate than the use of raw abundance data because they incorporate confounding factors such as life-cycle turnover, partner co-occurrence overlap and unevenness in spatial distribution.
To obtain effective abundances, recall that we can write empirical count data . If no interaction is recorded, and we set the estimate for species preference . For the remaining set of recorded counts with , we take logarithms and perform a linear regression. However, rather than regressing ‘y’ against ‘x’ as is commonly done, we do the opposite such that we infer the log-transformed effective abundances and from the log-transformed counts (see Supplementary Methods). The preference γ-term then represents errors or residuals, and as log γi,j’s are minimized during regression the estimated ’s are constrained to be as close to 1 as possible. In this way, binary matrices can be seen as a special case in which interaction magnitude is completely explained by mass action, and, as required, preferences are scaled relative to mass action—based on the inferred effective abundances—with . This quantitative -matrix can be assessed for nested patterns.
Binary and quantitative nestedness of empirical networks
We tested 52 bipartite empirical networks for binary and quantitative nestedness (Table 1 and Supplementary Table S1). For each network and test, we computed the probability p that a randomly constructed matrix , which preserves some of the properties of the empirical adjacency matrix , is associated with spectral radius (see Methods). All but one of the networks were binary nested (defined as having P<0.05), in agreement with earlier studies4. However, nestedness was not observed in species preferences: for the vast majority of networks, the quantitative structure of the -matrix was indistinguishable from random configurations, and in some cases, anti-nestedness (defined as having P>0.95) became apparent (Table 1, Fig. 3). The lack of nestedness in the dominant quantitative structure of empirical networks is consistent with our mathematical treatment of the local stability of nested structures. Although local stability analysis captures only one aspect of ecological system dynamics, its mathematical tractability provides a good starting point for assessing the dynamical consequences of network structure25.
Local stability analysis
Local stability analysis is concerned with how a dynamical system resting at equilibrium responds to perturbations. If an equilibrium point is stable, then the system returns to that point following small perturbations. For unstable equilibrium points, small perturbations will move the system away from the original resting state. Mathematically, the stability of an equilibrium point is completely defined by the sign of the real parts of the eigenvalues of the so-called community matrix M25,26,27 (these eigenvalues are distinct from the adjacency matrix eigenvalues we have been considering so far). If all of the signs are negative then the equilibrium point is stable. Contemporary work has shown that nested mutualistic networks are less likely to be stable than their random counterparts25. We now demonstrate that a nested structure within M minimizes local stability.
A community matrix can be written as the sum of a matrix with zeros on its diagonal, M′, and a corresponding diagonal matrix, −D, that is, M=M′−D. For very large systems, the spectral radius of M is , where is the average value of the diagonal25. Stability is therefore achieved whenever . Analogous to arranging coefficients in an adjacency or incidence matrix (as we did above), among all possible ways of arranging the coefficients of M′ the configuration yielding the largest spectral radius is perfect nestedness (binary or quantitative). (Note that the community matrix is often considered non-symmetric, that is, the effect of an animal on a plant is often assumed to be different from that of the plant on the animal. However, the maximum spectral radius is obtained for symmetric matrices.) Hence, for a given diagonal and set of coefficients, nestedness of the community matrix minimizes local stability.
This is seemingly at odds with the prevailing view that nestedness promotes the persistence of species in mutualistic systems8,9 (although recent work has begun to question this proposition28). As an approach to assessing system robustness, persistence encompasses local stability analysis—in many models of mutualism, local stability guarantees species persistence but locally unstable states may yet display persistence. Repeating precisely the analysis of Thébault and Fontaine9, we show that many dynamical models inadvertently build in trivial local stability and hence guarantee persistence: the diagonal elements of the community matrix are always large enough to compensate for the potential destabilizing effect of nestedness, thereby precluding nestedness—or, indeed, any other configuration of interactions—from having a significant contribution to local stability or persistence in such models (see Supplementary Methods and Supplementary Fig. S7). The claimed positive relationship between nestedness and persistence actually reflects a trivial positive relationship between connectance and persistence in obligate mutualistic systems—trivial because species without partners immediately go extinct (a feature not considered by Thébault and Fontaine9), and species with initial densities close to zero will quickly go extinct unless they have sufficient (binary) mutualistic partners to ‘pull’ them to larger densities, after which they are guaranteed to persist29.
Traditionally, nestedness has been associated with the plausibility of interaction: if the length of a pollinator’s proboscis is sufficient to obtain nectar from plants with deep corolla tubes, then it can also obtain nectar from species with shallower tubes, otherwise its visitation partners are restricted—for a community with many pollinator species, each with a different proboscis length, a nested binary interaction pattern emerges. Quantitative data allow us to investigate whether pollinators interact with particular plants more or less frequently than would be expected through random encounter, and whether they do so in any systematic fashion. With a nested preference structure, almost all consumers disproportionately interact with a common subset of the most generalist resources, while ignoring more specialist resources.
While we found empirical networks to be binary nested, after adjusting for uneven species abundances according to mass action, their quantitative preference structures were distinctly non-nested. The need to account for abundances has been highlighted using synthetic networks, where heterogeneous abundance distributions combined with random species associations was sufficient to produce significantly nested binary patterns, leading to the conclusion that complex trait-based models were not necessary to explain nestedness30. Our results extend this argument to quantitative networks: The vast majority of empirical networks analysed had quantitative preference structures indistinguishable from random graphs, meaning that no systematic process is required to promote or constrain observed levels of nestedness.
The lack of quantitative nestedness also finds support from mathematical analysis, where we showed that nested configurations of mutualistic interactions are minimally stable from the perspective of local stability analysis. How other types of interaction—such as antagonistic or facilitative pairings8—formally combine with mutualism to determine the overall stability and persistence of a network requires further work. At the community level, compared to quantitatively nested preference structures, non-nested structures suggest that species preferences are partitioned to avoid competition. Species rarely forgo abundant and accessible resources; rather, less abundant resources are disproportionately favoured by different sets of consumers—niches naturally arise. It would be instructive to see whether this kind of niche partitioning is also apparent at the level of individuals within a single-species population31.
Much like the solar spectrum of light can be used to infer the constituent elements of our sun, we used a spectral approach—spectrum derived from the Latin for ghost—to detect nestedness in complex ecological networks. And like a ghost, nestedness, which was strongly apparent in binary structures, disappeared when quantitative preference structures were analysed. As the size of ecological data grows, the advantages of a spectral approach will become more pronounced; in addition to the dominant eigenvalue and eigenvector of a network’s adjacency matrix, considered here, the relationship between other spectral properties and ecological phenomena warrants further investigation. Our findings suggest that nestedness may not be the preeminent structure we once thought it was, but spectral analysis may further elucidate which structural features influence the function of large complex ecological networks.
Tests for nestedness based on the spectral radius
We showed that perfectly nested binary and quantitative matrices are associated with large spectral radius. Already, we have a strong test for nestedness: compute the spectral radius of an empirical matrix, and, if it is greater than the smallest spectral radius of a corresponding perfectly nested matrix, then the empirical matrix is almost guaranteed to be nested. However, in general, empirical data are incompatible with perfect nestedness (in many ecological networks, no super-generalists interacting with all of the species in the other class are observed). Here we describe four statistical tests for (not necessarily perfect) nestedness that are more applicable to real-world data sets.
For each test, we compute the probability p that a randomly constructed incidence matrix has spectral radius , where and are the adjacency matrices of and , respectively. For both binary and quantitative matrices, we define three null models for constructing : (i) preserve |P|, |A| and place |E| edges at random within the matrix; (ii) as in (i), but accept only connected matrices; and (iii) as in (ii), but conserve the degree distribution (the row and column sums of ). As measures of nestedness can be very sensitive to matrix size, fill and configuration10,11, we used null model implementations that preserve |P|, |A| and |E| (null models (i) and (ii)) and degree distribution (iii) exactly, and not just their expected values.
For quantitative matrices only, we introduce a fourth null model: (iv) preserve |P|, |A| and |E|, and shuffle the coefficient values of but not their positions. That is, maintain the binary structure of the matrix (where the non-zero entries are located) but randomize which coefficient values occupy which non-zero positions. Using this null model, the P-value is to equal to 1 when all the coefficients have the same value (for example, a binary matrix).
In all tests, for all but the smallest of networks, P<0.05 is a suitable general significance level for nestedness, with P>0.95 indicating anti-nestedness. We encourage the use of null model (ii) for determining the nestedness of the binary network structure due to some important limitations of null models (i) and (iii), and null model (iv) for determining the nestedness of species preferences because it is the only null model that isolates quantitative structure (see Supplementary Methods).
Condition for finding connected graphs
Null models (ii) and (iii) require connected matrices. To ensure that there is a reasonable probability of finding randomized matrices that are connected, we calculate the percolation point for random bipartite graphs.
A classical result for Erdös–Rényi random graphs is the percolation point of connected graphs. For n nodes with a probability of connection C=|E|/(|P|·|A|), graphs in which C>log(n)/n are almost surely connected, while those in which C<log(n)/n are almost surely disconnected (for the limit n→∞).
Without loss of generality, we will assume |P|⩾|A|. Saltykov32 showed that in bipartite graphs the number of isolated nodes (that is, those that are not part of the giant component) is Poisson distributed. Using this result, Blasiak and Durrett33 provided the following extension: for a random bipartite graph with |P| rows, |A| columns and |E| edges, whenever |E|>|P| log(|P|+|A|), the graph is almost surely connected (again, for the limit n→∞).
From this, one can see that the probability of finding a connected graph approaches 1 whenever the probability of connection C>|P| log(|P|+|A|)/(|P|·|A|)=log(|P|+|A|)/|A|. For matrices with C around this threshold, it can take a long time to find connected matrices through random sampling.
How to cite this article: Staniczenko, P.P.A. et al. The ghost of nestedness in ecological networks. Nat. Commun. 4:1391 doi: 10.1038/ncomms2422 (2013).
Patterson B.D. & Atmar W. . Nested subsets and the structure of insular mammalian faunas and archipelagos. Biol. J. Linn. Soc. 28, 65–82 (1986) .
Patterson B.D. . The principle of nested subsets and its implications for biological conservation. Conserv. Biol. 1, 323–334 (1987) .
Brualdi R.A. & Sanderson J.G. . Nested species subsets, gaps, and discrepancy. Oecologia 119, 256–264 (1999) .
Bascompte J., Jordano P., Melián C.J. & Olesen J.M. . The nested assembly of plant-animal mutualistic networks. Proc. Natl Acad. Sci. USA 100, 9383–9387 (2003) .
Rezende E.L., Lavabre J.E., Guimarães P.R., Jordano P & Bascompte J. . Non-random co-extinctions in phylogenetically structured mutualistic networks. Nature 448, 925–928 (2007) .
Almeida-Neto M., Guimarães P., Guimarães P.R. Jr, Loyola R.D. & Ulrich W. . A consistent metric for nestedness analysis in ecological systems: reconciling concept and measurement. Oikos 117, 1227–1239 (2008) .
Saavedra S., Stouffer D.B., Uzzi B. & Bascompte J. . Strong contributors to network persistence are the most vulnerable to extinction. Nature 478, 233–235 (2011) .
Bastolla U. et al. The architecture of mutualistic networks minimizes competition and increases biodiversity. Nature 458, 1018–1020 (2009) .
Thébault E. & Fontaine C. . Stability of ecological communities and the architecture of mutualistic and trophic networks. Science 329, 853–856 (2010) .
Ulrich W., Almeida-Neto M. & Gotelli N.J. . A consumer’s guide to nestedness analysis. Oikos 118, 3–17 (2009) .
Gotelli N.J. & Ulrich W. . Statistical challenges in null model analysis. Oikos 121, 171–180 (2012) .
Almeida-Neto M. & Ulrich W. . A straightforward computational approach for measuring nestedness using quantitative matrices. Environ. Modell. Softw. 26, 173–178 (2011) .
Andelić M., da Fonseca C.M., Simić S.K. & Tosić D.V. . On bounds for the index of double nested graphs. Linear Algebra Appl. 435, 2475–2490 (2011) .
Bhattacharya A., Friedland S. & Peled U.N. . On the first eigenvalue of bipartite graphs. Electron. J. Combin. 15, 1 (2008) .
Chung F.K.R. . Spectral Graph Theory Vol 92, American Mathematical Society (1997) .
Olesen J.M. et al. Missing and forbidden links in mutualistic networks. Proc. R. Soc. B 278, 725–732 (2011) .
Bell F.K., Cvetković D., Rowlinson P. & Simić S.K. . Graphs for which the least eigenvalue is minimal, II. Linear Algebra Appl. 429, 2168–2179 (2008) .
Bhattacharya A., Friedland S. & Peled U.N. . On the first eigenvalue of bipartite graphs. Electron. J. Comb. 15, 144 (2008) .
Allesina S. & Pascual M. . Googling food webs: can an eigenvector measure species’ importance for coextinctions? PLoS Comput. Biol. 5, e1000494 (2009) .
Rosenzweig M. & MacArthur R. . Graphical representation and stability conditions of predator-prey interaction. Am. Nat. 97, 209–223 (1963) .
Holland J.N. & DeAngelis D.L. . Consumer-resource theory predicts dynamic transitions between outcomes of interspecific interactions. Ecol. Lett. 12, 1357–1366 (2009) .
Holland J.N. & DeAngelis D.L. . A consumer-resource approach to the density-dependent population dynamics of mutualism. Ecology 91, 1286–1295 (2010) .
Holling C.S. . The components of predation as revealed by a study of small mammal predation of the european pine sawfly. Canad. Entomol. 91, 293–320 (1959) .
Campbell S.L. & Meyer C.D. Jr . Generalized Inverses of Linear Transformations Dover (1991) .
Allesina S. & Tang S. . Stability criteria for complex ecosystems. Nature 483, 205–208 (2012) .
Levins R. . Evolution in Changing Environments: Some Theoretical Explorations Princeton University Press (1968) .
May R.M. . Stability and Complexity in Model Ecosystems Princeton University Press (2001) .
James A., Pitchford J.W. & Plank M.J. . Disentangling nestedness from models of ecological complexity. Nature 487, 227–230 (2012) .
Allesina S. . Ecology: the more the merrier. Nature 487, 175–176 (2012) .
Blüthgen N., Fründ J., Vázquez D.P. & Menzel F. . What do interaction network metrics tell us about specialization and biological traits? Ecology 89, 3387–3399 (2008) .
Tinker M.T. et al. Structure and mechanism of diet specialisation: testing models of individual variation in resource use with sea otters. Ecol. Lett. 15, 475–483 (2012) .
Saltykov A.I. . The number of components in a random bipartite graph. Discrete Math. Appl. 5, 515–524 (1995) .
Blasiak J. & Durrett R. . Random Oxford graphs. Stoch. Proc. Appl. 115, 1257–1278 (2005) .
We thank A. Eklöf, J. Landau, F. Marquitti, C. Melián, M. Pires and S. Tang for discussion. This research was supported by NSF SMA Grant Number 1042164 (to P.P.A.S.) and NSF DEB Grant Number 1148867 (to S.A.)
The authors declare no competing financial interests.
About this article
Cite this article
Staniczenko, P., Kopp, J. & Allesina, S. The ghost of nestedness in ecological networks. Nat Commun 4, 1391 (2013). https://doi.org/10.1038/ncomms2422
Nature Communications (2021)
Nature Communications (2021)
Exploring the dimensions of metapopulation persistence: a comparison of structural and temporal measures
Theoretical Ecology (2021)
Nature Ecology & Evolution (2020)
Scientific Reports (2020)