Temperature, productivity, and habitat characteristics collectively drive lake food web structure

While many efforts have been devoted to understand variations in food web structure among terrestrial and aquatic ecosystems, the environmental factors influencing food web structure at large spatial scales remain hardly explored. Here, we compiled biodiversity inventories to infer food web structure of 67 French lakes using an allometric niche‐based model and tested how environmental variables (temperature, productivity, and habitat) influence them. By applying a multivariate analysis on 20 metrics of food web topology, we found that food web structural variations are represented by two distinct complementary and independent structural descriptors. The first is related to the overall trophic diversity, whereas the second is related to the vertical structure. Interestingly, the trophic diversity descriptor was mostly explained by habitat size (26.7% of total deviance explained) and habitat complexity (20.1%) followed by productivity (dissolved organic carbon: 16.4%; nitrate: 9.1%) and thermal variations (10.7%). Regarding the vertical structure descriptor, it was mostly explained by water thermal seasonality (39.0% of total deviance explained) and habitat depth (31.9%) followed by habitat complexity (8.5%) and size (5.5%) as well as annual mean temperature (5.6%). Overall, we found that temperature, productivity, and habitat characteristics collectively shape lake food web structure. We also found that intermediate levels of productivity, high levels of temperature (mean and seasonality), as well as large habitats are associated with the largest and most complex food webs. Our findings, therefore, highlight the importance of focusing on these three components especially in the context of global change, as significant structural changes in aquatic food webs could be expected under increased temperature, pollution, and habitat alterations.


