The contrasting response of cavity‐nesting bees, wasps and their natural enemies to biodiversity conservation measures

The implementation of agri‐environmental schemes (AES) is a major tool to sustain biodiversity and ecosystem services in European agricultural landscapes. The benefit of different types and features of novel biodiversity measures needs to be assessed in order to successfully conserve insect communities in agroecosystems. We set up trap nests in 3 × 3 km landscapes in Germany, in which farmers implemented different novel biodiversity measures. We tested the effect of different features of the closest three biodiversity measures (i.e. distance to measures, measures' area, measures' quality) and of the proximity to forest and oilseed rape and of landscape connectivity on the abundance and species richness of cavity‐nesting bees, wasps and their natural enemies. We found total cavity‐nesting insect abundances to increase with measures' quality and to decline with increasing distance to oilseed rape and forest. Parasitism and mortality rates declined with edge density. Cavity‐nesting bees were not affected by biodiversity measures. Total wasp and herbivore‐predating wasp abundances increased in proximity to biodiversity measures. The abundance and species richness of all wasps, natural enemies and spider‐predating wasps declined with increasing distance to forest. Cavity‐nesting wasps benefit from biodiversity measures, while effects on solitary bees might only be detectable after several years after measure establishment. The proximity to forest is a major factor promoting insects as forest edges provide food, nesting sites and shelter. We emphasise the need for long‐term insect monitoring and an increasing focus of future AES on the creation of nesting habitats for effective insect conservation.


INTRODUCTION
Insects provide important ecosystem services of high economic value (Losey & Vaughan, 2006) and the provisioning of floral resources is a Nicole Beyer and Josephine Kulow contributed equally to this study. key component for successful insect conservation (Potts et al., 2003;Roulston & Goodell, 2011). Wild bees are essential pollinators for many global food crops (Klein et al., 2007) as they forage on floral nectar and pollen, on which their larvae depend on (Westrich, 2019).
Besides, mass-flowering crops such as oilseed rape can have a positive effect on solitary bee and wasp populations (Diekötter et al., 2014;Jauker et al., 2012;Westphal et al., 2003). The land cover of oilseed rape and the proximity to oilseed rape have been shown to promote cavity-nesting insects (Diekötter et al., 2014;Holzschuh et al., 2013).
Especially the solitary bee Osmia bicornis is known to profit from oilseed rape Jauker et al., 2012). Next to cavitynesting bee species of the genus Osmia, mainly solitary species that nest below-ground were observed foraging on oilseed rape (Hutchinson et al., 2021;Woodcock et al., 2013). Like bees, also cavity-nesting wasps are favoured by high area percentages of oilseed rape (Diekötter et al., 2014) as they feed on nectar (Witt, 2009) and can additionally prey on pest insects found in oilseed rape fields (Alford, 2003).
While the area of flower providing habitats can positively affect insects (Diekötter et al., 2014), it is also essential that resources are within the foraging range of the specific insect species. Accordingly, the proximity to floral resources has been shown to enhance reproduction of bumblebees (Goulson et al., 2002;Klatt et al., 2020), solitary bees  and solitary wasps (Hoffmann et al., 2018). Insect abundances and species richness usually increase with declining distance to flower-rich biodiversity measures (Ekroos et al., 2013;Hoffmann et al., 2018;Zurbuchen, Landert, et al., 2010).
As insects move between non-crop and crop habitats (Mandelik et al., 2012), the implementation of biodiversity measures close to crop fields can lead to a spill-over of beneficial insects from measures into nearby crop fields improving ecosystem service provisioning to crops (Albrecht et al., 2020;Bianchi & Wäckers, 2008).

