Introduction

Social interactions between the sexes during mating are pivotal for their reproductive success1,2,3,4,5, and animals often employ a suite of behaviors to communicate their quality and interests to potential mates5,6,7,8. To maintain reproductive barriers between species while permitting sexual selection within species, courtship interactions are often rapidly diversifying. Courtship behaviors exhibit exceptional diversity in complexity and form, often with quantitative and qualitative differences among even closely-related lineages8,9,10,11. The real-time production of social behaviors requires complex neural orchestration that integrates external and internal cues to guide adaptive motor responses in relevant social contexts. During the elaboration and diversification of courtship behaviors, how new behaviors are incorporated into existing complex social contexts and neural circuitry in a temporally coordinated and meaningful manner remains unknown.

Newly originated behaviors offer a favorable time window to infer the ancestral and derived states, and to pinpoint the initial changes at play before extensive secondary evolutionary changes mask their origins. However, a system to investigate recently originated social behaviors in species amenable to functional comparison of neural circuits has been lacking. In this study, we leveraged Drosophila species as an emerging neural comparative model12,13,14,15,16,17 and established a comparative paradigm to explore the origin of new social behaviors at both behavioral and neural levels. Shifting away from the traditional spotlight on male sexual behaviors18, we report a recently originated female behavior in D. santomea, referred to as wing spreading, in which a female extends her wings in response to a male’s courtship song to signal her receptivity. Combining a phylogenetic survey, behavioral characterization, and functional manipulation of neural circuits between species, we provide insights into the ultimate and proximate mechanisms underlying the origin of wing spreading. We demonstrate that wing spreading evolved as a new receptive female signal that dynamically shapes a male’s courtship efforts and copulation outcome. We further show that the origin of wing spreading is mediated by the co-option of a descending circuit node that drives a conserved abdominal behavior and the refinement of a latent and plastic ancestral circuit.

Results

Wing spreading is a newly originated receptive female response to male song

In Drosophila, the two sexes typically engage in an extended period of courtship interaction, where a female assesses a male based on his signals such as song, dance, and sex pheromone to inform her copulation decision2,19. Females communicate sexual interests through two conserved female-specific displays: vaginal plate opening (VPO), indicative of receptivity20, and ovipositor extrusion, indicative of rejection21,22. In D. santomea, a closely-related species of D. melanogaster, we observed that a female may extend her wings laterally when a male vibrates one wing to sing a courtship song (Fig. 1a, Supplementary Movie 1). In response to the female’s wing extension, the male may continue singing in place or approach the female to lick her genitalia, the latter of which may be followed by a copulation attempt. This interaction often occurred repeatedly before copulation (Fig. 1a and Supplementary Fig. 1). The female wing extension behavior has not been reported within the melanogaster subgroup but is reminiscent of the female wing spreading behaviors described before copulation in species of some distantly related lineages such as the virilis group20,23,24. Therefore, we refer to this behavior in D. santomea also as wing spreading based on similarities of their motor pattern and the pre-copulatory context, noting that the precise social conditions and functions of wing spreading may differ among species.

Fig. 1: Wing spreading in D. santomea is a recently originated female receptive behavior in response to male pulse song.
figure 1

a Representative behavioral ethograms of 2-min windows in 5 courting D. santomea pairs. Gray box: zoom-in showing song trace, ethogram annotation, and still photos of a courting pair during a clack and a pulse train. Arrows point to male single wing extension during a pulse train, and the arrowhead points to female wing spreading (WS). b Probability of observing WS in response to a male pulse train in intact, antennae cut (AnC), and aristae cut (ArC) females, and in pairs recorded in darkness. n = 21, 10, 15, 17. c, Probability of observing WS in response to a male pulse train in females separated by age-related sexual maturity and mating status. 1 day old females are sexually immature. n = 10, 39, 11. d Probability of observing WS in response to a male pulse train in sexually mature (4–6 day old) ummated females, separated by whether the pair copulated during the recording period. n = 10, 29. e, f Probability of observing WS in response to a male pulse train (bar, sliding windows of 0.1 width and 0.05 step size) over time and the corresponding density distributions (curve) in pairs that did not copulate (e) or copulated (f) during the recording period. Time was scaled for each pair such that 0.00 represents the start of recording, and 1.00 represents the end of recording (e) or the onset of copulation (f). n = 443 pulse trains from 12 pairs (e); 458 pulse trains from 16 pairs (f). g Probability of observing WS in response to conspecific male courtship songs in the melanogaster subgroup. n = 22, 11, 10, 13, 10, 10, 10, 10, 10, 8, 8. Error bars show mean ± SEM. Statistical significance was tested with two-sided ANOVA on linear models with post hoc Tukey test. Source data are provided as a Source Data file.

D. santomea males produce two types of courtship songs: trains of louder clack generated by bilateral wing vibration, primarily during chasing, and trains of quieter pulses generated by unilateral wing vibration, often when females slow down to allow males to sing in close proximity13,25,26,27. We found that wing spreading responded selectively to pulse and not clack trains (Fig. 1a). Consistent with the observation that female wing spreading followed an auditory signal, removing a female’s antennae or aristae to abolish her hearing28 completely eliminated wing spreading (Fig. 1b). In comparison, females invariantly performed wing spreading in light versus dark conditions, showing that the production of wing spreading does not depend on visual signals (Fig. 1b).

We further determined how wing spreading is modulated by a female’s internal state of receptivity. In sexually mature unmated females, 30.4% of pulse trains elicited female wing spreading. However, unreceptive females, either sexually immature or recently mated29, rarely exhibited wing spreading (Fig. 1c). Moreover, among the mature unmated females, those who had accepted a male’s copulation attempt responded with wing spreading more frequently than those that did not, suggesting a correlation between wing spreading probability and female receptivity to copulation (Fig. 1d). During the courtship interaction, a female continuously evaluates male quality based on his signals, which might influence her receptivity and inform her copulation decision. Indeed, we observed a major increase in wing spreading probability leading up to copulation (Fig. 1e, f), and 75.0% of the last pulse train before copulation elicited wing spreading. Therefore, wing spreading probability reflects not only female receptivity at the level of sexual maturity and mating status, but also temporal changes during the courtship interaction.

