Introduction

Individuals are not merely bystanders to environmental variation: often, individuals’ own traits influence the environments they experience (Eaves et al., 1977; Plomin et al., 1977; Odling-Smee et al., 1996). Individuals may choose a habitat, excrete waste products that influence local ecology, provide a home for other species, influence the behavior of interacting conspecifics or heterospecifics, or have an impact on their environments in other ways. The behaviors and other traits by which individuals influence their own environments are typically quantitative traits that are expected (or known) to have a genetic basis. This basic fact has important implications: if genotypes differ in traits that alter their environments, then different genotypes will experience different environments (Donohue, 2003, 2005; Jaffee and Price, 2007; Saltz, 2011; Saltz and Nuzhdin, 2014).

In ecology, the traits by which individuals alter their own environments are described as ‘niche-constructing’ traits (Odling-Smee et al., 2013); these include behaviors that influence the social environment, that is, ‘social niche-constructing’ traits (reviewed in Saltz et al., 2016). To avoid confusing implications of the word ‘niche’ and as the fitness effects of behavior are not the focus of the current study, I will use the term ‘social environment construction’ to describe the ways in which individuals’ behaviors (or other traits) influence their social environments (Saltz et al., 2016). Therefore, social environment construction occurs when an individual’s behavior affects the composition and/or dynamics of its social environment and genetic variation in social environment construction would occur when that behavior differs among genotypes. This idea is identical to the concept of gene–environment correlation in psychology, which refers to the heritability of experiences (Eaves et al., 1977; Plomin et al., 1977; Jaffee and Price, 2007; Plomin, 2014) and is closely linked to the concept of indirect genetic effects, whereby traits expressed by one individual—traits which are influenced by that individual’s genotype—affect the phenotype of an interacting individual (Moore et al., 1997). Indirect genetic effects are predicted to be nearly ubiquitous for social behaviors (Meffert et al., 2002; McGlothlin et al., 2010), suggesting that genetic variation in social environment construction is also common.

If the environment that individuals experience is determined in part by their own (environment-constructing) traits, then genetic variants underlying those traits will determine the environment in which all traits develop and are expressed (Saltz and Nuzhdin, 2014). This process is potentially important, because many traits, in particular behaviors, are phenotypically plastic: their expression and/or development depends on the environment, including the social environment. Here, the term ‘development’ refers to the effects of an individual’s prior experience on its behavior at a later time rather than any other meaning of the word ‘development’; in addition, behavioral development is not necessarily assumed to be irreversible (Stamps and Groothuis, 2010; Snell-Rood, 2013). In humans, genetic variation in social environment construction is hypothesized to influence behavioral development, including the development of mental illness, because genotypes differ in their likelihood of experiencing psychosocial stress and other risk factors for disease (Rutter et al., 2006; Jaffee and Price, 2007, 2012).

In animals, studies focused explicitly on social environment construction are just beginning (reviewed in Saltz et al., 2016). Several studies have documented the existence of genetic variation in social environment construction (Brown and Brown, 2000; Lea et al., 2010; Saltz and Foley, 2011; Saltz, 2011), but none have directly examined the effects of such genetic variation on behavioral development (Saltz and Nuzhdin, 2014).

This scarcity of direct empirical studies on the outcomes of genetic variation in social environment construction represents an important gap in knowledge, because genetic variation in social environment construction is hypothesized to have broad effects on the genetic basis of ecologically relevant traits (Saltz and Nuzhdin, 2014). Here I review these hypotheses and then describe a series of experiments in which I empirically tested how genetic variation in two behavioral mechanisms of social environment construction—social group choice and aggression—influence the development of aggressive behavior in the fruit fly, D. melanogaster.

Hypothesis 1. The environment-constructing trait affects its own development: genotype–environment covariance

