Genetic Variation in Sexual Size Dimorphism Is Associated with Variation in Sex-Specific Plasticity in Drosophila

The difference in body size between females and males, or sexual size dimorphism (SSD), is ubiquitous, yet we have a poor understanding of the developmental genetic mechanisms that generate it and how these mechanisms may vary within and among species. Such an understanding of the genetic architecture of SSD is important if we are to evaluate alternative models of SSD evolution, but the genetic architecture is difficult to describe because SSD is a characteristic of populations, not individuals. Here, we overcome this challenge by using isogenic lineages of Drosophila to measure SSD for 196 genotypes. We demonstrate extensive genetic variation for SSD, primarily driven by higher levels of genetic variation for body size among females than among males. While we observe a general increase in SSD with sex-averaged body size (pooling for sex) among lineages, most of the variation in SSD is independent of sex-averaged body size and shows a strong genetic correlation with sex-specific plasticity, such that increased female-biased SSD is associated with increased body size plasticity in females. Our data are consistent with the condition dependence hypothesis of sexual dimorphism and suggest that SSD in Drosophila is a consequence of selection on the developmental genetic mechanisms that regulate the plasticity of body size.


Introduction
Sexual dimorphism refers to the condition where traits differ between males and females. Sexual size dimorphism (SSD), the difference in body size between males and females of a species, is perhaps the most familiar and widespread form of sexual dimorphism. SSD is extremely variable among species regardless of their average size and varies in both direction and magnitude (Blanckenhorn et al. 2006;Fairbairn 2016). For example, most mammals and birds have male-biased SSD, where males are larger than females (Lindenfors et al. 2007;Székely et al. 2007), whereas insects typically exhibit female-biased SSD (Blanckenhorn et al. 2007b). SSD is also highly evolutionarily labile, even among closely related species and populations within species (Butler et al. 2000;Pearson et al. 2002;Cox and Calsbeek 2010;Rohner et al. 2017), suggesting that there is considerable intraspecific genetic variation in SSD on which selection can act. While numerous hypotheses have been proposed regarding the selective pressures that might give rise to SSD (Andersson 1994;Fairbairn 2007), the developmental genetic mechanisms that are the target of these selective agents remain largely unknown. This represents a substantial gap in our understanding of the evolution of SSD, since knowing the targets of selection could provide insight regarding the modes of selection favoring sex-specific changes in body size and how the developmental mechanisms that generate SSD might respond to such selection. Hampering efforts to fill this knowledge gap is the challenge of describing genetic variation in SSD within a population, since SSD cannot be measured for an individual.
While intraspecific variation in SSD is likely due to genetic differences in SSD among populations, it may also be a consequence of sex-specific differences in how body size responds to environmental variation, a phenomenon called sex-specific plasticity (Pigliucci 2005;Stillwell et al. 2010). Environmental variation can account for more than 70% of variation in body size within populations (Réale et al. 1999;Jarrett et al. 2017), and if males and females differ in how much the environment affects body size, this will generate variation in SSD expression across populations in different environments. The existence of sex-specific plasticity may appear to hamper efforts to describe genetic variation in SSD within a population, since the presence of sex-specific plasticity means that estimates of genetic variation in SSD will depend on the environmental conditions in which SSD is measured. Nevertheless, several adaptive hypotheses explaining the evolution of sexual dimorphism for traits used by males to attract or compete for females suggest that evolution of sexual dimorphism is associated with corresponding sex-specific differences in the size plasticity of the dimorphic trait (Andersson 1986;Rowe and Houle 1996;Bonduriansky and Rowe 2005;Bonduriansky 2007;Rohner et al. 2017). If the same were true for sexual dimorphism of body size, we should consider sex-specific plasticity when exploring the genetic basis of SSD (Stillwell et al. 2010;Rohner et al. 2017).
Previous studies have established a correlative relationship between sexual dimorphism of sexually selected traits and sex-specific plasticity of those traits. One approach taken by these studies has been to explore the relationship between sexual dimorphism and sex-specific plasticity for different traits within species. For example, in Prochyliza xanthostoma and Telostylinus angusticollis flies, the more sexually dimorphic a trait, the greater the sex-specific plasticity of the trait (Bonduriansky and Rowe 2005;Bonduriansky 2007). A second approach has been to explore the relationship between sexual dimorphism and sex-specific plasticity in the same trait among species; this approach also reveals a positive correlation between sexual dimorphism and sex-specific plasticity (Baker and Wilkinson 2001;Rohner and Blanckenhorn 2018).
Similar approaches have been used to study the relationship between sex-specific plasticity and SSD of body size. For example, in arthropods, where SSD is typically female biased, there is a general trend for body size to be more plastic in females than in males (Teder and Tammaru 2005;Stillwell et al. 2010). Among the few arthropod taxa with male-biased SSD, body size appears to be more plastic in males than in females (Rohner et al. 2017). In birds and mammals, where SSD is also typically male biased, the trend is again for males to be more plastic (Sheldon et al. 1998;Badyaev 2002). Together, these findings indicate a positive correlation between SSD and sex-specific plasticity across diverse taxa.
One of the limitations of these correlational studies is that they do not address causation. Because sex-specific plasticity will generate SSD under at least some environmental conditions, it is possible that SSD evolves because of sex-specific plasticity evolution. Under this hypothesis, selection for SSD and selection for sex-specific plasticity targets the same developmental mechanisms, and therefore pleiotropic loci are predicted to control both SSD and sex-specific plasticity (Bonduriansky 2007). In contrast, because SSD can evolve without sex-specific plasticity, the latter can evolve after the former, with selection on each targeting different developmental mechanisms and different loci (Andersson 1986). Identifying the proximate mechanisms that underlie SSD and sex-specific plas-ticity allows us to distinguish between these two hypotheses. However, this elucidation is daunting: it requires functional studies that target candidate genes and is made even more complex by the fact that both phenomena may be impacted by factors that affect growth rate, growth duration, and mass loss at multiple stages of development. A complementary approach is to determine whether SSD and sex-specific plasticity are genetically correlated among individuals within a species, beyond what would be expected to result from linkage disequilibrium. If found, the patterns of these correlations can then be interpreted in the context of current understanding of the mechanisms that regulate growth and size plasticity to infer the developmental and evolutionary relationships between SSD and sex-specific plasticity. This approach presents its own challenge however, since SSD and sex-specific plasticity are characteristics of populations and cannot be measured in individuals. This challenge can be circumvented by measuring SSD and sex-specific plasticity in sets of genetically distinct lineages where all individuals within a lineage are genetically identical except for sex.
In this study, we explore the genetic architecture of SSD and sex-specific plasticity using 196 isogenic Drosophila melanogaster lineages. Using variation in access to food during growth to generate variation in body size within lineages, we describe patterns of variation in SSD and sexspecific plasticity and investigate whether they are genetically correlated. We found considerable variation for SSD among genotypes and determined that variation in SSD is tightly genetically correlated with variation in sex-specific plasticity. Since linkage disequilibrium drops rapidly with distance in these lineages (Prado et al. 1989;Feder et al. 2012;Mackay et al. 2012), such a genetic correlation supports the hypothesis that common mechanisms regulate both sex-specific plasticity and SSD in Drosophila. Because the developmental mechanisms that regulate plasticity of body size are well understood (Gokhale and Shingleton 2015;Vea and Shingleton 2020), this finding has important implications both for understanding the developmental basis of SSD regulation and for understanding how selection may target these mechanisms to generate evolved changes in SSD.