Given that wing spreading behavior has not been previously reported in the melanogaster subgroup, we asked if wing spreading represents a recent behavioral innovation in D. santomea. We therefore recorded receptive females from five species in this subgroup spanning approximately 12 million years (Myr) of divergence30: D. melanogaster, D. simulans, D. yakuba, D. teissieri, and D. erecta. In none of these species did we detect wing spreading (Fig. 1g; Spieth20 documented a 10° wing spreading as an acceptance signal in female D. simulans, but we did not observe such behavior in our strain). We further sampled additional strains of D. santomea and its closest sibling species D. yakuba. Consistently, females from all D. santomea strains exhibited wing spreading, while none from the D. yakuba strains did (Fig. 1g). This indicated that wing spreading is a fixed species difference instead of an intraspecific variation among D. santomea strains. D. santomea is endemic to the volcanic island of São Tomé, while D. yakuba is widely distributed in Africa31. We conclude that wing spreading recently originated in the island species D. santomea when it diverged from D. yakuba about 0.4–1 Myr ago32,33,34.

Function of wing spreading as a receptive female signal

Female wing spreading might be a social signal that actively modulates a male’s behavior or simply a facilitating act that exposes her genitalia and thereby assists a male’s licking and attempted copulation. To distinguish between these scenarios, we examined the effect of abolishing wing spreading, by removing a female’s wings, on copulation success. A reduction in copulation success would be suggestive of wing spreading’s signaling role, while an increase would be suggestive of its facilitative role. We found that males paired with wing-cut females sang a similar amount of pulse trains (Supplementary Fig. 2a), but had a much lower copulation rate than those paired with intact females (Fig. 2a), supporting that female wing spreading is a functional signal. Consistent with wing spreading being a species-specific signal, wing removal in D. yakuba and D. melanogaster, whose females do not perform wing spreading, did not affect their copulation rate (Fig. 2a).

Fig. 2: Wing spreading-dependent copulation success and song modulation in D. santomea.
figure 2

a Proportion of pairs with intact or wing-cut (WC) females that succeeded in copulation in each species. Height of each bar represents the proportion. Error bars represent the 95% confidence interval. Fractions at the base of each bar denote “number of pairs that copulated”/“total pairs tested”. Significance tested by two-sided Fisher’s exact test. n = 20, 28, 30, 30, 28, 26. b Mean length of pulse trains separated by whether they elicited wing spreading (WS) and whether the pair copulated during the recording period. Dot size corresponds to the number of pulse trains of each type in each pair. n = 12, 8, 16, 15. c, d Mean latency of WS from pulse train onset (c) and mean pulse train length after WS onset (d), respectively, separated by whether the pair copulated during the recording period. In (d), the non-parametric two-sided Mann-Whitney U test is used to test for statistical difference between the two groups. n = 8, 15. e Mean length of pulse trains in pairs with intact females, separated by whether they elicited WS, and in pairs with WC females. Only pairs that did not copulate during the recording period are shown. n = 10, 6, 11. Dot size in (be) corresponds to the number of pulse trains of each type in each pair. Unless otherwise specified, error bars show mean ± SEM and statistical significance was tested with two-sided ANOVA on linear models (c), or linear mixed models using pair identity as a random effect (b, e), with post hoc Tukey test. Source data are provided as a Source Data file.

We next sought to understand how wing spreading, by communicating a female’s receptivity, alters a male’s behavior to influence the copulation outcome. We observed that wing spreading coincided with a longer pulse train in pairs where females eventually accepted the males’ copulation attempts (Fig. 2b and Supplementary Fig. 2b), thus prompting two possibilities. Firstly, female wing spreading motivates a male to sing longer pulse trains, with the male’s ability to adjust singing efforts predicting or directly affecting his copulation success. Alternatively, longer pulse trains are more potent at eliciting a female’s wing spreading response, and males who produce these longer pulse trains have higher copulation success. We found that wing spreading typically occurred shortly after the start of a pulse train, indicating that a female’s decision to display wing spreading did not depend on hearing a long pulse train. Concordantly, the long pulse train associated with wing spreading in copulated pairs resulted from continued singing after wing spreading began (Fig. 2c, d and Supplementary Fig. 2c, d). In addition, we directly tested the impact of wing spreading on the length of pulse trains by removing female wings to prevent wing spreading. We found that the duration of pulse trains were comparable to those not associated with wing spreading and significantly shorter than wing spreading-associated pulses (Fig. 2e and Supplementary Fig. 2e). Taken together, wing spreading serves as a functional female signal that promotes sustained pulse singing in males. The link between enhanced male singing efforts and copulation success further points to sexual selection favoring males who adeptly respond to the wing spreading signal.

D. santomea and its sibling species D. yakuba occupy a hybrid zone and naturally hybridize31,35,36, raising the possibility that wing spreading might contribute to species recognition and isolation during courtship. Therefore, we further asked if D. yakuba males responded to D. santomea female wing spreading. We found that D. yakuba males courted D. santomea females, albeit less intensely than D. santomea males did in conspecific pairings (Supplementary Fig. 2f). Removing females’ wings in this heterospecific context had no effect on male courtship intensity (Supplementary Fig. 2f), which was the same as in the conspecific context (Supplementary Fig. 2a). D. santomea females did respond to D. yakuba pulse songs with wing spreading but much less frequently (Supplementary Fig. 2g, compare with Fig. 1b, c). Under this heterospecific courtship context, wing spreading was not associated with longer pulse trains, and removing D. santomea females’ wings had no effect on D. yakuba male pulse train length (Supplementary Fig. 2h, i). Therefore, the signaling centered around wing spreading breaks down in heterospecific courtships, suggesting that wing spreading might be one of the premating mechanisms preventing hybridization between D. santomea and D. yakuba.