Genetic variation, VG, describes the degree to which individuals’ trait values deviate from the population mean due to genetic causes. Environmental variation, VE, describes the degree to which individuals’ trait values deviate from the population mean, because the trait is phenotypically plastic, that is, develops or is expressed differently in different environments. It is noteworthy that VE describes the effect of the environment on the trait, not simply the presence of environmental variation that could be measured by an experimenter. VE can be 0 even if the environment itself is variable, because the trait of interest may not be phenotypically plastic with respect to that environment (see below and Hypothesis 3). When genetic variation in social environment construction is present, two types of environmental variation potentially influence each trait: VEc, the ‘common’ environmental variance, which differs among genotypes due to environment construction, and VEw, the ‘other’ environmental variance (Falconer and Mackay, 1996 and Figure 1). VEc describes how individuals with similar genotypes also share similar environments, because their genetic similarity makes them likely to express similar environment-constructing behaviors.

Figure 1
figure 1

Hypothesized effects of genetic variation in social environment construction on the development of aggressive behavior. Genetic differences (VG) in aggression and/or social preference may influence the environment that individuals experience, representing genetic variation in social environment construction; this was measured on day 1 of the Development experiment. Experience in the constructed environment may or may not further influence behavioral development (VEc); this was measured on day 2 of the Development experiment.

Genetic variation in social environment construction is hypothesized to produce a correlation between genetic effects on the environment-constructing trait (VG) and the environmental effects on the environment-constructing trait (VEc), producing genotype–environment covariance, covGE. covGE occurs because expression of the environment-constructing trait produces an environment that influences the development (that is, later expression) of the environment-constructing trait. As a hypothetical example, students who are academically successful may receive access to enrichment programs and extra attention from teachers, further augmenting their potential for academic achievement (Falconer and Mackay, 1996; Dickens and Flynn, 2001). Here, the expression of the environment-constructing trait, academic achievement, generates an environment, access to enrichment opportunities, which leads to the development of further increased achievement.

When covGE is present, phenotypic variation in the population is described by:

(Falconer and Mackay, 1996). It is noteworthy that there may be an interaction between genotype and either the constructed or other environments, indicating that the developmental effect of these environments on the trait differs among genotypes; for brevity, I have not listed these terms.

Hypothesis 2. The environment-constructing trait affects the development of other traits: multivariate effects of genetic variation in social environment construction

Theory on covGE focuses on the effect of an environment-constructing trait on its own development. However, many ecological and social environments have the potential to affect the development of more than one trait. Therefore, the environment produced by social environment construction is expected to affect any trait that is phenotypically plastic with respect to the constructed environment (Saltz and Nuzhdin, 2014). For example, in Arabidopsis thaliana, genetic variation in the timing of germination affects the season—and therefore, the temperature, day length, climate and ecological setting—in which all subsequent life-history events occur (Donohue et al., 2005; Donohue, 2005). Indeed, most studies of environment construction, such as habitat choice, are interested in the effect of the chosen environment on the development of other traits, such as mating behavior or offspring viability, rather than the effect of the environment on habitat choice itself (Gripenberg et al., 2010).

Phenotypic variance in a phenotypically plastic trait (other than the environment-constructing trait) is then given by:

(Falconer and Mackay, 1996; again, for brevity, genotype-by-environment interaction terms are not listed). Here, VEc is an ‘environmental’ component of variance that is caused by genetic variation in the environment-constructing trait (Figure 1).

Hypothesis 3. Not all traits are plastic, not all environments matter: genetic variation in social environment construction may not have any phenotypic effect

Genetic variation in social environment construction is necessary, but not sufficient, for covGE. covGE only occurs when different genotypes experience different environments (that is, genetic variation in social environment construction is present) and the constructed environment affects the development of the trait (VEc>0). It is possible that the constructed environment does not affect the trait of interest (VEc=0). For example, Van den Akker et al. (2014) examined how children’s personality traits affect their parents’ behavior and vice versa. They found that variation among children in extraversion, which is heritable (Spengler et al., 2012), affects the behaviors—that is, parental ‘overreactivity’—of their parents (Van den Akker et al., 2014). This evidence indicates that child extraversion can act as a mechanism of social environment construction, and that different genotypes (for extraversion) have different experiences with their parents. However, parents’ overreactivity has no reciprocal effect on whether their children become more or less extraverted (Van den Akker et al., 2014). In other words, although genetic variation in extraversion influences the environment that individuals experience, it does not produce covGE, because the constructed environment (parental overreactivity) does not influence the development of the environment-constructing trait (extraversion). In this case, VEc, the effect of the constructed environment, is 0; thus, covGE is also 0. Phenotypic variation in the environment-constructing trait is then described by the standard model:

Similarly, traits other than the environment-constructing trait may or may not be plastic with respect to the constructed environment. In the child personality study described above (Van den Akker et al., 2014), parents’ overreactivity affected their child’s conscientiousness but not their child’s emotional stability. Therefore, for conscientiousness, but not emotional stability, VEc>0 and genetic variation in the environment-constructing trait (extraversion) affects the development of another phenotypically plastic trait (conscientiousness), as in Hypothesis 2. For emotional stability, VEc=0: genetic variation in extraversion and its effects on parental overreactivity are unimportant for the development of this trait, and variation in emotional stability is described by VP=VG+VEw.

Identifying the effects of genetic variation in social environment construction on behavioral development

The diverse effects of VEc on traits and behaviors across species highlights the need to identify whether and how the environment produced by social environment construction affects the development of ecologically and evolutionarily important traits. Discerning whether VEc is 0 is an empirical challenge: to demonstrate that genetic variation in social environment construction influences behavioral development, individuals (of a particular genotype) must express and/or develop one level or type of behavior if they experience the social environment that they construct, but a different level or type of behavior if they experience alternate environments (Eaves et al., 1977).

In humans, where genetic variation in social environment construction has been most intensively studied, experimentally demonstrating that the constructed environment affects behavior is challenging, because genotypes and social environments are difficult to manipulate. A further challenge specific to studying social environment construction is that, by definition, social environment construction means individuals only experience a narrow range of available environments, making it challenging to establish causation (Jaffee and Price, 2012). In other words, it is difficult to say whether individuals would have developed the same trait values if genetic variation in social niche construction had been experimentally manipulated or absent.

Studying the fruit fly, D. melanogaster, provides the opportunity to identify how different behavioral mechanisms of social environment construction vary across genotypes and influence behavioral development. Recurrent crosses of inbred genotypes representing natural variation can produce heterozygous, genetically identical individuals, analogous to identical twins. Thus, independent individuals with the same natural genotype can serve as ‘replicate individuals’ (Stamps et al., 2005) whose behavior may be studied across contexts. Comparing the development of behavior within and between genotypes, after experience in the constructed environment and alternate environments, permits inference about the developmental effects of genetic variation in social environment construction.

I have previously identified genetic variation in two behavioral mechanisms of social environment construction in male fruit flies. First, naive males of natural fly genotypes differ in the social group sizes that they prefer (Saltz, 2011). Second, short-term aggressive interactions influence behavioral dynamics within and among groups (Saltz and Foley, 2011; Saltz, 2013). Here I measured the consequences of genetic variation in these two types of social environment construction for the development of aggressive behavior. I tested the hypotheses that (Hypothesis 1) a focal male’s aggressive behavior would influence his social experience and this social experience would further affect his later aggressive behavior, generating covGE, and (Hypothesis 2) that a focal male’s preference for a particular group size would influence his social experience, and that experience would affect his later aggressive behavior. I also considered the null hypothesis that VEc is 0, that is, that social experience does not affect behavioral development (Hypothesis 3).

I measured social preferences in an expanded sample of natural male genotypes in two density contexts (Preference experiment) and then measured the aggressive behaviors and social experiences of independent individuals from the same focal genotypes in their preferred and unpreferred group sizes (Development experiment; Figure 2). Therefore, I experimentally allowed or limited social environment construction by re-creating the situation in which each focal male either got his preferred group size or was forced to experience his unpreferred group size. After experiencing their preferred or unpreferred groups for 1 day, males were transferred to a standard social environment and their aggressive behavior was measured. The second day of the experiment allowed direct evaluation of the consequences of prior social experience on later aggressive behavior with a new opponent.

Figure 2
figure 2

