Impact of plant defense level variability on specialist and generalist herbivores

Most organisms are defended against others, and defenses such as secondary metabolites in plants vary across species, individuals, and subindividual organs. Plant leaves show an impressive variability in quantitative defense levels, even within the same individual. Such variation might mirror physiological constraints or represent an evolved trait. One important hypothesis for the prevalence of defense variability is that it reduces herbivory due to non-linear averaging (Jensen’s inequality). In this study, we explore the conditions under which this hypothesis is valid and how it depends on the degree of specialization of the herbivores. We thus distinguish between generalists, non-sequestering specialists, and sequestering specialists that are able to convert consumed plant defense into own defense against predators. We propose a plant-herbivore model that takes into account herbivore preference, predation pressure on the herbivores, and the three herbivore specialization strategies we consider. Our computer simulations reveal that defense level variability reduces herbivory by all three populations when nutrient concentration is strongly correlated with defense level. If the nutrient concentration is the same in all leaves, the plant benefits from high defense level variability only when the herbivores are specialists that show a considerable degree of preference for leaves on which they perform best.


Introduction
Plants are immobile and not able to physically escape herbivore attacks (Karban and Agrawal 2002;Karban and Baldwin 2007;Gutbrodt et al. 2012). Hence, plants have evolved mechanisms to deal with herbivory, namely (i) tolerance to herbivory, which means that herbivory does not affect plant fitness, for example, because of an increased net photosynthetic rate after herbivore damage (Strauss and Agrawal 1999) and (ii) the reduction of damage by defensive traits that increase resistance to herbivory (Karban et al. 1997;Strauss and Agrawal 1999 damage. These mechanisms can be categorized into (i) permanent constitutive defenses such as thorns, trichomes (Karban and Baldwin 2007;Lankau 2007), secondary metabolites (van der Meijden 1996; Karban and Baldwin 2007;Dimarco et al. 2012;Gutbrodt et al. 2012), or a higher toughness of the leaves (Karban and Baldwin 2007;Clissold et al. 2009;Dimarco et al. 2012) and (ii) temporary, inducible defenses (Karban and Baldwin 2007). Inducible defenses represent defensive responses that are activated following damage by herbivores and allow them to react to an altered extent of herbivory, e.g., by adapting the amount of defensive chemicals in the leaves (Karban et al. 1997;Karban and Baldwin 2007;Chen 2008;Gutbrodt et al. 2012).
Several studies found that the defensive traits underlying either of the defensive mechanisms can vary spatially and temporally in their number or magnitude (Karban et al. 1997;Herrera 2009;Siefert et al. 2015), whereby the temporal variation of constitutive defense traits is linked to plant development. Spatial variation of defenses occurs for instance when some leaves are more valuable than others for the plant (e.g., because of a higher nutrient level or a younger age) and are therefore better defended (Gutbrodt et al. 2012;Cao et al. 2018;Marsh et al. 2018).
The performance of herbivores on a defended plant depends on their ability to deal with the plant's defenses, and it changes considerably with the herbivore's degree of specialization (Ali and Agrawal 2012;Gutbrodt et al. 2012;Anstett et al. 2019). Generalist (polyphagous) herbivores feed on many plant families and grow well only on undefended and weakly defended leaves, while specialist (oligophagous) herbivores focus on one plant family whose members often have similar defense mechanisms (Agrawal 2007). Specialists are well adapted to the defense of their host plant family (Kliebenstein et al. 2002;Schoonhoven et al. 2005;Lankau 2007) and can therefore deal well with a wider range of plant defense concentration than generalists (Kliebenstein et al. 2002;Schoonhoven et al. 2005;Lankau 2007; Kaplan et al. 2014). Furthermore, herbivores have evolved offensive traits that increase the benefits of the herbivore feeding on its host plant (Karban and Agrawal 2002). One example is sequestration (Karban and Agrawal 2002): Sequestering specialists are able to convert the consumed plant defense chemicals into proper defense against predators leading to a reduction of predation risk (Despres et al. 2007;Dimarco et al. 2012), but this incurs higher metabolic costs (Björkman and Larsson 1991).
Numerous empirical and theoretical studies investigated plant-herbivore systems where herbivores differ in their degree of specialization (Van Tienderen 1991;Lankau 2007;Ali and Agrawal 2012;Gutbrodt et al. 2012). For example, Van Tienderen (1991) used a quantitative genetics model to investigate under which conditions selection favors specialists or generalists in two coupled habitats that select for different traits. One result was that generalists are favored when the difference of the optimal traits in the different habitats and the cost for adaptations are small, while specialists are favored when the cost for simultaneous adaptation is high (Van Tienderen 1991). Furthermore, several studies focused on the plant response to specialist and/or generalist herbivores (Lankau 2007;Ali and Agrawal 2012;Danner et al. 2018) in terms of temporary, induced defense (Karban et al. 1997;Tollrian and Harvell 1999) and in dependency of abiotic factors (Gutbrodt et al. 2012). They found that plant responses to herbivory caused by a generalist and a specialist may differ considerably (Lankau 2007;Gutbrodt et al. 2012;Danner et al. 2018) and that herbivore-induced plant volatile blends even allow inference on the history of, for instance, the diet breadth of herbivores that fed on this plant (Danner et al. 2018).
As a consequence, a few studies investigated the optimal defense strategy of a plant individual based on the value of a particular tissue for the plant (i.e., on an intra-individual scale) (McCall and Fordyce 2010). Others focused on the inter-individual scale and investigated the optimal defense strategy when plants are attacked simultaneously by specialist and generalist herbivores (van der Meijden 1996). These studies suggest that defense level variability is maintained due to contrasting optimal defense levels to deter generalists and specialists (van der Meijden 1996), so that the mean defense level of a plant population depends on the composition of its herbivore community.
An interesting alternative hypothesis suggests that trait variability per se can be beneficial for the plant because it affects herbivore performance due to non-linear averaging via Jensen's inequality (Ruel and Ayres 1999;Bolnick et al. 2011;Wetzel et al. 2016;Thiel et al. 2020). This mathematical theorem states that a concave downwards function (i.e., decreasing slope, negative curvature) applied on a mean of a set of points is larger or equal to the mean applied on the concave downwards function of these points (Jensen 1906). The opposite is true when considering a concave upwards function (i.e., increasing slope, positive curvature). Since herbivore performance depends on the relevant plant traits, the curvature of the herbivore performance function in dependence of plant defense level determines the per se effect of plant defense level variability. The performance function, in turn, depends on the ability of the herbivore to deal with the plant defense and is therefore different for generalists and specialists.
Several empirical studies measured the herbivore performance in dependence of plant defense, but they came to contradictory results. In a review, Ali and Agrawal (2012) synthesize current data to compare the differential elicitation of plant responses to specialist and generalist herbivores and to generate predictions for the performance of herbivores differing in their degree of specialization. They found that specialists have a concave downwards defense performance function, while generalists have a linear one (Ali and Agrawal 2012). Other meta-studies found more evidence for a concave upwards or a linear defense performance function than for a concave downwards one without distinguishing between specialists and generalists (Ruel and Ayres 1999), or found on average a linear defense performance function and no correlation between the curvature of the defense performance function and the niche breadth of the herbivores (Wetzel et al. 2016). A reason for these contradictory findings may be that plants adopt different defense mechanisms that vary in their effectiveness depending on the considered herbivore and the herbivore age (Elliger et al. 1976;Blüthgen and Metzner 2007;Despres et al. 2007;Dimarco et al. 2012;Jeude and Fordyce 2014). Which defensive trait is considered in which defense level interval can thus have a crucial impact on the shape of the performance function (Elliger et al. 1976;Blüthgen and Metzner 2007;Dimarco et al. 2012;Jeude and Fordyce 2014).
In a recent study, Thiel et al. (2020) have found that the curvature of the performance function alone is not sufficient to predict the per se effect of plant trait variability, because herbivore preference behavior allows herbivores to benefit from a larger variability of plant traits. Herbivore preference indeed represents an important behavioral strategy to respond to variation in the plant traits (Via 1986;Herrera 2009;Gripenberg et al. 2010;Gutbrodt et al. 2012;Mody et al. 2015) and is another example of herbivore offense (Karban and Agrawal 2002). Preference can appear in different forms: besides feeding preference for leaves with certain traits, which requires mobility to reach and compare appropriate leaves (Lubchenco 1978;Mody et al. 2007), herbivores can show oviposition preference for plant parts on which offspring performs well (Via 1986;Despres et al. 2007;Travers-Martin and Müller 2008;Herrera 2009). The extent of preference observed in herbivores depends for instance on the specialization degree (van Leur et al. 2008;Gutbrodt et al. 2012), the costs for preference (Thiel et al. 2020), and the abiotic environment of the resource changing its susceptibility to herbivore attacks (Gutbrodt et al. 2012).
It is still unknown how the preference behavior of herbivores with different specialization strategies affects their performance in the face of defense level variability. In this paper, we address this open question by investigating the per se impact of plant defense level variability on a herbivore population consisting of either generalists or non-sequestering or sequestering specialists that have comparable mobility and are able to show a preference. From this information, we deduce under which conditions defense level variability is per se beneficial for the plant and thus an evolutionary advantage. As several studies find that young leaves tend to have a higher defense and nutrient level than old leaves (Travers-Martin and Müller 2008; Gutbrodt et al. 2012;Cao et al. 2018;Marsh et al. 2018), we are particularly interested in the effect of this relationship between the defense and the nutrient level on the per se impact of plant defense level variability. We base our study on the plant-herbivore model proposed in the study by Thiel et al. (2020), which we extend by incorporating the different herbivore specialization strategies, and a correlation between the nutrient and the defense level of a leaf. Furthermore, we take into account that herbivores experience predation to ensure that sequestering defense has some use.
The questions that will be addressed are the following: Under what conditions does increased variability of defense levels lead to decreased herbivory? How does this effect differ between specialists and generalists, and how does it change when nutrient concentration changes more strongly with defense level, or when herbivore predators are present? Under what conditions is it advantageous for the herbivore to show a preference for leaves on which it performs best, despite the costs of preference?
The results will show that there is no simple connection between defense variability and the extent of herbivory, but that nevertheless an increased variability leads to reduced herbivory under a broad range of conditions.

Model
In our model, we focus on insect herbivores, since they are responsible for a substantial part of plant attacks (van der Meijden 1996;Poelman et al. 2008). These herbivores feed on a plant population whose leaves show a distribution p(z) of the defense level z. Our model can be applied to intra-or inter-individual defense level variability. The defense level may be correlated with the nutrient level n(z) of a leaf. We further assume that there is always enough consumable plant material such that competition for food is negligible.

Defense level distribution
For the defense level distribution p(z) among leaves, we assume a Gaussian distribution with a mean in the middle of the considered defense level interval z ∈ [0, z max ], i.e., at z = z max /2. The variance V S of this distribution determines the degree of heterogeneity of the leaves concerning their defense level. We normalize the distribution such that the integral over the considered defense level interval equals 1. We define the trait variability parameter such that S = 0 represents the case of zero variability, where all leaves have the same defense levelz, and S = 1 represents a uniform (flat) distribution over the considered defense level interval.

Correlation between defense and nutrient level
Young leaves often contain a higher nutrient and defense level than old leaves (Travers-Martin and Müller 2008; Gutbrodt et al. 2012;Cao et al. 2018;Marsh et al. 2018). The leaves of a plant thus may differ not only in their defense level z, but also in their nutrient level n. We therefore introduce a function n(z) that specifies how nutrient level n changes with defense level z. Hereby, we keep the mean nutrient levelz in the plant constant. We assume a simple linear relation between the defense and nutrient levels, with a positive parameter l that determines the size of the nutrient level interval, i.e., n ∈ [n(z)−lz , n(z)+lz]. Hence, for l = 0, all leaves contain the same nutrient concentration. Nutrient level variability among leaves increases with l and is correlated with that of the defenses.

Herbivore performance function
Herbivores with different specialization strategies differ in their capability to grow on leaves with a certain defense level z. We use herbivore performance to distinguish these different growth behaviors. The performance function f (z) is defined as the weight gain of a herbivore individual feeding on a leaf with defense level z (and the corresponding nutrient level n(z); cp. Eq. 2) from hatching to pupation. We denote the performance of a herbivore on an undefended leaf as f n (n), which depends on the nutrient concentration n in the leaf. In the following, we will refer to this function as nutrient performance function f n (n). With increasing plant defense level z, the performance of the herbivore decreases because of the costs for removing the defense material or for converting it into proper defense. Both generalist and specialist herbivores incur such costs, even though to a different extent (Ali and Agrawal 2012;Anstett et al. 2019). The benefits for sequestering defense (namely a decreased predation pressure) influence herbivore fitness and can outweigh these costs (s. Section 2). Thus, we define the performance function f (z) as where g(z, ν) ∈ [0, 1] describes the proportional growth deficiency as a function of the defense level z of the consumed leaf. In addition, the proportional growth deficiency depends on the parameter ν that models the costs for removing or converting consumed plant defense and will thus be used to distinguish the different specialization strategies. In the following, we will refer to this parameter as cost factor ν. We further discuss the nutrient performance function f n (n) and the proportional growth deficiency g(z, ν) in the following.

Nutrient performance function
To ensure that the generalist has the edge over the specialist under some condition, we assume that generalists perform better on undefended leaves than specialists. Since generalists have access to more resources than specialists, we need not include a competition term even when undefended leaves are few. Denoting the nutrient performance function of a specialist herbivore as f Spec n (n), we write the nutrient performance function of both specialists and generalists as with γ = 1 for specialists and γ > 1 for generalists. In the following, we will refer to the parameter γ as performance benefit factor. Table 1 gives the value γ = 2 actually chosen in our simulations. Several studies found that the nutrient performance function f n (n) of herbivores is on average concave downwards (Ruel and Ayres 1999;Wetzel et al. 2016). Figure 1 a shows our choice of the nutrient performance function f n (n) for a generalist and a specialist herbivore. Depending on the parameter l (cp. Eq. 2), the herbivores can experience varying nutrient level intervals, which are marked in Fig. 1a with highlighted boxes.

Proportional growth deficiency
We choose the proportional growth deficiency g(z, ν) such that the performance of generalists decreases fast and linearly with the defense level z (Ali and Agrawal 2012), while that of the two specialists decreases more slowly and has a downwards curvature (Ali and Agrawal 2012). Since the sequestering specialists incur higher costs, their performance function should reach zero at a lower value of z than that of the non-sequestering specialists.  1 a Nutrient performance function f n (n) of herbivores on undefended leaves. The highlighted boxes show the nutrient level intervals that herbivores can experience with l ∈ [0, 0.5, 1] (cp. Eq. 2). b Chosen performance function of a generalist (Gen) and sequestering (SS) and non-sequestering specialist (NsS) and the corresponding fitness W H (z) of a herbivore individual feeding on a leaf with defense level z in absence of predation pressure, i.e. a 0 = 0, when all leaves contain the same nutrient concentration, i.e., l = 0. c W H (z) (cp. Eq. 8) of a generalist (Gen) and sequestering (SS) and non-sequestering specialist (NsS) individual feeding on a leaf with defense level z (cp. Eq. 2) in the presence of predation (a 0 > 0). d, e Same as c, but now with a correlation (l > 0) between nutrient concentration and defense level. f Distribution (z) of herbivore individuals on leaves with defense level z (cp. Eq. 12) for different trait variability parameter S (cp. Eq. 1) and preference τ , for the case that all leaves contain the same nutrient concentration (i.e., l = 0), showing that with decreasing defense level variability and with increasing preference this distribution moves to the left, where performance is larger A function that satisfies these criteria with an appropriate choice of parameters is with z max being the largest considered defense level and the cost factor ν being larger than 0.2 for all three species (see Table 1). Figure 1b shows the performance functions of the generalist (Gen) and non-sequestering (NsS) and sequestering specialist (SS) for our choice of parameters (s. Section 2 for details) when all leaves contain the same nutrient concentration. We tested the impact of the effectiveness of plant defense against generalist herbivores in Appendix A. Furthermore, we tested other variants to describe the proportional growth deficiency g(z, ν), but this did not affect the main results qualitatively. We show this in Appendix B, where we choose a linear function g(z, ν) irrespective of the specialization degree.

Mean fitness
The mean fitness W H of a herbivore population is defined as the mean number of offspring per herbivore individual reaching reproductive age. Denoting the distribution of herbivore individuals on leaves with defense level z as (z) and the fitness of a herbivore individual feeding on a leaf with defense level z as W H (z), the mean population fitness can be expressed as When the herbivores are equally distributed on all leaves irrespective of their defense level, the distribution (z) of herbivore individuals on leaves with defense level z corresponds to the defense distribution normalized to the considered defense level interval, i.e., We write the fitness W H (z) of a herbivore individual feeding on a leaf with defense level z as with the number of offspring per unit of weight gain λ H , and the probability a(z) to be consumed by a predator. This probability is specified in the next subsection.

Probability to be consumed by a predator
We assume that the defense level of the herbivore can be perceived by the predator, for instance, because of an altered appearance of the herbivore, and thus decreases the probability to be consumed a(z) (cp. Eq. 8). Such alerting signals may involve aposematic colors and odors sequestered from their specific host plants (Nishida 2002).
Alternatively, indirect effects such as learning that certain species are unpalatable can explain the reduced fitness decrease on the population level. We denote the predator encounter rate as a 0 and choose a simple decreasing function a(z) that contains a parameter ϑ that controls the speed of this decrease, We can interpret ϑ as the effectiveness of the converted defense against predator attacks, Figure 1c-e show how the parameters a 0 and l affect the fitness function W H (z) given by Eq. 8 with the expression Eq. 3 for f (z) and Eq. 9 for a(z), demonstrating an advantage for the specialists when nutrient level correlates with defense level, and an additional advantage for sequestering specialists in the presence of predation.

Preference function
We define preference as the probability that an adult herbivore lays eggs on a leaf with a defense level z when encountering it. We assume a Gaussian function p (z) that is centered at the fitness maximum and has a variance V p . We define the preference parameter such that τ → 0 stands for no, and τ → 1 for full preference. The latter limit describes the unrealistic case that the preference function is a delta distribution which means that just those leaves are used for oviposition on which the herbivore population reaches its fitness maximum. Instead of oviposition preference, the preference function can also indicate a feeding preference. In this case, the preference function p (z) describes the probability that a herbivore feeds on a leaf with defense level z when encountering it.
When herbivores show preference, the distribution (z) of herbivores on leaves with defense level z also depends on the preference function p (z). As we assume that intraspecific competition is negligible, the distribution is obtained by multiplying the preference function with the leaf abundance and normalizing the result, i.e., Figure 1f shows the distribution (z) of herbivore individuals on leaves with defense level z for varying trait variability parameter S and varying preference τ .
Herbivore preference includes energetic costs for finding appropriate leaves. We take this cost into account in the form of a mass loss of the herbivore. As in the study by Thiel et al. (2020), we describe the relative mass loss by a function that allows us to interpolate between 0 and 1 in different ways by changing the parameters of this function. In this way, we can make sure that unrealistic extreme cases of the preference function, such as a delta distribution, do not lead to the survival of the herbivore population. We thus define the relative mass loss due to preference as where larger μ means that the cost of preference is larger and large k means that the costs are mainly incurred when preference is large. Including this cost changes the expression Eq. 6 for the mean fitness W H of a herbivore population to where normalizes the distribution (z) of herbivore individuals on leaves with defense z. All model equations are summarized in Table 2.

Choice of parameter values
We choose the defense level range to be z ∈ [0, 10], such that the mean defense level isz = 5. We further assume that the nutrient level of leaves with an average defense level is Table 2 Synopsis of the model equations. They depend on the parameters z (defense level), τ (herbivore preference), and a 0 (predator encounter rate)

Mean fitness
Fitness of herbivore individual Probability to be consumed Relative mass loss due to preference β = The values of the other parameters are fixed and are given in Table 1. The dependence on z of the nutrient performance function f Spec n is shown in Fig. 1 n(z) = 5, such that the nutrient level varies in the range n ∈ [5(1 − l), 5(1 + l)], with the correlation parameter l ∈ [0, 1] (cp. Eq. 2). By choosing a suitable correlation parameter l and appropriate units for the defense and the nutrient level, every defense and nutrient level interval can be mapped onto the considered ones. Hence, the results are not sensitive to this choice. Since we want to investigate the per se effect of defense level variability, we keep the mean defense level constant and just alter the trait variability parameter S, i.e., the variance of the defense level distribution.
For the cost of preference, Eq. 13, we choose μ = 1 and k = 2, such that it is worth to have preference, but the herbivore incurs considerable costs for high preference (Thiel et al. 2020). In order to find an appropriate value for the number of offspring per unit of weight gain reaching reproductive age, λ H , we choose the forest tent caterpillar (Malacosoma disstria) as model species as in a study by Thiel et al. (2020). Malacosoma disstria has a typical mass gain until pupation of 300 mg and produces around 300 eggs with a survival rate of 1/100 resulting in a number of offspring reaching reproductive age per growth unit of λ H = 0.01 1 mg (Hemming and Lindroth 1999). These parameters are summarized in Table 1(b). However, these parameter values only have a quantitative impact on the fitness landscape of the herbivore population, but not a qualitative one.

Fig. 2
Mean fitness (i.e., the mean number of offspring per herbivore individual reaching reproductive age; cp. Eq. 14) of a population of generalists (left) or non-sequestering specialists (middle) or sequestering specialists (right) as a function of herbivore preference τ (cp. Eq. 11) and the trait variability parameter S (cp. Eq. 1). The predator encounter rate a 0 (cp. Eq. 9) increases from the top to the bottom row. The blue line indicates the optimal herbivore preference for a given trait variability parameter S, i.e., the preference τ for which herbivore fitness is maximized

Results
We divide our investigation into two parts. In the first step, we assume that each leaf contains the same nutrient concentration, i.e., l = 0 (cp. Eq. 2) and we then analyze whether defense level variability is per se beneficial for the plant considering herbivores with different specialization strategies. In the second step, we consider a positive correlation between the nutrient and the defense level in a leaf, i.e., l > 0 (cp. Eq. 2). We thus investigate the per se impact of a combined defense and nutrient level variability on herbivore fitness.

Per se impact of defense level variability
We first consider the situation that the plant leaves do not differ in their nutrient concentration, i.e., l = 0 (cp. Eq. 2). Figure 1c shows that while the non-sequestering specialist and the generalist have the largest fitness values on undefended leaves, the sequestering specialist maximizes its fitness on weakly defended leaves in the presence of predation (i.e., for a 0 > 0).
Our results for the population fitness as a function of the preference and plant trait variability parameter are shown in Fig. 2 in the absence and presence of predation. The white region indicates where the herbivore fitness is below 1, which means that the population cannot persist as the mean number of offspring per individual is less than 1. The blue solid line indicates the optimal herbivore preference, i.e., the preference that maximizes herbivore fitness, for a given trait variability parameter S.
From the figure, we can distinguish the following trends: -The fitness of all three populations has its global maximum (i.e., its darkest color) when defense level variability is largest, i.e., S = 1, and preference has a suitable intermediate value. This is plausible since individual fitness has its maximum on undefended leaves, and since large variability as well as nonzero preference leads to a larger proportion of herbivores feeding on leaves with low defense level (see Fig. 1f). -In the presence of predators (i.e., for a 0 = 0), the mean population fitness is smaller than that in the absence of predators, as can be seen from the lighter colors in the second row. The fitness decrease is the smallest for sequestering specialists, showing the advantage of sequestering defenses in the presence of predators. The figure shows also that for our choice of parameters, the sequestering specialists have higher fitness than the non-sequestering specialists in the presence of predators, but a smaller fitness in the absence of predators. -The generalist population has for all values of defense level variability a larger optimal preference than the two specialist populations, as can be seen from the blue line that is to the right of those of the specialists. This can be ascribed to the fact that generalist fitness decreases strongly with increasing defense concentration. Similarly, the optimum preference of the sequestering specialist is for all values of S higher than that of the non-sequestering specialist because of the steeper decline of fitness with defense concentration. -When preference is low (i.e., τ is small), fitness increases with defense level variability for the generalist, but decreases for the two specialists. This is a consequence of Jensen's inequality: For both specialists, the performance function is concave downwards, but it is linear and bends left (i.e., upwards) for the generalist. -When the preference is larger, also the specialists show a fitness increase with increasing defense level variability. Jensen's inequality does not give the correct prediction in this case because preference can convey a benefit from a broader distribution by choosing suitable leaves (Thiel et al. 2020). Consequently, large plant defense level variability reduces herbivory only when the herbivores are specialists that have a low preference.
From Fig. 2, we can also draw conclusions about the best strategies of plants and herbivores in an evolutionary scenario where the level of herbivore preference can change with time in the direction that increases herbivore fitness, and the defense level variability of the plant can change with time in the direction that reduces herbivory, i.e., increases plant fitness. If we assume that the generation time of the herbivores is much shorter than that of the plants, and that plant defenses are constitutive and thus change slowly during a plant generation, herbivore preference will move horizontally towards the blue line on the time scale of several herbivore generations. On an even larger timescale, when defense level variability evolves also, it moves along the blue line towards lower herbivory (i.e., lighter colors), and variability will decrease.
This of course presumes that preference as well as defense level variability is fully under genetic control and does not depend on factors that are ignored in our two-species models. Since these considerations still ignore competition, we must assume furthermore that there are external factors that regulate the size of an evolving population such that it remains limited.

Per se impact of a combined defense and nutrient level variability
Now, we investigate how a correlation between defense and nutrient level affects the results. We assume a fixed predator encounter rate of a 0 = 0.25, but we checked that a variation in the predator encounter rate does not change the results qualitatively.
A comparison of Fig. 1c-e shows that the fitness maxima of all three populations move to higher defense levels with increasing degree of correlation l between defense and nutrient concentration, with the maximum at higher z values when the performance function decreases more slowly. Figure 3 shows the mean population fitness (s. Eq. 14) in dependence of herbivore preference value and defense level variability. The white region denotes again that species cannot survive, and the blue line marks again optimum preference for a given defense level variability.
This figure shows the following trends: -With increasing degree of correlation l between defense and nutrient level, the mean fitness of the generalist population decreases considerably, while that of the specialists decreases much less. This must be due to the fact that little defended leaves contain less nutrients for larger l. Generalists can then barely consume leaves with higher nutrient content, while specialists can. -For the two specialist populations, the global fitness maximum moves from high defense level variability to low variability, and from nonzero preference values to zero preference, when l increases. The reason is that the fitness maximum moves to intermediate defense levels (see Fig. 1f), where the distribution p(z) of leaves has its maximum. A smaller variability then implies that there are more of these optimal leaves. -In subfigure (h), the fitness of the non-sequestering specialist decreases with increasing plant defense level variability even when preference is strong. This means that the fitness maximum must be very close to the frequency maximum of the nutrient distribution p(z), so that larger variability always decreases fitness.
Again, it is interesting to discuss an evolutionary scenario: If herbivores adjust their preference value much faster than the plant to its variability, preference evolves along horizontal lines towards the blue line. If plant trait variability evolves on a slower time scale and such that herbivory is reduced, the outcome is now a high variability when dealing with specialist herbivores, and when there is a large degree of correlation between defense and nutrient level.
In Appendix B, we show that this result remains valid when the performance functions of the specialist herbivores are linear as found by Wetzel et al. (2016) as long as specialists can cope well with the defenses of their hosts (Kliebenstein et al. 2002;Blüthgen and Metzner 2007;Lankau 2007), such that they perform just slightly worse Fig. 3 Mean fitness (i.e., the mean number of offspring per herbivore individual reaching reproductive age; cp. Eq. 14) of a population of generalists (left) or non-sequestering (middle) or sequestering specialists (right) as a function of herbivore preference τ (cp. Eq. 11) and the trait variability parameter S (cp. Eq. 1). The correlation parameter of the nutrient and defense level in the leaves l (and thus the nutrient level variability; cp. Eq. 2) increases from top to bottom row. The blue line indicates the optimal herbivore preference for a given trait variability parameter S, i.e., the preference τ for which herbivore fitness is maximized on medium-defended leaves than on undefended leaves. In this case, specialist herbivores can benefit from feeding on medium-defended leaves since the performance increase due to the higher nutrient concentration outweighs the performance loss caused by the higher defense level in the leaves.

Discussion
In the present paper, we proposed a plant-herbivore model that includes (intra-or inter-individual) plant defense level variability, herbivore preference, and predation pressure on the herbivores. This model is a considerable extension of the basic model introduced in the study by Thiel et al. (2020). We investigated the impact of the mentioned features on the fitness of insect herbivores with different specialization strategies (i.e., generalist and sequestering and nonsequestering specialist) (Ali and Agrawal 2012). We further included a correlation between the defense and the nutrient level in a leaf. Our focus was on the per se effect of defense level variability of the plant (Bolnick et al. 2011;Wetzel et al. 2016). Jensen's inequality predicts that defense level variability is per se beneficial for the plant when herbivore performance is a concave downwards (i.e., negative curvature, decreasing slope) function of the defense level while the opposite is true for a concave upwards (i.e., positive curvature, increasing slope) performance function (Bolnick et al. 2011;Wetzel et al. 2016).
The form of the performance functions of generalist and sequestering and non-sequestering specialist herbivores we use agrees qualitatively with the considerations by Ali and Agrawal (2012). For sequestering specialists, herbivore performance in the study by Ali and Agrawal (2012) corresponds to our definition of the fitness W H (z) of a herbivore individual feeding on a leaf with defense level z.
We find that the plant suffers more herbivory from generalists when defense level variability is larger, irrespective of predation and the degree of nutrient level variability. This agrees with the predictions based on Jensen's inequality (Jensen 1906;Thiel et al. 2020) as the generalist performance function decays linearly and has a sharp bent to the left when reaching zero, which means that it is a concave upwards function. However, generalists must show a considerable degree of preference for leaves on which they perform well; otherwise, generalist fitness is low.
We find further that generalists require a larger degree of preference than specialists in order to optimize their fitness. This means that the higher the effectiveness of defense against a herbivore, the higher is the extent of herbivore preference for leaves on which herbivore fitness is maximal. This agrees with empirical studies finding that the strength of herbivore preference increases with the deterrent the effectiveness of plant defense (Bellota et al. 2013;Jeude and Fordyce 2014), although Jeude and Fordyce (2014) found no clear correlation. Additionally, van Leur et al. (2008) found that the larvae of a generalist herbivore show a strong preference for leaves on which they perform best while the specialist herbivore has no preference.
Our data show also that the fitness of the generalist herbivore decreases considerably with increasing predator encounter rate a 0 (s. Fig. 2), or when nutrient concentration is strongly correlated with defense level (s. Fig. 3). This fits together with the observation that several plants produce indirect plant defense substances that attract enemies of the herbivores (Kahl et al. 2000;Ali and Agrawal 2012) and with the finding by Kaplan et al. (2014) that the presence of predators of the herbivores reduces plant damage.
While large defense level variability does not confer an advantage against generalist herbivores, it is beneficial for the plant when it is attacked by specialist herbivores that show a low preference. This can be explained by Jensen's inequality since both specialist herbivores have concave downwards performance functions (Jensen 1906;Wetzel et al. 2016;Thiel et al. 2020).
However, when the specialist populations show considerable preference, the plant suffers from large defense level variability in contrast to the predictions based on Jensen's inequality. This was demonstrated by an analytical calculation by Thiel et al. (2020). The reason is that preference allows herbivores to feed mainly on leaves on which they have a high fitness (Gripenberg et al. 2010;Mody et al. 2015), i.e., on weakly defended leaves. But with decreasing plant defense level variability, less weakly defended leaves are present.
In contrast, when the defense level in a leaf is positively correlated with its nutrient level, we find that defense level variability is per se beneficial for a plant that is attacked by a non-sequestering specialist (independent of preference) or a sequestering specialist that shows optimal preference. As a positive correlation between the nutrient and the defense level of a leaf decreases the fitness of generalists, the plant mainly suffers herbivory from the specialists. Indeed, several studies found that most orders of herbivorous insects are dominated by specialists (Bernays and Graham 1988;Schoonhoven et al. 2005;Ali and Agrawal 2012) and that young leaves contain a larger defense and nutrient concentration than old leaves (Gutbrodt et al. 2012;Cao et al. 2018;Marsh et al. 2018) (although there are counterexamples (Quintero and Bowers 2018)).
We neglected the intraspecific competition in our study. Although this can be the major regulating factor for some herbivore populations, others are mainly top-down controlled (Liebhold et al. 2000;Price et al. 2011). Furthermore, competition can be accounted for indirectly in our model by increasing the costs of finding appropriate leaves or by shifting the distribution of herbivores towards leaves with higher defense levels. This, however, does not affect our results qualitatively.
Consequently, our study confirms that under a wide range of conditions a combined variability of defense and nutrient levels reduces herbivory and therefore might be responsible for the widespread occurrence of this variability (Herrera 2009;Denno 2012;Siefert et al. 2015).
Indeed, Stockhoff (1993) found a reduced pupal mass of gypsy moth larvae that receive a diet of variable nitrogen concentrations and suggest that this is, in part, caused by the non-linear relationship between food utilization efficiency and nitrogen concentration.
To conclude, our study revealed under which conditions defense level variability is per se beneficial or disadvantageous for a plant that is attacked by a specialist or a generalist herbivore population. In particular, we demonstrated the important role of herbivore preference and of a positive correlation between the defense and the nutrient level in a leaf for these results. Although some studies found that young leaves contain a larger nutrient and defense level than old leaves (Gutbrodt et al. 2012;Cao et al. 2018;Marsh et al. 2018), we could not find a study that investigated whether the nutrient and the defense level of a leaf are positively correlated independently of the age of the leaf. Empirical work concerning this question is therefore needed.
On the theoretical side, due to the complementary per se effect of defense level variability on specialists or generalists, a good next step would be to investigate the best plant strategy when the plant is simultaneously attacked by specialists and generalists that compete for food. Our investigation did not yet consider the effects arising from the limited availability of plants and the resulting interspecific competition between the generalist and the specialist herbivores. Including this competition in future models may further reveal under which conditions generalist and specialist herbivores that compete for the same host plant population can survive and coexist.

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

Appendix A: Impact of the effectiveness of plant defense
Plant defenses can vary in their effectiveness to deter herbivores. Hence, we test whether our results also apply when considering a defense chemical that is less effective in deterring generalist herbivores such that the generalist can grow on average-defended leaves (z = 5). In order to achieve this, we change the proportional growth deficiency defined in Eq. 5 to The resulting fitness functions W H (z) of a generalist individual feeding on a leaf with defense level z are shown in Fig. 4. The fitness function W H (z) in Fig. 4a displayed in red color qualitatively corresponds to the performance function. Figure 5 shows the mean fitness (s. Eq. 14) of a generalist population that is less effectively deterred by plant defense in response to the plant trait variability parameter S (s. Eq. 1) and the herbivore preference τ (s. Eq. 11) for  Mean fitness (i.e., the mean number of offspring per herbivore individual reaching reproductive age; cp. Eq. 14) of a population of generalists that is less effectively deterred by the plant defense as a function of herbivore preference τ (cp. Eq. 11) and the trait variability parameter S (cp. Eq. 1) for varying predator encounter rate a 0 (cp. Eq. 9) ((a),(c),(e)) and correlation parameter l (s. Eq. 2) ((b),(d),(f)). The blue line indicates the optimal herbivore preference for a given trait variability parameter S, i.e., the preference τ for which herbivore fitness is maximized different predator encounter rates a 0 (s. Eq. 9) ((a),(c),(e)) and correlation parameters l (s. Eq. 2) ((b),(d),(f)). The blue solid line indicates the optimal herbivore preference, i.e., the preference that maximizes herbivore fitness for a given trait variability parameter S.
We find qualitatively the same results as in Sections "Per se impact of defense level variability" and "Per se impact of a combined defense and nutrient level variability". The generalist reaches the highest fitness values and has thus the largest impact on the plant, when plant defense level variability is high (i.e., small S; cp. Eq. 1), the predation pressure is low, and when all leaves contain the same nutrient concentration, whereby the generalist population reaches even higher fitness values under these conditions (compared to Sections "Per se impact of defense level variability" and "Correlation between defense and nutrient level") as being less effectively deterred by the plant defense. Hence, the generalist benefits from large defense level variability irrespective of the predator encounter rate a 0 and the correlation parameter l.
In contrast to the findings in Section "Per se impact of defense level variability" and "Correlation between defense and nutrient level", optimal preference of the generalist population decreases with decreasing plant defense level variability S when S < 0.3. As the generalist can grow on medium-defended leaves (z ≈ 5), it is not worth to take the high cost for searching for weakly defended leaves when plant defense level variability is low, which means that most leaves have an intermediate defense level.

Appendix B: Impact of the functional form of the proportional growth deficiency
In their meta-study, Wetzel et al. (2016) found that the defense performance function is in average linear and no correlation between the curvature of the defense performance function and the niche breadth of the herbivores. We hence test the robustness of our results when both generalist and specialist have a linear defense performance function. Hence, we assume that the proportional growth deficiency g(z, ν) is a linear function independent of the specialization strategy of the herbivore population. In order to take into account that specialists have evolved effective mechanisms Table 3 Cost factor ν for a generalist, a sequestering, and a non-sequestering specialist assuming a linear function for the proportional growth deficiency g(z, ν) (cp. Eq. 16)

Generalist
Non-sequestering specialist Sequestering specialist Cost factor ν 3 0.5 0.75 to cope with the defenses of their hosts in contrast to generalists (Kliebenstein et al. 2002;Blüthgen and Metzner 2007;Lankau 2007), we assume that the costs for dealing with plant defense that the considered herbivore population has to take determine the absolute value of the slope of g(z, ν).
A simple function that can satisfy these assumptions by an appropriate choice of parameters is Fig. 6 Fitness W H (z) (cp. Eq. 8) of a generalist (Gen) and sequestering (SS) and non-sequestering specialist (NsS) individual feeding on a leaf with defense level z assuming linear functions for the proportional growth deficiency g(z, ν) (cp. Eq. 16). In the left column, we vary the correlation parameter l (cp. Eq. 2), in the right column the predator encounter rate a 0 is varied (cp. Eq. 9) with the maximum considered defense level z max and the cost factor ν. We choose the cost factor ν such that specialist herbivores can deal well with a wide range of defense concentrations (s. Table 3). Figure 6 shows the resulting performance functions (b) and the corresponding fitness functions W H (z) for varying predator encounter rate a 0 and correlation parameter l considering generalist (Gen) and sequestering (SS) and non-sequestering specialist (NsS) herbivores, respectively. When the leaves differ in their nutrient level (i.e., l > 0), the fitness functions (and thus the performance functions) are concave downwards independent of the specialization strategy. Figure 7 shows the mean fitness (s. Eq. 14) of a herbivore population consisting of generalists ((a),(d),(g)) or non-sequestering ((b),(e),(h)) or sequestering specialists ((c),(f),(i)) that have linear defense performance functions in response to the plant trait variability parameter S (s. Eq. 1) and the herbivore preference τ (s. Eq. 11) for different values of the correlation parameter l (s. Eq. 2). The white region marks where the herbivore fitness is below 1, which means that the population would go extinct in the long-term limit. The blue solid line indicates the optimal herbivore preference, i.e., the preference that maximizes herbivore fitness for a given trait variability parameter S.
When all leaves contain the same nutrient concentration, specialist herbivores that have preference benefit from high defense level variability (in contrast to the findings of Section 2 for τ > 0 due to the linear performance function (Thiel et al. 2020)). This is illustrated by the color change from lighter to darker colors with increasing defense level variability S in Fig. 7. The same is true when the specialists show optimal preference in concert with the results of Section 2.
However, when nutrient level variability is high (i.e., l = 1), specialist herbivores that show optimal preference benefit from low defense level variability. Hence, the plant reduces the impact of specialist herbivores by having large defense and nutrient level variability. We hence find the qualitatively same results as in Section 2. Fig. 7 Mean fitness (i.e., the mean number of offspring per herbivore individual reaching reproductive age; cp. Eq. 14) of a population of generalists (left) or non-sequestering (middle) or sequestering specialists (right) as a function of herbivore preference τ (cp. Eq. 11) and the trait variability parameter S (cp. Eq. 1) under the assumption of linear functions for the proportional growth deficiency g(z, ν) (cp. Eq.16).
The correlation parameter of the nutrient and defense level in the leaves l (and thus the nutrient level variability; cp. Eq. 2) increases from top to bottom row. The blue line indicates the optimal herbivore preference for a given trait variability parameter S, i.e., the preference τ for which herbivore fitness is maximized