Relationship between wing spreading and VPO

To understand how the newly originated wing spreading behavior is integrated into the pre-existing courtship ritual, we examined the relationship between wing spreading and other female behaviors. Like wing spreading, VPO (when a female extends her abdomen and pushes open her vaginal plate) was reported to be a response to male courtship song in receptive females in D. melanogaster37. Given the similarity between wing spreading and VPO in both the external sensory stimulus and the associated female receptive state, we tested if the two behaviors are associated.

In this dataset, a pulse train could evoke wing spreading and VPO simultaneously (VPO + WS; 39.5%), just VPO (VPO-only; 17.1%), or neither behavior (Neither; 43.4%). Thus, wing spreading always co-occurred with VPO, and we never observed ovipositor extrusion in sexually mature unmated females. Using SLEAP, a deep-learning based animal pose tracker38, we monitored changes in female abdomen length as a quantitative readout for VPO and wing angle for wing spreading before, during, and after hearing a pulse train (Fig. 3a–c). The velocity and relative positions of the interacting sexes are shown in Supplementary Fig. 3. Most notably, the VPO + WS events revealed a linearly correlated increase (p < 1 × 10−10, adjusted R2 = 0.980) in abdomen length and wing angle upon pulse song onset until the maximum abdomen length was reached (Fig. 3c). Nonetheless, many VPO events happened without wing spreading. VPO + WS events showed significantly more intense VPO than VPO-only events, measured by the maximum extension of abdomen (Fig. 3d). The co-occurrence and quantitative scaling of wing spreading with VPO, as well as its preferential association with more intense VPO, together suggest that wing spreading is layered on top of the conserved behavior VPO to communicate non-identical social information, potentially signaling a higher receptivity level, during the courtship interaction.

Fig. 3: Wing spreading scales with VPO and co-occurs with VPO of higher intensity.
figure 3

a–c Temporal relationship between normalized female abdomen length and female wing angle, averaged by event type: Neither (a), VPO only (b) and VPO + WS (c). Pulse onset is marked as a triangle. Gray arrow behind data points in (c) represents an approximate progression of data points. Inset diagrams illustrate each event type at maximum abdomen length and/or wing angle. n = 207 (a), 52 (b), 45 (c) events from 13 females. d Maximum normalized female abdomen length compared across all event types. Statistical significance was tested with two-sided ANOVA on linear mixed models, using pair identity as a random effect, with post hoc Tukey test. Error bars show mean ± SEM. n = 207, 52, 45. Source data are provided as a Source Data file.

Co-option of VPO command neurons in wing spreading

We hypothesized that wing spreading emerged through modification of pre-existing female sexual circuits. Many circuit elements that encode female-typical behaviors express the sex determination gene doublesex (dsx), which undergoes splicing into sex-specific isoforms to guide the development of sexually dimorphic neural circuits17,37,39,40,41,42,43,44,45,46. In the brain of D. melanogaster, dsx neurons are organized in anatomically and functionally discrete neuronal clusters that function in various aspects of female reproductive behaviors37,39,41,42,43,44,46,47,48,49. For instance, pC1 neurons encode a female’s mating status43,48,50. Additionally, vpoDN (also known as pMN2) is a single pair of descending neurons that integrates the external and internal signals to function as a command control of VPO. They receive direct inputs from pC1 neurons and the male song-tuned auditory neurons in the brain, and project to the ventral nerve cord (VNC), primarily _targeting the abdominal circuit37.

To compare the function of dsx brain neurons across species in relation to the origin of wing spreading, we developed genetic tools that specifically labeled and manipulated dsx brain neurons in D. santomea, its sibling species D. yakuba, and the model species D. melanogaster. Specifically, we generated a brain-specific flippase transgene and combined it with dsx-GAL417 to restrict GAL4-dependent expression of effector genes to dsx neurons in the brain of D. yakuba and D. santomea. The gross anatomy of dsx brain neurons labeled was similar across the three species (Fig. 4a). By expressing CsChrimson51, we optogenetically activated dsx brain neurons in isolated, freely-moving females and tracked their body coordinates using SLEAP38. Neural activation drove robust abdomen extension in all three species (Fig. 4b, c and Supplementary Movie 2). Based on findings in D. melanogaster, this abdomen phenotype can be readily explained by the activity of vpoDN in triggering VPO and/or the activities of DNp13 (also known as pMN1) and pC2l in triggering ovipositor extrusion37,44,46,47. In contrast to the conserved abdomen phenotype, the same activation triggered robust wing spreading (manifested as an increased wing angle) only in D. santomea females (Fig. 4d, e and Supplementary Movie 2). Remarkably, decapitated females with only VNC neurites of vpoDN and DNp13 descending neurons activated (Fig. 4a) largely recapitulated earlier results: females from all three species showed similar abdomen extension, but only D. santomea females displayed robust wing spreading (Fig. 4f–i, Supplementary Movie 2), effectively restricting the neurons responsible for wing spreading in D. santomea to the two candidate neuron pairs. Unlike VPO and wing spreading, ovipositor extrusion represents a rejective female state21,22,44,46. Further, in natural behaviors of D. santomea, wing spreading obligately co-occurs with VPO while never with the rejective behavior ovipositor extrusion. Taken together, we inferred that activation of vpoDN elicited wing spreading in D. santomea.

Fig. 4: Activation phenotypes of brain dsx neurons across three species.
figure 4