Experimental design for the Development experiment. Focal males (marked with a small dab of yellow paint) experienced either their preferred or unpreferred group size for one day (left) and observers measured their social experiences. Next, the same individual focal male was transferred to a new arena containing a naïve age-matched stimulus male. This second day (right) of the experiment provided information about how experience in preferred and unpreferred groups influenced later aggressive behavior in a novel social situation.

Social dynamics of aggression in Drosophila

Flies live socially and ecologically complex lives. Adults consume microflora that grows on rotting fruit (Powell, 1997); thus, social interactions take place on these discrete food patches. Adult flies in nature (Wertheim et al., 2002, 2006) and in the lab (Stamps and Blozis, 2006; Saltz and Foley, 2011) readily form social groups, that is, aggregations of unrelated adults, on patchy food substrates. In nature, groups vary substantially in size (Wertheim et al., 2006). Males exhibit multiday site fidelity, suggesting that social groups can be semi-stable over days (Stamps et al., 2005). Thus, social group formation is integral to fly biology and flies can choose to join or leave social groups at any time.

Aggressive behavior in flies is appropriate for studying genetic variation in social environment construction and its consequences. Aggression is heritable in at least four natural populations of Drosophila (Hoffmann, 1988; Edwards et al., 2006; Cabral et al., 2008). Natural genetic variation in aggressiveness influences group formation, including group size (Saltz and Foley, 2011), through processes that are not yet fully understood (Foley et al., 2015). Males from natural genotypes modulate their aggressive behavior in response to local ecology and sex ratio (Cacoyianni and Hoffmann, 1990), and natural genotypes show indirect genetic effects, whereby the aggressiveness of a male depends on the genotype of his opponent (Cabral et al., 2008; Saltz, 2013). Complementary work on laboratory genotypes has shown that prior exposure to males (Yurkovic et al., 2006; Wang et al., 2008) and females (Yuan et al., 2014; Baxter et al., 2015) can influence males’ later aggression. In particular, laboratory genotypes show ‘loser effects,’ whereby males who are attacked more frequently in initial encounters are less aggressive in subsequent encounters (Yurkovic et al., 2006). Overall, aggression can affect social dynamics and the development of aggressive behavior depends on prior social experience, at least in laboratory genotypes.

Materials and methods

Natural genotypes

Inbred parental lines, a subset of the Drosophila Genetic Reference Panel, were originally derived from a population in Raleigh, NC, and were made homozygous through inbreeding (Mackay et al., 2012). These lines thus represent a sample of alleles segregating in a natural population (Mackay et al., 2012). By crossing inbred parental lines, I generated heterozygous individuals that more closely resemble wild flies. As each parental line is homozygous, a cross between a given maternal genotype and a given paternal genotype always generates progeny with the same heterozygous genotype. For example, genotype A/B would be generated by crossing virgin females of genotype A to males of genotype B. Thirteen focal genotypes and one stimulus genotype were used in all experiments. No genotypes were related. The 13 focal genotypes were as follows: 208/712, 360/335, 639/517, 707/765, 732/775, 304/862, 306/391, 315/365, 357/714, 375/427, 437/324, 486/380 and 786/820. (Genotype numbers are arbitrary ‘names’ and have no other meaning.) As in previous experiments, the stimulus genotype was 303/313 and was originally chosen at random (Saltz, 2011). The direction of the crosses was consistent, to control for maternal effects. It is noteworthy that 5 of these genotypes (208/712, 360/335, 639/517, 707/765 and 732/775) have been studied previously and have been found to differ in social preference using this stimulus genotype (Saltz, 2011).

Preference experiment

Rearing

All focal flies were male. Flies were reared under standard conditions that minimize variation in larval density (Saltz and Foley, 2011; Saltz, 2011, 2013).

Males

All males (focal and stimulus) were collected within 8 h of eclosion and held individually in vials. Trials began when males were 3 days post eclosion.

Females

Stimulus females were collected within 8 h of eclosion. On their first day of adulthood, females were mated to males of a standard genotype (852) not used in any other part of the experiment. After 1 day, males were removed and females were housed in all-female groups for 5 days before trials began. Thus, females were socially experienced during the trials; most females in nature are non-virgin (Harshman and Clark, 1998).

