Abstract
Food webs represent the set of consumer-resource interactions among a set of species that co-occur in a habitat, but most food web studies have omitted parasites and their interactions. Recent studies have provided conflicting evidence on whether including parasites changes food web structure, with some suggesting that parasitic interactions are structurally distinct from those among free-living species while others claim the opposite. Here, we describe a principled method for understanding food web structure that combines an efficient optimization algorithm from statistical physics called parallel tempering with a probabilistic generalization of the empirically well-supported food web niche model. This generative model approach allows us to rigorously estimate the degree to which interactions that involve parasites are statistically distinguishable from interactions among freeliving species, whether parasite niches behave similarly to free-living niches, and the degree to which existing hypotheses about food web structure are naturally recovered. We apply this method to the well-studied Flensburg Fjord food web and show that while predation on parasites, concomitant predation of parasites, and parasitic intraguild trophic interactions are largely indistinguishable from free-living predation interactions, parasite-host interactions are different. These results provide a powerful new tool for evaluating the impact of classes of species and interactions on food web structure to shed new light on the roles of parasites in food webs.
I. INTRODUCTION
Ecological networks, and food webs in particular, are a useful quantitative tool for evaluating and understanding the structure and function of complex ecosystems. Most food web studies have focused on the interactions among free-living species, and have omitted diverse and ecologically important groups like parasites, which contribute to ecosystem function [1]. Food web research is beginning to explicitly include parasites, but it remains unclear whether parasites and free-living species (Figure 1) play distinct roles in structuring food webs, and thus whether food web theory needs to be altered to account for different types of feeding interactions (Figure 2). Resolving this question would shed new light on the fundamental principles of trophic organization in ecosystems.
Several recent studies have considered this question, but substantial ambiguity remains, in part because the competing hypotheses have primarily been tested indirectly, focusing on the impact that including parasites has on standard statistical measures of food web structure. For instance, many studies have argued that parasites alter food web structure in fundamental ways [2–8], partly as a result of parasites unique characteristics like small body sizes compared to their hosts, trophic intimacy with their hosts, and often complex life cycles [2, 9–12]. One proposal to explain such differences posits a distinct inverse niche space that parasites occupy [13], which allows parasites and free-living species to follow different rules of interaction.
On the other hand, one recent study [14] showed that most of the changes to common network measures for food webs that result from adding parasites and their links are largely what we should expect simply from changing the food webs scale by increasing the number of species S and links L [15]. This study noted two exceptions. First, concomitant links, the feeding links connecting predators to the parasites of their prey [5], appear to alter the observed frequencies of certain motifs representing interactions among triplets of species [16]. Second, generalist parasites, which have multiple hosts, appear to have more complex trophic niches than generalist free-living predators [17]. The disagreement and accordance between this and past studies illustrates the complexity of the question of whether and how parasites alter food web structure, and demonstrate the need for statistically rigorous tools for addressing it [14].
A subsequent study further investigated the distributions of motifs among free-living species, parasites, and different types of interaction links [18]. This study showed that parasites have unique structural roles compared to free-living species: when concomitant links were excluded, parasites have diverse roles similar to free-living consumers that have both predators and prey (i.e., intermediate taxa), but when concomitant links were included, their roles were more constrained and different [18]. This study also found that concomitant links represent the most structurally diverse type of interaction.
A common feature of earlier work on these questions is the indirect nature in which they tested the null hypothesis that parasites and free-living species follow similar rules in how they fit into food webs [19]. This leaves open the possibility that parasites alter food web structure in subtle but important ways not apparent through existing approaches. In particular, most previous work has lacked either rigorous hypothesis testing or an explicit comparison of parasite interaction types to those among free-living species, or it has focused on changes in network-level statistics without controlling for confounding effects. A more direct approach would use an explicit but realistic null model of food web structure. We construct such a probabilistic null model based on the hypothesis that there is no difference in the structural roles of parasites and free-living species, but which nevertheless represents realistic food web structure. This approach can demonstrate whether a single set of rules is sufficient to simultaneously explain the interaction patterns of both parasites and free-living species. Here, we introduce a novel computational method for making just such a direct test, which we demonstrate by untangling the role of parasites within the well-studied Flensburg Fjord food web [14, 20].
Our approach is based on the probabilistic generalization of the empirically well-supported niche model [19], called the probabilistic niche model or PNM [17, 21]. The PNM enables the inference of an underlying niche structure that explains the observed links in a food web. Specifically, the model assumes a single underlying niche space, in which each species i is located at some niche location niand probabilistically feeds on species located near location ci, the center of species is feeding range of width ri. Through certain patterns on these parameters, the PNM can capture a variety of empirically supported structural features, such as hierarchical feeding, compartmental structure, and body-size determined feeding niches [22–24]. The PNM can also capture cascade structure and inverse niche structure [13, 25] (see also Supporting Information S4, Table S4). Generalizing over these hypotheses, we can assess the statistical quality of the overall model as multiple types of taxa and interactions are introduced. These characteristics make the PNM an attractive and powerful method for testing hypotheses about the structural role of parasite species and their interactions in food webs.
However, fitting the PNM to an existing food web does not itself test the hypothesis that parasites and free-living species follow distinct rules for feeding. Instead, we first partition the types of interactions, e.g., predation among free-living species versus free-living predation on parasites versus concomitant links. We then test whether or not parasites and free-living species or their interactions are different by comparing models across the sequence of food webs created by adding these interaction types one at a time. If parasites follow distinct patterns, then adding parasites and their links to a free-living food web forces the model to fit a broader variety of interaction patterns, which will result in a decrease in the PNMs goodness-of-fit. On the other hand, if parasites play similar structural roles to free-living species, adding these taxa and their links will not impact the models goodness-of-fit. Similarly, if concomitant links follow a distinct pattern to links among and between parasites and free-living species, adding them will result in another decrease in the PNMs goodness-of-fit. In this way, the PNM provides a mechanism-agnostic method for detecting heterogeneities in linkage patterns as more types of interactions are added, without having to identify the particular ecological mechanism at play.
Across different subsets of the data, we use three distinct goodness-of-fit measures to test the null hypothesis: one based on in-sample learning, one based on out-of-sample learning, and one based on statistical network feature similarity. A model that performs better under each of these measures more effectively captures the observed pattern of interaction in the food web. Conversely, if interaction types fail to be well represented, the goodness-of-fit measures will reveal this. By evaluating the null hypothesis several different ways, we increase the reliability of the overall test for differences between types of species and interaction types. Each of these tests requires estimating the best underlying niche structure for a food web, which is a difficult optimization problem related to finding the global maximum of a likelihood function characterized by many local optima. Previous work with the PNM [21] has used simulated annealing, which is inefficient and sensitive to initialization heuristics. Furthermore, initialization heuristics can induce a strong bias when applied to food webs containing parasites, making them unsuitable for testing the hypotheses of interest here. To resolve these technical difficulties, we use a sophisticated and more efficient optimization technique from statistical physics called parallel tempering to fit the PNM directly to the links contained in a food web, without any initialization heuristics. Compared to a number of alternative optimization techniques, this method achieves substantially better results on food web data.
We apply our method to the Flensburg Fjord food web, a single, well-resolved coastal food web, to demonstrate that this technique can address specific open questions about parasites in food webs. We use this data set, with and without parasites and with and without concomitant links, and trophically aggregated by species and over life stages [14, 20]. Here, we focus on demonstrating how to untangle the role of parasites or other types of taxa in food webs using generative models. We intentionally leave a comparative investigation across food webs for future work, and instead emphasize the development and demonstration of these methods, which can be applied to a wide range of questions about ecological network structure. We use these methods to specifically address the question of whether parasites and free-living species exhibit statistically distinguishable interactions or niches, and whether these methods can be used to recover previously hypothesized models.
II. RESULTS
The probabilistic niche model (PNM) is a generative model for food web structure. Each species i in the food web is represented by a triplet of parameters: ni, ci and ri. The settings of these parameters for each species represent the underlying niche structure of the model. A directed consumer-resource link from species i to species j is generated with probability given by a generalized Gaussian function (Figure 3). Thus, the PNM defines a parametric probability distribution over all possible food web structures, and the particular settings of the parameters determine with types of structures are more or less likely to be generated. In observed food web data, the underlying niche structure is unknown, while the links are observed. For a given set of species and feeding links, we estimate the niche structure—i.e., the three parameters for each species—via maximum likelihood.
The likelihood function for the PNM is known to be rugged, exhibiting many local optima. This property makes it difficult to find the maximum likelihood niche structure via standard techniques, e.g., greedy optimization or gradient descent [26]. To circumvent this difficulty, we used a state-of-the-art optimization technique from statistical physics called parallel tempering [27] that is known to perform well on such functions. Parallel tempering is a Markov chain Monte Carlo (MCMC) technique in which we run a parallel set of MCMC simulations, distributed across a range of temperatures. Each chain evolves by sampling at the specified temperature, but can probabilistically move between more global and more local exploration by exchanging states with a chain at another temperature, higher or lower (Figure 4; Supporting Information S3). Each MCMC thus takes a random walk across temperatures that simulates a tempering process, which improves their ability to escape being trapped in local optima.
To evaluate the null hypothesis that parasites and free-living species follow similar feeding rules, we measured the quality of the estimated model, using three measures described below, as we added progressively more parasite information to a free-living food web. In this sequence, there are three versions of the food web: (i) FlensFree or GF, containing all free-living species VF and their predation links EF →F; (ii) FlensPar of GFP, containing all free-living species VF and parasites VP, the edges of GF as well as parasite-host links EP →F, predation among parasites EP →P, and predation on parasites EF →P; and (iii) FlensParCon or GFPC, containing the same nodes and links as GFP as well as concomitant links EC, i.e., GFPC includes predation and concomitant predation on parasites EF →cP. The observed interaction types are made explicit in Figure 2.
If parasites and free-living species follow distinct sets of rules, the quality of the model will decline as we require it to fit increasingly distinct types of feeding patterns, i.e., from GF to GFP to GFPC. Our measures of model quality are three-fold: (i) the goodness-of-fit for the model, formalized as an AUC statistic (see Supporting Information S2) on the observed predation links, which quantifies the ability of the model to correctly distinguish between observed predation links and observed non-feeding pairs; (ii) the fitted models ability to generate synthetic food webs with statistically similar structure to the empirical data via standard network measures; and (iii) the out-of-sample prediction accuracy for missing links, formalized as an AUC statistic in which we remove a subset of links from the empirical web and measure the models ability to accurately identify which edges were removed. We point out that these measures are comparable across food webs with different numbers of species S and links L.
Applying this method to the Flensburg Fjord food web, we found that the PNM fits the data well, consistently yielding high AUC scores for in-sample goodness-of-fit for each version of the web (Table I). This indicates that the model is able to find an underlying niche structure that differentiates the probabilities of observed consumer links from the probabilities of pairs of species that do not consume each other. However, for the two food web versions including parasites, the AUC is much lower on parasite-host links, EP → F. On the other hand, goodness of fit is highest on EF →cP, indicating that concomitant links are well captured by the PNM. We also find that trophic interactions among parasites EP →P are fit as well as other types of predation links. Finally, the free-living species web GF is slightly better fit than the food webs including parasites, measured across all observed edge types, which is consistent with scaling effects observed in Dunne et al. [14].
We compared statistical network properties of the empirical data to synthetic food webs drawn from the fitted PNM models. We found close agreement between the synthetic webs and the empirical ones for standard measures of network properties such as connectance and clustering coefficient; the average shortest path length between species in the data was slightly longer than in the resampled networks (Table II). Overall, this suggests that the probabilistic niche model generates an ensemble of networks that are structurally similar to the original data. This was true across GF, GFP, and GFPC, suggesting there is no scale dependence, nor sensitivity to parasites, on the ability of the model to fit and generate structurally similar networks.
Comparing predictions of presence or absence of missing links, we applied the link prediction goodness-of-fit test to different subsets of each of the three webs. We conducted a strong test of the ability of a single underlying niche structure to model both free-living and parasitic feeding links. We simulated an out-of-sample test by removing a uniformly random 10% of observed links (i) from among free-living species EF →F, (ii) from freeliving species to parasites EF →P (in GFP) or EF →cP (in GFPC), (iii) from parasites to free-living species EP →F, or (iv) from among parasites EP →P, and fitting the model to the reduced food web (for GF, this can only be done on EF →F). We then measured its ability to correctly place higher probabilities on the missing edges than on all other non-predation links in the graph [28]. The AUC scores for each of these tests quantifies the amount of information the niche structure of the remaining links contains about the missing links of a given type. We found that differences across the different subwebs are not significant, which suggests the extra information (parasites; concomitant links) is not violating the models assumptions (Table III).
Finally, we checked whether the model has overfitted the data, as a measure of the robustness of our results (Table IV). We removed a uniformly random 10% of observed links from each web and trained the model on the reduced food web. We then compared the probabilities of all true (observed) links to the probabilities of the true non-links. We also broke down the comparison of true links and non-links by link-type. If the model were overly sensitive to the missing links, then we expect the model to perform less well, predicting the missing links poorly. We found that the noisy in-sample AUC scores are comparable to the scores on the fully observed data (Table I), which suggests that the model is not overly sensitive to noise, i.e., not overfitting the data. As in Table I, parasite-host links EP →F are least well fit by the model, but trophic interactions among parasites are comparably well fit to other predation link types; concomitant links are again well explained by the model.
As a number of previously hypothesized models of niche structure are special cases of the PNM, we examined the inferred parameter values for the corresponding patterns that would indicate support for two alternate models, the cascade model and the inverse niche model [13, 25, 29]. The cascade model requires that consumers only feed on those below them in the niche space, whereas the inverse niche model follows a niche model on predation among free-living species as in Ref. [19], and parasites feeding on free-living hosts above them in the niche space, with feeding range width decreasing with higher niche position for parasites. We consider 100 local optima for each web and search for these properties within each optimum and on average. In no case did every species in the model have an inferred ni ≥ ci, i.e., a strict cascade. On average, and for both free-living species and parasites, there is no statistically significant direction of feeding: the average ni – ci isn’t statistically different than zero for any type of species. In no case did every species follow the inverse niche model, where free-living species follow the cascade model (ni ≥ ci) and parasites follow an inverse cascade (ni ≤ ci) (see Supporting Information S4 and Table S4). Contrary to the inverse niche assumption, niche position and feeding range width are uncorrelated for parasites. Feeding niches were also not continuous [21, 30]. Looking past those specific models, all parameters ni, ci, and ri were distributed significantly differently for free-living species than for parasites (KS test, p < 0.001; Supporting Information S4, Table S5).
III. DISCUSSION
We found that there is little evidence that there is a structural distinction between parasites versus free-living species with respect to the models ability to learn the structure of predation in a real food web. The PNM accurately represented predation among free-living species, predation on parasites, concomitant predation, and predation among parasites. Furthermore, we found that predation is well explained by the niche model, regardless of consumer or resource type. The similarity of predation on parasites to predation among free-living species sheds light on the poorly-understood role of predation on parasites [5]. The PNM was able to successfully model predation even without additional allowances for secondary niches or separation by life stage [5, 13, 14]; other work suggests that separation by life stage would not improve the fit of the PNM [31]. Conversely, parasite-host interactions were less well described by the PNM. In this food web, parasites play similar roles to free-living predators, i.e., predation is predation, regardless of context or body size, but parasitism is a structurally distinct trophic strategy.
Our results showed that parasites occupy a broad range of niches, interspersed among the niches occupied by free-living species, but parasite niches are distributed differently than free-living niches. Despite this difference, separating parasites and free-living species may not be a necessary or meaningful distinction in describing the structure of predatory interactions. Other traits, such as niche width or relative abundance, may prove to be more useful features for modeling heterogeneities in food web link structure.
The general nature of the PNM also allows us to test for the signature of specific structuring mechanisms that represent alternative models of food web structure. For instance, the cascade model, the simplest and earliest food web model [25], embodied the notions that taxa feed with a fixed probability on species with lower niche values, and that their niche is non-contiguous. Hierarchical feeding is at the heart of subsequent niche and related models, although in a relaxed form [19, 22, 29], and the niche model further embodies contiguous feeding niches. Another example that is a special case of the PNM is the recent inverse niche model of free-living predation and parasitism on free-living hosts. The inverse niche model keeps a relaxed, contiguous feeding hierarchy for free-living species but reverses its direction for parasites, which feed on free-living taxa with higher niche values [13]. In our analysis of the Flensburg food web, we did not find evidence for the cascade or the inverse niche models using the PNM. The inverse niche model did not model predation on parasites or predation among parasites, EF →P, EF →cP, or EP →P, so there is no explicit comparison possible for those interactions. However, the poor fit of links from parasites to free-living species EP →F suggests that an alternate mechanism, perhaps similar to the inverse niche model, may be necessary to explain such parasite-host connections.
There has been disagreement about whether concomitant predation links should be included in food web data, in part because they represent a secondary form of trophic interaction compared to classic predation or parasitism (Figure 2) [3, 4, 32]. These secondary links embed information about trophic intimacy between parasites and hosts, and it is currently unclear what structural or functional roles these links play in food webs [5, 14]. Here, we found that concomitant links did not obscure the underlying niche structure of either free-living species or parasites, and including them led to no significant decrease in model fit. In fact, predation on parasites was easier to predict when concomitant links were included. Concomitant links were naturally represented by the PNM and appeared to follow similar patterns to other types of predation on parasites.
Previous work found that food webs including concomitant links deviated in motif frequencies [14, 18]. However, motifs and niches describe the network at fundamentally different levels, and so there is no conflict between such observations and our results. Concomitant links naturally close triangles and can create bidirectional links between parasites whose hosts also consume the parasites as concomitant prey. These bidirectional links are relevant as a mode of trophic parasite transmission and infection between free-living hosts. At the motif level, these triangles and bidirectional links obscure motif distributions, but here, they reinforce the niche structure and increase predictability (Supporting Information S5). Under the PNM, the global properties of the network, including our network measures and the distinction between links and non-links, are preserved when concomitant links are included. Dunne et al. [14] found that the roles of parasites as consumers were different from free-living species. We found that this difference splits by type of resource: specifically, when the resources are free-living, we find that the PNM represents these parasitic trophic interactions less effectively. When the resources are other parasites, the PNM represents these links easily, and as easily as when the consumer is free-living. Dunne et al. also found that parasites have more complex trophic niches, which reduces the goodness of fit for the PNM on predicting parasite consumer links. Complex trophic niches corroborate the lessened predictive ability of the PNM on parasite-host links.
Generative models, such as the PNM, are a sophisticated tool for investigating the structure of food webs, including whether different types of taxa and interactions follow distinct connectivity patterns. We united these techniques and applied them to a single food web. By applying these methods to a wide variety of food webs, one can assess the generality of these results. Applying such techniques to a broader range of data and to other types of trophic interactions and species will help characterize structural differences, generate novel ecological hypotheses, and support the iterative development and testing of ecological models and theory for parasites and other previously underrepresented taxa and interactions [7, 8, 14, 33]. Broadly, these methods provide a principled framework to detect heterogeneities in the roles of nodes and links in empirical network data.
IV. METHODS
A. Data
We use the Flensburg Fjord food web data [20] to demonstrate our methods. We consider three nested subsets of the data: GF, GFP, and GFPC (Figure 1). We define the species set VF as all free-living and basal taxa, and VP as only parasites. We follow existing naming conventions to distinguish these data sets, which are constructed as follows:
FlensFree (GF) contains only links between free-living and basal taxa.
GF includes taxa VF and predation links EF →F
FlensPar (GFP)
GFP includes taxa VF and VP and predation links EF →F; predation on parasites, excluding concomitant links, EF →P; parasite-host links EP →F; and predation among parasites EP →P
FlensParCon (GFPC)
GFPC includes taxa VF and VP and predation links EF →F; predation on parasites, including concomitant links, EF →cP; parasite-host links EP →F; and predation among parasites EP →P
We consider four subsets of the webs in our analyses, corresponding to the four quadrants of Figure 2: links (i) among free-living species VF × VF; (ii) from free-living species to parasites VF × VP, possibly including concomitant links; (iii) from parasites to free-living species VP × VF; and (iv) among parasites VP × VP, representing the sets of potential consumer-resource relationships. The elements of the subgraph of VF × VP will vary dependent on the inclusion of concomitant links, either with edges EF →P or EF →cP. Due to trophic aggregation, the set of free-living species VF in GFP and GFPC is not equivalent to the set of free-living species in GF.
B. Probabilistic Niche Model
The probabilistic niche model (PNM) of Williams et al. [21] and Williams and Purves [17] is a probabilistic construction of the niche model for food webs [19] that creates quasi-interval webs [30]. For a food web of S species, each species i that resides in an ecological niche located at ni in the underlying one-dimensional niche space. Each species consumes other species in the food web with probability given from a species i’s feeding distribution with center at i’s ideal feeding position ci and variance ri, corresponding to i’s feeding range (Figure 3). We express the full vector of PNM parameters as θ = {a, n1,…, nS, c1,…, cS, r1,…, rS, e}.
The probability of species i consuming species j is given by: where α is an uncertainty parameter traditionally set to 0.9999 and e can take values other than 2 for a broader range of distributions [21]. When a is allowed to be a free parameter, we find values near 1, so we fix this parameter in practice. We allow e to be a free parameter, and find that its value decreases as we introduce parasite nodes and concomitant links (Table S3).
C. Evaluating model performance
The log-likelihood for the food web data G given the parameters θ is defined as: for the PNM [21]. Deviations of the data from the predictions made by the model can then be observed, either as non-edges with predicted high probability (G(i, j) = 0, Pr(i j θ)) or observed edges predicted with low probability (G(i, j) = 1, Pr(i → j |θ)). Ranking all edges by predicted presence Pr(i → j |θ) and comparing such a ranking to the observed G(i, j) then describes the goodness of fit of the PNM. We calculate the AUC A on the ranked probabilities, xi and yj over sets of size S1 and S2 as
We evaluate the performance of the model using AUC, or the area under the receiver operating characteristic curve. The AUC measures the separation of the distributions of probabilities predicting true links from true non-links. Intuitively, the AUC is the probability that given a true link and a true non-link, we rank the true link higher than the true non-link. AUC has high natural variance on sets of disparate sizes, as it effectively oversamples the smaller set to calculate that probability. Sets such as links (of size L) and non-links (of size S2 − L) will be of disparate sizes when connectance is low, typical of food webs (L/S2 ≪ 1).
D. Optimization for the PNM with parallel tempering
We use parallel tempering to find optima of the maximum likelihood parameters. Parallel tempering, also known as replica exchange MCMC (Markov chain Monte Carlo), is an efficient and easily parallelizable optimiza tion technique from statistical physics [27, 34].
In parallel tempering, Q replicas of the system (likelihood space) are explored using MCMC, under the Metropolis-Hastings algorithm. The prelicas are taken over a range of mixing temperatures T1,…, TQ, and are run in parallel. After every t steps of the chain, a pair of replicas at adjacent temperatures Tk, Tk+1 is allowed to switch location in the psace with probability based on their relative likelihood and temperatures (Figure 3). The replicas switch with probability
Parallel tempering is a general MCMC method and meets the detailed balance condition. By combining high temperature (fast-mixing) and low temperature (slow-mixing, or locally hill-climbing) chains, parallel tempering allows us to more quickly survey the likelihood space and explore more diverse local optima [27]. See Supporting Information S3 for more details and guidelines.
ACKNOWLEDGMENTS
We thank Rich Williams and Daniel Stouffer for helpful conversations. This work was supported in part by Grant #FA955012-1-0432 from the U.S. Air Force Office of Scientific Research (AFOSR) and the Defense Advanced Research Projects Agency (DARPA) (AZJ, CM, AC); the NSF GRFP award DGE 1144083 (AZJ); NSF grant IIS-1452718 (AC), and the Santa Fe Institute.
Footnotes
↵* abigail.jacobs{at}colorado.edu