a Confocal images of female dsx brain neurons in the brain (top) and VNC (bottom) of each species. Only two pairs of neurons, vpoDN and DNp1337,44, project into VNC. Arrowheads highlight VNC projections of vpoDN and arrows highlight that of DNp13. The neuron schematic of vpoDN is based on our confocal images and the neuron schematic of DNp13 was adapted from44 with permission from the publisher. Scale bars: 50 µm. n = 10 biological replicates for each species over 2 rounds. b–i, Behavioral phenotypes of optogenetically activating dsx brain neurons in intact (be) and decapitated (fi) females of each species. b, d, f, h Mean normalized abdomen length (b, f) and wing angle change (d, h) of intact females (b, d) at 1.6 μW/mm2 or decapitated females (f, h) at 0.8 μW/mm2. Activation window is denoted by bars above each plot. Shaded areas represent the SEM. Inset diagrams illustrate how abdomen lengths or wing angles were measured. n = 10 (D. melanogaster), 8 (D, yakuba), 9 (D. santomea). c, e, g, i Maximum normalized abdomen length (c, g) and wing angle change (e, i) of intact females (c, e) or decapitated females (g, i) under each activation intensity. Two-sided Mann-Whitney U tests were performed only between D. melanogaster and D. santomea (activation triggered female song in D. yakuba). Curve and error bars show mean ± SEM. n = 10 (D. melanogaster), 7 (D, yakuba), 8 (D. santomea). Source data are provided as a Source Data file.

Aside from the wing spreading phenotype in D. santomea, we also observed behavioral changes in the other two species upon activating dsx brain neurons. In D. yakuba, females moved wings inward while generating a polycyclic song (Supplementary Fig. 4a and Supplementary Movie 3), a behavior that has not been observed in wildtype D. yakuba in this study nor previous ones. In D. melanogaster, there was a slight increase in the wing angle upon activation (Fig. 4d, h), contributed by a few females (30.0% intact, and 20.0% decapitated) exhibiting wing spreading (Supplementary Fig. 4b and Supplementary Movie 4). Therefore, D. melanogaster has a latent circuit for wing spreading.

Latent potential of vpoDN to drive wing spreading in D. melanogaster

Given the likely role of vpoDN in wing spreading in D. santomea, we hypothesized that the activated wing spreading phenotype in D. melanogaster also stemmed from the activity of vpoDN. Indeed, optogenetic activation of vpoDN neurons using a previously reported genetic reagent37 (Fig. 5a) induced VPO in all females and wing spreading in 21.9% of females (Fig. 5b, Supplementary Fig. 5a, b, Supplementary Movie 5). We note that this vpoDN line has a different genetic background from the reagent labeling all dsx brain neurons. The idiosyncrasy of vpoDN in inducing wing spreading across different genetic backgrounds of D. melanogaster suggested that it might be attributable to stochasticity during development. Environmental factors, such as a high temperature during development, can challenge the robustness of non-canalized developmental mechanisms and introduce stochasticity52,53,54. Hence, we tested the effect of developmental temperature, an impactful environmental factor on neuronal morphology and synaptic physiology55,56,57, on the efficacy of vpoDN activation in eliciting wing spreading. Intriguingly, rearing flies at a high temperature of 29 °C, relative to 23 °C, during the larva and pupa stages drastically boosted vpoDN’s potential to elicit wing spreading (Fig. 5c–g, Supplementary Fig. 5c–j) to 71.3% of females. This temperature effect was robustly manifested across different activation intensities (Fig. 5g and Supplementary Fig. 5c, d, g, h). In contrast, VPO was fully canalized to the varying developmental temperature, and no major effect was observed for the proportion of responding females (100% versus 100%) or the extent of abdominal extension (Fig. 5d, f and Supplementary Fig. 5e, f). In sum, vpoDN has a latent potential to induce wing spreading in D. melanogaster, and this potential is idiosyncratic and strongly modulated by temperature-dependent developmental plasticity.

Fig. 5: Idiosyncratic and plastic latent potential of wing spreading in D. melanogaster.
figure 5

a Confocal image of vpoDN neurons in D. melanogaster vpoDN-SS2 > UAS-CsChrimson:mVenus female brain and VNC. Scale bars: 50 µm. n = 12 biological replicates over 2 rounds. b Proportion of VPO and wing spreading (WS) events in response to 10 activation bouts with intensities ramping from 0.4 to 4.1 µW/mm2. Each dot represents an individual. Color represents whether an individual was scored as a WS responder or not. Error bars show mean ± SEM. c Schematic of how room temperature (RT) and high temperature (HT) groups were generated. d, e Mean normalized abdomen length (d) and wing angle change (e) of HT and RT flies at 4.1 µW/mm2. Activation window is denoted by bars above each plot. Shaded areas represent the SEM. Inset diagrams illustrate how abdomen lengths or wing angles were measured. f, g Maximum normalized abdomen length (f) and wing angle change (g) under each activation intensity. Curve and error bars show mean ± SEM. Two-sided Mann-Whitney U test was performed between RT and HT across all activation intensities. n = 91 (RT group), 80 (HT group). h WS onset frame of each of the 9 WS events observed in 7 courting wildtype pairs. Numbers denote “pair ID”.“event ID”. i Temporal relationship between normalized abdomen length and wing angle, averaged across all WS events. Pulse onset is marked as a triangle. Gray arrow behind data points represents an approximate progression of data points. n = 9 events from 7 females. Source data are provided as a Source Data file.

Expression of latent potential as rare wing spreading events in D. melanogaster