Measuring social preference

Social preference was measured as in Saltz, 2011. Focal males chose between two food patches. Each food patch hosted a mesh habitat that confined 0–8 stimulus flies; in a given trial, the patches differed only in the number of stimulus flies present in the associated mesh habitat (see low and high density below). As the mesh habitats were uniform in size across all trials, the number of stimulus flies inside (that is, group size) could be considered as both group size and density, that is, the larger the groups, the higher the density.

Food patches were composed of standard fly food with grapefruit juice added (each batch made with 9.5 g agar, 18 g yeast extract, 13.5 g malt sugar, 0.25 l water and 0.25 l 100% grapefruit juice; Saltz and Foley, 2011; Saltz, 2011, 2013). The mesh habitats were made from Finum brewing baskets (green, size medium) with side tabs cut off. Focal males could indicate their preference by perching on the habitat or petri dish of their preferred group size. Males could also choose not to perch near either of the patches. Each male’s location—perched near larger group, perched near smaller group, or ‘away’—was measured five times during the course of 1 day. I have shown previously (Saltz, 2011) that this assay measures social preference beyond simple attraction to food.

Low density

In the low-density social context, focal males could choose between an empty food patch (zero stimulus flies) and a patch with a group of two stimulus flies (one stimulus male, one stimulus female).

High density

In the high-density social context, focal males could choose between a smaller group of four stimulus flies (two stimulus males, two stimulus females) and a larger group of eight stimulus flies (four stimulus males, four stimulus females). To control for side biases, the side of the arena containing the larger group (left or right) was alternated between trials and included as a covariate in the analyses.

Replication

Thirty independent individuals from each of the 13 genotypes were measured at low density and 30 at high density, for a total of 780 trials.

Development experiment

Overview

To determine the consequences of genetic variation in social environment construction for behavioral development, males were forced to experience either their preferred or unpreferred group size for 1 day and their aggressive interactions were measured during pre-planned sampling periods (Day 1; Figure 2 left). Next, the same individual focal males were transferred to a standard environment (Day 2; Figure 2 right) containing a single naive stimulus male.

Rearing

Flies were the same genotypes as in Experiment 1. Each fly was marked with a small dab of paint (Stamps et al., 2005; Saltz, 2013), enabling observers to discriminate between the focal and stimulus males (Figure 2).

Observations in the morning and evening

On days 1 and 2, behaviors were measured in the morning and evening, as detailed below: ‘evening’ was 0–90 min before the flies’ subjective dusk and ‘morning’ was 30–90 min after flies’ subjective dawn; these correspond to times of high fly activity.

Day 1: social experience in preferred and unpreferred group sizes

Group sizes

Focal males interacted in groups of 0, 2, 4 or 8 stimulus flies—identical to the stimulus groups in Experiment 1.

Arena conditions

Flies interacted in relatively small (10 cm diameter, 4 cm high) circular arenas with a single (4 cm diameter, 0.5 cm high) food patch; thus, individuals had only one social group in which to interact (Figure 2 and Saltz, 2013). As the physical arena size was consistent across trials, larger groups were also higher density groups.

Measuring behavior in groups

Each group entered the arena in the evening. After a 30 min acclimation time, one observer (JBS) observed each arena for 3 min. During observation periods, observers measured all instances of aggression by all males (lunging, Nilsen et al., 2004; Saltz and Foley, 2011; Saltz, 2013), noting which individual lunged and at whom. At the start and end of the observation, and every 1 min, the observer noted whether or not the focal male was perched on the food patch. Most aggression takes place on patches and patch use influences aggression for some Drosophila males (Cacoyianni and Hoffmann, 1990; Saltz and Foley, 2011; Saltz, 2013). The following day (day 1) a second 3 min observation period was conducted in the morning and a third observation period in the evening.

Day 2: developmental effects of social experience

Naive stimulus male

All arenas on day 2 contained a single, naive, age-matched stimulus male.

Arena conditions