| INTRODUC TI ON
Trophic interactions determine energy and material fluxes among species that strongly constrain their abundances and ecological dynamics (Paine, 1980;Pimm et al., 1991). At the community level, trophic interactions among multiple species can be represented by a network of interactions often referred to as food webs. The general architecture of the latter (i.e., their structure) typically exhibits non-random features such as significant modularity (Thébault & Fontaine, 2010), distinct food chains (Rooney et al., 2006) and a broad and skewed degree of distribution where few species have many trophic links and many species have few links (Dunne et al., 2002). These characteristics are suggested to be directly involved in community stability, persistence and productivity (Allesina et al., 2015;Danet et al., 2021;Thébault & Fontaine, 2010) and can additionally inform on their responses to environmental changes (Solé & Montoya, 2001;Woodward et al., 2005). Determining the factors that influence food web structure is, thus, important to better understand the consequences of ecological perturbations.
Different key drivers can constrain food web structure in natural ecosystems. By affecting biological rates such as metabolism and macro ecological features such as occupancy range, temperature has often been shown as an important driving factor of community structure (Montoya & Raffaelli, 2010;Walther, 2010). Particularly, sensitivity to changes in temperature increases significantly with the trophic level (Voigt et al., 2003). As a result, warming should shorten food chains, simplify food webs, reduce energy fluxes, and alter the distribution of biomass throughout the food web, shifting toward bottom-heavy biomass distribution (Binzer et al., 2016;Gibert, 2019;Tanentzap et al., 2020). Moreover, temperature variations could also play a role in shaping food web structure although this remains largely unexplored at the network scale. Recent studies suggest that temperature variation could have a larger impact on species and their trophic interactions than a temperature increase per se (Vasseur et al., 2014). In line with this finding, the extent of temperature variation can negatively affect the structure and dynamics of ecological networks (Zander et al., 2017).
Another important driver of food web structure is primary productivity. It determines the energy supplied at the base of the food web and can, thus, constrain its structure (e.g., food chain length) through energy loss across trophic levels (Takimoto & Post, 2013).
Low ecosystem productivity limits the amount of energy transferring up in the food web, which energetically limits populations at higher trophic levels and increases their extinction risk (Sentis et al., 2017).
As a result, the vertical food web structure in less productive systems is expected to be truncated compared to more productive systems (Binzer et al., 2016). The most productive ecosystems are supplied by a surplus of available energy favoring food web complexity with species at high trophic levels becoming more abundant and new trophic levels can add up (Jia et al., 2021;Takimoto & Post, 2013).
In addition to temperature and productivity, the extent of available habitats can also influence food web structure (Post et al., 2000). Larger ecosystems, indeed, favor immigration rates and microhabitat diversity and lead to more complex food webs being species-rich and top-heavy (Post et al., 2000). Habitat size promotes the occupancy likelihood of large-sized predators, that require large home ranges, as well as those of intermediate trophic-level consumers (Srivastava et al., 2008;Ward & McCann, 2017). Consequently, the presence of these top and intermediate consumers in large and habitat-rich ecosystems would elongate food chains and increase the complexity of the vertical structure of food webs (Jia et al., 2021;Thompson & Townsend, 2005).
Until now, most studies have explored the link between environmental drivers and food web structure by focusing on a specific structural metric (e.g., food chain length, McHugh et al., 2010;Post et al., 2000;Takimoto & Post, 2013;Ward & McCann, 2017) or a single environmental driver (e.g., temperature; Gibert, 2019).
However, variations in the combination of environmental drivers are expected to be at the basis of the diversity of food web structural features observed in natural ecosystems (Montoya et al., 2009;Woodward et al., 2010). In addition, their relative influence within a given ecosystem type (e.g., savannah, lake) yet remains largely unexplored (but see e.g., Kortsch et al.,  Therefore, it is important to study a diversity of structural features and environmental drivers as it can help to predict how food web structures and their associated functions may respond to anthropogenic stressors and hence allow the development of relevant management strategies. In this study, we aim at deciphering the relative influence of three important environmental drivers (productivity, temperature, and habitat characteristics) on lake food web structures based on binary link information (i.e., presence/absence of trophic links). We assembled biodiversity inventories for 67 French lakes from regulatory monitoring programs and inferred the occurrence of species trophic interactions using an allometric niche-based model calibrated for temperate freshwater ecosystems (Vagnon et al., 2021).
We then characterized variations in food web structure using metrics informing on complementary aspects of the general structure of food webs. Although food web metrics can covary (e.g., some metrics vary with diversity and complexity; Martinez, 1993Martinez, , 1994, we expected that their collective use might support the identification of distinct and complementary structural characteristics of the lake food webs. Productivity, water temperature (average and intraannual variation), and habitat (size and complexity) are expected to be important predictors of food web structure with a non-linear influence, as food web structure responses to environmental drivers do not necessarily follow linear relationships (McHugh et al., 2010;Tunney et al., 2012;Ward & McCann, 2017).

| MATERIAL S AND ME THODS
We used taxonomic and environmental data collected over 67 French lakes distributed on the entire national territory and monitored under the EU Water Framework Directive (European Commission, 2000) (Supporting Information S1). Since zooplankton is not collected within the WFD monitoring program, we considered fish and macroinvertebrate taxonomic data while assigning a single node for zooplanktons, phytoplanktons, protists, and bacteria (see below for more details). To infer the occurrence of trophic interactions among taxa, we used an allometric niche-based model relying on taxa occurrence and body size. We then analyzed how food web structure varies among lakes and depends on water temperature, productivity, and habitat characteristics.

| Biodiversity data
Fish data were collected between 2005 and 2019 using the Norden gillnet standardized protocol (European Committee for Standardization (CEN), 2015). This protocol is based on a random stratified sampling design where the sampling effort is proportional to lake depth and area. The gillnets were set before sunset and lifted after sunrise to cover peaks of maximal fish activity (Prchalová et al., 2010). Benthic multi-mesh gillnets (12 panels ranging from 5 to 55 mm knot-to-knot; 30 m in length and 1.5 m in height) were randomly set at different depth strata (<3 m, 3-5.9 m, 6-11.9 m, 12-19.9 m, 20-34.9 m, 35-49.9 m, 50-74.9 m, and >75 m according to lake bathymetry). For deep lakes (>10 m), the sampling is completed using pelagic multi-mesh gillnets (11 panels ranging from 6.5 to 55 mm knot-to-knot; 27.5 m in length and 6 m in height), which were lowered from the surface to 6 m every day. Fish sampling occurred between spring and autumn, when most fishes are active but do not spawn much. The captured fish were identified to species level. As no general trend (i.e., decrease or increase) of the taxonomic composition of fish communities has been found over the last decade (Cilleros et al., 2019), all sampling years were gathered to establish the fish taxonomic list (i.e., occurrence of species) of each lake.
Macroinvertebrates were collected between 2017 and 2019, once in each lake, in early spring (i.e., before the emergence of aquatic insects) using a bottom kick net (300 μm mesh size). A total of 15 samples were collected per lake in the littoral zone at a depth between 0.5 and 1 m and at a maximum distance from the shore of 10 m by three successive sweeps for a maximum volume of 1 l.
Sampling locations were determined based on substrate type (mineral, organic, and/or plant) and the number of sampling locations per substrate type was proportional to the coverage percentage of the different substrate types over the littoral area of the lake. For instance, a lake covered at 33% by sand would result in five sampling locations with this substrate. Samples were washed and preserved in 95% ethanol prior to taxonomic identification in the laboratory.
Identification of taxa was heterogeneous, with the majority of taxa identified at the genus level while some of them were identified at the family level (e.g., Lepidoptera and Coenagrionidae organisms).
To standardize identification levels across taxa and, thus, be able to compare food web structures among lakes, we used the family level for all taxa. Moreover, the temporal component of diversity has been shown to be important for rare taxa but not for dominant ones in lake littorals (Suurkuukka et al., 2012). Thus, macroinvertebrate communities in the present work should be representative of the 2005-2019 period, at least for dominant taxa, as only family-level information (reducing the potential effect of rare species) and occurrence data were used. Some trophic compartments were not sampled in the 67 studied lakes. To address this issue, we incorporated four general taxonomic groups (i.e., zooplankton, phytoplankton, protists, and bacteria) into the taxonomic list of each lake. We assumed that these four taxonomic groups were present in each of the 67 study sites as they are ubiquitous in lake ecosystems (Porter et al., 1988). The addition of nodes from lower and basal trophic levels is a common approach in food web inference studies (e.g., Bonnaffé et al., 2021;Braga et al., 2019) as it allows a better characterization of food chain length by accounting for the lower and basal trophic levels.

| Body size estimates
Once the biodiversity inventories were gathered for the 67 lakes, we estimated the taxa body size that is needed to run the allometric nichebased model. For fish species, average adult body size was obtained from different sources such as Fishbase (Froese & Pauly, 2020) and books on European fish biology (e.g., Kottelat & Freyhof, 2007). For macroinvertebrate families, we inferred body size using an ecological trait database for freshwater macro-invertebrates that is fuzzycoded (Usseglio-Polatera et al., 2000). Fuzzy-coded affinity scores from the original database were transformed to obtain a quantitative estimation of the body size of each macroinvertebrate family (see Supporting Information S2 for more details). The four general taxonomic groups (i.e., zooplankton, phytoplankton, protists, and bacteria) were characterized by a unique mean body size based on a literature survey (Dussart, 1965;Laybourn-Parry, 1992). Before inferring trophic interactions, all body sizes were converted to μm and log 10 -transformed (see Supporting Information S3 for more details about taxa and associated information). Although empirical measurements of fish body sizes were available from our sampling, we decided to use estimated body sizes from the literature for consistency across taxonomic groups (but see Supporting Information S5 for a comparison of results with empirical vs. literature body sizes).

| Inferring trophic links
The occurrence of trophic interactions among taxa within each lake was inferred using an allometric niche-based model (aNM) calibrated for temperate freshwater ecosystems (Vagnon et al., 2021). The aNM is an extension of the original niche model principles (Williams & Martinez, 2000) that defines the trophic niche of a consumer according to three consumer-specific parameters: its niche position (i.e., consumer body size, n), its feeding niche centroid (c) and its feeding range (i.e., body size range of suitable prey, r). The parameters c and r were estimated using a linear model and 5%-95% quantile regressions, respectively (Gravel et al., 2013). The aNM was calibrated using a set of 26 consumers covering wide taxonomic and body size diversities (i.e., from protists to piscivorous fish) for which diets and/or feeding ranges were already documented (see Vagnon et al., 2021 for more details). Due to vertebrate and invertebrate consumers differing in their feeding ranges, the aNM parameters (c and r) were estimated independently for these two taxonomic groups. Vagnon et al. (2021) validated the model using independent data and found that it predicts well empirical trophic links (accuracy = 81 ± 10%, equation 4 of Vagnon et al., 2021) (see also Supporting Information S4 for predator-prey mass ratio analysis and Supporting Information S5 for an analysis of the influence of fish body size on the niche attributes, trophic links, and food web metrics using either empirical body size measurements or body size estimates from the literature). Overall, the aNM provides integrative food webs including all realized trophic interactions although they are not necessarily realized simultaneously in nature.
For each lake x, we applied the aNM to predict niche parameters (c, r) for each consumer of body size (n) (see Supporting Information S3). The occurrence of a trophic interaction was then assigned to a consumer with any taxon falling within its feeding range r. This procedure was repeated for each consumer present in each lake x leading to the implementation of a binary consumer-prey interaction matrix M x . The matrix has a dimension of S x × S x , where S x represents the taxonomic richness of lake x and trophic interactions m ijx were either 1 or 0 for the presence or absence of trophic links between taxa i and j, respectively.

| Food web metrics
For each lake, we computed 20 metrics commonly used in food web structure analyses (e.g., Braga et al., 2019;Kortsch et al., 2019) ( Table 1). These metrics represent different characteristics of the food web structure including complexity, vertical diversity, trophic level, and diet strategies (Braga et al., 2019). Complexity metrics included, among others, taxonomic richness, number of links, link density, and connectance. Vertical diversity metrics quantify the proportion of taxa along major trophic levels (i.e., basal, intermediate, and top level) while trophic level metrics (e.g., mean trophic level) refer to the vertical trophic position of taxa within a food web.
Diet strategy metrics (e.g., average generality and vulnerability) refer to dietary niche properties of taxa related to the number of consumers and resources, respectively. Food web metrics were calculated using the R packages "igraph" (Csardi & Nepusz, 2006) and "cheddar" (Hudson et al., 2013).

| Environmental variables
We characterized each lake with nine environmental variables belonging to the three categories related to the tested hypotheses (i.e., habitat, productivity, and temperature, Table 2). For the lake habitat, we included lake area, maximal depth, and shoreline development index (SDI). The first two variables are related to habitat size while SDI is a proxy of the littoral zone complexity. SDI is calculated as the length of the lake's shoreline relative to the circumference of a circle with the same area as the lake (Kent & Wong, 1982). High values of SDI indicate high littoral zone complexity while values close to one indicate littoral zones with low complexity. For lake productivity, we considered the concentrations of dissolved organic carbon (DOC), nitrate, and total phosphorus that are among the main drivers determining variation in lake productivity and biomass (Carpenter et al., 1998;Smith, 1979). Lakes are often phosphorus limited but nitrogen also emerges as a limiting factor for freshwater productivity and the development of harmful algal blooms (Paerl et al., 2014).

| Statistical analyses
Many food web structural metrics are correlated (Riede et al., 2010;Vermaat et al., 2009) and, thus, inform on similar characteristics. To account for their covariance, we projected the 20 metrics of each lake food web on a multivariate plane using a principal component analysis (PCA). The PCA summarizes the main variations in food web structures among the 67 lakes. We identified significant and strong correlations (i.e., Pearson's r > .70, p < .05) between each PCA axis and individual food web structural metrics to define composite food web descriptors from PCA axes (see e.g., Baiser et al., 2012;Braga et al., 2019;Vermaat et al., 2009). We only kept the PCA axes explaining individually more TA B L E 1 Overview of structural metrics, their abbreviation, definition, and associated summary statistics characterizing the food webs of the 67 studied lakes. than 20% of the total variance (i.e., PCA axes 1 and 2). This analysis was performed using the R package "FactoMineR" (Lê et al., 2008).
The relationships between composite food web descriptors (i.e., PCA axes) and the different environmental variables were then investigated using generalized additive models (GAMs) that can handle nonlinear relationships (Wood, 2017). To avoid overfitting, we constrained the GAMs at three knots. All models were fitted using the gam function of the R package "mgcv" (Wood, 2017).
Following Braga et al. (2019), we accounted for spatial dependency unexplained by the environmental drivers given that both the environmental variables and food web topological metrics can show some level of spatial autocorrelation. First, we accounted for the spatial dependency of food web structures by computing an autocovariate variable for each of the composite food web descriptors using the autocov_dist function of the R package "spdep" (Dormann et al., 2007). The autocovariate variable allows for estimating how much the food web structure of a given lake reflects the structure of the neighboring ones. However, as the composite food web descriptors could show a spatial autocorrelation because the environment itself is autocorrelated, we then modeled each autocovariate variable (one for each composite food web descriptor) to the set of environmental variables using a bootstrap aggregating model with the randomForest function from the R package "randomForest" (Liaw & Wiener, 2002). Bootstrap aggregating prediction models is a general method for fitting multiple versions of a prediction model and then combining (or ensembling) them into an aggregated prediction (Breiman, 1996). This technique reduces the variance and bias in the sample data and results in tackling the overfitting of the models. For each composite food web descriptor, the residuals of the bootstrap aggregating model were extracted and included in the GAMs as a spatial variable that is independent of the environmental predictors (hereafter referred to as the spatial residuals variable).
To investigate the relationship between each composite food web descriptor and the 10 explanatory variables (i.e., the nine environmental variables and the spatial residuals variable), a variable selection was carried out using a double penalty approach. This approach can completely remove terms with little to no predictive power from the model as it penalizes the null space of the basis (i.e., the basis functions that are smooth [constant, linear]) in addition to the range space of a spline basis (i.e., the basis functions that are wiggly) (Marra & Wood, 2011).
This approach is directly integrated into the gam function of the R package "mgcv" using the argument "select = TRUE".
Using single food web metrics or the composite food web descriptors from the PCA axes yielded similar qualitative results and relationships with the explanatory variables (see Supporting Information S8). Therefore, here we present results on PCA axes as they summarize the main features of food web structures among the 67 lakes.
The data and codes are available online (Leclerc, 2023).

| Properties of lake food webs
The food web properties differed among the 67 lakes ( Figure 1, Table 1). These food webs ranged in size from 10 to 54 nodes (mean ± SD = 31 ± 8) with a number of trophic links spanning from 15 to 508 (mean ± SD = 191 ± 94). Particularly, the fish communities within lakes comprised between 1 and 20 species (mean ± SD = 11 ± 4) while those of macroinvertebrates ranged from 2 to 34 families (mean ± SD = 16 ± 7). Such variability in the diversity of biological compartments influenced the mean body size of the communities that ranged between 3.4 and 21.8 cm (mean ± SD = 11.9 ± 3.9 cm; by single nodes (mean fraction ± SD = 0.07 ± 0.03). Connectance did not differ strongly among lakes while ranging from 0.10 to 0.21 (mean ± SD = 0.18 ± 0.02), and food web clustering was low and varied slightly (mean ± SD = 0.09 ± 0.04), indicating that the distribution of feeding links was rather homogenous within food webs for most lakes. Interestingly, we found bimodal distributions for the maximum trophic level and the mean food chain length indicating that food webs were either well vertically structured with long trophic chains reaching high trophic levels, or poorly vertically structured with short trophic chains and the absence of predators from high trophic levels.

| Composite food web descriptors
The two first PCA axes explained 71.1% of the total variance and summarized the covariation of the 20 food web metrics (Figure 2). The second PCA axis accounted for 20.7% of the total variance and was associated with fish richness, mean community body size, F I G U R E 1 Raincloud plots of the individual food web structure metrics. Points represent the metric for individual lakes, and the associated probability density plot and boxplot are shown. Inside the band of range represents the median, hinges indicate the IQR, whiskers extend to ±1.5 IQR, and outliers are upper the 1.5 IQR. The abbreviations of the individual metrics and their summary statistics are shown in Table 1.
These metrics differed from the ones associated with the trophic diversity descriptor and provided insights related to the vertical structure of the food web and this axis hereafter is referred to as the vertical structure descriptor. This indicates that food webs with high values of vertical structure had more fish species, longer food chains, and higher (mean and maximum) trophic levels and average body size. Altogether, the PCA allowed to discriminate variations in food web complexity among lakes with large, diverse, and vertically structured food webs associated to positive values of the two composite descriptors (upper right corner in Figure 2), whereas small, simple, and species-poor food webs are associated to negative values of these descriptors (lower left corner in Figure 2).

| Drivers of food web structure
Environmental drivers explained a significant proportion of the total deviance of the two composite descriptors: 32.4% of the trophic diversity descriptor (i.e., PCA axis 1) and 64.3% of the vertical structure descriptor (i.e., PCA axis 2). Among the different environmental variables, water temperature explained an important part of the variation in the food web structure. In particular, temperature seasonality had the strongest effect on the vertical structure descriptor and explained 39.0% of the total deviance ( Table 3) (Table 3). However, isothermality had a significant effect on the trophic diversity descriptor, explaining 10.7% of the total deviance ( Table 3) Habitat also had an important role in explaining the trophic diversity and vertical structure of food webs. In particular, maximal depth, SDI, and lake area had a positive effect on the vertical structure and explained 31.9%, 8.5%, and 5.5% of the total deviance, respectively ( Table 3). As a result, deep lakes with large areas and complex shorelines promoted food webs with an important vertical structure (i.e., presence of fish, long trophic chains, high maximum trophic level) (Figure 3, Supporting Information S9). The trophic diversity was also sensitive to habitat variables with the lake area and SDI explaining 26.7% and 20.1% of the total deviance, respectively ( Table 3)  Four food web visualizations, obtained using Network3D (Williams, 2010;Yoon et al., 2004), are added to highlight the different extreme food web structures within the 67 lakes. Node color informs on the taxa trophic position. Yellow nodes represent taxa having the lower trophic position, and purple nodes represent taxa with the highest trophic position. The lines represent trophic links between taxa.
In regards to productivity, total phosphorus had no significant effect on both food web descriptors. Moreover, DOC and nitrates had no significant effect on the food web vertical structure descriptors but had an important effect on the trophic diversity, explaining 16.4% and 9.1% of the total deviance, respectively ( Table 3). We found a unimodal relationship between these two productivity vari-

| DISCUSS ION
The study of aquatic food webs has a long history. However, their structural variations have been mostly investigated in streams and rivers (e.g., Pomeranz et al., 2020), whereas it still remains underexplored in lakes (but see Bauer et al., 2022). Here, by combining large-scale biodiversity inventories with an allometric niche-based model, we inferred the occurrence of trophic links for 67 French lakes and explored how key environmental drivers impact the structure of food webs. We identified two main patterns of variations among the structure of these lake food webs (i.e., trophic diversity and vertical structure). Although the two descriptors of food web variations responded differently to environmental variables, our results highlight that a set of environmental variables (i.e., temperature, productivity, and habitat size/complexity) collectively shaped the food web structure. Overall, our study helps to better understand the factors underlying variations in food web structures, which is important to assess how food webs could be modified by human activities as well as the consequences of TA B L E 3 Summary of GAMs for the trophic diversity descriptor (PCA axis 1) and the vertical structure descriptor (PCA axis 2). Variables are sorted by relative percent deviance explained in each model. Bold values denote statistical significance at the p-value <.05 level. these modifications for the persistence of ecological networks (Pomeranz et al., 2020).
We found that the 67 lake food webs varied in their structure although the amount of variation depended on the considered food web metric. Network size (i.e., number of nodes in the food web) exhibited a wide range of variation and remained in the range commonly reported for aquatic food webs (e.g., Dunne et al., 2002). As reported in previous studies, network size representing taxonomic richness was a major determinant of food web complexity and was positively correlated to other food web metrics related to network complexity such as the number of links (Baiser et al., 2012;Riede et al., 2010;Vermaat et al., 2009). This result is in line with the important variation observed for other metrics of complexity (number of links and link density). In contrast, we found a low variability of connectance suggesting that the 67 food webs were similarly connected with an average connectance of 0.18. This is consistent with empirical estimates from other aquatic ecosystems with connectance values of approximately 0.2 (e.g., Danet et al., 2021;Dunne et al., 2002). We also found relativity high vulnerability and generality values in our 67 food webs indicating that each taxon feeds on a diversity of other taxa and is consumed by several consumers (Table 1), which highlights the generalism of lake consumers in our 67 food webs.
Our results indicated that food web structural characteristics can be summarized by two composite food web descriptors that capture up to 71.1% of food web structural variation. These composite descriptors provide an understanding on how different food web properties covary among food webs and the identification of the properties that contribute most to the discrimination of food web structural variations. In particular, we found that the main variation pattern is related to the trophic diversity of food webs. Thus, taxa richness that determines food web size is mainly driven by macroinvertebrate diversity and the associated metrics (e.g., proportion of intermediate species) highlighting the importance of this taxonomic group in structuring lake food webs. However, zooplankton, protists, phytoplankton, and bacteria have been characterized by unique taxonomic units and their contribution to food web size has been, thus, underestimated. Additionally, connectance was not independent of taxa richness while previous studies reported that taxonomic richness and connectance are independent and can form the two main axes of variation in food web structure (Braga et al., 2019;Vermaat et al., 2009). Although connectance has been shown to be independent of diversity (Martinez, 1992), this relationship has been debated in the food web complexity-stability theories (Winemiller, 1989).
Here, our results have supported the linkage between the diversity and the complexity of the trophic relationships. Table 3) on the trophic diversity descriptor (PCA axis 1) and the vertical structure descriptor (PCA axis 2). Black lines are the estimated effects of each predictor with the respective 95% confidence intervals shaded in grey and colored circles represent partial residuals. Diagnostic plots suggest that the models adequately describe the underlying data (see Supporting Information S10).

F I G U R E 3 Smooths of generalized additive modeling (GAM) terms showing the effect of the significant environmental predictors (see
We found that the second composite descriptor of food web structural variation represents the vertical structure of food webs.
This composite descriptor is associated to maximum/mean trophic level, mean community body size, and mean food chain length.
In our food webs, they are certainly promoted by the diversity of fish taxa as fish richness is strongly correlated to these food web metrics while macroinvertebrate richness is mostly independent of them. This finding highlighted the trophic role of fish that elongate food chains and add trophic levels (Romanuk et al., 2011). This is not surprising as 50% of the fish species present in the 67 lakes are partially piscivorous. The lack of correlation between macroinvertebrates and fish richness can appear surprising at first sight as it is expected to be positively correlated; macroinvertebrates are an important resource for fishes and can constrain fish richness (e.g., Mantyka-Pringle et al., 2014). However, other studies have observed weak or no relationship between the richness of macroinvertebrates and fish taxonomic groups (e.g., Larsen et al., 2012). Overall, no taxon appeared to be a good predictor of the richness of other taxa (Wolters et al., 2006), and the lack of strong correlations is generally attributed to taxonomic resolution (i.e., species, genus, etc.) and to taxon-specific responses to environmental gradients (Paavola et al., 2006). Overall, by applying an allometric niche model, we have highlighted two main characteristics of food web structural variation (trophic diversity and vertical structure of food webs). Interestingly, these two characteristics can be efficiently tracked using stable iso- We found that the structural variations of lake food webs are influenced by the annual average temperature and its variation (i.e., isothermality and seasonality). Our results, thus, highlight the importance of temperature in shaping food web structures and are in line with recent studies reporting that warming can alter these structures, at both local and global scales (Gibert, 2019;Tanentzap et al., 2020). While most food web studies focused on average temperature, our results indicate that temperature variations have also an influence on the food web structure. In particular, we found that trophic diversity within food webs is maximized at an intermediate This result contradicts previous studies showing that a more stable climate may favor longer food chains and narrower food niches (Carscadden et al., 2020;Ruiz-Cooley et al., 2017). Nevertheless, a positive relationship between temperature variation and the vertical structure has already been reported for tetrapod food webs at the European scale (Braga et al., 2019), and some studies have predicted that ectotherm food chain lengths should increase with increasing latitude because larger-amplitude seasonal fluctuations generate more opportunities for species to diverge in their thermal optima (Casas Goncalves & Amarasekare, 2021). We, thus, need to improve our understanding about the consequences of temperature variation (i.e., intra-annual and inter-annual) for food webs, especially since such variations may alter the stability and thresholds for collapse of interacting species and because this may be one of the major consequences of climate change on lake communities (Dee et al., 2020).
In addition to temperature, habitat size, and complexity also contribute in explaining food web structural variations. We found significant positive associations between the vertical structure and lake area, maximal depth or the SDI, as well as between trophic diversity and lake area. We found also a significant negative association between trophic diversity and the SDI. Thus, lakes with complex shorelines have species-poor food webs (especially macroinvertebrate taxa-poor) with lower link density but complex shorelines promote food webs with high trophic levels. This result can be explained by the ecological integrity of lake shores, the dependence of macroinvertebrates on littoral habitats and their lower mobility than fish. Indeed, although lake shores can be complex, they can be also morphologically altered and, thus, impact the structure of littoral benthic invertebrate communities (Brauns et al., 2011). This may explain the response pattern of the SDI with the trophic diversity and the vertical structure of food webs. For lake area and depth, we found that small or shallow lakes are associated to species-poor food webs (especially fish species-poor) with lower link density and mean food chain length (see Supporting Information S4). The observed striking influence of habitat size on trophic diversity and vertical structure was consistent with a mounting body of evidence indicating that ecosystem size strongly influences the food web structure (Post et al., 2000;Takimoto & Post, 2013). Our results support the expectation that larger habitats promote the occurrence of top-level predators or intermediate taxa and, thus, richer species assemblages with longer trophic chains and higher trophic levels (Post & Takimoto, 2007). Predators, indeed, are more sensitive to habitat size than their prey and can only occur in habitats large enough to meet their energy demands and/or habitat requirements (Srivastava et al., 2008). Small and structurally simple habitats promote strong trophic interactions as predators and prey are spatially confined and these strong interactions may have a destabilizing effect on the food chain length over long time scales (McCann et al., 1998). In more complex food webs, habitat contraction as well as the decline in habitat quality and diversity can disrupt the spatial flow of energy and lead to a destabilization of the food web dynamics with an increased risk of species extinctions (Takimoto et al., 2012;Tunney et al., 2012). Habitat size, quality, and diversity are particularly important as human exploitation is causing ecosystem degradation and contraction (Haddad et al., 2015), and abiotic perturbations are becoming more severe and frequent (IPCC, 2021). Based on our results and previous findings, we predict that habitat contraction should lead to simpler and less stable food webs.
Productivity has long been hypothesized to be the principal factor responsible for the variation in the trophic structure of aquatic ecosystems (Neutel et al., 2007). In our study, we found that productivity only affects trophic diversity. Greater amounts of energy available to primary consumers (i.e., higher productivity) should, indeed, support more diverse communities and, thus, more complex food webs, but a threshold effect can be expected (even if this has been debated; Post & Takimoto, 2007;Takimoto & Post, 2013;Ward & McCann, 2017). More precisely, greater productivity should promote taxonomic diversity increase by providing favorable ecological niches for the settlement of new colonist species until a threshold where no additional species (predators or consumers) are able to colonize the system owing to physiological or spatial constraints (Ward & McCann, 2017). At productivity levels above this threshold, diversity may even decrease because of different mechanisms (e.g., strong intraguild predation whereby predators eventually lead prey to extinction or high productivity causing anoxia and, thus, local extinctions) (Ward & McCann, 2017). Our results support this pattern as we observed that trophic diversity first increases with nitrate and DOC concentrations, reaches the highest value, and then slightly decreases at high levels of productivity. Conversely, productivity does not play a role in the vertical structure while it can be positively related to resource availability (Thompson & Townsend, 2005); nevertheless, the absence of a relationship between them has also been reported (Post et al., 2000;Warfe et al., 2013). Overall, the relative importance of vertical structure drivers may be context-dependent (Post, 2002). In a global change context, nutrient enrichment and productivity are expected to increase due to human activities and worsen through more frequent and intense flooding causing nutrient flushes into systems (Talbot et al., 2018) and leading to simpler food webs.
The reconstructed food webs exhibit structural features that are comparable to empirical food webs, indicating that the aNM plausibly reconstructs lake food webs (Supporting Information S3).
However, complementary information that may have supported additional refinement of the reconstructed food webs is still, unfortunately, lacking from the biodiversity inventories used in this study.
Indeed, zooplankton has not been monitored at the national scale hence preventing its inclusion in the reconstructed food webs. We, thus, introduced complementary nodes (zooplankton, protists, phytoplankton, and bacteria) to cope with this concern. While this is a common practice in food web reconstruction , the food web structure is likely to be impacted by the severe reduction in trophic information on these four taxonomic groups and also by the macroinvertebrate lower taxonomic resolution. Previous studies reported mixed results about taxonomic resolution and food web structure: the food web structure can vary with taxonomic resolution, affecting both trophic diversity and vertical structure (Martinez, 1993;Thompson & Townsend, 2000), yet some studies found no effect of taxonomic resolution on food web structure (Sugihara et al., 1989). In our study, the low taxonomic resolution of lower trophic levels has probably led to an underestimation of the food web trophic diversity and could also have impacted vertical diversity although the latter should be less influenced by taxonomic resolution as food chains length and maximum trophic level are weakly dependent on horizontal diversity.
Another limitation relates to the sampling of macroinvertebrates which did not fully overlap with that of fish. The temporal turnover of diversity can be important for rare taxa of macroinvertebrates but not for dominant ones in lake littorals (Suurkuukka et al., 2012).
Given the results from Suurkuukka et al. (2012) and since we used only family-level information (thus decreasing the potential influence of rare taxa) and focused on occurrence data, we have assumed that macroinvertebrate communities in the sampled lakes were representative of the 2005-2019 period. In addition, terrestrial taxa have not been included in the food web structure. Aquatic and terrestrial ecosystems are, indeed, tightly linked, through the fluxes of organisms, material, and energy (Soininen et al., 2015). For example, spiders and birds can eat aquatic insects (Nakano & Murakami, 2001).
Thus, the trophic diversity and the vertical structure of food webs are probably underestimated in our study. Then, accounting for the encounter rate between consumers and their prey (neutral process; Canard et al., 2012) through their respective abundances would have enabled to refine our food web reconstructions and give a more accurate snapshot of the food web structure (Pomeranz et al., 2020).
Nonetheless, the aNM inferences provide the set of all possible realized trophic interactions based on taxa body size that may represent a comprehensive diet of consumers and resources over the long run.
Furthermore, each taxon was allocated to a single node and therefore characterized by a single body size. Although it is a common practice in food web studies (see e.g., Braga et al., 2019) and of minor limitations for small taxa, it could introduce a limited ecological realism for larger species with strong ontogenetic diet shifts.
Consequently, splitting taxon-specific nodes to size or age-specific nodes can offer an opportunity to account for taxa size distribution when available . However, this could introduce concern regarding the definition of nodes within food webs and the arbitrary choice of the number of class sizes per taxon. We also used body sizes estimated from the literature whereas body sizes can vary significantly depending on local conditions and genotypes. Nevertheless, all body sizes were log10-transformed before inferring trophic interactions, which should have reduced the influence of variation in body size in the niche model. Moreover, supplementary analyses indicated that our results are robust to the source (i.e., literature estimates or empirical measurements) used for the body size of fish species, with little influence of the body size source on trophic niche attributes or food web metrics (see Supporting Information S5). Despite the limitations mentioned above, we found substantial variations in food web structures among lakes and most importantly, environmental drivers explained a large part of the variance in food web structures. This suggests that our implementation of the aNM was appropriate at detecting the impacts of environmental factors on the lake food web structure.
Our study contributes to the growing body of literature on the assessment of biodiversity in a functional way where network inference is crucial for identifying species relationships and interactions and for better understanding how communities are organized beyond a simple set of species along environmental gradients. Here, we highlighted that temperature as well as productivity and habitat features (i.e., size and complexity) collectively shape lake food web structures. In view of the growing human footprint, a small change in such environmental factors (e.g., temperature increase and its intra-annual and inter-annual variation) can have important consequences on ecosystem processes (Woolway et al., 2021) as well as on community structure and stability (Dee et al., 2020). Although identifying the environmental factors underlying variations in the food web structure is important to understand current biodiversity patterns, further investigations must be carried out to assess the stability and fragility of food webs under global changes.

ACK N OWLED G M ENTS
We are thankful to the three anonymous reviewers and the as- Research Agency (ANR).

CO N FLI C T O F I NTER E S T S TATEM ENT
The authors declare no conflicts of interest.