The latent, plastic circuit potential of vpoDN to elicit wing spreading in the outgroup species D. melanogaster lets us hypothesize that this potential might be occasionally expressed in wildtype females in a way that would be overlooked in previous studies or by standard analysis. Therefore, we performed a detailed scrutinization of wing spreading behaviors with a much larger sample of D. melanogaster flies raised at 23 °C and 29 °C. Indeed, we identified a total of 9 wing spreading events contributed by 7 females from assaying the courtship interactions of 141 pairs (7 of 105 pairs with females raised at 29 °C, and 0 of 36 pairs with females raised at 23 °C, Fig. 5h, Supplementary Movie 6). All wing spreading events co-occurred with VPO, and 4 out of 9 immediately preceded copulation. Also mirroring the natural wing spreading behavior in D. santomea, there was a positive temporal correlation between female wing angle and abdomen length upon the onset of male singing (Fig. 5i). The temporal correlation suggests that these events are homologous to the wing spreading behavior in D. santomea and are thus possibly driven by a shared circuit mechanism. Together, consistent with the presence of a circuit potential, wildtype D. melanogaster females perform wing spreading at a very low frequency in some conditions.

D. santomea wing spreading is a recurrent variant of a receptive female behavior

Given the previous reports of wing spreading behaviors outside of the melanogaster subgroup, we investigated wing spreading in a broader phylogeny to better understand its evolutionary history. Beyond the melanogaster subgroup, female wing spreading has been reported in a few species within the Sophophora subgenus, and more broadly in the Drosophila subgenus as a pre-copulatory acceptance signal that initiates copulation20,23,24. Whether females also perform wing spreading during the courtship interaction as in D. santomea, and how wing spreading is associated with VPO in this social context, have not been explicitly investigated in the broader phylogeny. Therefore, we surveyed 22 species in the Sophophora and Drosophila subgenera for VPO and wing spreading during courtship and before copulation (Fig. 6, Supplementary Movie 7). As expected, VPO was a conserved female behavior observed in all species. In contrast, wing spreading was common in species of the Drosophila subgenus and more sparsely represented in the Sophophora subgenus, with repeated evolution in many lineages.

Fig. 6: Wing spreading is found in multiple Drosophila lineages.
figure 6

First two columns: proportion of females observed to exhibit VPO + WS, VPO, or neither behavior in pairwise matings under the designated social context (above). Asterisk denotes species where females were observed to sing courtship duets with males, and song-independent wing spreading behavior was not observed. Sample sizes are indicated in parentheses. Last column: published results from Spieth 195220 on whether the pre-copulatory acceptance behavior is VPO or VPO + WS. Numbers next to key nodes indicate estimated divergence times in Myr30,32,33,34. Phylogeny is based on30,31,101,102,103,104. Source data are provided as a Source Data file.

In species with wing spreading, these events were not specifically linked to copulation: in the Sophophora subgenus, wing spreading was more commonly seen during the courtship interaction than right before copulation; whereas in the Drosophila subgenus, wing spreading appeared obligatory prior to copulation but was also observed during courtship. Therefore, wing spreading can be broadly characterized as a receptive signal that communicates females’ sexual interests instead of an acceptance signal that green-lights copulation, while the precise social context and receptivity state that wing spreading represents may vary across species.

Furthermore, in species with wing spreading, wing spreading co-occurs with VPO, but VPO may also occur by itself. As such, both the association and the decoupling between the two behaviors are common behavioral features across the phylogeny (Fig. 6). Together, the utility of wing spreading in the courtship context and its association with VPO across independent phylogenetic lineages hint at evolutionary parallelism in the underlying circuit mechanisms, i.e., the co-option of vpoDN by actualizing a latent circuit potential.

Ancestral state reconstruction of wing spreading in the Drosophila genus

Lastly, given the presence of wing spreading in other Drosophila lineages, we inferred the ancestral states of wing spreading in the Drosophila genus to determine if the latent potential simply reflects a vestigial feature derived from a lost ancestral behavior. Here we included data from Spieth (1952)20 to achieve a denser species sampling (46 species) and reconstructed the ancestral states using a maximum likelihood method or Bayesian inference (Supplementary Fig. 6). Both methods estimated a higher probability of wing spreading being absent than being present across all ancestral nodes of D. santomea and D. melanogaster in the Sophophora subgenus, which spans about 40 Myr of divergence time30, and a similar probability of being absent versus being present in the ancestral node of the Sophophora and Drosophila subgenera. Despite the uncertainty of the ancestral states, our phylogenetic inferences raise the intriguing possibility that wing spreading in D. santomea may be a novelty without an ancestral behavioral homolog58,59, rather than a re-emergence of a lost ancestral behavior by reinstating a vestigial circuit.

Discussion

Historically, studies on the evolution of mating behaviors have predominantly focused on male signals. An emerging perspective shift repositions females as active participants in the dynamic courtship interaction and not passive receivers of male signals4,7,60,61. Nonetheless, female courtship behaviors remain much under-characterized, and little is known about how they originate or evolve. Here, we show that D. santomea wing spreading, a species-specific female behavior originated within the last 0.4–1 Myr, is layered on top of conserved elements of the dynamic courtship interaction to affect male behaviors and direct mate selection. Wing spreading in D. santomea serves both as a female response to a male’s signal (the pulse song) and as a signal of her sexual interests, thereby influencing the male’s subsequent actions. Intriguingly, whether a male is capable of increasing his efforts accordingly is a predictor of his chances of copulation, supporting a pivotal role of female sexual behavior in organizing a social feedback loop upon which sexual selection operates. D. santomea co-localizes with the sibling species D. yakuba in a hybrid zone on the island of São Tomé31,35,36. As such, wing spreading might be a key phenotype in the reproductive isolation in these two naturally hybridizing species.

Expression of a new behavior in the appropriate social context

Capitalizing on this recently originated female behavior, our neural circuit comparisons across species shed light on the neural mechanisms by which a new social behavior may originate. The co-option of the VPO command neurons vpoDN, which integrate both sensory and motivational information37, would allow a receptive female hearing a potent male song to express the new behavior wing spreading, and thereby communicate her interests to the male. Descending neurons like vpoDN act as a critical information bottleneck that compresses high-dimensional brain dynamics to low-dimensional commands that interface with motor circuits62,63. The co-option of vpoDN in wing spreading suggests that existing descending pathways might be restrictive neural substrates favored by evolution to drive new behaviors, because they readily permit the expression of newly originated behavior in a meaningful social context.