The day 2 arena was identical to the one on day 1, except for the addition of a ball of live yeast on the food patch. The live yeast was included, because it is common in studies of Drosophila aggression (for example, Nilsen et al., 2004; Cabral et al., 2008; Wang and Anderson, 2010; Baxter et al., 2015) and because it provided a cue that could indicate to the flies that the day 2 environment was different from the day 1 environment (Figure 2).

Measuring behavior on day 2

After the end of day 1, focal males were transferred to a new arena to begin day 2. The following day, each arena was observed for 3 min in the morning and 3 min in the evening. During observation periods, aggressive behavior was recorded for both males, as well as the amount of time the focal male was perched on the patch (in number of seconds). This finer-scale measure of male patch use was possible on day 2, because only two males were present in each arena.

Replication

Ten independent individuals from each of the 13 genotypes were measured in each of the 4 group sizes, for a total of 520 trials.

Analysis

Preference data were analyzed using Binomial regression implemented in the stats package in R (version 3.1.1; R Core Team, 2014). The model describes the proportion of times the male perched near the larger group, relative to the total number of observations (out of five) in which he was perched near any group. Therefore, the analysis measures social preference independent of patch use (Saltz, 2011). Aggression data, measured in number of aggressive lunges, were modeled as counts using Zero-inflated Poisson regressions, implemented in the pscl package in R (Zeileis et al., 2007). One observation representing clearly anomalous data, as evident from graphical analysis, was excluded as an outlier. In Binomial and Poisson models, the significance of categorical fixed factors (focal genotype and interactions between focal genotype and other factors) was assessed using Wald’s tests (reported using χ2-values), implemented in the aod package in R (Lesnoff and Lancelot, 2012).

Results

Genotypes vary in social preference

In the Preference experiment, genetic variation in social preference was evident in both density contexts (low density, 0 vs 2: χ2=25.2, degrees of freedom=12, P=0.014; high density, 4 vs 8: χ2=47.9, degrees of freedom=12, P<0.0001). This result indicates that these genotypes differ in social environment construction: when given a choice, we expect some genotypes to experience large groups and other genotypes to experience small groups.

In addition, there was a significant interaction between genotype and density context (χ2=44.2, degrees of freedom=12, P<0.0001), demonstrating that genotypes that preferred to perch near other flies (that is, the group of 2) in the low-density context did not necessarily prefer the larger group of eight in the high-density context.

Using genotype means, each male genotype was assigned preferred and unpreferred group sizes for each density context: if the genotype’s mean preference score in a particular density context was nominally >0.5, the larger group (two in the low-density context or eight in the high-density context) was considered preferred, but if the genotype’s mean preference score was nominally below 0.5, the smaller group (zero in the low-density context, or four in the density context) was considered preferred.

Social preference acts as a mechanism of social environment construction

For genetic variation in social environment construction to potentially influence behavioral development, different groups must represent different social experiences for focal males. To assess this, a zero-inflated Poisson model was fit to data from day 1 of the Development experiment. The model compared how often focal males were attacked by stimulus males in their preferred and unpreferred group sizes, including focal male genotype, focal male aggressive behavior (in number of lunges), focal male presence on patch and group size as covariates (Table 1, Development experiment model 1). For this part of the analysis, I excluded focal males who experienced groups of 0 (that is, isolation) on day 1, because they had no opportunities for these types of social experience. It is noteworthy that, as group size was included as a covariate, this model independently measures the effects of focal male’s preference for a particular group size and the effects of group size per se, on male social experience.

Table 1 Effect sizes and P-values for significant terms in each model for the Development experiment (for specific P-values see text)

Model results demonstrated that focal males have different social experiences in their preferred groups, relative to their unpreferred groups (parameter estimate=0.34, z=2.3, P=0.021). The positive parameter estimate indicates that males experience a 1.40 higher incidence rate of attacks by stimulus males in their preferred group, relative to their unpreferred group. This result demonstrates that social preference influences male social experience and thereby acts as a mechanism of social environment construction.

Aggression acts as a mechanism of social environment construction