Fly Stocks
Flies come from the Drosophila Genetic Reference Panel (DGRP), consisting of more than 200 inbred Drosophila melanogaster lineages generated from a natural population in Raleigh, North Carolina, after 20 generations of full-sib mating (Mackay et al. 2012). Each lineage discussed in this article refers to a specific isogenic line in the DGRP with a unique genotype.

Starvation Treatment and Measurement
We collected data from 196 DGRP lineages. For each lineage, flies were reared following previously publish protocols (Stillwell et al. 2011(Stillwell et al. , 2016Myers and Frankino 2012). Eggs were collected over 12-20 h and transferred in lots of 50 into 7 mL of fly food, and the larvae were reared at 227C in standard cornmeal-molasses medium until the starvation treatment was applied. Larvae were removed from food at precisely timed developmental stages and starved starting at either 0-24 or 24-48 h before pupation to generate variation in body size. Because larvae stop feeding approximately 24 h before pupation , larvae removed from the food 0-24 h before pupation were essentially allowed to feed ad lib. and are referred to as "fed" flies. In contrast, larvae removed from the food 24-48 h before pupation were starved during the period when adult body size is affected by nutrition (Shingleton et al. 2005) and are referred to as "starved" flies. After being removed from the food, larvae were transferred to an empty vial containing a wet cotton plug and left until pupariation. To allow us to associate each adult fly with its pupal case after eclosion, pupae were transferred to individual 2.5-mL Eppendorf tubes with a small puncture in the top for gas exchange. After flies emerged from their pupal cases, they were sexed, and the pupal case was imaged and size quantified using semiautomated software developed in the Shingleton lab (Shingleton et al. 2009). We used area of the pupal silhouette (dorsal view) as a proxy for adult body size (Stillwell et al. 2011(Stillwell et al. , 2016Myers and Frankino 2012). Flies were collected in nine temporal blocks, with five lineages repeated across all blocks to serve as a control.

Statistical Analyses
We collected data from 15,733 flies (7,662 females and 8,071 males; 8,593 fed and 7,140 starved) across the 196 lineages. All analyses were conducted in R (ver. 4.0.3), and the script and data used in the analyses are provided in the Dryad Digital Repository (https://doi.org/10.5061/dryad .vdncjsxzs; Shingleton et al. 2023). Before analysis, body size measurements were log transformed to ensure scale invariance across the full range of body sizes (Green et al. 2009).
We used a mixed linear model (R package lme4; Bates et al. 2014) to test for genetic variation in SSD and sexspecific plasticity. For SSD, we used only the data from the fed flies and fitted the following mixed model equation (MME): where B is body size, S is sex, L is lineage (random factor), K is block (random factor), and ε is error. The two models differ only in whether there is random variation in the effect of sex on body size among lineages (S#L; model 1) or not (model 2)-that is, whether SSD varies among lineages. We compared the models using both a log-likelihood ratio test and parametric bootstrapping. For sex-specific plasticity, we used the data from the fed and starved flies and fitted the following MME: where D is diet (fed or starved). The two models differ in whether there is random variation in the interaction between the effects of sex and diet on pupal size among lineages (S#D#L; model 3) or not (model 4)-that is, whether sex-specific plasticity varies among lineages. Again, we compared the models using a log-likelihood ratio test and parametric bootstrapping. A major challenge to analyzing variation and covariation in SSD and sex-specific plasticity among isogenic lineages (or indeed populations, species, or any other group) is that they are characteristics of groups rather than individuals. One solution is to use estimated body sizes-for example, means or best linear unbiased predictions-of fed and starved males and females in each lineage to calculate summary indexes (e.g., SSD, sex-specific plasticity) for that lineage, which can then be used to explore genetic correlations between indexes among lineages. Problematically, these estimated body sizes do not capture the uncertainty of measurements within each lineage, which will cause anticonservative estimates of statistical significance for genetic correlations using indexes based on these estimates (Postma 2006;Hadfield et al. 2010).
To incorporate this uncertainty in our analyses, we adapted the methods of Grieshop et al. (2021). We modeled the female-male-fed-starved (co)variance matrix for body size among lineages, G: where the matrix elements are estimated variances for fed (f) and starved (s) female (F) and male (M) body sizes on the diagonal and estimated covariances off the diagonal. This matrix resembles the G matrix used to explore genetic and environmental correlations among traits (Lande 1979;Arnold 1992;Arnold et al. 2008), with the difference that the trait is the body size expressed by a genotype in fed and starved females and males. The matrix therefore captures variation among genotypes in the sex-specific effects of diet on body size. The G matrix was modeled as a general linear mixed effects model (GLMM) using Bayesian Markov chain Monte Carlo (MCMC) simulations in the MCMCglmm package (Hadfield 2010) in R (referred to as MCMCglmm). The full GLMM is where G captures the sex-by-diet-by-line interaction. The model was run for 220,000 iterations with a burn-in of 20,000 and a thinning interval of 200 after burn-in. The resulting posterior MME solutions provided 1,000 uncorrelated posterior estimates of sex-/diet-specific body size in each lineage ( Next, we used the 1,000 resampled estimates of fed and starved female and male body sizes from the MCMCglmm analysis to generate 1,000 resampled estimates of sexaveraged body size, SSD, female and male plasticity, and sex-specific plasticity for each lineage (eqq.
[7]-[11]; see below). We then used these to generate 1,000 resampled estimates of the genetic variances within these indexes and the relationships (covariances, correlations, and regressions) between them among lineages. Throughout "Results" we report the mode of these resampled indexes, covariances, correlations, regressions, and their 95% credibility intervals (CIs). Two-tailed P values for each correlation/regression were calculated as twice the proportion of the 1,000 estimates that were on the other side of zero than the mode of the resampled correlation/regression. For comparisons between sexes, the two-tailed P values were calculated as twice the proportion of the resampled 1,000 estimates for female minus male (e.g.,B female:fed 2B male:fed ) that were on the other side of zero than the resampled mode for female minus male. To assess whether the slope of the relationship between female and male body size was 11, the two-tailed P values were calculated as twice the proportion of the resampled 1,000 estimates where the slope was ≤1. This approach allows the uncertainty in body size for each lineage to be incorporated into the estimated genetic relationships between indexes not explicitly modeled in the MCMCglmm and accounts for the anticonservatism that would otherwise undermine statistical tests of these relationships (Grieshop et al. 2021 Nutritionally induced size plasticity for each sex within a lineage was calculated as Sex-specific size plasticity for a lineage was calculated as sex-specific plasticity p D female 2 D male : Because SSD (eq. [8]) and sex-specific plasticity (eq. [11]) both useB female:fed andB male:fed in their calculations, we a priori expect them to be correlated (Postma 2011;Berger and Postma 2014). To account for this spurious correlation when exploring the genetic correlation between SSD and sex-specific plasticity, we calculated an index of plasticity that was independent ofB fed by regressingB starved on B fed for males and females, respectively, using OLS regression and then used the residuals of the fit as an independent index of plasticity (D female.indep and D male.indep ). These indexes were then used in equation (11) to calculate independent sex-specific plasticity. Further details of the rationale for this approach are provided in "Results." To confirm that our method of assaying the genetic correlation between SSD and sex-specific plasticity dealt satisfactorily with autocorrelation, we repeated the analysis using a dataset where we permuted posterior estimates of B female:fed ,B female:starved ,B male:fed , andB male:starved among lineages independently within each resample of the 1,000 estimates generated by the MCMCglmm. This broke up any genetic covariances among fed and starved male and female body size while retaining the same level of genetic variation for each trait among lineages. Any remaining correlation between SSD and sex-specific plasticity for these permuted data is spurious and provides a null distribution of correlation coefficients against which the distribution of observed correlation coefficients can be compared, using a Bayesian t-test (R package Bolstad; Bolstad and Curran 2016).
To illustrate relationships graphically, our plots use the mode of the 1,000 posterior estimates ofB female:fed , B female:starved ,B male:fed , andB male:starved in each lineage and the indexes derived from them (eqq. [6]-[10]). The trends illustrated in the plots are fitted to these modes. The 95% CIs for the trends are not, however, based on these modes but calculated from the 1,000 resamples of the relationship.

Results
Throughout this section, unless otherwise stated, all statistical tests of variances, covariances, correlations, and regressions were applied to the 1,000 resampled posterior estimates of fed and starved male and female body size in each lineage, generated using Bayesian MCMC simulations. The reported point estimates of the test statistics (variance, covariance, coefficient of variation, r, R 2 , slope) are the modes of the test statistics for the 1,000 tests, along with their 95% CIs.

Sexual Size Dimorphism Shows Genetic Variation in Drosophila melanogaster
The estimated G matrix indicated that there was considerable genetic variance and covariance in fed and starved female and male body size among lineages (table 1). Females were significantly larger than males, using pupal area of fed flies as a measure of overall body size (MCMCglmm: mean log female body size p 14:57 mm 2 , 95% CI p 14.53-14.60; mean log male body size p 14:48 mm 2 , 95% CI p 14.44-14.50, P ! :001; table S1). In both fed flies and starved flies, there was tight genetic correlation between female and male body size (table 1). Nevertheless, there was also genetic variation for SSD in fed flies among lineages (shown as variation in the slopes of the lines connecting female and male body size by lineage in fig. 1). The point estimate of variance in SSD was 0.0010 (95% CI p 0.0007-0.0015), while the point estimate of the coefficient of variation was 0.330 (95% CI p 0.254-0.404). A linear mixed effects model of body size that included a sex-by-lineage interaction-that is, modeling variation in SSD among lineageshad a significantly better fit to the data than a model that did not (table S2). This indicates nonzero genetic variance for SSD.

Variation in SSD Results from Variation in Female Body Size More than Variation in Male Body Size
To determine the degree to which SSD in fed flies results from variation in male versus female size, we fitted linear relationships between posterior estimates of SSD (y) and either female or male body size (x) using ordinary least squares (OLS) regression ( fig. 2A). The adjusted R 2 (R 2 adj ) of this relationship captures the proportion of variation in SSD that can be attributed to variation in female or male body size. We found that the point estimate of the R 2 adj for the relationship between SSD and female body size was 0.17 (95% CI p 0.06-0.32, P ! :001), while the point estimate of the R 2 adj for the relationship between SSD and male body size was 0.00 (95% CI p 0.00-0.10, P p :386). Furthermore, the point estimate of the slope for the relationship between SSD and body size was significantly steeper in females than in males (resampled female slope p 0:12, 95% CI p 0.08-0.18; resampled male slope p 0:05, 95% CI p 20.01 to 0.11, P ! :001; fig. 2A). These data indicate that the variation in SSD among lineages is primarily due to variation in female size.

SSD Increases with Sex-Averaged Body Size among Lineages
Male and female body size are tightly correlated among lineages (table 1). If variation in SSD is due more to variation in female size than male size, it follows that regressing female size (y-axis) against male size (x-axis) should yield a slope significantly greater than one. Major axis regression between posterior estimates of female and male body size supported this prediction (resampled slope p 1:09, 95% CI p 1.04-1.17, P ! :001; fig. 2B). The observation that females lie above the y p x reference line ( fig. 2B) indicates that females are larger than males among lineages. The observation that the slope of this line is 11 indicates that SSD increases with sex-averaged body size among lineages (resampled slope p 0:11, 95% CI p 0.04-0.15, P ! :001; fig. S1) because of a disproportionate increase in female size. This is converse to Rensch's rule, which states that among species, SSD decreases with an increase in body size when SSD is female biased (Rensch 1950). However, while variation in SSD among lineages correlates with sex-averaged body size, the observation that the slope of female on male body size regression is only slightly greater than one suggests that the majority of the observed variation in SSD is independent of sex-averaged body size. Indeed, variation among lineages in sex-averaged body size accounts for only 10% of the variation in SSD, while the remaining 90% is independent of sex-averaged body size ( fig. S2).

Females Have Greater Nutritionally Induced Size Plasticity than Males
Because female size is more variable than male size among lineages, it follows that females are more sensitive to factors that influence size than are males. A key environmental determinant of body size in all animals is access to nutrition during growth and development (Gokhale and Shingleton 2015). We therefore tested whether females are more sen-sitive than males to variation in developmental nutrition, using the difference in body size between fed and starved treatments as a measure of male or female size plasticity for each lineage (eqq. [9], [10]; fig. 3A). We found that across lineages there was a significant interaction between the effects of sex and diet on body size-that is, sex-specific plasticity-such that female body size is more nutritionally plastic than male body size (MCMCglmm: mean log female plasticity p 0:18 mm 2 , 95% CI p 0.17-0.19; mean log male plasticity p 0:15 mm 2 , 95% CI p 0.14-0.15, P ! :001; table S1). Furthermore, there was considerable genetic variation in sex-specific plasticity among lineages (shown as variation in the slopes of the lines connecting female and male plasticity by lineage in fig. 3A). The point estimate of variance in sex-specific plasticity among lineages was 0.001 (95% CI p 0.001-0.002), while the point esti-mate of the coefficient of variation was 1.180 (95% CI p 0.749-1.743; fig. 3B). A linear mixed effects model of body size that included a sex-by-diet-by-lineage interactionthat is, modeling variance in sex-specific plasticity among lineages-was a significantly better fit to the data than a model that did not (table S3). This indicates nonzero genetic variance for sex-specific plasticity. C, Ordinary least squares (OLS) linear regression of starved body size against fed body size among lineages for males (triangles, blue line) and females (circles, red line). The black reference line is y p x. The distance a point lies above or below this line (black double arrow, C 0 inset) indicates plasticity, while the distance a point lies above or below the regression line (gray double arrow, C 0 inset) is a measure of plasticity independent of fed body size. D, OLS linear regression between sexual size dimorphism (SSD) and independent sex-specific plasticity among lineages (slope p 0:56, 95% CI p 0.15-0.78, P ! :001), where the latter is the difference in plasticity independent of fed body size in females versus males (eq. [11]). Points are modes of indexes based on 1,000 uncorrelated posterior estimates of fed and starved female and male body size. Line shows fit to these modes, while shading shows 95% credibility intervals of the fit based on the 1,000 estimates, not the modes. DGRP p Drosophila Genetic Reference Panel.

Sex-Specific Plasticity Covaries with Sexual Size Dimorphism
If females are generally more sensitive to environmental size-regulatory factors than males, then sex-specific plasticity will generate SSD at least under some environmental conditions. Furthermore, if there is genetic variation among lineages in sex-specific plasticity, this may account for the variation among lineages in SSD. We therefore tested whether there was a relationship between posterior estimates of SSD and sex-specific plasticity among lineages. Because our measures of both SSD and sex-specific plasticity included fed body size, we would a priori expect a correlation between them. To remove this spurious correlation, we used a measure of plasticity that was independent of fed body size. To do this, we regressed posterior estimates of starved body size (y) on fed body size (x) among lineages for each sex, using OLS regression ( fig. 3C). The residuals of this regression are a measure of the effect of diet on body size in a lineage irrespective of fed body size. That is, they are a measure of size plasticity that is uncorrelated with, and independent of, fed body size. We then used these residuals to calculate a measure of sex-specific plasticity that is independent of fed body size (independent sexspecific plasticity; fig. 3C 0 ). It is important to note that if a lineage lies on the line of regression of starved on fed body size for one or either sex (residual p 0), this does not mean that the lineage does not have nutritional plasticity of body size. Rather, that lineage has a level of size plasticity that is expected for its fed body size. Nevertheless, some lineages have greater size plasticity than expected for their fed body size (lie below the regression of starved on fed body size), while other lineages have less size plasticity than expected for their fed body size (lie above the regression of starved on fed body size; fig. 3C 0 ). It is this genetic variation (and its covariation with SSD) that we are assaying when we use the residuals of starved on fed body size as a measure of plasticity.
We found a significant genetic correlation between posterior estimates of SSD and independent sex-specific plasticity (resampled r p 0:56, 95% CI p 0.24-0.73, P ! :001; fig. 3D). That is, lineages that had higher levels of SSD also had higher levels of sex-specific plasticity, independent of fed body size. To confirm that the observed relationships were not due to autocorrelation arising from our method of calculating SSD and independent sex-specific plasticity, we permuted the body size measurements among lineages within fed and starved males and females for each of the 1,000 MCMCglmm estimates of fed and starved female and male body size and reran our analyses. We found no relationship between SSD and independent sexspecific plasticity for these permuted datasets (resampled r permuted p 20:016, 95% CI p 20.005 to 0.004, P p 1), indicating that our method to calculate SSD and independent sex-specific plasticity dealt with spurious autocorrelation. Importantly, the distribution of estimated correlation coefficients between independent sex-specific plasticity and SSD was significantly different for the observed data than for the permuted data (Bayesian t-test: P ! :001 for both r and slope), such that the observed correlation between SSD and sex-specific plasticity (resampled r observed p 0:56) lay well outside the distribution of correlation coefficients for the permuted datasets (resampled r permuted 95% CI p 20.005 to 0.004).

Discussion
Although SSD is highly variable among species, we have a poor understanding of the developmental genetic mechanisms that regulate SSD and that are targeted by selection to generate variation in SSD within and between species. Our data show considerable variation among genotypes for SSD in Drosophila melanogaster. Part of this variation is due to the tendency for larger lineages to have higher levels of female-biased SSD (correlated SSD). This is a consequence of female body size increasing more than male body size as sex-averaged body size for a lineage increases ( fig. 2B). However, most of the variation in SSD is independent of overall body size (uncorrelated SSD). The variation in uncorrelated SSD is strongly and positively correlated with sex-specific plasticity, such that for two lineages of the same size, the lineage with the higher degree of female-biased SSD will also have a higher degree of female-biased sexspecific plasticity. This higher level of size plasticity is not because of a simple relationship between plasticity and size, where larger individuals are more plastic than smaller individuals: the correlation is observed when sex-specific plasticity is calculated controlling for maximum body size.
Numerous studies have found a positive correlation between SSD and sex-specific plasticity among species, and one explanation for these correlations is that, because sex-specific plasticity necessarily generates SSD under some environmental conditions, the same developmental genetic mechanisms underlie both phenomena. However, interspecific correlations may also arise because sex-specific plasticity evolves after, and because of, the evolution of SSD, through different developmental genetic mechanisms. To separate these hypotheses, we can explore whether there is a genetic correlation between SSD and sex-specific plasticity within a species such as Drosophila, where linkage disequilibrium drops off rapidly with distance and genetic correlations arise primarily through pleiotropy (Mackay et al. 2012). Our study reveals just such a genetic correlation and therefore supports the hypothesis that SSD and sex-specific plasticity are generated through the same developmental genetic mechanisms. We have an increasingly good understanding of the developmental genetic mechanisms that regulate the plasticity of body size, particularly in response to developmental nutrition (Gokhale and Shingleton 2015). Consequently, our results support ongoing developmental studies that explore the role that plasticity mechanisms play in regulating SSD.

Proximate Mechanisms for Sex-Specific Plasticity and Sexual Size Dimorphism
Work over the past three decades has revealed the developmental mechanisms that regulate the plasticity of body size with respect to variation in developmental nutrition, not just in Drosophila but in all animals (Nijhout et al. 2014;Gokhale and Shingleton 2015). Two signaling pathways play particularly important roles in nutritionally mediated growth regulation: the insulin/insulin-like growth factor signaling (IIS) and target of rapamycin (TOR) signaling pathways (for in-depth reviews, see Goberdhan and Wilson 2003;Wullschleger et al. 2006;Vea and Shingleton 2020).
The IIS responds to circulating insulin-like peptides (dILPs in Drosophila), which are released in a nutrient-dependent manner and bind to the insulin receptors (InR) of dividing cells (Semaniuk et al. 2020). Binding activates a signal transduction pathway that ultimately controls the expression of genes involved in regulating cell survival, growth, and proliferation (Geminard et al. 2006). The TOR signaling pathway has a similar effect but is regulated more directly by circulating amino acids (Oldham and Hafen 2003;Wullschleger set al. 2006). However, there is considerable cross talk between these two pathways, such that they work in concert to tune organismal growth and development in response to variation in the nutritional environment (Miron et al. 2003). There is increasingly compelling evidence that the IIS and TOR signaling pathways regulate SSD in Drosophila. SSD is eliminated in flies carrying a hypomorphic mutation of InR , which indicates that a functional IIS pathway is necessary to generate the difference in body size between males and females. Several studies implicate higher levels of circulating dILP2 in females as a factor generating their larger body size relative to males. First, fat-body-specific expression of the sex-determining gene Transformer-which produces protein in females but not in males-increases female body size by stimulating the secretion of dILP2 from the insulin-producing cells of the brain (Rideout et al. 2015). Second, females, but not males, increase body size when reared on a very high-protein diet, and this elevated sex-specific plasticity is also dependent on dILP2 and Transformer (Millington et al. 2021). More recent evidence suggests that the TOR signaling pathway is also involved in regulating SSD, although in response to food quality rather than food quantity. Specifically, females, but not males, reduce body size when reared on high-sugar diets (Shingleton et al. 2017; although see Millington et al. 2021), and this appears to reflect sex-specific differences in the activity of the TOR signaling pathway (McDonald et al. 2021;Millington et al. 2021).
Sexual dimorphism in the size of sexually dimorphic traits in other species also appears to be regulated by nutrient-sensing pathways. The horns of male rhinoceros beetle (Trypoxylus dichotomus) show heightened insulin sensitivity and corresponding nutritional sensitivity relative to other traits in the body, with knockdown of InR having a greater effect on horn size in males than females, reducing the sexual dimorphism (Emlen et al. 2012). Similarly, the size of the exaggerated mandibles of male broad-horned flour beetle (Gnatocerus cornutus) is regulated by a specific ILP (GcorILP2), which is expressed in a condition-dependent manner (Okada et al. 2019). Thus, increased activity of the IIS pathway, either systemically or in specific tissues, appears to account for sex-specific nutritional plasticity in trait size among a diversity of insects.
Genetic variation in IIS and TOR signaling pathways has been hypothesized as accounting for genetic variation in body size in Drosophila (de Jong and Bochdanovits 2003) and other animals (Boyko et al. 2010;Liu et al. 2014;Wilches et al. 2021). Because SSD is correlated with overall body size, such genetic variation may account for some of the observed variation in SSD. However, most of the variation in SSD is independent of sex-averaged body size ( fig. S2). Consequently, if changes in IIS and TOR signaling pathways account for variation in SSD, these changes must act in a sex-specific way.

Evolutionary Implications of Pleiotropy for Sex-Specific Plasticity and SSD
The observation that SSD in Drosophila is generated by sex-specific plasticity has important implications for our understanding of the evolution of sexual dimorphism in general and SSD specifically. In particular, it suggests that during the evolution of SSD, selection targets mechanisms that conditionally increase trait size in one sex over the other. This is perhaps best understood in the context of the condition dependence hypothesis. This hypothesis, as originally articulated (Nur and Hasson 1984;Grafen 1990;Rowe and Houle 1996;Bonduriansky 2007), explains the relationship between sexual dimorphism and sex-specific plasticity when there is strong directional sexual selection on a trait in one sex and where the cost of the trait increases with trait size. Individuals in better condition are better able to pay the marginal costs of increasing trait size relative to individuals in worse condition (Rowe and Houle 1996), resulting in greater sex-specific trait exaggeration in high-condition individuals. In combination, this increases the condition dependency of the sexually selected trait relative to other traits in the selected sex or the same trait in the opposite sex. For sexually dimorphic traits used by one sex to attract or compete for members of the other sex, this renders the trait a reliable and sensitive indicator of mate quality (Emlen et al. 2012). The condition dependence hypothesis predicts strong covariation between the strength of sexual selection, measured by the level of sexual dimorphism, and the degree of condition dependence of the trait (Bonduriansky 2007). In as much as condition reflects access to nutrition during growth, these sexually dimorphic traits are also predicted to show heightened nutritionally induced size plasticity (Stillwell et al. 2010). These predictions are supported by studies that compare sexually dimorphic versus sexually monomorphic traits within species (Bonduriansky 2007) and the same sexually dimorphic trait across multiple species (Baker and Wilkinson 2001;Rohner and Blanckenhorn 2018). In both cases, as traits become more sexually dimorphic, they become more condition dependent in the sex subject to sexual selection.
More recently, the condition dependence hypothesis has been generalized to explain sex differences in the plasticity of traits that are under sex-specific directional selection regardless of the nature of that selection (Stillwell et al. 2010;Rohner et al. 2017), including body size and SSD. In Drosophila and most other insects, a female's reproductive success is limited by the number of eggs that she can lay. Since larger females are typically able to lay more eggs than smaller females, the result is directional selection for increased body size through its effects on fecundity (Honěk 1993;Lefranc and Bundgaard 2000;Bergland et al. 2008;Millington et al. 2021). In contrast, while male reproductive success may be loosely correlated with body size in Drosophila, the strength of directional selection on male size appears to be much weaker than it is in females (Lefranc and Bundgaard 2000;Millington et al. 2021). Regardless of sex, individuals consuming higher levels of nutrition are, in principle, able to grow larger than those that consume lower levels of nutrition, although they may allocate nutrition to fitness-enhancing traits other than body size, for example, accelerated developmental rate. However, since females show greater marginal fitness gains from increased size than males in D. melanogaster, we would expect females to allocate more than males toward increasing body size at higher levels of nutrition. This results in female-biased sex-specific body size plasticity in response to variation in access to nutrition. The same logic would predict male-biased sex-specific body size plasticity under directional selection on body size in males-for example, due to sexual selection-that was weaker or absent in females. For sexually selected traits, the hypothesis again predicts a strong positive correlation between the degree of SSD and sex-specific plasticity of body size. This prediction is supported by studies showing a positive correlation between SSD and sex-specific plasticity among species and among populations within species (Teder and Tammaru 2005;Blanckenhorn et al. 2007a;Rohner et al. 2017).
Early descriptions of the condition dependence hypothesis implicitly or explicitly modeled the developmental genetic mechanisms that confer heightened condition dependence of a sexually dimorphic trait as evolving separately from the developmental genetic mechanisms that generate the sexual dimorphism itself (Andersson 1986;Rowe and Houle 1996). However, a subsequent model proposed that sexual dimorphism may reflect a pleiotropic effect of conditionally expressed sex-linked genes that determine the degree of relative allocation in each sex (Bonduriansky 2007)-that is, that the same developmental genetic mechanisms regulate sexual dimorphism and sex-specific plasticity. It is not possible to distinguish between these hypotheses using intertrait or interspecific comparisons, since both predict a correlation between sexual dimorphism and condition dependence among species or among traits within species. In contrast, much stronger evidence of pleiotropy is provided by the presence of genetic correlations between sexual dimorphism and condition dependence for a single trait within a species, in the absence of extensive linkage disequilibrium. Our data demonstrating a strong genetic correlation between SSD and sex-specific plasticity support the Bonduriansky (2007) model that SSD evolved because of selection on the same mechanisms that generate sexspecific plasticity. This is further supported by developmental studies implicating nutrient-sensing signaling pathways in the generation of SSD and sex-specific plasticity Rideout et al. 2015;McDonald et al. 2021;Millington et al. 2021). It is also interesting to note that female body size is genetically more variable than male body size. While we do not know the genetic mechanisms that generate this variation, the condition dependence hypothesis also predicts that the larger sex should also show greater variation in response to genetic determinants of condition (Rowe and Houle 1996).
Collectively, our data suggest that the observed SSD in Drosophila evolved because of selection for a sex-specific plastic response of body size to variation in access to nutrition during growth and development, where females show greater fitness benefits from increasing body size in response to nutrition than males (Lefranc and Bundgaard 2000;Handa et al. 2014). Indeed, SSD is eliminated in severely malnourished fruit flies or flies with suppressed IIS activity Shingleton et al. 2017). This suggests that SSD is explained by sex-specific plasticity and that the two phenomena are biologically and conceptually inseparable. The same appears to be true in the fly Telostylinus angusticollis (Bonduriansky 2007).
However, growth in all animals can be conceptually divided into condition-sensitive growth, which generates traits of different sizes depending on the environmentally and genetically determined condition of an animal, and morphogenetic growth, which is growth that arises because of the developmental processes that generate the shape and cell identities of individual traits, regardless of the environment (Mirth and Shingleton 2019). Both types of growth have the potential to generate SSD, but only conditionsensitive growth can generate sex-specific plasticity. The extent to which SSD reflects sex-specific differences in condition-sensitive versus morphogenetic growth may vary among species. In species such as Drosophila, where SSD is eliminated under some environmental conditions (such as malnutrition), SSD appears to be due solely to conditionsensitive growth, and SSD is a pleiotropic consequence of sex-specific plasticity. In other species, however, SSD may be due to a combination of both condition-sensitive and morphogenetic growth, such that SSD is modified but maintained under different environmental conditions. In these situations, sex-specific plasticity may have evolved after, and be conceptually and mechanistically distinct from, SSD. Finally, there may be species in which SSD is not affected by environmental or genetic condition, implying that it arises because of differences in morphogenetic growth only. Conceptually, SSD in a given system may lie anywhere along the continuum of being generated entirely by condition-sensitive growth, being generated through a mix of condition-sensitive and morphogenetic growth, or being generated entirely through morphogenetic growth. Where a species lies on this spectrum presumably reflects both the genetic architecture of the proximate mechanisms that generate SSD and sex-specific plasticity and the selective pressures that ultimately target these mechanisms.
Our observation of a genetic correlation between SSD and sex-specific plasticity also has interesting implications for Rensch's rule, which states that male-biased SSD increases with overall body size, while female-biased SSD decreases with overall body size (Blanckenhorn et al. 2007b). The general explanation for this phenomenon is that male body size varies more than female body size among populations and species, hypothesized to result from greater plasticity in male size (Fairbairn 2005). Interspecific variation in SSD consistent with Rensch's rule is common in vertebrates (Abouheif and Fairbairn 1997;Fairbairn 1997) but is also seen in several invertebrate groups, including the Drosophilidae (Blanckenhorn et al. 2007a). Among Drosophila genotypes, however, we found female size to be more variable than male size, so female-biased SSD increases with overall body size among lineages-the reverse of Rensch's rule (albeit applied to genotypes rather than populations or species). The observation that the generally female-biased interspecific variation in SSD among Drosophilidae follows Rensch's rule but that intraspecific variation in SSD exhibits a reverse Rensch's rule suggests that Rensch's rule cannot be explained by greater plasticity in males versus females. Indeed, there is a general trend in both vertebrates and invertebrates that the larger sex is more plastic than the smaller sex (Badyaev 2002;Stillwell et al. 2010). If Rensch's rule were due to sex-specific plasticity, then we should observe it only when males are larger than females but not when females are larger than males.

Conclusions
We tested whether individual genetic variation in SSD covaries with sex-specific plasticity in a population of isogenic lineages in Drosophila melanogaster. By separating size-dependent and size-independent components of variation in SSD and sex-specific plasticity, we found that SSD and sex-specific plasticity show a strong positive genetic correlation, indicating shared developmental genetic mechanisms regulating both phenomena. This suggests that the selective pressures that generate SSD act on the developmental mechanisms that regulate nutritionally induced body size plasticity. In other words, the observed sexual size dimorphism may be a consequence of sex-specific selection favoring increased body size as condition improves in females but less so in males. Full testing of this hypothesis requires identification of the loci that underlie variation in both SSD and sex-specific plasticity among these Drosophila lineages. More generally, our study suggests that to fully understand the evolution of SSD, it is necessary to also understand the developmental genetic mechanisms selection targets to generate differences between female and male body size.