As vpoDN evolved from a uni-functional node that only drives VPO to a possibly bi-functional one that drives both VPO and wing spreading, we further consider how wing spreading can be encoded in a way that communicates non-identical social information from the ancestral VPO signal. Social behaviors, such as mating and aggression, may involve a combination of behaviors that are associated with graded states of drive64,65,66. We showed that wing spreading tended to co-occur with more intense VPO in wildtype D. santomea, and the intensity of VPO increased with the activation intensity of vpoDN in D. melanogaster. Therefore, compared with VPO, the expression of wing spreading might involve a higher level of vpoDN activity. Because vpoDN activity reflects female receptivity by receiving excitatory inputs from pC1 neurons37, it is possible that wing spreading is differentially gated from VPO by vpoDN activity to represent a higher receptivity level. Alternatively, modulatory inputs independent of vpoDN could contribute to the differential expression of wing spreading and VPO in natural behaviors. Future testing of the hypotheses would benefit from genetic tools that specifically label vpoDN in D. santomea.

Latent circuit potential facilitates the evolution of new behaviors

How does a socially informed behavioral decision lead to a new motor action? Notably, wing spreading is qualitatively distinct from known female behaviors of D. santomea. The co-option of vpoDN to elicit wing spreading in D. santomea suggests that it must be functionally coupled with a wing motor circuit. When the VNC neurites of vpoDN and DNp13 were activated in decapitated flies (who lacked inputs from the central brain), wing spreading was elicited most robustly in D. santomea. Therefore, the functional connection between vpoDN and the downstream wing spreading motor circuit has evolved to be more potent in D. santomea, pinpointing the neural substrates of behavioral divergence. Meanwhile, in D. melanogaster, vpoDN activation sometimes induced wing spreading, and wildtype females displayed wing spreading on rare occasions, suggesting that this connection is not a de novo feature specific to D. santomea but rather an ancestral feature that remains largely latent yet potent. Previous studies reported that sex- and developmental stage-typical behaviors can be experimentally induced, suggesting that latent potentials may broadly exist in the nervous system67,68,69,70,71,72, serving as raw substrates that fuel the rapid evolution of new behaviors13. If so, we anticipate that species-specific behaviors may commonly exist in closely-related outgroup species in primitive prototypes that are occasionally expressed under certain conditions, blurring the traditional line that defines a new behavior.

Re-emergence of lost ancestral traits is an important mode of behavioral evolution73,74, and neurons for lost behaviors, such as wing motoneurons in flightless grasshoppers, may survive long evolutionary time69,75. Is the latent potential to express wing spreading a part of a vestigial circuit from a lost behavior? While this is a possibility, our phylogenetic inferences lends stronger support to an alternative, where wing spreading in D. santomea represents a qualitative novelty without an ancestral behavioral homolog58,59. Therefore, the ancestral connection between vpoDN and the wing motor circuit might not be a vestigial feature on its way of degeneration, but rather exists as an exaptation76 that possibly serves an as-yet undefined function. In all three species we examined, vpoDN projects to the mesothoracic neuromere, where they branch dorsally and medially to innervate the tectulum, potentially permitting a contact with the wing motor and premotor circuit. One hypothesis is that this connection is required for movement coordination, such as the engagement of wing muscle to sustain a proper posture during VPO. In this scenario, the circuit configuration is maintained by selective pressures unrelated to wing spreading and potentiates the repeated evolution of wing spreading.

Species difference, idiosyncrasy, and plasticity in behaviors

In D. melanogaster, vpoDN’s ability to drive VPO constitutively versus wing spreading as a latent potential presents a comparison. The former is penetrant and canalized: all individuals displayed VPO in response to vpoDN activation, and the response was unaffected by developmental temperature. In contrast, the latter is idiosyncratic and plastic: only some individuals responded with wing spreading, and the response was strongly influenced by developmental temperature. Notably, here, the species difference, idiosyncrasy, and plasticity in behaviors, despite operating at different levels, all reflect phenotypic variation of the same neural circuit substrates, highlighting the lability of ancestral circuits in encoding new behavioral prototypes. Such a labile circuit can then be refined through genetic assimilation to encode stably expressed behaviors when a selective pressure is present77. With a prototypic circuit in place, minor modifications, such as reweighting the strength of local excitations or inhibitions, might be sufficient to allow vpoDN to robustly engage the wing motor circuit. Extensive resources in the model species D. melanogaster, such as EM connectomes and neurogenetic tools78,79,80,81,82, will facilitate future characterizations of the organization and evolution of the underlying circuits.

By developing a comparative paradigm that combines behavioral and neural approaches to investigate the origin of new behaviors, our results revealed how the ancestral nervous system potentiates such changes and shapes the trajectories of behavioral evolution. The themes emerging from this study, such as co-option, ancestral potential, and the plasticity of prototypic phenotypes, converge with Evo-Devo concepts that typically focus on morphological evolution77,83,84,85,86. For example, analogous to the origin of wing spreading, the repeated evolution of “supersoldiers” in the ant genus Pheidole occurred via the actualization of an ancestral developmental potential, where large supersoldier-like anomalies are occasionally found in nature and can be artificially induced by hormonal manipulation in species lacking a supersoldier caste87. The dissection of neural mechanisms underlying the origin of new behaviors contributes to the synthesis of principles unique for behavioral evolution as well as a unifying conceptual framework for phenotypic evolution88.

Methods

Fly stocks

Flies were maintained on cornmeal-agar-yeast medium (Fly Food B, Bloomington Recipe, Lab Express) at 23 °C and 50% humidity on a 12 hr light/dark cycle, unless otherwise specified. All fly stocks used in this study are listed in Supplementary Table 1.