In the same model described above (Table 1, Development experiment model 1), I found evidence more aggressive males were attacked more times by stimulus males (parameter estimate=0.051, z=2.9, P=0.004), consistent with prior studies (Saltz, 2013). This result demonstrates that aggression influences male social experience and thereby acts as a mechanism of social environment construction. Below, I confirm that this mechanism of social environment construction differs among genotypes.

Interplay between mechanisms of social environment construction: why are males attacked more times in their preferred groups?

Perhaps males were attacked more times in their preferred groups, because they were also more aggressive in those groups. To assess this hypothesis, focal male aggression was modeled (Table 1, Development experiment model 2). The model compared the focal male’s aggression between the focal males’ preferred and unpreferred group sizes, and included focal male genotype, focal male presence on patches, stimulus male aggressive behavior and group size as covariates.

Surprisingly, whether the group was the focal male’s preferred or unpreferred size did not influence focal male aggressive behavior (parameter estimate=−0.09, z=−0.8, P=0.42), and neither did group size per se (parameter estimate=0.016, z=0.72, P=0.47). In addition, this analysis confirmed that focal male genotypes differ in aggressive behavior (χ2=138.0, degrees of freedom=12, P<0.0001). Taken together, these results indicate that aggression differs among genotypes and affects social experience, but does not account for the effects of social preference on experience. Therefore, aggressiveness and social preference influenced male social experience independently, at least in terms of males’ experience being attacked by stimulus males. Similarly, this result implies that some trait other than aggressive behavior caused males to be attacked more frequently in their preferred groups relative to their unpreferred groups.

Effects of genetic variation in social environment construction on the development of aggressive behavior

To determine whether genetic variation in social environment construction influenced the development of aggressive behavior, a model was fit describing how social experience in each genotype’s preferred and unpreferred group sizes (on day 1) influenced aggressive behavior the following day in a standard environment (day 2). If social experience in the constructed environment influences later behavior, this provides evidence that genetic variation in social environment construction influences behavioral development (VEc>0, Hypotheses 1 and 2).

The model included focal male genotype, male experience on day 1 (group size, whether the group was preferred or unpreferred, the focal male’s aggressive behavior and the number of attacks by stimulus males) and male experience on day 2 (how often the focal male was attacked by the naive stimulus male on day 2 and focal male patch use on day 2) as covariates (Table 1, Development experiment model 3). All males including those who had experienced groups of 0 on day 1 were included.

I found that focal males who were attacked more often on day 1 were less aggressive the following day, day 2 (parameter estimate=−0.18, z=−2.0, P=0.04996). These results demonstrate that VEc is not zero, because the social experiences that resulted from males’ social environment-constructing behaviors influenced the development of aggressive behavior.

Discussion

Even when individuals live in the same population, they may experience different environments, including social environments. When genotypes differ in social environment construction, environmental variation is not random, as typically assumed by quantitative genetic models. Instead, environments are caused in part by individuals’ own behavior—behavior that varies among genotypes (Eaves et al., 1977; Plomin et al., 1977). Here I measured two mechanisms of genetic variation in social environment construction and their influence on the development of aggressive behavior in Drosophila melanogaster. The central findings of this study are: that both choice among groups (that is, group size) and social interactions within groups (that is, aggressive encounters between focal and stimulus males) differed among genotypes, demonstrating that individuals can engage in multiple simultaneous mechanisms of social environment construction, that the two mechanisms of social environment construction both affected male social experience, and that this social experience directly influenced the development of aggressive behavior, demonstrating that VEc>0 (Table 2). Together, these findings—representing measurements of 1300 focal individuals—provide the first manipulative experimental demonstration that genetic variation in social environment construction can causally influence behavioral development (Figure 1).

Table 2 Summary of the most important results and their relevance to the hypotheses

The finding that genetic variation in social environment construction can directly contribute to behavioral development supports longstanding hypotheses in psychology. Observational and, now, manipulative experimental evidence demonstrates that genetic variants can influence behavior through two qualitatively different types of mechanisms: directly, by influencing the underlying substrates of behavior and, indirectly, by influencing the social environment in which behavior develops and is expressed (Saltz and Nuzhdin, 2014). In quantitative genetics terms, these findings imply that nonzero covGE and VEc may be common and important for understanding the relationship between genotypes and phenotypes, and therefore should be studied more widely.