Another important landscape component for solitary bees and
wasps is the availability of nesting habitat (Roulston & Goodell, 2011).
Many solitary bee and wasp species nest in cavities in wood or plant stems and those species rely on woody semi-natural habitats, such as forest edges for nesting (Bailey et al., 2014;Bartual et al., 2019;Bogusch & Horák, 2018;Morandin & Kremen, 2013;Uzman et al., 2020). Beyond nesting opportunities, woody habitats can offer floral and arthropod food for insects (Jauker et al., 2012;Montagnana et al., 2021;Westrich, 2019) and provide a favourable microclimate (Magura et al., 2001). Forest proximity has been shown to promote cavity-nesting wasps (Holzschuh et al., 2009) and higher parasitoid and predatory fly abundances have been found in woody habitats, such as forest edges and hedgerows than in herbaceous semi-natural habitats (Bartual et al., 2019;Holzschuh et al., 2009). Due to the various habitat demands of solitary wild bees and wasps, a landscape needs to constitute of various connected partial habitats containing food, nesting habitat and material for nest construction. Only when all these conditions are met, solitary bees and wasp can successfully reproduce in a landscape (Westrich, 2019;Witt, 2009). Accordingly, landscape heterogeneity has been shown to be an important factor driving cavity-nesting insect abundances (Montagnana et al., 2021;Steckel et al., 2014). Especially wasps are known to profit from habitat connectivity, which facilitates wasp movement for prey hunting (Heneberg et al., 2018;Holzschuh et al., 2009Holzschuh et al., , 2010, but also pollinator movement is facilitated by field borders leading to enhanced wild bee abundances with increasing field border density (Hass et al., 2018). Moreover, parasitoids are favoured by enhanced habitat connectivity, as they usually have smaller dispersal ranges than their hosts (Tscharntke et al., 2005). The occurrence of natural enemies in a landscape is mainly driven by their hosts as they need specific hosts for reproduction (Holzschuh et al., 2010;Staab et al., 2018) and parasitism rates have been shown to increase with parasitoid diversity (Holzschuh et al., 2009;Tylianakis et al., 2006).
Knowledge on how a landscape has to be designed and managed is of upmost importance to conserve insects and their services in agricultural landscapes. The implementation of wildlife-friendly biodiversity measures is one way to promote insect communities in agroecosystems (Boetzl et al., 2021;Marja et al., 2022). The development and assessment of targeted conservation measures that maintain and increase biodiversity is a key component to improve existing and develop novel AES and to give adequate local and landscape management advice. While the impact of individual AES targeting specific species groups has been studied frequently (Haaland et al., 2011;Scheper et al., 2015), little is known about how solitary bees and wasps are affected by different sets of measures aiming at the promotion of biodiversity in general. In this context, there is a lack of studies that consider the realistic scenario of bundles of different AES as a whole at landscape scale (Image et al., 2022). As many EU agricultural landscapes are composed of intensively used cropland interspersed with various different agri-environmental measures targeting different species groups, we wanted to focus on the impact of measures aiming at a general biodiversity promotion on beneficial insects.
For this, we set up trap nests in nine different agriculturally dominated landscapes in Germany in 2017 and 2018. We investigated how the distance to, the area and the quality of the closest three biodiversity measures as well as the proximity to forest and oilseed rape and landscape connectivity shape insect abundances and species richness in trap nests. We had following hypotheses: (1) The proximity to biodiversity measures, the area of biodiversity measures and measures' quality enhance the abundance and species richness of cavitynesting bees and wasps as they provide diverse floral resources and arthropod food (for wasps). Especially bees might profit from the enhanced resource availability provided by biodiversity measures.
(2) The proximity to forest enhances the abundance and species richness of cavity-nesting bees and wasps as forest edges provide floral resources, arthropod prey and nesting opportunities. (3) The proximity to oilseed rape enhances abundance and species richness of especially the bee species O. bicornis, which is known to profit from the early mass-flowering resource. We also expect wasps to benefit as oilseed rape fields offer nectar and harbour arthropod prey. (4) Edge density has a beneficial effect on cavity-nesting bees and wasps as landscape connectivity facilitates insect movement within a landscape. We expect edge density to be especially important for wasps. (5) Natural enemy responses are driven by host availability.

Study sites
Nine different regions with intensive agricultural land use located in eight different federal states of Germany were chosen ( Figure A1).
Within each region, a 3 km Â 3 km study landscape was selected based on farmers' willingness to implement novel agri-environmental measures aiming at biodiversity promotion. Details on implemented biodiversity measures can be found in Table A1. Some of the implemented measures are AES, others are not eligible as AES because they were specifically designed or adapted to the needs of the particular farms. In the following, we refer to all implemented measures as 'biodiversity measures'.

Trap nests
In order to assess the species richness and abundance of bees and wasps as well as of their natural enemies under standardised nesting conditions, we used trap nests (Tscharntke et al., 1998). Trap nests provide several advantages, such as the possibility to record multiple trophic interactions, simple handling and many replicates are feasible (Staab et al., 2018). We set up in total 340 trap nests at 170 different locations (termed 'trap nest location' in the following), that is, 10 dif- Using ArcGIS Pro version 2.8.4 (Esri, 2021), we calculated the mean distance from each trap nest to the closest three biodiversity measures as well as the mean area of the closest three biodiversity measures (Table 1). In total, 53.7% of all closest measures considered (510-the three closest for each of the 170 trap nest locations) were flower strips (Table A2). Only in eight cases (of 170), there was no flower strip among the closest three measures. The area of the closest three measures was independent of the area proportion of the major land-use types, that is, arable land, grassland, urban area and forest (spearman R between 0.17 and 0.42), which were calculated using vector based ATKIS data (Basic-DLM-digital landscape model). As we consider a set of different measures targeting different species groups, we additionally evaluated the measures' quality for flower-visiting insects using a quality index, including flower availability and diversity aspects (for further details see Supplementary Material S1). For analyses, the mean quality index for the closest three biodiversity measures was calculated.
Beyond, we calculated the distance to the nearest oilseed rape field and the distance to the closest forest (

Statistical analyses
Statistical analyses were conducted in R version 4.1.2 (R Core Team 2021). Global models were fitted using generalised linear mixed models with the glmmTMB package (Brooks et al., 2017). Response variables were the abundance (number of brood cells) of all cavitynesting insects (wasps and bees summed), the parasitism rate and mortality rate of all insects, the abundance of all bees, of all wasps and of natural enemies. Additionally, we fitted separate models for the abundance of the most abundant bee species Osmia bicornis, the abundance of all other bees (all bees excluding O. bicornis, hereafter termed 'other bees') (see Table A3 for the different species) and for the abundance of all herbivore-predating and all spider-predating wasps (see Table A4). Furthermore, the species richness of bees and of wasps was used as response variables. For the analyses of the abundances and parasitism and mortality rates, only the data of the dissected trap nests were used. For species richness analyses, we used all trap nests (dissected and not dissected ones) and data were pooled for the two pipes per trap nest location.
Predictor variables included in each global model were the mean distance to the closest three biodiversity measures (hereafter termed 'distance to measures'), the mean quality of the closest three biodiversity measures (hereafter termed 'measure quality'), the mean area of the closest three biodiversity measures (hereafter termed 'measure area'), distance to the closest oilseed rape field (hereafter called 'distance to oilseed rape'), distance to the closest forest (hereafter called 'distance to forest') and edge density (within a 150 m radius around each trap nest). Moreover, we added the interaction between distance to measures and measure quality (as we expect the proximity to measures to have a stronger positive effect when their quality is high), the interaction between distance to measure and distance to oilseed rape (as we expect the proximity of oilseed rape to compensate for the absence of close measures to some extent) and the interaction between distance to oilseed rape and year (as we expect oilseed rape to have a stronger impact in 2018 where all trap nests were set up before the flowering of oilseed rape-in 2017 most trap nests were set up afterwards). All continuous predictors were standardised to a mean of zero and a standard deviation of 1 to improve model convergence. As random effect in the models we added the trap ID (trap nest location) nested within the study landscape (study landscape/trap ID).
In the species richness models, only study landscape was added as random effect and an offset of the log of the number of pipes per pole was included in order to account for different sampling effort (mainly the two pipes per pole were used, but in some cases, one pipe was destroyed or disappeared and thus just one pipe per pole was available).
The abundance and species richness models were fitted with Poisson family (log link). In case of overdispersion, negative binomial family was used. Overdispersion was tested with the performance package (Lüdecke et al., 2020), which was also used to test for zeroinflation. In case of detected zero-inflation, a general zero-inflation term was added to the model if the model with the zi-term had a lower Bayesian information criterion (BIC) than the model without.
T A B L E 1 Minimum (min), maximum (max) and mean value of all landscape variables (over all trap nests in the 17 study landscapes). For models of parasitism rates and mortality rates, we used binomial family (logit link). For model structures, see Table A5.
Following a multimodel inference approach (Burnham & Anderson, 2002) and based on the global models explained above, candidate models including all possible combinations of predictor variables were fitted with the MuMIn package (Barton, 2019). Candidate models were ranked by BIC and all models within BIC <2 compared to the best fitting model were considered to have important empirical support (Raftery, 1995). The posterior probability of each model was assessed via BIC model weights (w i ) (Link & Barker, 2006). In order to assess the relative importance of each predictor variable, we calculated BIC model weights (Σw i ) over all models that include the respective explanatory variable (as in the study by Beyer et al., 2021).
We tested for collinearity with the variance inflation factor (VIF) and VIFs were always below 3 (Zuur et al., 2010). To evaluate the models' goodness of fit, we calculated the marginal (R 2 m ) and conditional (R 2 c ) R 2 values (Nakagawa et al., 2017). R 2 values and VIFs were calculated with the performance package (Lüdecke et al., 2020). We checked residual plots to validate model assumptions. All graphics were generated with ggplot2 (Wickham, 2016). We obtained predictions and confidence intervals from the effects package (Fox & Weisberg, 2019).

RESULTS
In total, we counted 15,056 brood cells of bees and wasps in the dis-  (Table A3); 22.5% of all wasp brood cells belonged to herbivore-predating wasps and 65.6% to spider-predating wasps; 93.5% of all identified spider-predating wasps belonged to the genus Trypoxylon (Table A4). In total (dissected and unopened nests), we found 19 different bee species and 33 different wasp species (Table A6). The mean species richness per trap nest (both pipes per pole) was 1.2 (ranging from 0 to 6 species) for bees, 2.1 (ranging from 0 to 9 species) for wasps and 1.4 (ranging from 0 to 6 species) for natural enemies. The most common natural enemy of bees was Cacoxenus indagator (Diptera: Drosophilidae) and most common natural enemies in wasp nests were Melittobia acasta (Hymenoptera: Chalcidoidea) and Trichrysis cyanea (Hymenoptera: Chrysididae). While species richness did not differ between dissected and unopened nests for bees ( p = 0.80) and wasps (p = 0.55), we found a higher species richness of natural enemies in dissected nests (p < 0.01).

All cavity-nesting insects
There were four best-fitting models explaining the effect of biodiversity measures and other landscape parameters on the abundance of all cavity-nesting insects (Table A5). All models were subsets of the second-best explaining model including year (Σw i = 1.00), distance to oilseed rape (Σw i = 1.00), distance to forest (Σw i = 0.53) and measure quality (Σw i = 0.47). There were approximately 2.2 times more trap nesting insect brood cells in 2018 compared to 2017 ( Figure A2a).
Insect abundance declined with increasing distance to forest and with increasing distance to oilseed rape (Figure 1a,b). A higher quality of the closest three biodiversity measures enhanced insect abundance ( Figure 1c).
The multimodel inference revealed two models within dBIC <2 explaining the effect of year (Σw i = 1.00), edge density (Σw i = 0.95) and measure area (Σw i = 0.52) on the parasitism rates of cavitynesting insects (Table A5). Parasitism rates were approximately 1.7 times higher in 2018 ( Figure A2b) and decreased with increasing edge density (Figure 1d). Parasitism rates declined with increasing mean area of the closest three biodiversity measures (Figure 1e).
There were two best-fitting models explaining the effect of landscape parameters on the mortality rate of cavity-nesting insects which included year (Σw i = 1.00), edge density (Σw i = 1.00) and distance to oilseed rape (Σw i = 0.34) (Table A5). Mortality rates were approximately 1.7 times higher in 2018 than in 2017 ( Figure A2c). With increasing edge density and with increasing distance to oilseed rape, mortality rates declined (Figure 1f,g).

Bees
Regarding the abundance of solitary bees, there was one best-fitting model showing that bee abundances were 3.6 times higher in 2018 compared to 2017 (Σw i = 1.00; Figure A2d). No landscape parameter or biodiversity measure feature was included in the best model. The

Wasps
There were five best-fitting models explaining the effect of biodiversity measures and landscape parameters on cavity-nesting wasps (Table A5). All models were subsets of the third-best fitting model including distance to oilseed rape (Σw i = 0.80), distance to forest Considering only spider-predating wasps, the one best-fitting model included only the distance to forest (Σw i = 0.66) (Table A5).
Abundances declined with increasing distance to forest (Figure 2d).
The abundance of herbivore-predating wasps was also explained by one best-fitting model, including the distance to biodiversity measures (Σw i = 0.64) ( Table A5). Abundance of herbivore-predating wasps declined with increasing distance to biodiversity measures ( Figure 2e). As the null model was the second-best model, this result has to be interpreted with care.
The multimodel inference resulted in one best-fitting models regarding wasp species richness. We found on average 33.5% fewer wasp species in 2018 than in 2017 (Σw i = 0.95; 1.27 and 1.91 species respectively; Figure A2i). Species richness declined with increasing distance to forest (Σw i = 0.77) (Figure 2f).

Natural enemies
The abundance of natural enemies was explained by two best models including year (Σw i = 0.83), host abundance (Σw i = 0.90) and distance to forest (Σw i = 0.52) (Table A5). There were on average 3.7 times as many natural enemies in 2018 than in the preceding year ( Figure A2j) and the abundance of natural enemies declined with increasing distance to forest (Figure 3a). Natural enemy abundance was also enhanced by host abundance (Figure 3b). There was one best-fitting model explaining the effect of distance to forest (Σw i = 0.95) and measure area (Σw i = 0.78) on the species richness of natural enemies (Table A5). Species F I G U R E 1 The effect of (a) distance to forest (m), (b) distance to oilseed rape (m) and (c) measure quality on the abundance of all cavitynesting insects. The effect of (d) edge density (m/ha) and (e) measure area (*1000 m 2 ) on the parasitism rates of all cavity-nesting insects (brood cell number of bees and wasps). The effect of (f) edge density (m/ha) and (g) distance to oilseed rape (m) on the mortality rate of all cavity-nesting insects. Y-axes in (a-c) are log transformed for graphical reasons. Predictions and 95% confidence intervals are displayed and obtained from models bc.1 (a, b), bc.3 (c), pa.1 (d, e), mo.1 (f) and mo.2 (g) ( Table A5).

DISCUSSION
Our study found that high-quality biodiversity measures can enhance cavity-nesting insects in agricultural landscapes. More specifically, wasps, especially herbivore-predating species profited from the proximity to biodiversity measures, while bees were unaffected. A main driver of insect abundances and species richness was the proximity to forest.

Effect of biodiversity measures on cavity-nesting insects
The abundance of all cavity-nesting insects was enhanced by increasing measures' quality, in terms of an enhanced resource availability and flower diversity, as expected. Similarly, Schubert et al. (2022) showed that wild bee species richness and abundance were positively impacted by local habitat quality of wildflower strips, that is, the number of forb species and the floral reward amount. Generally,  (Ebeling et al., 2008;Potts et al., 2003). Beyond, also at the landscape scale, high amounts of high-quality resources have been shown to be important for beneficial insects in agricultural landscapes (Kennedy et al., 2013). Thus, our study emphasises the conservation value of providing highquality biodiversity measures for insects in simplified agricultural landscapes. That no effect of measures' quality on bees and wasps was observed but only on all cavity-nesting insects might be explained by the limited size of the datasets when divided into functional groups.
Effects might have added up when the whole dataset was considered.
In contrast to our expectations, the proximity to biodiversity measures did not influence total insect abundances and there was no interaction between measures' proximity and quality included in any best model. This is surprising considering that the closest biodiversity measure was more than 600 m away from the trap nest in 44% of all cases, which distance has been published as the maximum foraging distance for most larger solitary bee species (Gathmann & F I G U R E 2 Effect of (a) distance to closest forest (m), (b) distance to closest biodiversity measure (m) and (c) distance to closest oilseed rape field (m) on the abundance of wasps. Effect of (d) distance to closest forest (m) on the abundance of spider-predating wasps and the effect of (e) distance to closest biodiversity measure (m) on the abundance of herbivore predating wasps. Effect of (f) distance to closest forest (m) on the species richness of wasps. Y-axes in (a-d) are log-transformed for graphical reasons. Predictions and 95% confidence intervals are displayed and obtained from the respective best-fitting models w.bc.1 (a-c), ws.bc.1 (d), wh.bc.1 (e), w.spr.1 (f) (Table A5). . However, there are studies that found solitary bees and wasps to respond to landscape structure at much larger spatial scales (Coutinho et al., 2020;Steffan-Dewenter et al., 2002). Zurbuchen, Landert, et al. (2010) found some solitary bee individuals of different species to be able to cover distances exceeding 1000 m.
Thus, insects might fly further than their typical foraging ranges if resources are scarce, which, however, results in a higher energetic cost and lower reproduction (Zurbuchen, Cheesman, et al., 2010). We  (Barone & Frank, 2003;Hoffmann et al., 2018). We found only herbivore-predating wasps and not spider-predating wasps to be affected by the proximity to biodiversity measures. Opposing this result, Hoffmann et al. (2020) suggest that spider-predating wasps of the genus Trypoxylon use flower strips for prey hunting. However, this was only the case, if the percentage of grassland in the surrounding landscape was high. The authors assume that grasslands provided floral resources and enhanced connectivity for wasp movement between foraging and nesting sites (Hoffmann et al., 2020). Our landscapes, consisting mainly of cropland, were probably too homogeneous and did not provide sufficient complexity for spider-predating wasps to successfully F I G U R E 3 Effect of distance to forest (m) on (a) the abundance of natural enemies and on (b) the species richness of natural enemies of cavity-nesting insects. Effect of (c) mean area of closest measures (m 2 ) on the species richness of natural enemies. Y-axis in (a) is log-transformed for graphical reasons. Predictions and 95% confidence intervals are displayed and obtained from the best-fitting models n.bc1 and e.spr1 (Table A5). travel between biodiversity measures and their nests. Fabian et al. (2014) argue that the distance between hunting and nesting sites is especially important for spider-predating wasps as prey weight relative to their body weight exceeds that of herbivore-predating wasps.
Maybe biodiversity measures were not connected to trap nests well enough for spider-predating wasps to transport their heavy prey to the nests while herbivore-predating wasps were less restricted in their mobility due to lighter prey in relation to their body weight (Fabian et al., 2014).
The area of biodiversity measures affected species richness of natural enemies positively unlike Boetzl et al. (2021) who found natural enemy diversity to be unrelated to flowering field size. Other studies showed parasitoid abundance to be enhanced by local flower species richness (Steckel et al., 2014) and parasitoids to aggregate at flower strips due to nectar resources leading to prolonged longevity (Bianchi & Wäckers, 2008). Thus, larger areas of biodiversity measures probably provided a high resource quantity for different natural enemy species. The enhanced species richness of natural enemies with a high area of measures did not translate into higher parasitism rates. Instead, parasitism rates of all cavity-nesting insects were reduced by increasing areas of closest biodiversity measures. It seems that measure's area profited a bigger range of different natural enemy species but did not enhance the abundance of natural enemies, which is why the parasitism rates did not change in relation to measure' area.
Further studies are needed to address the effect of different features of AES on insect communities and insect interactions. As species interactions help to maintain ecosystem functioning (Loreau et al., 2001), future studies should also focus on species networks and interactions and how they are changed by environmental impacts.
Trap nests are a valuable tool to investigate not only abundances and species richness of beneficial insects but also revealing insights into trophic interactions with antagonists and with floral pollen and prey insects (Staab et al., 2018).
Unlike cavity-nesting wasps, bees were not affected by biodiversity measures, nor by any of the other tested landscape features. This contradicts our expectations and literature showing the beneficial effect of biodiversity measures on pollinators (Haaland et al., 2011;Scheper et al., 2013). In accordance with our findings, distance to wildflower strips did not affect bee visitation rates to and pollination of squash and sunflower on diversified farms (Delphia et al., 2022). As ecological contrast created by wildflower strips might have been too small to cause effects on diversified farms (Scheper et al., 2013), a positive effect of biodiversity measures in our homogenous intensified landscapes is likely. Nevertheless, there are various explanations for why we did not detect any effect on bees. There is evidence that pollinator responses are only measurable after several years after measure establishment as pollinator populations need time to build up (Blaauw & Isaacs, 2014;Buhk et al., 2018). Blaauw and Isaacs (2014) found a positive impact of flower plantings on wild bee abundance only after the third year. Moreover, Albrecht et al. (2020) found that the strongest increase in pollination service provision was detected about 3 years after flower strip establishment. In our study, measures were established in 2017, thus bee responses were probably not yet measurable in the same and second year and effects would have probably been detected in the third year after measure implementation.
This illustrates the need for long-term monitoring of biodiversity to effectively and reliably assess the long-term value of biodiversity measures.
Another reason why bees did not react might be that the tested biodiversity measures were not specifically tailored to the promotion of bees, but designed to promote biodiversity in general (e.g. also including measures for birds). Thus, not all measures enhanced flower availability in the study landscapes which, however, is one of the major drivers of bee abundances (Roulston & Goodell, 2011). The aim of our study was to assess the general value of the combination of different sets of general biodiversity measures for cavity-nesting insects.
As farmers can chose between very different AES, our approach mirrors the realistic situation in many EU agricultural landscapes, which are composed of intensively used cropland interspersed with various AES of different quality for different animal groups. However, measure quality did also not affect bees in our study. This suggests that another factor than food might have been limiting, for example, nesting habitat for cavity-nesting insects such as provided by woody structures (which were not part of our implemented biodiversity measures). The lack of suitable nesting habitats could have prevented benefits of biodiversity measures on cavity-nesting bees. Most bee species do not nest in cavities but underground (Antoine & Forrest, 2021). With our method, we focused on cavity-nesting bees only. Ground-nesters might have reacted differently to the implemented biodiversity measures. The study of Image et al. (2022) showed that AES in England promoted only ground-nesting bee species and not cavity nesters, likely because schemes did not target specific nesting requirements of those species. Further research should target the eligibility of different AES in providing nesting opportunities for different functional pollinator groups. It is important that future AES focus more on the creation of diverse nesting habitats for different insect species in addition to improving floral food availability (Image et al., 2022).
Lastly, it is conceivable that the resource availability in our study landscapes was already sufficient to sustain pollinators and that biodiversity measures did not make a valuable contribution. However, this explanation might be relatively unlikely considering that on average 65% of our study landscapes consisted of cropland and that we specifically chose regions with intensive agricultural land use. The only effect that showed up in our bee models, was year. In 2018, we found more bees and a higher species richness than in 2017. This might be related to the later trap nest set-up date in 2017, which may have led to an underrepresentation of some early species, like O. bicornis or might have been a consequence of the weather. 2017 was a year with a lot of precipitation and many trap nests were soaked which probably favoured mould infections. Moulds are a very common problem in trap nests (Staab et al., 2018) reducing the survival of insects (Harmon-Threatt, 2020; see discussion in the following paragraph about effect of forest proximity).

Effect of forest proximity on cavity-nesting insects
The proximity to forest enhanced the abundance of all cavitynesting insects, the abundance and species richness of all cavitynesting wasps, the abundance of spider-predating wasps as well as natural enemy abundance and species richness. The negative effect of increasing distance to forest can be explained by various benefits which forests provide. Forest edges can provide food and nesting resources for cavity-nesting bees and wasps, which have been shown to profit from forest proximity and cover (Bailey et al., 2014;Holzschuh et al., 2009;Montagnana et al., 2021;Uzman et al., 2020). Similarly, Holzschuh et al. (2009) found cavity-nesting wasp abundances and species richness to be highest at forest edges. Moreover, forest edges provide a favourable microclimate for insects and might have sheltered trap nests against rain and wind (Fornoff et al., 2021;Magura et al., 2001).
The potentially more sheltered location in proximity to forests was likely to reduce mould infections, which is a very common thread to insects occupying trap nests (Staab et al., 2018). As we did not measure microclimate or how sheltered trap nests actually were, we do not know whether those parameters drove pathogen infections in our trap nests. In our study, 2.8% of all pipes were discarded due to heavy mould infestations and none of those, except for one, were set up in proximity to forest. Cavity-nesting bees, for instance, are known to choose nest cavities with favourable microclimatic conditions, in terms of moisture and temperature, favouring larval development and reducing susceptibility to pathogens (Pitts-Singer & James, 2008;Wilson et al., 2020;Xu & James, 2012). Thus, an unfavourable microclimate might have lowered insect occupation of trap nests set up in large distances from forests.
Also, natural enemies might have benefitted from nectar resources, overwintering habitats and a favourable microclimate provided by woody habitats (Bianchi et al., 2006;Magura et al., 2001).
However, the positive effect of forest proximity on natural enemies might be mainly due to the enhanced host populations close to forest, which drive natural enemy occurrences (Holzschuh et al., 2010;Staab et al., 2018).

Effect of oilseed rape proximity on cavity-nesting insects
The proximity to oilseed rape enhanced the abundance of all cavitynesting insects and of solitary wasps, which probably drove the pattern of all cavity-nesting insects Accordingly, Diekötter et al. (2014) found cavity-nesting wasps to profit from oilseed rape. Adult wasps probably fed on the nectar resources as energetic reward (Fabian et al., 2014;Witt, 2009) or they hunted for prey in the crop fields, such as aphids or lepidoptera larvae, which are pests found in oilseed rape fields (Alford, 2003). Both, food resources (floral resources for adult wasps and arthropod prey for larvae) and nesting habitat are important for solitary wasp reproduction as well as that the different habitats are well connected (Witt, 2009).
Against our expectation, a beneficial effect of oilseed rape proximity on O. bicornis could not be confirmed based on our data. Possible explanations might be alternative resources or that half of all trap nests were on average more than 600 m away from the next oilseed rape field (maximum foraging distance for most larger solitary bee species; Gathmann & Tscharntke, 2002). Next to Osmia, main solitary bee visitors observed in oilseed rape fields in other studies are belowground nesting species, such as from the genus Andrena (Hutchinson et al., 2021;Woodcock et al., 2013), which were not covered by our sampling method. Thus, most cavity-nesting bee species do not seem to forage on and profit from oilseed rape. Furthermore, we found higher mortality rates of all cavity-nesting insects when oilseed rape was close in line with the findings of Jauker et al. (2012). This indicates a negative effect of oilseed rape resources on insect survival, which might be caused by pesticide application in those fields. Insecticide applications can enhance larval mortality and reduce reproductive success of beneficial insects (Klaus, Tscharntke, Bischoff, & Grass, 2021;Siviter & Muth, 2020). Nevertheless, in our study, those adverse effects of oilseed rape proximity on mortality of all cavity-nesting insects might have been compensated by the enhanced brood cell numbers in trap nests set up close to oilseed rape fields.

Effect of landscape connectivity on cavity-nesting insects
Parasitism rates of cavity-nesting insects were negatively impacted by landscape connectivity, against our expectations. Field margins can provide a valuable habitat and refuge for predators in agroecosystems (Dennis & Fry, 1992) and can enhance the abundance and diversity of parasitoids (Huallacháin et al., 2014). Contrarily, Bosem Baillod et al. (2017) found lower parasitism rates at field edges than within crop fields, similar to pest densities, which probably drove this pattern. However, abundance of wasp predators and parasitoids were not impacted by edge density in our study and thus we cannot deduce where the effects on parasitism rates result from. It is surprising that wasps did not profit from an enhanced edge density as expected. It is known that edges and habitat connectivity are important factors facilitating wasp movement in agricultural landscapes (Holzschuh et al., 2009;Holzschuh et al., 2010). Our landscapes probably contained too few edges to cause an effect on predatory wasps as the study took place in very homogenous intensified agricultural landscapes. While our maximum edge density was 530 m/ha, the study of Holzschuh et al. (2010), for instance, included landscapes with a maximum edge density of about 750 m/ha.
Mortality rates of all cavity-nesting insects were reduced by a high edge density, which might be related to a higher quality of larval food or enhanced food acquisition in well-connected sites, where insect movement is facilitated (Hass et al., 2018;Holzschuh et al., 2009). Field margins can be quite flower-rich (e.g. see Beyer et al., 2020;Kells et al., 2001) and reproductive success of wild bees has been shown to be enhanced by higher flower diversity (Klaus, Tscharntke, Bischoff, & Grass, 2021) and pollen diversity (Hass et al., 2019). Field margins also increase spider diversity (Rischen et al., 2022) and caterpillar growth is promoted by high-quality floral diets (Burghardt & Fiedler, 1996). Thus, a high edge density, that is, landscape connectivity might facilitate the efficient provisioning of larvae with high-quality food (Hoffmann et al., 2018).

CONCLUSIONS
Our study showed that high-quality biodiversity measures can promote cavity-nesting insects. However, when analysing separately, results indicated that wasps benefited from proximity to biodiversity measures while the species richness of natural enemies increased with increasing measures' area and bees did not react at all. The enhanced abundances of herbivore-predating wasps near biodiversity measures indicate that important pest control agents and possibly also pest control services can be enhanced by the implementation of AES. Another very important landscape feature, which affected abundance and species richness of cavity-nesting wasps and natural enemies was the proximity to forest. These findings emphasise the value of forest edges in meeting several habitat requirements of different insect groups. Forest edges provide floral food sources, nesting and overwintering habitat and an enhanced microclimate and landscape connectivity (Bianchi et al., 2006;Holzschuh et al., 2009;Magura et al., 2001;Montagnana et al., 2021). Thus, we argue that future AES should increasingly target the creation of woody habitats, such as forest edges or hedgerows, next to the promotion of measures solely enhancing flower availability in order to conserve cavity-nesting insects. Furthermore, future long-term recordings of insect abundances, species richness and their trophic interactions are needed in order to assess the efficiency of biodiversity measures in promoting farmland biodiversity.
Biodiversity benefits of habitat enhancements are often only visible after several years (Blaauw & Isaacs, 2014) as it might be also the case for the cavity-nesting bee populations in our study. Long-term monitoring of insects is therefore the cornerstone for the development and improvement of future biodiversity measures that successfully conserve insects and the services they provide.

CONFLICT OF INTEREST STATEMENT
There are no conflicts of interest to be declared among the authors of the manuscript.

DATA AVAILABILITY STATEMENT
The data that support the findings of this study is openly available in figshare https://doi.org/10.6084/m9.figshare.21932274.v1.