Generation of transgenic flies

The generation of the dsx-GAL4 knock-in alleles in D. santomea, D. yakuba, and D. melanogaster were described in Ye et al. 202417. The Otd-Flp lines, which drive Flp expression exclusively in brain, were generated by inserting the pBpGuW-Otd-nls:FLPo plasmid89 into the 2253 attP landing site on the third chromosome in D. santomea and the 2285 landing site on the third chromosome in D. yakuba90 using the attB/P φc31 integrase system. The FRT-stop-FRT-CsChrimson:mVenus lines were similarly generated by inserting the pJFRC300-20XUAS-FRT > -dSTOP-FRT > -CsChrimson-mVenus plasmid91 into the 2253 site in D. santomea and the 2180 landing site on the second chromosome in D. yakuba90. The dsx-expressing brain neurons were labeled and activated using a genetic intersection of dsx-GAL4 and Otd-Flp to drive the expression of CsChrimson:mVenus, where the brain-specific recombinase (Otd-Flp) excises a transcriptional stop cassette (FRT-stop-FRT) to enable the transcriptional control of UAS-CsChrimson:mVenus under dsx-GAL4 only in brain. All injections were performed at Rainbow Transgenic Flies using a standard protocol.

Preparation of flies for behavioral assays

Flies in the Sophophora subgenus used in behavioral assays were collected within a few hours of eclosion and kept in single-sex vials with 10–15 flies in each vial. Males were separated into individual vials at least 3 days before recording. All flies were 3-6 days old at the time of the assay, with the exception of the 1 day old sexually immature females in Fig. 1c. Mated females in Fig. 1c were generated by mating each female with a wildtype male 24 hr prior to recording. Flies in the Drosophila subgenus were collected the same way, but allowed to age for 10–12 days before recording, and males were separated into individual vials at least 8 days before recording.

In optogenetic activation experiments, females were collected the same way as wildtype females but kept on medium supplemented with 0.2 mM all trans-retinal (Sigma Aldrich) in the dark for 5 days until recording. In wing-cut, antennae-cut, or aristae-cut experiments, female wings, antennae, or aristae, respectively, were removed bilaterally under CO2 anesthesia using micro scissors 3 days before recording. Control females were also subjected to CO2 anesthesia alongside the experimental females. Each female was exposed to CO2 for less than 3 min. In decapitation experiments, females were cut at the neck using micro scissors under CO2 anesthesia 30 min before the recording, and were allowed to recover in a vial with food until the recording. In temperature manipulation experiments, D. melanogaster females were either grown according to the presented scheme (Fig. 5d) or at 29 °C throughout development (Fig. 5i, j).

Behavioral recording