I found that males who were attacked more times by stimulus males on the first day of the experiment—as a consequence, in part, of social environment construction—were less aggressive toward a naive opponent the following day. This result indicates a negative covGE for aggressiveness, because genotypes that are initially more aggressive create social experiences—the experience of being attacked by other males—that make them less aggressive later. Therefore, genetic variation in social environment choice does not always reinforce initial genetic differences in behavior and thus may either augment or reduce the expression of phenotypic differences between genotypes (Dickens and Flynn, 2001; Saltz and Nuzhdin, 2014). Ultimately, integrating molecular and neurobiological information about fly aggression in laboratory genotypes (reviewed in Chen et al., 2002; Thomas et al., 2015) with the complex social effects on aggression described for natural genotypes (including those described here) would provide a more comprehensive, mechanistic framework for understanding the relationships between genotype and aggressiveness (Bell and Dochtermann, 2015).

I found no evidence that group size per se influenced behavioral development (Table 1), suggesting that specific experiences, rather than simple exposure to males and females, are important to behavioral development. Recently, Trannoy et al. (2016) showed in laboratory genotypes that the duration of loser effects depends on the duration of social experience: loser effects only last beyond 24 h if initial exposure to attacks from stimulus males occur repeatedly over time (Trannoy et al., 2016). This ‘spaced training’ type of experience is similar to the experience recorded in the morning and evening of day 1 in the Development experiment and may occur in nature as well, as males are moderately site faithful and may encounter the same male repeatedly (Stamps et al., 2005). Understanding how experiences with males and females contribute to male behavioral development (Yurkovic et al., 2006; Wang et al., 2008; Yuan et al., 2014; Trannoy et al., 2016) and how females contribute to the dynamics of male–male aggression (Foley et al., 2015) would provide a fuller picture of how social interactions unfold among interacting individuals and over time in ecologically relevant social environments.

Although I was able to successfully identify some mechanisms of social environment construction and their consequences for behavioral development, this study was limited in two major ways. First, I examined only a small subset of the large range of group sizes and group compositions that occur in nature (Wertheim et al., 2006). As behavior is often density dependent, the dynamics found here may or may not occur in very large groups. Similarly, results may or may not have been different if a different standard stimulus genotype had been chosen. In general, social behavior and group dynamics may often depend on the identity of the genotypes present in the group (Moore et al., 1997; Meffert et al., 2002; Saltz, 2013). Future research integrating genetic variation in social environment construction with indirect genetic effects theory would facilitate predictions about how behavior and fitness are affected by group size and composition (Saltz et al., 2016). Second, the study encompassed only 2 days of the flies’ adult lives. Identifying how long these effects last and whether they are reversible would be important to fully characterize the importance of genetic variation in social environment construction for long-lasting behavioral differences among individuals.

Testing hypotheses about behavioral development requires investigators to measure the behavior of multiple individuals or genotypes across experimentally manipulated social environments. In this study, the genotype, age, rearing environment and sex ratio of the stimulus flies with which each focal male interacted were all standardized and group size was experimentally varied. Even in these highly standardized social groups, different focal genotypes had different social experiences: consistently across replicates, some genotypes were attacked many times by stimulus males, whereas other genotypes were attacked only a few times or not at all. Genetic variation in social behavior is common (Meffert et al., 2002; Stirling et al., 2002), suggesting that genetic variation in social environment construction may be a commonplace or even ubiquitous feature of social interactions. Thus, even when studying questions in which social environment construction is not the focus and environments appear to be carefully controlled, investigators could derive insight from measuring the experiences of each experimental animal.

Overall, genetic variation in social environment construction may be a powerful, but overlooked, force influencing the development of complex phenotypes. Understanding the diverse pathways by which the genome can influence behavior and behavioral differences will provide novel insights into population and quantitative genetics, psychology and behavioral evolution.

Data archiving

Data reported in this paper have been deposited in Dryad. doi:10.5061/dryad.gp3ng