Experimental evolution with an insect model reveals that male homosexual behaviour occurs due to inaccurate mate choice

The existence of widespread male same-sex sexual behaviour (SSB) is puzzling: why does evolution allow costly homosexual activity to exist, when reproductive fitness is primarily achieved through heterosexual matings? Here, we used experimental evolution to understand why SSB occurs in the flour beetle Tribolium castaneum. By varying the adult operational sex ratio across 82–106 generations, we created divergent evolutionary regimes that selected for or against SSB depending upon its function. Male-biased (90:10 M:F) regimes generated strong selection on males from intrasexual competition, and demanded improved ability to locate and identify female mates. By contrast, Female-biased regimes (10:90 M:F) generated weak male–male competition, and relaxed selection on mate-searching abilities in males. If male SSB functions through sexually selected male–male competition, it should be more evident within Male-biased regimes, where reproductive competition is nine times greater, than in the Female-biased regimes. By contrast, if SSB exists due to inaccurate mate choice, it should be reduced in Male-biased regimes, where males experience stronger selection for improved mate finding and discrimination abilities than in the Female-biased regime, where most potential mating targets are female. Following these divergent evolutionary regimes, we measured male engagement in SSB through choice experiments simultaneously presenting female and male mating targets. Males from both regimes showed similar overall levels of mating activity. However, there were significant differences in levels of SSB between the two regimes: males that evolved through male-biased operational sex ratios located, mounted and mated more frequently with the female targets. By contrast, males from female-biased selection histories mated less frequently with females, exhibiting almost random choice between male and female targets in their first mating attempt. Following experimental evolution, we therefore conclude that SSB does not function through sexually selected male–male competition, but instead occurs because males fail to perfectly discriminate females as mates.

Empirical tests between these divergent explanations have not revealed a consistent reason for the widespread existence of SSB, and there is considerable variation between different taxa in SSB (Scharf & Martin, 2013), even when species are closely related (Serrano, Castro, Toro, & L opez-Fanjul, 2000). These different study findings could be the consequence of SSB having different functions in different taxa and/or circumstances. Here, we employed experimental evolution within a species to test explicitly whether maleemale competition or inaccurate mate discrimination can explain male SSB. We used the red flour beetle, Tribolium castaneum, a promiscuous species where SSB is recognized (Levan, Fedina, & Lewis, 2009). In this model, SSB generates measurable costs: when T. castaneum males invest in homosexual behaviour they are not engaged in searching for, courting or mating with females and fertilizing their eggs. In addition, there is some indirect evidence that SSB might function in intrasexual competition by reducing rival male life span: average life span of adults in single-sex male groups was under half that of males in isolation, or of females in single-sex groups, and many of the dead males in the group condition exhibited hardened white deposits around the mouth and tip of the abdomen (Spratt, 1980). We applied divergent experimental evolution regimes that allowed us to test between the two core hypotheses that SSB occurs (1) because it generates sexually selected benefits for males through competition or (2) because males do not perfectly identify females, so they mate indiscriminately with any adult to maximize female mating opportunities. Having maintained replicate independent lines evolved through divergent adult operational sex ratios (Lumley et al., 2015;Michalczyk et al., 2011b), we then conducted tightly controlled mate choice assays to measure how experimental evolution under different sexual selection regimes had shaped male SSB. Our Male-biased lines were reproduced through adult operational sex ratios containing 90 males and 10 females, while the Female-biased lines reproduced using 10 males and 90 females. Under Male-biased regimes, males must achieve fertilizations in the face of strong levels of sexual selection from maleemale competition. In tandem, males in Male-biased conditions face much greater selection to evolve abilities that improve mate location and discrimination, because females are rare in the adult population. Male-biased conditions will therefore promote the evolution of male behaviours that simultaneously improve maleemale competition and enhance female location and mate discrimination. By contrast, under Female-biased conditions, maleemale competition is weak, and males experience much more relaxed selection to locate and discriminate between potential mates because nine out of 10 adults encountered are female. Our Female-biased regimes therefore relaxed selection on the evolution of male behaviours that are required for reproductive competition, while simultaneously weakening selection on mate finding and discrimination abilities. Adult population densities (N ¼ 100) in every line and both regimes were kept identical throughout to maintain equal adult encounter rates. Since T. castaneum is a promiscuous species (Fedina & Lewis, 2008) in which females mate repeatedly with multiple males (Michalczyk et al., 2011a) and males have substantial mating rate and fertilization potential (Lumley et al., 2015), male and female encounter rates were expected to correlate closely with the operational sex ratio. Although there is limited evidence for it, if female T. castaneum take 'time out' of mating activity after copulation, this will only exacerbate the differences in selection acting on SSB between our Male-biased and Female-biased regimes: more mating opportunities in the Male-biased lines would increase any female 'time out' in that regime, making females even rarer, and therefore further increasing the selection on males from maleemale competition and female mate searching and discrimination.
Previous work with these lines has confirmed that male reproductive competitiveness has evolved to become stronger following selection under male-biased conditions (Godwin et al., 2017). The contrasting regimes therefore provide an ideal opportunity to test between explanations for the evolution of male homosexual behaviour. If SSB functions within maleemale competition, maleefemale signalling, mating practice or some other sexually selected route to indirectly improve male reproductive fitness, then we would predict increased selection for SSB under the Male-biased, strong sexual selection regime. Males that evolved through stronger levels of sexual selection in the Malebiased regime should therefore exhibit a greater level of SSB. On the other hand, if SSB exists because males fail to find and recognize female mates correctly, then we would expect the reverse outcome: males from the Male-biased regime have faced stronger selection to improve their abilities in locating and identifying females as mates, and therefore should evolve lower levels of SSB. Applying this logic in reverse, if male SSB functions within maleemale competition, males from Female-biased regimes exposed to relaxed levels of sexual selection should engage less in SSB. If, however, SSB is the result of erroneous female recognition, then the relaxed selection on mate location and discrimination in our Female-biased regimes (where most potential adult mates are female) should result in higher levels of SSB among Female-biased males. Having evolved replicate lines across 82 and 106 generations of these contrasting intensities of selection on SSB depending on its function, we then used experimental mate choice assays to reveal what evolutionary forces influence the existence of male homosexual behaviour.