Two cameras (FLIR BFS-U3-200S6M-C, Edmund optics #11-521) with 50 mm lens (Edmund optics #63-248) were used to record videos at 10 Hz. For audio recording (Figs. 1, 2, 6), we used a 3D printed behavioral chamber with beveled circular arenas fitted with fine mesh below. The arenas measured 10 mm in diameter and 3 mm in height. D. ezoana pairs (Fig. 6) were placed in arenas measuring 15 mm in diameter to accommodate their larger body size. Each arena was placed on top of a microphone in SongTorrent, a custom 96-channel recording apparatus that enables simultaneous audio (5 kHz) and video recording92. To optimize video recording (Figs. 35) for behavioral tracking, we used acrylic behavioral chambers with circular arenas that measured 10 mm in diameter and 3 mm in height and did not perform audio recording. In all recordings of female-male pairs, the flies were separated by a divider until the start of the recording. Wildtype flies were recorded for 20 min. Optogenetic flies were recorded for the duration of the activation scheme.

In optogenetic activation experiments, flies were allowed to see in blue light and recorded under infrared light (850 nm). Red light (635 nm) was used for activation following a programmed cycle. An activation cycle consisted of 10 activation bouts with increasing intensity, and each 1 s bout was interspersed with 9 s intervals. The only exception to this activation scheme was the D. yakuba audio recording (Supplementary Fig. 4a), which was also done using 10 s activation bouts and 10 s intervals. Activation intensity gradient (in μW/mm2) was as follows: 0.4, 0.8, 1.2, 1.6, 2.0, 2.4, 2.9, 3.3, 3.7, and 4.1.

Behavioral tracking

SLEAP (v1.2.0a6)38 was used to track the behavior of interacting pairs (in wildtype experiments) or individual females (in optogenetic activation experiments). For pairs, we tracked the head, thorax, abdomen, and each of the wing tips for each fly. A classifier was trained using the multi-animal top-down mode with the default settings and the following modifications: anchor part=thorax, rotation min and max angles = −180 and 180, scale=TRUE, contrast=TRUE. Inference was run using a simple tracker with default settings and the following modifications: 2 instances/frame, cull to _target instance count=TRUE, all nodes are used for tracking, and connect single track breaks=TRUE. The onset of pulse trains were used as key frames, and we focused on the interval between 2 s before to 3 s after the pulse onset. Manual adjustments were made wherever necessary.

For individuals, we tracked the head, thorax, abdomen, tip of the external genitalia, and each of the wing tips. A single classifier was trained using the single animal model with default settings, and intact and decapitated D. melanogaster, D. yakuba and D. santomea were included in the training dataset. Inference was run using a simple tracker with 1 instance/frame. We focused on 2 s before and after each 1 s activation bout. Manual adjustments were made wherever necessary.

Tracking data was exported as HDF5 files and analyzed in Python (v3.8.13) and R (v4.2.2) to calculate parameters such as the female wing angle and abdomen length. In wildtype recordings, female abdomen length was normalized to the baseline of each female, calculated as the mean abdomen length across the 20 frames (2 s) before each pulse onset. In optogenetic recordings, each female’s baseline abdomen length used for normalization was calculated as the mean abdomen length over the 100 frames (10 s) before the first activation bout. Wing angle change was calculated by subtracting the observed wing angle by each female’s baseline wing angle, which was calculated as the mean wing angle over the 100 frames before the first activation bout.

Behavioral analysis

Probability of wing spreading in response to male song

The custom Matlab software Tempo (https://github.com/JaneliaSciComp/tempo) was used to annotate male songs, and when applicable, female wing spreading in response to song. In Figs. 1c–f, 2b–e, and Supplementary Fig. 1 and 2, all pulse trains and wing spreading were annotated manually. In Fig. 1b, g, if a male produced 20 or fewer pulse trains (or song trains in D. melanogaster and D. simulans), all pulse/song trains were annotated; otherwise 20 pulse/song trains were randomly sampled. Each pulse/song train’s co-occurrence with wing spreading was then recorded.

Wildtype behavior

In wildtype recordings of non-D. santomea species (Fig. 5h, i and Fig. 6), full recordings were carefully examined for VPO and wing spreading. To qualify as wing spreading, a putative female wing extension behavior must occur in response to a male courtship song and co-occur with VPO. These criteria were imposed to disambiguate wing spreading from female wing flicking, grooming, and balancing after jumping. If VPO was not observed, it was typically associated with limited courtship history, non-ideal positioning of the female, and scoring challenge due to the subtlety of VPO in certain species.

Activation experiments

For vpoDN activation experiments in D. melanogaster, wing spreading behaviors were manually identified by detecting wing angle changes in response to activation bouts. Responders (Fig. 5b and Supplementary Fig. 5c, d) were defined as females with at least one confirmed wing spreading out of 10 activation bouts in an activation cycle. Responses to activation such as grooming, jumping and turning, and responses with low SLEAP tracking quality were considered invalid. Individuals with more than 5 invalid responses in the activation cycle were removed from Fig. 5b and Supplementary Fig. 5c, d. In Fig. 5b, invalid events were excluded when calculating wing spreading and VPO rates of each individual. Notably, both intact and decapitated D. santomea females exhibited leaning and flipping over more frequently than the other species upon activation, possibly suggesting their lower resistance to activation. When females were not standing still, especially when leaning, SLEAP tended to underestimate the wing angle.

Immunostaining

Female brains and VNCs were dissected in 1X Phosphate Buffered Saline (PBS; Thermo Fisher) within 50 min of ice anesthesia, fixed with 4% paraformaldehyde (PFA) for 35 min at room temperature, rinsed 3 times in PBS with 1% Triton X-100 (PBTX), then blocked with 5% normal goat serum (NGS) in PBTX for 1.5 hr. Samples were incubated in primary antibodies (diluted in 5% NGS) at 4 °C overnight. Samples were then washed with PBTX 3 times for 30 min each, and incubated with secondary antibodies (diluted in 5% NGS) at 4 °C overnight. After 3 washes with PBTX, each 30 min, the samples were mounted with ProLongTM Gold antifade reagents (Fisher Scientific; Cat.#: P36931) on poly-L-lysine coated coverslips, and sealed on all slides with nail polish. Primary antibodies used were: chicken-anti-GFP (1:600, ab13970, Abcam), mouse-anti-nc82 (1:30, DHSB). Secondary antibodies used were: goat-anti-chicken/AF488 (1:500, A-11039, Thermo Fisher), goat-anti-mouse/AF568 (1:500, A-11031, Thermo Fisher). Confocal images were taken on a Leica DMi8 microscope with a TCS SP8 Confocal system at 40x, and processed with VVDViewer (v1.6.4).

Selection of vpoDN split-GAL4 lines

Three vpoDN split-GAL4 lines (SS1, SS2, and SS3)37 were each crossed to UAS-CsChrimson:mVenus flies to assess their ability in eliciting VPO upon optogenetic activation. Behavioral recording, tracking, and analysis were performed as described above. The line vpoDN-SS2 was chosen for further experiments as it had the most robust abdomen extension phenotype (Supplementary Fig. 5a).

Statistical Analysis

Data analysis was performed in Python (v3.8.13) with the following packages: h5py (v3.6.0; https://www.h5py.org), numpy (v1.23.5)93, scipy (v1.8.0)94, and pandas (v1.4.2)95, and R (v4.2.2) with the following packages: tidyverse (v1.3.2)96, lme4 (v1.1-31)97, emmeans (v1.8.3; https://CRAN.R-project.org/package=emmeans), and lmerTest (v3.1-3)98. Scripts are available in the Supplementary Data 1. Linear models and linear mixed models (to account for replicate effects and repeated measurements from the same subjects) were fitted to the data and the statistical significance of predictors were assessed with two-sided ANOVA with post hoc Tukey test. Variables that were proportions were arcsine-square root transformed to stabilize the variance. When there was significant deviation from the assumptions of linear models, the non-parametric, two-sided Mann-Whitney U test was used.

Ancestral state reconstruction

Phylogenetic tree in Supplementary Fig. 6 was based on30,32. Behavior of each species was defined as one of the two possible states of wing spreading: presence and absence based on data in this study and Spieth 195220. If reports were incongruent, results in this study took precedence. Ancestral states were reconstructed based on a maximum likelihood method and Bayesian inference. R package ape (v5.7.1)99 was used to implement the reconstruction based on the maximum likelihood method, assuming equal probabilities for gains and losses. Bayesian inference was performed with BayesTraits (v4.1.2)100 using the Markov chain Monte Carlo analysis method with a multistate model. Prior distribution of every parameter was set as a uniform distribution between 0 and 1. 1,000,000 iterations, following a burn-in of 10,000 iterations, were run and sampled every 1000 iterations. The posterior means were used to plot the reconstructed ancestral state on the phylogenetic tree.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.