Experimental Evolution and the T. castaneum Model
Tribolium castaneum demonstrates significant levels of SSB (Levan et al., 2009;Martin, Kruse, & Switzer, 2015;Spratt, 1980), is readily cultured in the laboratory under experimental control, freely engages in measurable mating behaviour, and can be reared from egg to adult in 1 month (Sokoloff, 1972).
Beetles were maintained in density controlled, nonoverlapping generations under standard conditions (30 ± 1 C, 60 ± 5% relative humidity and 16:8 h light:dark) with ad libitum fodder consisting of organic flour and yeast (9:1 by volume) topped with oats for traction (details in Godwin et al., 2017;Lumley et al., 2015;Michalczyk et al., 2011b, Michalczyk, Martin, Millard, Emerson, & Gage, 2010. Experimental evolution was applied by altering the adult operational sex ratio at every generation to create either Male-or Female-biased conditions for reproduction, as described previously in detail (Michalczyk et al., 2011b;Lumley et al., 2015). Experimental evolution took place through six independent lines, three per regime. In the Male-biased regime, 90 males and 10 females (all previously unmated) were placed in fresh fodder for 7 days of reproduction, after which adults were removed and eggs and offspring left to develop to the next generation (Fig. 1a). The Female-biased regime was engineered in the same manner, except that the adult operational sex ratio was reversed, comprising 90 females and 10 males. In the Female-biased regime, reproducing males were therefore nine times more likely to encounter a female than the Male-biased regime, and suffer nine times less competition for reproductive success. While these Male-biased and Female-biased operational sex ratios generate contrasting intensities of selection from reproductive competition and mate-finding abilities, their adult structures create identical theoretical effective population sizes, with microsatellite screening revealing similar levels of heterozygosity between the regimes (Lumley et al., 2015). In addition, the identical adult population densities (N ¼ 100) also equalized adult encounter rate.

Mate Choice Assays
Mate choice assays were conducted through two experimental repeats after 82 and 106 generations. Mating behaviour of 'focal' males from the Male-and Female-biased experimental evolution regimes was assayed within experimental trios, where simultaneous choice of a male and female sexual 'target' was presented to the focal male (Fig. 1b). All adults in the mate choice assays were reared to adulthood under identical conditions, having been isolated and sexed as pupae, and then stored singly in fodder-filled 1.5 ml Eppendorf tubes to metamorphose into adult imagos, and then allowed 12 ± 2 days posteclosion to ensure sexual maturity (Michalczyk et al., 2011b). Individual storage ensured that all adults in the assays were unmated virgins, and therefore without the potential for uncontrolled variance arising from prior mating and insemination activities. All adults emerged under identical conditions, thereby standardizing any sociosexual conditioning effects that could have influenced mating behaviour and SSB (Dukas, 2010;Engel, Manner, Ayasse, & Steiger, 2015;Fedina & Lewis, 2008).
Mate choice trials were conducted in 5 cm diameter plastic petri dishes with lightly scored floors to aid traction. Each trio consisted of (1) the focal selection line male (from either the Male-or Femalebiased background, and marked with a white paint spot on the thorax), whose sexual behaviour was recorded, and (2) the male and (3) female mating target. All targets were sourced from Georgia 1 standard laboratory stock, which is ancestral to the experimentally evolved lines. To allow focal male mate choice, and to restrict confounding interference between all three adults, male and female targets were tethered using 2 cm lengths of ultrafine silk cotton tied between the thorax and abdomen of either adult. The targets were tethered to opposite sides of the petri dish mating arena (marked as either male or female and oriented randomly) and could move freely within their own hemispheres, but could not interact and mate with each other, transfer substances such as pheromones or cuticular hydrocarbons by direct contact, or interfere with or interrupt the focal male's mounting or mating attempts with the opposite target Scharf & Martin, 2013). Our mate choice trios were therefore designed to give the focal male maximum opportunity to express his sexual behaviour, while limiting interference, courtship, mating or direct maleemale competition by the target adults.
Sexual behaviour was measured in a total of N ¼ 145 trios containing Male-biased males, and N ¼ 141 trios containing Female-biased males. To assay sexual behaviour, focal males from either experimental evolution background were introduced to the centre of the petri dish mating arena, equidistant from male and female targets. Sexual behaviour of the focal male with either target was then recorded for 15 min at 30 ± 1 C, 60 ± 5% relative humidity (Lumley et al., 2015). Sexual behaviour was categorized into either (1) mounting, where the focal male attempted to copulate with the target but did not remain on its dorsum for 36 s, or (2) mating where the focal male maintained a mounted copulatory position on the dorsum of the target for over 36 s, which is known to correlate with successful spermatophore transfer to females in T. castaneum (Bloch Qazi, Herbeck, & Lewis, 1996). Thus, mounting and mating frequency and durations were recorded by observers, allowing the following sexual behaviours exhibited by the focal In mate choice assays, selection line FBR and MBR focal males were provided with a simultaneous choice of virgin male and female targets, both of which were tethered to prevent interaction or interference with one another. If MBR males invested greater relative amounts of mating effort than FBR males on the male target, the hypothesis that SSB functions in sexually selected maleemale competition is supported. If MBR males invested less relative mating effort than FBR males on the male target, the hypothesis that SSB occurs through inaccurate mate discrimination is supported.
male to be assayed: (1) total mounting and mating behaviour; (2) the latency to first mounting and mating and the sex of the first mounting and mating target; (3) the proportion of total mounting and/or mating events on the female or male target, and (4) the proportion of total time within the 15 min observation period invested in mounting or mating either target.

Ethical Note
Beetles were maintained in conditions, and observed engaging in conspecific mating interactions, that are normal components of their life cycle (Fedina & Lewis, 2008;Levan et al., 2009;Martin et al., 2015;Sokoloff, 1972;Spratt, 1980). No invasive procedures were applied. Although male and female mating 'targets' were tethered to ensure they did not mate with each other or disrupt mating attempts by the focal male with the other target, they could move freely within their own hemispheres and were therefore able to physically resist mating attempts by the focal male. After each 15 min observation period, beetles were returned to their stock populations.

Data Analysis
All data were analysed with R.3.3.2 (R Core Team, 2017a) using the RStudio.0.99.903 wrapper (RStudio Team, 2016), and graphs plotted using 'ggplot{ggplot2}' (Wickham & Chang, 2016, following ;Weissgerber, Milic, Winham, & Garovic, 2015). Data were analysed using generalized linear mixed models (GLMMs), and maximum models were fitted using restricted error maximum likelihood (REML) available in 'glmer{lme4}' (Bates et al., 2016). The most appropriate error distribution for each GLMM was selected by examining diagnostic residual plots (Bolker et al., 2008;Crawley, 2013;Thomas et al., 2015). The total mounting and mating frequencies on both targets were analysed using a Poisson distribution with a log link function. The proportion of males mounting and mating the female target first used a Bernoulli binomial GLMM (where 1 ¼ mounting/mating the female first or 0 ¼ mounting/ mating the male target first) with a logit link function. The proportion of mounting events, mating events, total duration mounting and total duration mating that the male spent on the female target (out of the totals spent on both male and female targets) were analysed using binomial GLMMs with logit link functions (Thomas et al., 2015).
In all analyses, the experimental evolution regime (Male-or Female-biased) was entered as a fixed factor, and their three independent replicate lines nested as random factors, together with the sampling generation and experimental repeat (Bates, M€ achler, Bolker, & Walker, 2015). After each model was fitted, the significance of the experimental evolution regime was assessed by a likelihood ratio test between models, with and without the factor of interest, using c 2 testing in 'drop1{stats}' (Bolker et al., 2008;R Core Team, 2017b).

Total Mating Effort
There were no overall differences between Male-biased and Female-biased regime focal males in their mating activity, irrespective of male or female target. On average, Male-biased regime males engaged in 4.3 ± 0.2 mountings within each 15 min trial, and Female-biased males engaged in 4.4 ± 0.2 mountings (c 2 3,283 ¼ 0.1, P ¼ 0.780; Fig. 2a). Mating frequency was also similar between focal male regime background (irrespective of target): Malebiased ¼ 1.8 ± 0.1 matings and Female-biased ¼ 1.7 ± 0.1 matings by focal males (c 2 3,211 ¼ 0.7, P ¼ 0.400; Fig. 2b). Moreover, there were no differences between Male-biased and Female-biased focal males in total time invested in mounting both targets (c 2 3,283 ¼ 0.1, P ¼ 0.760; Fig. 2c), or in their total mating effort (c 2 3,211 ¼ 0.1, P ¼ 0.790; Fig. 2d). The contrasting experimental evolution regimes had therefore not caused divergence in overall male mating activity through our trials.

First mounting and mating
Focal males from the Male-biased experimental evolution regimes were 20% less likely to mount the male target first compared with focal males from Female-biased backgrounds (c 2 3,283 ¼ 9.4, P ¼ 0.002; Fig. 3a). Male-biased males exhibited a clear preference for the female targets, with 71% of the first mounts upon the female. By contrast, males from the Female-biased regime exhibited near random choice over their first mating partner, with 49% of the first mounts occurring on male targets versus 51% on female targets. When we analysed 'matings', where mounts in the copulatory position lasted more than 36 s, 77% of Male-biased males committed to their first mating with the female target, compared with 60% of the Female-biased males (c 2 3,211 ¼ 7.4, P ¼ 0.007; Fig. 3b).

Mounting and mating frequencies
Although there were no differences in overall mounting or mating frequencies by males between either experimental evolution regimes (Fig. 2), Male-biased males performed 9% fewer mountings on the male targets than Female-biased males (c 2 3,283 ¼ 4.4, P ¼ 0.036; Fig. 4a). In addition, as a proportion of total matings, Male-biased males invested 12% more of their mating frequency with females than males from Female-biased backgrounds (c 2 3,211 ¼ 5.1, P ¼ 0.024; Fig. 4b).

Mounting and mating time investment
Despite similar total time invested by focal males from either experimental evolution regime in mounting and mating (Fig. 2), focal males from the Male-biased background spent 12% more of their mounting time targeting the female, with 68% of their total time spent mounting females (and 32% investing in SSB on males). By contrast, Female-biased regime focal males spent 56% of their time mounting female targets (and 44% engaging in SSB with males; c 2 3,283 ¼ 5.7, P ¼ 0.017; Fig. 4c). Likewise, of the total time invested in matings lasting over 36 s, Male-biased regime focal males invested 79% of this time targeting the female, and 21% engaging in SSB with male targets. By contrast, Female-biased focal males invested 65% of their mating time with female targets, and 35% engaging in SSB with male targets (c 2 3,211 ¼ 12.6, P < 0.001; Fig. 4d).

DISCUSSION
Following experimental evolution under divergent intensities of sexual selection our study reveals that male SSB in T. castaneum is the consequence of inaccurate mate discrimination, where males are targeted for mating instead of females. We found no evidence that SSB is the consequence of sexually selected maleemale competition or female choice. Instead, our results showed that males from Male-biased experimental evolution regimes that had evolved under stronger opportunities for sexual selection engaged in less SSB than males that evolved under Female-biased ratios. By comparison with males that evolved through Female-biased operational sex ratios, Male-biased regime males demonstrated superior abilities for recognizing females as mating targets, through which direct reproductive fitness will be achieved. As well as investing more total effort into mounting and/or mating females, Male-biased regime males were more likely to mount or mate the female target first after initial introduction to their mate choice trio. By contrast, males from the Female-biased evolutionary background, experiencing weaker sexual selection and relaxed selection on female location and mate discrimination, engaged much more frequently in SSB, choosing the sex of their first mating attempt almost randomly (Fig. 3a).
Overall, we found that males from Male-biased and Femalebiased evolutionary backgrounds engaged in similar levels of total mating investment within our trials. On average, focal males engaged in 4.3e4.4 mounting attempts across each 15 min mating trial, and 1.7e1.8 matings lasting more than 36 s. We therefore found no differences in levels of overall male mating effort between Male-biased and Female-biased backgrounds, removing the possibility that SSB arises because of biased levels of sexual activity. However, within these equivalent levels of sexual activity, Malebiased regime males invested significantly more mating effort towards the female targets and discriminated more effectively against SSB and male targets. In our Male-biased selection regime, where females were nine times less abundant in the adult mating population (and competitor males nine times more abundant), selection was predicted to act on superior female-finding and mate choice abilities if SSB occurs due to inaccurate mate choice: our mating trial assays revealed exactly this pattern. Previous work has shown that changing the operational sex ratio and proximate mating environment can change engagement in male SSB. For example, reduced female availability improved mate discrimination up to eight-fold in male field crickets, Teleogryllus oceanicus (Bailey & French, 2012), and when male density was increased during maturation in T. castaneum, SSB decreased (Martin et al., 2015). Relative to our Female-biased lines, we found that selection reduced male engagement in SSB in the Male-biased lines, which would be expected if SSB occurs due to inaccurate mating discrimination, and there is no sexually selected direct or indirect reproductive fitness to be gained from investing mating effort towards other males. Our study using experimental evolution concords with the ca. 80% of studies (N ¼ 87) reviewed by Scharf and Martin (2013) where inaccurate mate discrimination was the explanation for widespread SSB. A large number of studies have failed to find sexually selected explanations for SSB functioning through maleemale competition, such as through competitive dominance, signalling, mating practice or indirect sperm transfer (e.g. Bailey & French, 2012;Benelli & Canale, 2012;Dukas, 2010;Harari, Brockmann, & Landolt, 2000;Levan et al., 2009;Shimomura, Mimura, Ishikawa, Yajima, & Ohsawa, 2010). In T. castaneum, for example, mounting males actively engaging in SSB were no larger and did not gain greater reproductive fitness than the mounted males, lending little support to social or competitive dominance (Levan et al., 2009). Moreover, males initially engaging in SSB were no more successful in subsequent heterosexual matings, providing no support for mating practice being a reason for SSB (Levan et al., 2009). There is some evidence that SSB in T. castaneum can allow indirect sperm transfer leading to significant paternity gains via male proxy (Haubruge, Arnaud, Mignon, & Gage, 1999). However, further research has concluded that this phenomenon is rare: Levan et al. (2009) found that indirect sperm transfer only occurs in 7% of SSB matings, and that it achieves only 1% subsequent paternity, while Tigreros, South, Fedina, and Lewis (2009) found no viable sperm transfer from SSB. Although indirect sperm transfer could reduce some selection against SSB in T. castaneum, males will clearly achieve far greater reproductive fitness by targeting sperm transfer to females, especially under initial mating opportunities with virgins. If indirect sperm transfer was an important source of indirect reproductive fitness for males, we might expect SSB to be commoner in our Male-biased regime males, where increased opportunities for indirect sperm transfer exist and there is stronger competition for fertilizations.
The wider evidence that SSB can function within sexually selected maleemale competition is scarce, but does exist in some systems (Emlen, 2008). A competitive advantage for males engaging in SSB has been proposed in ca. 10% of studies (N ¼ 87) reviewed by Scharf and Martin (2013). Males can use SSB to incapacitate or damage male rivals, causing reduced fitness and survival among competitor males (Bieman & Witter, 1982;Maklakov & Bonduriansky, 2009). For example, the high mortality of all-male T. castaneum groups is associated with the presence of desiccated ejaculates around the mouthparts and/or anogenital opening (Spratt, 1980), and abdominal damage has been found on male C. maculatus (Maklakov & Bonduriansky, 2009). However, studies directly linking SSB-derived damage and reduced male fitness are lacking, and the known costs of engaging in SSB also need to be considered. A review of 25 studies of SSB in Lepidoptera concluded that 68% of cases could be explained via intrasexual competition (Caballero-Mendieta & Cordero, 2012). For example, SSB in the oriental fruit moth, Grapholita molesta, was displayed when latearriving males interfere with males that are already engaged in courting females, reducing the subsequent mating success of courting males and allowing the late arrivals to gain reproductive success (Baker, 1983). In the broad-horned flour beetle, Gnatocerus cornutus, which reproduces through territoriality and ritualized physical fighting, SSB can act as a form of intrasexual competition, as pairs of males engaging in SSB subsequently showed reduced aggression where one consistently mounted the other, compared to pairs without SSB or fluctuating roles (Lane, Haughan, Evans, Tregenza, & House, 2016). Moreover, submissive males receiving SSB attempts had reduced subsequent mating success and reproductive fitness, relative to dominant males engaging in SSB or males exhibiting no SSB (Emlen, 2008;Lane et al., 2016).
Despite the differences in rates of male SSB between our two selection regimes, we still found significant levels of SSB across all our mate choice trials, even those involving males that evolved through a Male-biased selection regime. Although varying by context and test condition, male homosexual mating activity is common in T. castaneum, and previous experiments using singlesex or mixed-sex quartets revealed SSB levels that were similar to our own. In a selection experiment across three generations, Castro, Toro, and L opez-Fanjul (1994) found evidence for genetic control of SSB, with realized heritability across four replicates of ca. 10%. Within two-male þ two-female quartets, an average of 30% of all male mating activities involved homosexual mountings, and this could be increased to around 40% across three generations by selecting males engaging in most SSB to sire the next generation (Castro et al., 1994). When focal males are placed within a quartet containing one male and two female mating targets, 33% SSB would be expected if 'focal' males exhibited no discrimination, so the homosexual mating rates found by Castro et al. (1994) indicate near-random mate choice. Using groups containing both T. castaneum and Tribolium confusum, Serrano et al. (2000) explored the relative levels of SSB shown by males of either species, by housing two conspecific males with two to four females of the other species. Tribolium castaneum males frequently engaged in SSB, with 53% of the mating activity being homosexual, versus 32% in T. confusum (Serrano et al., 2000). The mating activity we found in our Female-biased regime males also indicated a lack of discrimination, with an average of 49% of first mounts and 44% of total mounting investment on the male SSB target (Figs 3 and 4), contrasting with 39% and 32% of SSB mounting activity for the Malebiased males. Although conditions and contexts are very different, our SSB data by comparison with those of Castro et al. (1994) and Serrano et al. (2000) suggest that SSB remained similar to stock conditions in the Female-biased regime but reduced through selection in our Male-biased regime. However, because our experimental evolution regimes are very different to ancestral stock conditions in terms of effective population size, density and the possibility for uncontrolled drift and other evolutionary changes over 82e106 generations of stock maintenance, we cannot know whether SSB increased in the Female-biased regime and/or decreased in the Male-biased regime, relative to their ancestors.
To standardize behavioural measurements, we assayed SSB within trios where focal experimental line virgin males were tested  . Differences between focal males from Female-biased (purple) versus Malebiased (blue) experimental evolution regimes in the preferred sex of their first mounting or mating target. Sexual behaviour is defined as (a) attempting to mate through mounting, or (b) matings in which unbroken mounting lasted for >36 s. Error bars are 95% confidence intervals and experimental trial sample sizes are presented at the base of the plots. simultaneously against virgin male or female mate choice targets. The use of trios all containing virgins allowed consistent assays and tight experimental control, but the mating conditions are obviously different to those operating within each line through experimental evolution, where there will be added variation in mating conditions, individual mating history and interference, and so the costs and benefits of SSB may also be different. However, it would be impossible to measure SSB in larger groups of males and females without the addition of uncontrolled confounds arising from variation in individual mating history and status, as well as interference between adults (which is why we used tethered mating targets). There is good evidence that mating history and experience affect SSB in this system. In experiments investigating how social conditions affect SSB in T. castaneum, Martin et al. (2015) showed that SSB varied depending on prior sociosexual exposure, with increasing homosexual activity when males were held in all-male groups for longer periods, and SSB activity was greatest among males held in isolation compared with groups. In these experiments, SSB was measured in the experimental males when they were placed into quartets with three other males for 15 min observation periods. Seven-day-old males previously isolated showed an average of 4.5 homosexual mounts per 15 min observation period in the quartets, whereas males previously held in groups with seven other males exhibited 1.5 SSB mounts per trial; males previously housed with seven females showed 2.5 SSB mounts per trial (Martin et al., 2015). Previous sociosexual experience therefore has a strong influence over the relative levels of SSB, which is why we applied standardized conditions to assay SSB following experimental evolution.
If SSB occurs due to inaccurate mate discrimination, and does not help in maleemale competition, why do male flour beetles still engage in significant levels of SSB, even when they have been under more than 100 generations of strong evolutionary pressure through our Male-biased selection regime to reduce this costly activity? It is possible that the reproductive ecology of T. castaneum makes it particularly challenging for males to distinguish between potential mates. Flour beetles live within their stored product food, often burrowing through it, and frequently at high infestation densities. Most communication is through olfaction (Shimomura et al., 2010), but sex-specific cues may be hard to signal or receive in these conditions, making discrimination between males and females as mates difficult Castro et al., 1994;Engel   . Comparison of sexual activity of focal males from Male-biased (blue bars) and Female-biased (purple bars) experimental evolution regimes. Sexual activity is described as: (a) proportion of mounting events targeting the female, (b) proportion of mating events targeting the female, (c) proportion of total mounting time on the female target, and (d) proportion of total mating time with the female target. Matings are defined as periods of unbroken mounting lasting >36 s. Box plots have a horizontal median line, interquartile range (IQR) boxes and 1.5 Â IQR whiskers. Sample sizes are below boxes, empty dots are experimental trial data points and black dots are means. et al., 2015). Linked to this is the possibility that it may be less costly for overall male reproductive fitness to mate indiscriminately if, by being more discriminatory, there is the potential to lose heterosexual mating opportunities. Tribolium castaneum is a promiscuous species (Michalczyk et al., 2011a) in which males have a high potential reproductive rate (Lumley et al., 2015). Engaging in SSBs, although erroneous and without direct reproductive benefit, may enable males to maximize lifetime reproductive success if the species possesses a challenging mate discrimination system. If evolving a more discerning mate choice system also translates into more missed mating opportunities with hard-to-identify females, SSB can evidently persist in the T. castaneum mating system, even in male-biased evolutionary regimes where homosexual matings will impose more significant reproductive fitness costs for individual males (Taylor & Sokoloff, 1971;Thornhill & Alcock, 1983).

Declaration of Interest
The authors have no competing financial interests related to this research.

Author Contributions
Experimental evolution lines have been maintained for 10þ years by Ł.M., O.Y.M., A.J.L., R.V., K.S. and M.J.G.G. M.J.G.G. and K.S. conceived and designed the study, with input from all authors. K.S., T.T., J.G. and R.V. collected the mating trio data, and K.S. led the analyses. The manuscript was written by K.S. and M.J.G.G., with contributions from all authors.