Abstract
Neural network architecture determines its functional output. However, the detailed mechanisms are not well characterized. In this study, we focused on the neural network architectures of male and hermaphrodite C. elegans and the association with sexually dimorphic behaviors. We applied graph theory and computational neuroscience methods to systematically discern the features of these two neural networks. Our findings revealed that a small percentage of sexual-specific neurons exerted dominance throughout the entire male neural net-work, suggesting male’s prioritized sexual-related behavior outputs. Based on the structural and dynamical characteristics of two complete neural networks, sub-networks containing sex-specific neurons and their immediate neighbors, or sub-networks exclusively comprising sex-shared neurons, we predicted dimorphic behavioral outcomes for males and hermaphrodites. To verify the prediction, we performed behavioral and calcium imaging experiments and dissected a circuit that is specific for the increased spontaneous local search in males for mate-searching. Our research sheds light on the neural circuits that underlie sexually dimorphic behaviors in C. elegans, and provides significant insights into the inter-connected relationship between network architecture and functional outcomes at the whole-brain level.
1 Introduction
The concept that neural network architecture plays a crucial role in determining func-tional output has gained widespread acceptance in the neuroscience field [1], and it has also been applied in artificial intelligence, where optimizing network performance involves modifying the network architecture [2]. The same number of neurons form specialized architectures that may result in distinct functions, e.g., neurons may exe-cute continuous topographic mapping in vision system or discrete parallel processing in olfactory circuit [1]. The convergent-divergent feature in the Drosophila olfactory circuit facilitates a wide range of odor representations and supports olfactory mem-ory [3, 4, 5, 6, 7]. The modified characteristics of the engram cell at both cellular and circuitry levels elucidate the underlying mechanisms of learning and memory [8], e.g., AMPA receptors recycling on the membrane mediates the synaptic strength to regulate memory formation and forgetting [9, 10]. However, due to the absence of connectome data, limited research has been directed towards exploring the relation-ship between neural network architecture and the behavioral functional output at the whole-brain level.
Sexually dimorphic behavior provides an intriguing platform to study the rela-tionship between neural network architectures and behavioral outcomes. Sexually dimorphic behaviors are generally categorized into two types: those with qualitative differences, observed in only one sex, and those with quantitative differences, displayed by both sexes but at varying levels [11]. Some animals exhibit sex-specific behaviors. For example, male satin bowerbirds construct intricate bowers and engage in elabo-rate courtship displays nearby to attract females. The female assesses the quality of the bower and the male’s performance for mate selection [12]. Studies have discovered the molecular and circuitry mechanisms of sex-specific behaviors in some cases. For instance, the male-specific isoform of Fruitless, Fru(M), in Drosophila plays an essential role in regulating male courtship behavior. Interestingly, females expressing Fru(M) also exhibit courtship behavior [13]. Male-specific P1 interneuron drives male courtship initiation and motivation [14, 15, 16]. Pregnant female mice actively participate in nesting behaviors to create a suitable environment for offspring. Using brain-wide immediate early gene mapping, Topilko et al discovered that the Edinger-Westphal (EW) nucleus plays an important role in regulating nesting behavior [17]. Males tend to exhibit more frequent or intense aggressive behaviors than females [18]. However, reproductive state significantly influences female attack behavior, as evidenced by lac-tating female mice displaying maternal aggressiveness to protect the offspring [19]. The male aggression is mediated by the progesterone receptor (PR) expressing neu-rons located in the ventromedial hypothalamus [20], and artificially activation of these neurons triggers male aggression [21]. Estrogen receptor-α (Esr1) positive neurons in female ventromedial hypothalamus are essential for lactation-related aggression [22, 19].
C. elegans has two sexes, male and hermaphrodite. Numerous studies have unveiled sexual dimorphism at gene expression, neural circuity and behavioral lev-els [23, 24, 25, 26, 27]. Males are attracted to hermaphrodite pheromones, through dimorphic expression of pheromone receptors in male-specific neurons and some sex-shared sensory neurons [28, 29, 30, 31, 32]. Male C. elegans exhibit faster movement, potentially due to mechanisms at the interneuron level or neuromuscular junction [33, 34, 35]. Cook et al. reconstructed the neural networks of male and hermaphrodite C. elegans by compiling serial images acquired through electron microscopy. They iden-tified 302 neurons in hermaphrodite and 385 neurons in male, along with their synaptic connections, including chemical and electrical synapses [36]. These two networks serve as the foundation for understanding behavioral dimorphism at the whole brain level. In this study, we generated the functional neural networks of male and hermaphrodite C. elegans by merging neurons with the same function. Using graph theory and computa-tional neuroscience methods, we systematically analyzed the structural and dynamical differences between these two neural networks. We identified circuitry mechanisms underlying the role of sex-specific neurons in the male neural network and predicted sexually dimorphic behaviors based on these structural and dynamical differences. Our predictions were validated by discovering a circuit with sex-shared neurons and dimorphic connections responsible for enhanced local search behavior in males. This study provides evidence for the significant role of neural network architecture and the circuitry bases of dimorphic behaviors.
2 Result
2.1 Structural characteristics of functional neural networks in male and hermaphrodite C. elegans
We employed network science methods to systematically analyze the structural fea-tures of male and hermaphrodite neural networks [36]. In order to simplify network size to emphasize the functional connectivity, we merged neurons with similar func-tions into singular node. For instance, neurons ADAL (ADA Left) and ADAR (ADA Right) were consolidated as node ADA, and their total synaptic connections were inte-grated as the connections of ADA. Neurons with diverse functions were maintained as separate nodes, such as ASEL and ASER. We generated two simplified functional neural networks: the male neural network that comprises 161 neuron nodes and the hermaphrodite neural network that is composed of 122 nodes (Supplementary figure 1, Supplementary table 1). In Supplementary figure 1, synaptic connections between neurons are denoted by clockwise lines. The line width corresponds to the synapse number, which is the sum of chemical synapses and electrical synapses [36]. Given that chemical synapses are one-directional while electrical synapses are two-directional, we considered that one electrical synapse between two neurons is equivalent to two recip-rocal chemical synapses to generate the connection matrix (Supplementary table 1). We found that 120 nodes are shared in these two neural networks (Supplementary figure 2), suggesting the dimorphic behaviors are largely mediated by male-specific neurons or synaptic connection differences among sex-shared neurons.
Given the directional nature and variable synapse numbers of the synaptic connections, we abstracted these neural networks as two directed-weighted graphs (Supplementary figure 1). We used graph theory methods designed for directed-weighted graphs to facilitate feature detection in both the male and hermaphrodite neural networks. One obvious observation is that the absence of connections between pharyngeal neurons and other neurons in the male neural network (Supplementary figure 1), suggesting a relatively independent functionality of pharyngeal neurons in males, though several studies imply the non-synaptic communications in C. elegans [37, 38].
The node strength measures how strongly a node directly possesses with other nodes in the network. We calculated the node strength for each node and revealed that the distribution of node strengths in both hermaphrodite and male networks follow an exponential distribution (Figure 1A). Overall, neurons in the male network exhibit a larger node strength (Figure 1B). Comparing the node strengths of sex-specific neurons and sex-shared neurons, we found that the increased node strengths of sex-specific neurons in the male neural network, but not in the hermaphrodite network (Figure 1C and 1D), indicating the stronger connections of sex-specific neurons in the male neural network. A substantial node strength indicates a neuron’s potential to exert dominance in shaping behavioral outputs. By classifying behavioral outputs of the top 20 neurons based on node strength, we predict enhanced mating and suppressed locomotion and chemotaxis behaviors in males (Figure 1E). Several sex-shared neurons are in the top 20 list in both neural networks, including AVA, ALA and RIA, highlighting their important roles in both sexes (Supplementary table 2).

Structural characteristics of neural networks in male and hermaphrodite. A, The node strengths follow exponential distribution in both neural networks. B, Neurons in the male neural network exhibit significantly more node strengths in comparison with those in the hermaphrodite. C, Sex-specific neurons exhibit significantly more node strengths in com-parison with sex-shared neurons in the male neural network. D, Sex-specific neurons exhibit similar node strengths in comparison with sex-shared neurons in the hermaphrodite neural network. E, Prediction of behavioral outputs based on the top 20 node strengths in male and hermaphrodite neural networks. F, The node out-strengths follow exponential distribution in both neural networks. G, Neurons in the male neural network exhibit significantly more node out-strengths in comparison with those in the hermaphrodite. H, Sex-specific neurons exhibit significantly more node out-strengths in comparison with sex-shared neurons in the male neural network. I, Sex-specific neurons exhibit similar node out-strengths in comparison with sex-shared neurons in the hermaphrodite neural network. J, The node in-strengths fol-low exponential distribution in both neural networks. K, Neurons in the male neural network slightly more node in-strengths in comparison with those in the hermaphrodite. L, Sex-specific neurons exhibit significantly more node in-strengths in comparison with sex-shared neurons in the male neural network. M, Sex-specific neurons exhibit significantly less node in-strengths in comparison with sex-shared neurons in the hermaphrodite neural network. N, Neurons in the male neural network exhibit significantly more edge weights in comparison with those in the hermaphrodite. O, Sex-specific neurons exhibit similar edge weights in com-parison with sex-shared neurons in the male neural network. P, Sex-specific neurons exhibit significantly less edge weights in comparison with sex-shared neurons in the hermaphrodite neural network. Q, Neurons in the male neural network exhibit significantly shorter length of the shortest path in comparison with those in the hermaphrodite. R, Sex-specific neurons exhibit significantly shorter length of the shortest path in comparison with sex-shared neurons in the male neural network. S, Sex-specific neurons exhibit similar length of the shortest path in comparison with sex-shared neurons in the hermaphrodite neural network. T, Neurons in the male neural network exhibit significantly lower betweenness centrality in comparison with those in the hermaphrodite. U, Sex-specific neurons exhibit significantly lower betweenness centrality in comparison with sex-shared neurons in the male neural network. V, Sex-specific neurons exhibit significantly lower betweenness centrality in comparison with sex-shared neu-rons in the hermaphrodite neural network. W, Prediction of behavioral outputs based on the top 20 betweenness centrality in male and hermaphrodite neural networks. Student’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).
We further analyzed the node strength by dividing it into node out-strength and in-strength, representing the synaptic outputs or inputs of individual neurons, respec-tively. Both out-strength and in-strength exhibit an exponential distribution (Figure 1F and 1J). It is observed that neurons in males have stronger out-strength compared to those in hermaphrodites, particularly for male-specific neurons (Figures 1G-I). Interestingly, although the overall in-strength in both male and hermaphrodite neural networks is similar (Figure 1K), the analysis shows a difference in how sex-specific and sex-shared neurons receive inputs. Male-specific neurons receive more substantial input signals compared to sex-shared neurons in males (Figure 1L), suggesting a height-ened sensitivity or importance in processing inputs related to sex-specific behaviors in males. In contrast, female-specific neurons in hermaphrodites exhibit the pattern of decreased in-strength (Figure 1M), highlighting a sex-dependent variation in neural network architecture and function.
The node strength takes into account the total synapse number of individual neurons, regardless the number of connections with other neurons. Next, we calcu-lated edge weight that is defined by assigning a number to each edge, representing the synapse number of the individual connection between two neurons. Our analy-sis indicated that, on average, male neural networks tend to have larger edge weights compared to hermaphrodite networks (Figure 1N). This suggests that the male net-work may have stronger synaptic connections per connection on average. A closer look at the edge weights of sex-specific and sex-shared neuron-related edges reveals a nuanced picture. In males, the edge weights associated with sex-specific neurons are comparable to those associated with sex-shared neurons (Figure 1O). This indicates a uniformity in how connections are established within the male neural network, regard-less of whether the neurons are involved in sex-specific or shared functions. However, in hermaphrodites, the edge weights of sex-specific neurons are significantly smaller than those of sex-shared neurons (Figure 1P), suggesting that synaptic connections in the hermaphrodite network may be organized differently, with decreased modification of sexual-related behaviors.
Focusing on the top edge weights in the male neural network, we found that the consistent high weights of ALA-related edges in both sexes underscore the impor-tance of ALA-mediated harsh touch escape behavior for individuals of both males and hermaphrodites (Figure 1N and Supplementary figure 3). However, in males, the weights of edges associated with AVA and RIA are notably higher (Figure 1N and Supplementary figure 3), indicating the increased AVA-or RIA-mediated behaviors in males.
In graph theory, the shortest path problem involves finding a path between two nodes in a graph that minimizes the sum of the weights. For a neural network repre-sented as a graph, the shortest path between two neurons can provide insight into the functional correlation between them, especially when they are not directly connected. A shorter shortest path in the male neural network suggests a more cohesive inter-connection of functional relationships among neurons in males (Figure 1Q). When comparing the shortest paths between two sex-shared neurons or those involving at least one sex-specific neuron, it is observed that the latter shows a tighter connection in males compared to hermaphrodites (Figures 1R and 1S).
Betweenness centrality in a graph measures the number of shortest paths that pass through a particular node, thus highlighting the key functional nodes within the network. The top betweenness centrality of AVA in both male and hermaphrodite networks (Figure 1T-V) underscores the critical role of AVA in both sexes. By exam-ining the top 20 neurons ranked by betweenness centrality, we infer that males exhibit enhanced mechanosensation, mate-searching, and mating behaviors (Figure 1W). These predictions are based on the understanding that nodes with high between-ness centrality are often involved in a significant number of shortest paths, indicating that they are integral to the network’s function and connectivity. AVA, in partic-ular, may be central to various behaviors and processes, including mechanosensory responses and social interactions such as mate-searching and mating.
Acknowledging the crucial influence of sex-specific neurons and their interactions in driving behaviors unique to each sex [39, 40, 41, 42, 43], we generated the sex-specific sub-neural networks that include the sex-specific neurons along with their directed-connected sex-shared neurons. This approach allows us to delve into the intrinsic properties of neural networks that exhibit sexual dimorphism (Supplementary figure 4).
Our analysis of sex-specific sub-neural networks has revealed that they share simi-lar characteristics with their respective entire neural networks. Node strengths, which include total node strength, node out-strength, and node in-strength, are found to fol-low exponential distributions within these sex-specific sub-networks for both males and hermaphrodites (Figures 2A, 2E, and 2I). In males, the sex-specific sub-neural network exhibits enhanced node strengths when compared to the hermaphrodite’s, indicating a more robust connectivity within the male network (Figure 2B). And the male sex-specific neurons reveal larger total node strengths and node out-strengths (Figures 2C and 2G), while the node in-strengths remain similar to those of hermaphrodites (Figure 2K). In contrast, hermaphrodites show no significant difference in total strengths, out-strengths, and in-strengths between sex-specific neurons and sex-shared neurons (Figures 2D, 2H, and 2L). The large edge weights and short length of the shortest path within the male sex-specific sub-neural network suggest a tighter functional con-nection, indicative of a more integrated network (Figures 2M-R). Specifically, the top edge weights of AIY→RIA and RIA→RMD DV in the male sub-neural network, along with the role of RIA in sensorimotor integration for olfactory steering, suggest that this AIY→RIA→RMD DV circuit plays a significant role in mediating chemotaxis-related behaviors in males (Figure 2M). Additionally, the high betweenness centrality of AVA and the top edge weights of AVA→DA and AVA→VA within the male sub-neural network point to AVA’s regulatory role in locomotion, which is essential for male’s sex-related behaviors (Figures 2M and 2S). These findings underscore the importance of understanding the connectivity and functional roles of neurons within sex-specific neural networks and how these factors contribute to the manifestation of sex-specific behaviors.

Structural characteristics of sex-specific sub-neural networks in male and hermaphrodite. A, The node strengths follow exponential distribution in both sex-specific sub-neural networks. B, Neurons in the male sex-specific sub-neural network exhibit signifi-cantly more node strengths in comparison with those in the hermaphrodite. C, Sex-specific neurons exhibit significantly more node strengths in comparison with sex-shared neurons in the male sex-specific sub-neural network. D, Sex-specific neurons exhibit similar node strengths in comparison with sex-shared neurons in the hermaphrodite sex-specific sub-neural network. E, The node out-strengths follow exponential distribution in both sex-specific sub-neural networks. F, Neurons in the male sex-specific sub-neural network exhibit significantly more node out-strengths in comparison with those in the hermaphrodite. G, Sex-specific neurons exhibit significantly more node out-strengths in comparison with sex-shared neu-rons in the male sex-specific sub-neural network. H, Sex-specific neurons exhibit similar node out-strengths in comparison with sex-shared neurons in the hermaphrodite sex-specific sub-neural network. I, The node in-strengths follow exponential distribution in both sex-specific sub-neural networks. J, Neurons in the male sex-specific sub-neural network exhibit signifi-cantly more node in-strengths in comparison with those in the hermaphrodite. K, Sex-specific neurons exhibit slightly more node in-strengths in comparison with sex-shared neurons in the male sex-specific sub-neural network. L, Sex-specific neurons exhibit similar node in-strengths in comparison with sex-shared neurons in the hermaphrodite sex-specific sub-neural network. M, Neurons in the male sex-specific sub-neural network exhibit significantly more edge weights in comparison with those in the hermaphrodite. N, Sex-specific neurons exhibit slightly less edge weights in comparison with sex-shared neurons in the male sex-specific sub-neural network. O, Sex-specific neurons exhibit significantly less edge weights in comparison with sex-shared neurons in the hermaphrodite sex-specific sub-neural network. P, Neurons in the male sex-specific sub-neural network exhibit significantly shorter length of the shortest path in comparison with those in the hermaphrodite. Q, Sex-specific neurons exhibit signifi-cantly shorter length of the shortest path in comparison with sex-shared neurons in the male sex-specific sub-neural network. R, Sex-specific neurons exhibit significantly longer length of the shortest path in comparison with sex-shared neurons in the hermaphrodite sex-specific sub-neural network. S, Neurons in the male sex-specific sub-neural network exhibit signifi-cantly lower betweenness centrality in comparison with those in the hermaphrodite. Student’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).
Previous studies have demonstrated that sex-shared neurons can form dimorphic circuits that are responsible for mediating behaviors that vary between males and hermaphrodites [44, 45, 32]. Therefore, we generated the sex-shared sub-neural net-works containing sex-shared neurons and the connections among them (Supplementary figure 5) and analyzed the characteristics of these sex-shared sub-neural networks for both sexes.
Interestingly, our findings indicate that sex-shared sub-neural networks display distinct features when compared to the complete neural networks. Both of these sub-networks exhibit node strengths that follow a similar exponential distribution (Figures 3A, 3B, 3D, 3E, 3G, and 3H). To quantify the differences in node strength between two sexes, we calculated the node strength difference for each neuron, defined as the node strength of the male neuron minus that of the hermaphrodite neuron (Figures 3C, 3F, and 3I). Significantly, some neurons show an increase in node strength in males, including the commander neuron AVA, motor neurons VA and VB, and the interneuron RIA (Figures 3C, 3F, and 3I). This increase in node strength suggests that the neural functions associated with AVA and RIA may be heightened in males. Conversely, the comparatively reduced node strength observed in several neurons in males could be indicative of behaviors that are specific to hermaphrodites, such as those related to neurons URY, PVC, and PVR (Figures 3C, 3F, and 3I).

Structural characteristics of sex-shared sub-neural networks in male and hermaphrodite. A, The node strengths follow exponential distribution in both sex-shared sub-neural networks. B, Neurons in the male sex-shared sub-neural network exhibit similar node strengths in comparison with those in the hermaphrodite. C, Node strength differences of the same neurons in two sex-shared sub-neural networks, positive represents more strength in male. D, The node out-strengths follow exponential distribution in both sex-shared sub-neural networks. E, Neurons in the male sex-shared sub-neural network exhibit similar node out-strengths in comparison with those in the hermaphrodite. F, Node out-strength differ-ences of the same neurons in two sex-shared sub-neural networks, positive represents more strength in male. G, The node in-strengths follow exponential distribution in both sex-shared sub-neural networks. H, Neurons in the male sex-shared sub-neural network exhibit similar node in-strengths in comparison with those in the hermaphrodite. I, Node in-strength differ-ences of the same neurons in two sex-shared sub-neural networks, positive represents more strength in male. J, Top 5 male-specific and hermaphrodite-specific edges. K, Neurons in the male sex-shared sub-neural network exhibit significantly more edge weights in comparison with those in the hermaphrodite. L, Weight differences of the connection between same neu-rons in two sex-shared sub-neural networks, positive represents more strength in male. M, Neurons in the male sex-shared sub-neural network exhibit significantly shorter length of the shortest path in comparison with those in the hermaphrodite. N, Length differences of the shortest length between same neurons in two sex-shared sub-neural networks, positive repre-sents longer length in male. O, Neurons in the male sex-shared sub-neural network exhibit significantly lower betweenness centrality in comparison with those in the hermaphrodite. P, Betweenness centrality differences of the same neurons in two sex-shared sub-neural net-works, positive represents larger betweenness centrality in male. Student’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).
In examining the edge weight feature of the neural networks, we identified several edges that are specific to one sex (Supplementary table 3). These findings under-score the potential influence of these sex-specific edges on the generation of dimorphic behavioral outputs. For clarity, we focus on the top five weighted sex-specific edges and their edge counts, as indicated in Figure 3J. When comparing the weights of shared edges, it is observed that they tend to be more substantial in males (Figure 3K). This disparity in edge weight is particularly notable in circuits related to RIA, such as AIY→RIA→RMD DV, and circuits associated with AVA, including AVA→DA and AVA→VA, which are markedly enriched in males. On the other hand, circuits like PVP-AQR and those involving FLP neurons, such as FLP→AVD and FLP→AVB, appear to be more dominant in hermaphrodites (Figure 3L). These circuit-specific differences suggest that they may contribute to distinct behavioral manifestations between two sexes.
Furthermore, we observed a decrease in the shortest paths among pharyngeal neu-rons, such as M3, M5, and NSM, in the male neural network (Figure 3M, 3N). Along with a lack of connections with other neurons (Supplementary figure 1), this obser-vation indicates the formation of a functional unit consisting of pharyngeal neurons, which may be critical for male-specific behaviors. We have noted an increase in the shortest paths involving the RIP neuron, such as RIP→ASI, RIP→ADE, RIP→ALN, RIP→ASJ, and RIP→ASER (Figure 3N), along with a decrease in the betweenness centrality of the RIP neuron (Figure 3O and 3P). These changes strongly suggest an enhanced dimorphic function of the RIP neuron in hermaphrodites, which could be integral to hermaphrodite-specific behaviors.
2.2 Dynamical characteristics of functional neural networks in male and hermaphrodite C. elegans
To systemically study the dynamics of these two neural networks, we performed com-putational neuroscience method to assess the functional role of individual neurons in the network. We utilized non-spiking RC model to simulate neuronal activity because it is widely accepted that neurons in C. elegans are non-spiked, with the acknowl-edgment of action potentials in several neurons [46, 47]. To simplify the simulation, we standardized parameters for all neurons, maintaining a resting potential of −60mV and the fixed linear correlation of the current input and synapse number (Supplemen-tary file 1). We stimulated individual neurons by shifting the membrane potential to +60mV for a duration of 40 seconds and monitored the membrane potential changes of all the other neurons. Figure 4A illustrates the stimulation of AVA in hermaphrodite neural network as an example, the other neurons of hermaphrodite neural network exhibit diverse response patterns (Figure 4A). From these simulations, we identified the neuron that exhibited the strongest response when an individual neuron was stim-ulated, creating functional pairs. We found that only 30% of these functional pairs are conserved across both neural networks (Figure 4B and Supplementary table 4). To gauge the influence of a neuron as an upstream component within the network, we measured the cumulative changes in membrane potential across all other neurons when a particular neuron was stimulated. A substantial alteration in membrane poten-tial across all other neurons would indicate that a particular neuron has a significant impact on the entire network as an upstream component. According to our results, neurons in the male network are more capable of activating the network than those in the hermaphrodite network (Figure 4C). Furthermore, sex-specific neurons, when acting as upstream neurons, have a greater effect on the network in males than do sex-shared neurons (Figure 4D), a trend not observed in hermaphrodites (Figure 4E). Similar patterns were observed when assessing the dynamic functions of neurons as part of the downstream component of the network (Figures 4G-I). By categorizing the top 20 upstream and top 20 downstream neurons, we attempted to predict sexually dimorphic behaviors. Both predictions highlighted mating behavior as a key aspect of male-specific behaviors (Figures 4F and 4J).

Dynamical characteristics of neural networks in male and hermaphrodite. A, Showcase of AVA neuron in hermaphrodite, left represents protocol of manipulating AVA membrane potential, right represents diverse membrane potential dynamics of all the other neurons in hermaphrodite neural network. B, Downstream neurons with the strongest responses, pink color represents the same strongest response downstream neurons in two neural networks. Blue color represents strongest response downstream neurons in male, red color represents strongest response downstream neurons in hermaphrodite. C, Sum of membrane potential changes in all the other neurons accesses individual neuron’s role as upstream neuron in a neural network. Neurons in the male neural network exhibit stronger influence as upstream neuron in comparison with those in the hermaphrodite. D, Sex-specific neurons exhibit sig-nificantly higher membrane potential changes in all the other neurons in comparison with sex-shared neurons in the male neural network. E, Sex-specific neurons exhibit similar mem-brane potential changes in all the other neurons in comparison with sex-shared neurons in the hermaphrodite neural network. F, Prediction of behavioral outputs based on the top 20 neu-rons as upstream in male and hermaphrodite neural networks. G, Sum of membrane potential changes in a neuron when activating all the other neurons accesses individual neuron’s role as downstream neuron in a neural network. Neurons in the male neural network exhibit stronger influence as downstream neuron in comparison with those in the hermaphrodite. H, Sex-specific neurons exhibit significantly higher membrane potential changes when activat-ing all the other neurons in comparison with sex-shared neurons in the male neural network. I, Sex-specific neurons exhibit similar membrane potential changes when activating all the other neurons in comparison with sex-shared neurons in the hermaphrodite neural network. J, Prediction of behavioral outputs based on the top 20 neurons as downstream in male and hermaphrodite neural networks. Student’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).
2.3 A neural circuit for dimorphic spontaneous local search behavior
Given the structural and dynamical discrepancies identified between the male and hermaphrodite neural networks, several sexually dimorphic behaviors can be pre-dicted. In particular, male behavior is primarily characterized by an emphasis on sexual-related behaviors. The AVA neuron emerges as pivotal to the function of the male network, participating in both sex-specific and sex-shared sub-neural networks. Considering that AVA regulates local search behavior in hermaphrodite [48, 49] and enhanced connections of AVA in the male neural network, therefore, we examined the hypothesis that AVA-related neural circuit could be a key regulatory component for dimorphic spontaneous local search behavior in males.
We placed individual worms onto distinct food patches and recorded the num-ber of reversals over the initial ten minutes in the new environment; this number indicates local search behavior [48]. Results showed that males display high level of local search behavior on both thick and thin food patches, as well as patch without food (Figure 5A-D). The absence of food alters the initial local search behavior in hermaphrodites, with no impact on males (Figure 5C and 5D). The males’ enhanced local search behavior is dependent on sexual maturity, as evidenced by the similar reversal rates of late larval males and hermaphrodites (Figure 5E). To explore the potential impact of the prior experiences during development on male’s local search behavior, we separated L4 male on three distinct types of plates: a plate devoid of both food and hermaphrodites, a plate containing food without hermaphrodites or a plate with both food and hermaphrodites. There was no significant difference among males with different prior experiences, suggesting that developmental experiences do not influence the enhanced local search behavior in males (Figure 5F). Overall, we discovered a sexually dimorphic behavior in C. elegans, that sexually matured males exhibit enhanced local search behavior regardless the environment.

Males reveal consistently high local search behavior. Reversal rate within a 10-minute time window for N2 wild-type males and hermaphrodites on 3.5 cm OP50-seeded plates under three conditions: A, Thick food (10 µL E. coli OP50 cultured for 16 hours), B, Thin food (10 µL E. coli OP50 cultured for 0.5 hours), C, No food. D, Statistical testing for the average reversal rate between minutes 7 to 10 under Thick food, Thin food and No food conditions, with sample sizes of 17, 23, and 21 respectively. E, tatistical testing for the average reversal rate between minutes 7 to 10 under different developmental stages, Sample size: 17 males and 14 hermaphrodites in L4 stage; 20 males and 25 hermaphrodites in 1-day adult stage; 2-day adult: 16 males and 15 hermaphrodites in 2-day adult stage. F, Statistical testing for the average reversal rate between minutes 7 to 10 with different social experiences, with sample sizes of 20 for each group. G, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds. 25 wild-type worms, 25 AVA::HisCl1 transgenic worms and 21 non-transgenic siblings. H, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds. 15 Wild-type worms, 15 AVA::HisCl1 transgenic worms and 18 non-transgenic siblings. I, Showcases of spontaneous calcium events in AVA of male and hermaphrodite 1-day adults. J, Statistical testing for the spontaneous calcium event frequency in AVA of male and hermaphrodite 1-day adults. Sample size: 16 males and 13 hermaphrodites. K, Hermaphrodite preference assay behavior paradigm. L, Statistical testing for the choice index of 1-day adult males under different genetic backgrounds, with sample sizes of 11 for each group. Student’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).
To examine AVA’s role in local search behavior, we temporally suppressed AVA activity by expressing HisCl1 (histamine-gated chloride channel) in AVA and administrating histamine [50]. The significantly reduced reversal rates indicate the commanding role of AVA in driving reversals in both males and hermaphrodites (Figure 5G and 5H). Subsequently, we conducted in vivo calcium imaging studies on AVA neurons. Our findings revealed that AVA neurons exhibit spontaneous cal-cium transients, with adult males showing a significantly higher frequency of these events compared to hermaphrodites (Figure 5I and 5J). However, this difference is not observed in late larval males (Supplementary figure 6), which aligns with the behavioral outcomes.
Next, to identify male’s local search target, we assessed male’s behavioral prefer-ence towards hermaphrodites. We generated four food patches with equal distance to the center of the plate, then placed approximately 30 adult hermaphrodites on diag-onal food patches for 1 hour, followed by introducing approximately 30 males to the center of the plate (Figure 5K). After 1 hour, we quantified the distribution of males across food patches with and without hermaphrodites. A greater proportion of wild-type males congregated on patches containing hermaphrodites. However, inhibiting AVA activity notably reduced the preference for hermaphrodites (Figure 5L). These findings suggest that AVA-mediated enhancement of male local search behavior aids in locating hermaphrodites for mating purposes.
In order to elucidate the AVA-related dimorphic circuit responsible for male-specific local search behavior, we quantified the differences in chemical synaptic connections with AVA neurons between males and hermaphrodites. Notably, PQR, RIC, and DVC neurons demonstrated the highest synaptic output to AVA (Figure 6A, 6B and Supple-mentary figure 7), suggesting their potential role as upstream neurons. Consequently, we investigated the effect of PQR, RIC, and DVC on male’s enhanced local search behavior by blocking their synaptic release using TeTx expression driven by cell-specific promoters (Supplementary figure 8). Our findings indicated that selectively blocking either RIC or DVC significantly reduced the local search behavior in males (Figure 6C and 6E), but not in hermaphrodites (Figure 6D and 6F). However, PQR is not involved in local search regulation in both male and hermaphrodite (Figure 6G, 6H and Supplementary figure 9). To further validate these results, we conducted AVA calcium imaging under conditions where PQR, DVC, or RIC synaptic activity was blocked. A decrease in the frequency of spontaneous calcium transients was observed specifically when DVC or RIC activity was suppressed, indicating that both DVC and RIC are indeed upstream neurons of AVA and play a crucial role in modulating the enhanced local search behavior observed in males (Figure 6I-N). These results are consistent with the behavioral observations.

Neurons that responsible for the increased local search in males. A, Chemical synapse number difference of AVA with upstream neurons between male and hermaphrodite. B, A circuit with AVA and top 3 upstream neurons and top 4 downstream neurons based on the chemical synapse number difference. C, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for RIC neuron manipulation. 17 wild-type worms, 20 RIC::TeTx transgenic worms and 20 non-transgenic siblings. D, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for RIC neuron manipula-tion. 15 wild-type worms, 20 RIC::TeTx transgenic worms and 15 non-transgenic siblings. E, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for DVC neuron manipulation. 15 wild-type worms, 20 DVC::TeTx transgenic worms and 15 non-transgenic siblings. F, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under differ-ent genetic backgrounds for DVC neuron manipulation. 20 wild-type worms, 20 DVC::TeTx transgenic worms and 18 non-transgenic siblings. G, Statistical testing for the average rever-sal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for PQR neuron manipulation. 17 wild-type worms, 20 PQR::TeTx transgenic worms and 20 non-transgenic siblings. H, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for PQR neuron manipulation. 14 wild-type worms, 15 PQR::TeTx transgenic worms and 14 non-transgenic siblings. I, Statistical testing for the spontaneous calcium event frequency in AVA of 1-day adult males under different genetic backgrounds for RIC neuron manipulation. 11 wild-type worms, 20 RIC::TeTx transgenic worms and 15 non-transgenic siblings. J, Statistical testing for the spontaneous calcium event frequency in AVA of 1-day adult hermaphrodites under dif-ferent genetic backgrounds for RIC neuron manipulation. 8 wild-type worms, 10 RIC::TeTx transgenic worms and 10 non-transgenic siblings. K, Statistical testing for the spontaneous calcium event frequency in AVA of 1-day adult males under different genetic backgrounds for DVC neuron manipulation. 10 wild-type worms, 13 DVC::TeTx transgenic worms and 13 non-transgenic siblings. L, Statistical testing for the spontaneous calcium event frequency in AVA of 1-day adult hermaphrodites under different genetic backgrounds for DVC neuron manipulation. 8 wild-type worms, 11 DVC::TeTx transgenic worms and 11 non-transgenic siblings. M, Statistical testing for the spontaneous calcium event frequency in AVA of 1-day adult males under different genetic backgrounds for PQR neuron manipulation. 11 wild-type worms, 14 PQR::TeTx transgenic worms and 8 non-transgenic siblings. N, Statistical testing for the spontaneous calcium event frequency in AVA of 1-day adult hermaphrodites under dif-ferent genetic backgrounds for PQR neuron manipulation. 8 wild-type worms, 8 PQR::TeTx transgenic worms and 8 non-transgenic siblings. Student’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).

Receptors in AVA that responsible for the increased local search in males. A, Sum-mary of receptor examined in this study. B, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for glr-2 manipulation in AVA. 22 wild-type worms, 22 AVA::glr-2 RNAi transgenic worms and 21 non-transgenic siblings. C, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for glr-2 manipulation in AVA. 18 wild-type worms, 20 AVA::glr-2 RNAi transgenic worms and 20 non-transgenic siblings. D, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for nmr-1 manipulation in AVA. 20 wild-type worms, 19 AVA::nmr-1 RNAi transgenic worms and 18 non-transgenic siblings. E, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for nmr-1 manipulation in AVA. 24 wild-type worms, 20 AVA::nmr-1 RNAi transgenic worms and 18 non-transgenic siblings. F, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for nmr-2 manipulation in AVA. 19 wild-type worms, 19 AVA::nmr-2 RNAi transgenic worms and 19 non-transgenic siblings. G, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for nmr-1 manipulation in AVA. 20 wild-type worms, 20 AVA::nmr-2 RNAi transgenic worms and 20 non-transgenic siblings. H, Statistical testing for the average rever-sal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for ser-3 manipulation in AVA. 22 wild-type worms, 21 AVA::ser-3 RNAi transgenic worms and 20 non-transgenic siblings. I, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for ser-3 manipulation in AVA. 16 wild-type worms, 17 AVA::ser-3 RNAi transgenic worms and 16 non-transgenic siblings. J, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult males under different genetic backgrounds for ser-6 manipulation in AVA. 21 wild-type worms, 19 AVA::ser-6 RNAi transgenic worms and 20 non-transgenic sib-lings. K, Statistical testing for the average reversal rate between minutes 7 to 10 of 1-day adult hermaphrodites under different genetic backgrounds for ser-6 manipulation in AVA. 17 wild-type worms, 18 AVA::ser-6 RNAi transgenic worms and 16 non-transgenic siblings. Stu-dent’s t test for all the statistical tests. *(P < 0.05), * * (P < 0.01), * * *(P ≤ 0.001).
DVC identified as a glutamatergic neuron [51] and activates AVA calcium transient events for local search behavior in males (Figure 6E and 6K). Therefore, we tested whether NMDA or AMPA receptors on AVA regulates local search behavior. we gener-ated transgenic strains that individually silence NMDA and AMPA receptor genes in AVA neurons (Figure 7A). By examining the reversal rates, we evaluated the impact on local search behavior. Our results indicated that individually silencing AMPA recep-tor gene glr-2, as well as NMDA receptor genes, nmr-1 or nmr-2, led to a significant decrease in reversal rates in males (Figure 7B, 7D, and 7F). However, no such effect was observed in hermaphrodites (Figure 7C, 7E, and 7G). This suggests that both AMPA and NMDA receptors are crucial for mediating local search behavior in males. Furthermore, since RIC is known to release octopamine [51], we explored the influence of octopamine receptors SER-3 and SER-6 in AVA on local search behavior (Figure 7A). By silencing ser-3 and ser-6 genes specifically in AVA neurons and assessing the reversal rates, we aimed to determine their contribution. Our findings demonstrated that silencing ser-3 in AVA significantly reduced the reversal rate in males, without affecting hermaphrodites (Figure 7H and 7I). In contrast, silencing ser-6 in AVA had no discernible effect on the reversal rate in either sex (Figure 7J, 7K, and Supple-mentary figure 10). These results suggest that the octopamine receptor SER-3 plays a specific role in regulating the increased local search behavior observed in males.
3 Discussion
In this study, we systematically analyze the structural and dynamical differences of neural networks, which set the circuitry basis for the dimorphic behaviors in male and hermaphrodite C. elegans. We reveal that male neural network characteristics determine the prioritized sexual-related behaviors in males. We predict dimorphic behavioral outputs according to the structural and dynamical features, and further verify the prediction by dissecting a circuit responsible for the enhanced local search behavior in males.
3.1 Male C. elegans develops multiple mechanisms to increase the mating efficiency
The overwhelming majority (99.9%) of the C. elegans population consists of hermaphrodites, which prefer self-fertilization over mating [52, 53, 54, 55]. Therefore, the evolution pressure has driven the rare males to develop multiple mechanisms to increase the mating efficiency.
We find that male’s neural network contains about 25% (41/161) male-specific neurons, while neural network in hermaphrodite only contains about 1.6% (2/122) hermaphrodite-specific neurons that regulates hermaphrodite specific egg-laying behavior [25]. Structural analysis shows that male-specific neurons form strong con-nections within male neural networks, revealing the important roles of these neurons and setting the basis for males’ prioritized sexual-related behavior. Our functional simulation analysis confirms the prediction based on structural features, emphasizing the substantial impact of male-specific neurons on the male neural network.
Not only the dominate role of male-specific neurons, the distinct connections and functions of sex-shared neurons facilitate sexual-related behaviors through different mechanisms. Males express pheromone receptors in both sex-shared sensory neurons [56, 28] and male-specific neurons [57, 58] to increase pheromone sensitivity. Besides the increased pheromone receptors in the sensory neurons, males rewire the synap-tic connections at the interneuron and motor neuron level to promote sex-related behavior. AVA neuron is the command neuron for driving reversals, which plays an essential role for hermaphrodite behaviors, including navigation, food searching, aver-sive response, learning and memory etc. [59, 48, 60]. We find that AVA have strong connections with sex-specific neurons and shows the key position for the functional connection in the whole male network as well as the male-specific sub-network, it suggests that AVA plays an important role for mating behavior in males. Indeed, previous study demonstrated that AVA integrates the signals for sex-specific neu-rons to complete a series of stereotyped steps during mating [61]. Beyond directly regulating mating behavior, we find that AVA-related rewired circuit in male medi-ate increased local search behavior that indirectly enhance the mating efficiency. The highly increased connections between command neuron AVA and downstream motor neurons VA and DA indicates a strong motor control in males. Sex-shared neurons DVC and RIC have increased chemical synapses with AVA in male, and our behavioral assay and calcium imaging results show that the circuit involving glutamatergic neu-ron DVC, octopaminergic neuron RIC and command neuron AVA regulate enhanced spontaneous local search behavior that facilitate mate-searching. For further prioritiz-ing the value of hermaphrodites, males decrease food attraction to promote food lawn leaving [62], and decrease aversive response to nociceptive stimuli [63].
3.2 Structural and dynamical feature based sexually dimorphic behavior prediction
In C. elegans, pharyngeal neurons that govern the pharyngeal pumping mechanism for feeding are organized into a specialized sub-network [64]. Previous research has demonstrated that signals from non-pharyngeal neurons can modulate feeding behav-iors through regulating pharyngeal neurons in hermaphrodites [65, 66]. Structural and functional studies characterized RIP neuron as a pivotal intermediary to connect pha-ryngeal neurons with others in hermaphrodite neural network [67, 68]. Interestingly, our current study reveals a distinct pattern in male worms. Unlike previous findings, we observed no direct connections between the pharyngeal neurons and other neurons, as depicted in Supplementary figure 1. Instead, we noted a robust interconnection among the pharynx neurons themselves and a loose functional linkage of the RIP neu-ron with sensory neurons responsible for internal and external environment changes [69, 70, 71, 72] in neural network (Figure 3N). These findings suggest that males may possess an independent regulatory mechanism for feeding behaviors.
Our previous study demonstrated that the AIY→RIA circuit is fundamental for sensorimotor integration in olfactory steering in hermaphrodites [73, 74]. AIY receives inputs from various sensory neurons, including AWC and AWA, in both sexes (Sup-plementary figure 11). Notably, AWC and AWA in males are involved in sexual attraction [31, 32]. Here, we discover an enhanced circuit at the inter-motor neuron level, AIY→RIA→RMD DV circuit (Figure 3K and 3L), therefore, we predict that enhanced AIY→RIA→RMD DV circuit facilitates pheromone-guided olfactory steer-ing behavior in males. A recent study showed that AFD expresses a dimorphic level of the insulin-like peptide INS-39 in males, suggesting a dimorphic function of AFD [27]. Our analysis show that neuron AFD exhibits the highest number of synaptic connec-tions with AIY (Supplementary figure 11), therefore, further exploring the function of the AFD→AIY circuit in males is of significant interest.
Previous functional studies have demonstrated that AVA, as the command neuron, drives locomotion to regulate diverse behaviors in both sexes [75, 59, 76, 48, 77, 63]. Here, we present structural evidence for the essential role of AVA in the neural networks of males and hermaphrodites. We find that AVA has a large number of synapses, including both synaptic inputs and outputs, in two neural networks (Figure 1B, 1G and 1K). Interestingly, with respect to the difference in synapse numbers among sex-shared neurons, AVA exhibits a dimorphic connection pattern in males and hermaphrodites, as well as playing a key role in the sex-specific sub-neural network of males. Therefore, it is reasonable to predict that a wide range of behaviors mediated by AVA are sexually dimorphic. Here, we have demonstrated that AVA and the upstream neurons DVC and RIC regulate enhanced local search behavior in males (Figure 5-7). However, PQR, which reveals the largest synapse number difference with AVA between the two sexes, is not involved. Thus, it is intriguing to investigate the function of PQR-AVA circuit in males to discover how this dimorphic circuit mediates sexually specific behavior.
We have identified several synaptic connections that exist only in one sex (Sup-plementary table 3 and Figure 3J). One male-specific circuit involving PHA and two hermaphrodite-specific circuits comprising PHB and URY are highlighted according to the sex-specific connections (Supplementary figure 12). Indeed, studies have demon-strated the mechanisms of sex-specific pruning of PHA and PHB neuronal synapses and the corresponding sexually dimorphic behaviors [78, 79, 45]. Sensory neuron URY is involved in pathogen avoidance in hermaphrodites [80, 81]. Therefore, it is intriguing to examine whether URY activates downstream motor neurons RMD DV and SMD or interneuron AVE, to generate avoidance behavior in a sex-specific manner.
Overall, this study elucidates the neural circuitry underlying prioritized sexual behaviors in males, also predicts potential dimorphic behaviors and the associated circuits.
4 Materials and methods
4.1 C. elegans strains
Caenorhabditis elegans strains maintenance followed the protocol from wormbook [82]. The Bristol N2 strain was used as wild-type. Males were generated through heat shock and maintained in a mixed population with hermaphrodites [83]. The following strains were employed in this study, with their detailed genotypes or microinjection mixtures described within square brackets:
GR1333, yzIs71[Ptph-1::GFP + rol-6(su1006)] V;
PSC140, scnEx92[WY079(Pnmr-1sp::loxp::STOP::loxp::HisCl1), 30ng/uL; XZ046(flp18p::Cre), 30ng/uL; CC::GFP, 30ng/uL];
PSC286, scnEx223[XZ046(flp18p::nCre), 31ng/uL; YW379(nmr1sp::loxp::Stop::loxp::nGC6s), 6ng/uL; CC::DsRed2, 39ng/uL; pUC19, 24ng/uL];
PSC138, scnEx90[YW397(Ptbh-1p::TeTx::mCherry), 30ng/uL; CC::GFP, 31ng/uL; pUC19, 30ng/uL];
PSC412, scnEx302[YW398(ceh-63p::TeTx::mCherry), 45ng/uL; CC::GFP, 30ng/uL; pUC19, 30ng/uL];
PSC227, scnEx166[YW396(gcy36p::TeTx::mCherry), 30ng/uL; CC::GFP, 30ng/uL; pUC19, 40ng/uL];
PSC132, scnEx84[YW399(Pnmr1sp-nmr1 sense), 30.6ng/uL; YW400(Pflp18p-nmr1 anti-sense), 30.4ng/uL; CC::DsRed2, 39ng/uL];
PSC136, scnEx88[YW401(Pnmr1sp-nmr2 sense), 30.1ng/uL; YW402(Pflp18p-nmr2 anti-sense), 30ng/uL; CC::DsRed2, 39ng/uL];
PSC149, scnEx101[YW405(Pflp18p-glr2 anti-sense, 30.5ng/uL; YW406(Pnmr1sp-glr2 sense), 30ng/uL; CC::GFP, 31ng/uL];
PSC233, scnEx172[YW474(Pnmr1sp-ser3-sense, 31ng/uL; YW475(Pflp18p-ser3-anti sense), 30ng/uL; CC::GFP, 40ng/uL];
PSC320, scnEx245[YW495(Pnmr1sp-ser6 sense), 33ng/uL; YW496(Pflp18p-ser6 anti-sense), 30ng/uL; CC::GFP, 30ng/uL];
PSC321, scnEx246[YW495(Pnmr1sp-ser6 sense), 33ng/uL; YW496(Pflp18p-ser6 anti-sense), 30ng/uL; CC::GFP, 30ng/uL];
BNU001, scnEx223; scnEx90 [mated by PSC286 and PSC138];
BNU002, scnEx223; scnEx302 [mated by PSC286 and PSC412];
BNU003, scnEx223; scnEx166 [mated by PSC286 and PSC227].
4.2 Molecular cloning of plasmids
The plasmids used to generate the aforementioned transgenic strains were constructed via Gibson assembly [84], utilizing the Gibson Assembly Master Mix (NEB, E2611) according to the manufacturer’s protocol. Gibson assembly is an isothermal, single-reaction method that assembles multiple overlapping DNA fragments through the concerted action of a 5’ exonuclease, DNA polymerase, and DNA ligase. The DNA fragments (listed in Supplementary table 5) used for Gibson assembly were generated via PCR with the 2× High-Fidelity PCR Master Mix (MedChemExpress, Cat. No.: HY-K0533). Primer and template details are provided in Supplementary table 5. The identity of each plasmid was confirmed by sequencing.
For cell-specific expression, the following promoters were employed: AVA neuron expression: Driven by an overlapping strategy using the flp-18 promoter (Pflp-18, 1527 bp upstream of the flp-18 gene) and the nmr-1s promoter (Pnmr-1s, 990 bp upstream of the nmr-1s gene) [85]; RIC neuron-specific expression: Driven by the tbh-1 promoter (Ptbh-1, 2819 bp upstream of the tbh-1 gene) [86]; DVC neuron-specific expression: Driven by the ceh-63 promoter (Pceh-63, 646 bp upstream of the ceh-63 gene) [87]; PQR neuron expression: Driven by the gcy-36 promoter (Pgcy-26, 1089 bp upstream of the gcy-36 gene) [88].
4.3 Cell-specific gene knock-down
Cell-specific gene knockdown was carried out based on the methodology outlined in a previous publication [89] with some modifications. In this approach, double-stranded RNAs (dsRNAs), consisting of both sense and antisense RNA strands, are transcribed using cell-specific promoters. The DNA fragments responsible for generating the pro-moter::sense or promoter::antisense RNA were subcloned into a plasmid, which was sequenced to confirm the accuracy of the dsRNA constructs.
For AVA neuron-specific RNA interference (RNAi), the expression of sense and antisense RNA strands was achieved using the aforementioned overlapping pro-moter strategy, where the flp-18 promoter drove the expression of the sense RNA, and the nmr-1s promoter drove the expression of the antisense RNA [85]. This promoter-overlapping approach facilitated the generation of dsRNA specifically in AVA neurons. Details of the DNA fragments used to produce the dsRNAs are provided in Supplementary table 5.
Plasmids designed to express sense and antisense RNA were constructed using Gibson assembly. These plasmids, along with a microinjection marker plasmid (CC::GFP or CC::DsRed2), were injected into the germline of C. elegans to create RNAi transgenic lines, specifically PSC132, PSC136, PSC149, PSC233, PSC320, and PSC321.
4.4 Graph theory analysis
In the graph theory analysis, several parameters were calculated. The definitions for each parameter are as follows:
Node strength: The node strength of a neuron is defined as the total number of synapses connected to that neuron.
Node out strength: The node out strength of a neuron is defined as the number of synaptic outputs from that neuron.
Node in strength: The node in strength of a neuron is defined as the number of synaptic inputs to that neuron.
Edge weight: The edge weight of a directed connection between two neurons is defined as the number of synapses comprising that connection.
Length of shortest path: The length of a path is defined as the reciprocal sum of the edge weights of the connections within the path. The shortest path between two neurons is the path with the minimum length.
Betweenness centrality: The betweenness centrality of a neuron is defined as the proportion of the number of shortest paths passing through that neuron relative to the total number of shortest paths in the entire neural network.
We generated an artificial network following the same principles as the neural networks in C. elegans (Supplementary figure 13) and used it as an example to demonstrate the calculation of each parameter.
Node strength:
Neuron A: 2+3+3=8; Neuron B: 2+2+2+4=10; Neuron C: 3+1+2=6; Neuron D: 4+3+2+1=10.
Node out strength:
Neuron A: 2+3=5; Neuron B: 2+2=4; Neuron C: 3+1=4; Neuron D: 4.
Node in strength:
Neuron A: 3; Neuron B: 2+4=6; Neuron C: 2; Neuron D: 1+2+3=6.
Edge weight:
EA→B=2; EA→D=3; EB→C=2; EB→D=2; EC→A=3; EC→D=1; ED→B=4.
Length of shortest path: Here we take the pair of neurons B and D as an example. There are three possible paths from neuron B to neuron D, with the following lengths:
PB→D=1/2; PB→C→D=1/2+1=3/2; PB→C→A→D=1/2+1/3+1/3=7/6.
Thus, the shortest path from neuron B to neuron D is the path B→D, with a length of 1/2.
6. Betweenness centrality: Total 12 shortest paths in the sample network are listed below with the lengths:
PA→B=1/2; PA→B→C=1/2+1/2=1; PA→D=1/3; PB→C→A=1/2+1/3=5/6; PB→C=1/2; PB→D=1/2;
PC→A=1/3; PC→A→B=1/3+1/2=5/6; PC→A→D=1/3+1/3=2/3; PD→B→C→A=1/4+1/2+1/3=13/12; PD→B=1/4; PD→B→C=1/4+1/2=3/4.
Taking neuron D as an example. There are 6 shortest paths that pass through neuron D. Therefore, the betweenness centrality of neuron D is 6/12=0.5.
4.5 Computational modeling
We model the dynamics of neural networks in both sexes of Caenorhabditis elegans using the RC neuron model. The RC neuron model is represented as follows:
In this equation, V is the membrane potential, c = 1.0 is the membrane capaci-tance, gNa= 120.0, gK = 36.0 and gL = 0.03 are the conductance of sodium ion channel, potassium ion channel and leakage channel, respectively. ENa = 50.0mV, EK = −77.0mV and EL= −54.4mV are the reversal potentials of the sodium ion, potassium ion and leakage current, respectively. Iext is the external input current. A neuron receives synaptic currents from all upstream neurons, and the sum of all synaptic currents is its external input current Iext. If there are N synapses connecting neuron A to neuron B, then neuron B will receive a synaptic current IA→B,
where k = 100.0 is the coefficient, VAand VB are the membrane potentials of neuron A and neuron B.
The details of the computation are provided in the Python code included in the supplementary materials (Supplementary file 1).
4.6 Local search behavioral assay
A 10 uL of OP50 bacterial liquid culture was transferred onto a 3 cm NGM plate and allowed to dry at room temperature for either 0.5 hours or 16 hours to differentiate food thickness. Individual one-day-old adult male or hermaphrodite C. elegans were then placed on the assay plate. The plate was positioned under a high-speed camera (MV-CA060-11GM, Hikvision) to record for 10 minutes at a frame rate of 10 Hz. Reversal behaviors were manually counted for further analysis. In the subsequent local search behavioral assay with transgenic animals, only the last 3 minutes of the 10-minute search period were recorded and analyzed.
4.7 Manipulating AVA neuron with histamine administration
The protocol for temporally inhibiting AVA neurons with histamine treatment in AVA::hisCl1 transgenic animals was adapted from a previous study [50]. A 1 M histamine-dihydrochloride (H7125, Sigma-Aldrich) stock solution was prepared and stored in a −4°C freezer. For experimental use, the stock solution was diluted with double-distilled water (ddH2O) to a final concentration of 200 mM. To prepare the histamine-containing food lawn, 10 uL of the 200 mM histamine-dihydrochloride solu-tion was mixed with 190 uL of E. coli OP50 culture to achieve a final concentration of 10 mM histamine. Assay plates were prepared by seeding 10 uL of this bacterial mixture onto the center of 3 cm NGM plates and allowing the plates to dry for 0.5 to 3 hours before the experiment.
4.8 Hermaphrodite preference assay
A 9 cm NGM assay plate pretreated with 10 uM histamine solution (H7125, Sigma-Aldrich) was divided into four equal sectors. A food lawn was created at the center of each sector by drying 50 uL of OP50 bacterial liquid culture for 2 hours at room temperature. Approximately 30 one-day-old adult GR1333 hermaphrodites were trans-ferred onto two diagonal food lawns, initiating a 2-hour pheromone-releasing period. After this period, about 30 one-day-old adult males were quickly placed at the center of the assay plate and allowed to freely select a sector for 1 hour. Following the selec-tion period, the number of males in each sector was manually counted. The Choice Index was calculated based on the distribution of males across the sectors:
4.9 Calcium imaging and data analysis
One-day-old males or hermaphrodites were paralyzed with 10 mM levamisole (A606644-0100, Sango Biotech) and placed on a glass slide with a thin layer of NGM agar. Images were captured for ten minutes at a frame rate of 4.84 frames per second using a Zeiss LSM980 confocal microscope equipped with an EMCCD camera and a ×60 oil immersion objective. The images were processed using ImageJ software. The dynamic tracking plugin “TurboReg” was used to pre-process the raw image gallery and correct any frame misalignment. Regions of interest (ROIs) were manually drawn around the AVA soma, and the gray values of these ROIs were measured to obtain the time series of calcium signals. Approximately 144 frames (about 5% of the total 2876–2879 frames) were averaged to establish the F0 baseline value. △F was calcu-lated as △F = F − F0, where F represents the average fluorescence intensity of the ROI in each frame. The frequency of calcium events was determined by counting the number of signal intervals with △F/F0 exceeding a threshold value of 1 during the 10-minute recording period.
Acknowledgements
We thank Prof. Yun Zhang from Harvard University for generously providing plasmid XZ046 (flp18p::Cre), and plasmid WY079 (Pnmr-1sp::loxp::STOP::loxp::HisCl1) was generated during co-author Dr. Wenxing Yang’s postdoctoral research in her lab. We acknowledge the Caenorhabditis Genetics Center for providing C. elegans strains. We also appreciate the technical support from the Instrumentation and Service Center for Science and Technology at Beijing Normal University. This work was supported by the National Natural Science Foundation of China (NSFC) under grant numbers 32371079, 32000720 and 32271178.
Additional files
Appendix A Supplementary figures

Directed-weighted graphs of male and hermaphrodite neural networks. A, The graph of hermaphrodite neural network. B, The graph of male neural network. Clockwise lines represent synaptic connections between neurons and the line width corresponds to the synapse number.

Majority of neurons are shared in male and hermaphrodite neural networks

Weight comparison for the top edges in male neural network, including ALA, AVA and RIA-related edges

Sex-specific sub-neural networks of male and hermaphrodite

Sex-shared sub-neural networks of male and hermaphrodite

Similar calcium event frequency of AVA in males A and hermaphrodites B L4 stage. Sample size: 13 males and 13 hermaphrodites

Chemical synapse number difference of AVA with downstream neurons between male and hermaphrodite

The expression of mCherry linked with TeTx indicates the expression of TeTx protein

Reversal rates from an independent PQR::TeTx strain PSC229 indicate PQR is not involved in male’s enhanced local search behavior. Sample size: 22 wild-type worms, 23 transgenic worms and 17 non-transgenic siblings in males.

Reversal rates from an independent AVA::ser-6 RNAi strain PSC321 indicate SER-6 in AVA is not involved in male’s enhanced local search behavior. Sample size: 20 wild-type worms, 20 transgenic worms and 19 non-transgenic siblings in males and 14 wild-type worms, 18 transgenic worms and 19 non-transgenic siblings in hermaphrodites.

Predicted circuits for sensorimotor integration in males and hermaphrodites

Predicted male-specific and hermaphrodite-specific circuits

An artificial network as an example to demonstrate the calculation of each graph theory parameter
References
- [1]Architectures of neuronal circuitsScience 373:eabg7285
- [2]Understanding brain functional architecture through roboticsScience Robotics 8:eadg6014
- [3]Drosophila olfaction: past, present and futureProceedings of the Royal Society B 289
- [4]Cellular and circuit mechanisms of olfactory associative learning in drosophilaJournal of neurogenetics 34:36–46
- [5]Synthesis of conserved odor object representations in a random, divergent-convergent networkNeuron 108:367–381
- [6]Convergence, divergence, and reconvergence in a feedforward network improves neural speed and accuracyNeuron 88:1014–1026
- [7]Olfactory information processing in drosophilaCurrent Biology 19:R700–R713
- [8]Memory engrams: Recalling the past and imagining the futureScience 367:eaaw4325
- [9]Synaptotagmin-3 drives ampa receptor endocytosis, depression of synapse strength, and forgettingScience 363:eaav1483
- [10]Losing connections, losing memory: Ampa receptor endocytosis as a neurobiological mechanism of forgettingJournal of Neuroscience 36:7559–7561
- [11]Sexually dimorphic behaviorsAnnual review of neuroscience 11:225–251
- [12]Variable female preferences drive complex male displaysNature 428:742–745
- [13]J. fruitless splicing specifies male courtship behavior in drosophilaCell 121:785–794
- [14]Flymad: rapid thermogenetic control of neuronal activity in freely walking drosophilaNature methods 11:756–762
- [15]Neuronal control of drosophila courtship songNeuron 69:509–522
- [16]Hor-monal control of motivational circuitry orchestrates the transition to sexuality in drosophilaScience Advances 7:eabg6926
- [17]Edinger-westphal peptidergic neurons enable maternal prepara-tory nestingNeuron 110:1385–1399
- [18]Sexual dimorphism in aggression: sex-specific fighting strategies across speciesFrontiers in behavioral neuroscience 15
- [19]Make war not love: The neural substrate underlying a state-dependent switch in female social behaviorNeuron 110:841–856
- [20]Sexually dimorphic neurons in the ventromedial hypothalamus govern mating in both sexes and aggression in malesCell 153:896–909
- [21]Social control of hypothalamus-mediated male aggressionNeuron 95:955–970
- [22]Esr1+ cells in the ventromedial hypothalamus control female aggressionNature neuroscience 20:1580–1590
- [23]Sex-specificity of the c. elegans metabolomeNature communications 14
- [24]Sexual dimorphic regulation of recombination by the synaptonemal complex in c. eleganseLife 12:e84538
- [25]Neural circuits of sexual behavior in caenorhabditis elegansAnnual Review of Neuroscience 41:349–369
- [26]Young duplicate genes show developmental stage- and cell type-specific expression and function in caenorhabditis elegansCell Genomics 4
- [27]Sex-specific developmental gene expression atlas unveils dimorphic gene networks in c. elegansNature Communications 15:4273
- [28]A single-neuron chemosensory switch determines the valence of a sexually dimorphic sensory behaviorCurrent Biology 28:902–914
- [29]A hub- and-spoke circuit drives pheromone attraction and social behaviour in c. elegansNature 458:1171–1175
- [30]A blend of small molecules regulates both mating and development in caenorhabditis elegansNature 454:1115–1118
- [31]Srd-1 in awa neurons is the receptor for female volatile sex pheromones in c. elegans malesEMBO reports 20:e46288
- [32]The sensory circuitry for sexual attraction in c. elegans malesCurrent Biology 17:1847–1857
- [33]Unc-43/camkii-triggered anterograde signals recruit gabaars to mediate inhibitory synaptic transmission and plasticity at c. elegans nmjsNature Communications 14:1436
- [34]Distributed effects of biolog-ical sex define sex-typical motor behavior in caenorhabditis elegansJournal of Neuroscience 34:1579–1591
- [35]Camkii mediates sexually dimorphic synaptic transmission at neuromuscular junctions in c. elegansJournal of Cell Biology 222:e202301117
- [36]Whole-animal connectomes of both caenorhabditis elegans sexesNature 571:63–71
- [37]Dissecting the functional organization of the c. elegans serotonergic system at whole-brain scaleCell 186:2574–2592
- [38]An extrasynaptic gabaergic signal modulates a pattern of forward movement in caenorhabditis eleganseLife 5:e14197
- [39]Environmental co2 inhibits caenorhabditis elegans egg-laying by modulating olfactory neurons and evokes widespread changes in neural activityProceedings of the National Academy of Sciences 112:E3525–E3534
- [40]Sexual dimorphism: Mystery neurons control sex-specific behavioral plasticityCurrent Biology 25:R1170–R1172
- [41]A single neuron in c. elegans orchestrates multiple motor outputs through parallel modes of transmissionCurrent Biology 33:4430–4445
- [42]The robust-ness of caenorhabditis elegans male mating behavior depends on the distributed properties of ray sensory neurons and their output through core and male-specific targetsJournal of Neuroscience 31:7497–7510
- [43]Natural sensory context drives diverse brain-wide activity during c. elegans matingCell 184:5122–5137
- [44]Sexually dimorphic differentiation of a c. elegans hub neuron is cell autonomously controlled by a conserved transcription factorCurrent Biology 27:199–209
- [45]Sexually dimorphic architecture and function of a mechanosensory circuit in c. elegansNature communications 13:6825
- [46]C. elegans enteric motor neurons fire synchronized action poten-tials underlying the defecation motor programNature communications 13:2783
- [47]C. elegans awa olfac-tory neurons fire calcium-mediated all-or-none action potentialsCell 175:57–70
- [48]A circuit for navigation in caenorhab-ditis elegansProceedings of the National Academy of Sciences 102:3184–3191
- [49]Parallel multimodal circuits control an innate foraging behaviorNeuron 102:407–419
- [50]Inducible and titratable silencing of caenorhabditis elegans neurons in vivo with histamine-gated chlo-ride channelsProceedings of the National Academy of Sciences 111:2770–2775
- [51]A cellular and regulatory map of the cholinergic nervous system of c. eleganseLife 4:e12432
- [52]Evolution remodels olfactory and mating-receptive behaviors in the transition from female to hermaphrodite reproductionCurrent Biology
- [53]Diversity in mating behavior of hermaphroditic and male–female caenorhabditis nematodesGenetics 175:1761–1771
- [54]Mating damages the cuticle of c. elegans hermaphroditesPloS one 9:e104456
- [55]Pathogenic bacteria modulate pheromone response to promote matingNature 613:324–331
- [56]Counteracting ascarosides act through distinct neu-rons to determine the sexual identity of c. elegans pheromonesCurrent Biology 27:2589–2599
- [57]Contrasting responses within a single neuron class enable sex-specific attraction in caenorhabditis elegansProceedings of the National Academy of Sciences 113:E1392–E1401
- [58]Transcriptomic profiling of sex-specific olfactory neurons reveals subset-specific receptor expression in caenorhabditis elegansGenetics 223:iyad026
- [59]Nmdar-mediated modu-lation of gap junction circuit regulates olfactory learning in c. elegansNature Communications 11:3467
- [60]Gabaergic motor neurons bias locomotor decision-making in c. elegansNature communications 11:5076
- [61]The c. elegans male exercises directional control during mating through cholinergic regulation of sex-shared command interneuronsPloS one 8:e60597
- [62]Sex, age, and hunger regulate behavioral prioritization through dynamic modulation of chemoreceptor expressionCurrent Biology 24:2509–2517
- [63]Reprogramming the topology of the nociceptive circuit in c. elegans reshapes sexual behaviorCurrent biology 32:4372–4385
- [64]The connectome of the caenorhabditis elegans pharynxJournal of Comparative Neurology 528:2767–2784
- [65]Multiple excitatory and inhibitory neural signals converge to fine-tune caenorhabditis elegans feeding to food availabilityThe FASEB Journal 30
- [66]Pharyngeal pumping in caenorhabditis elegans depends on tonic and phasic signaling from the nervous systemScientific reports 6
- [67]The pharynx of caenorhabditis elegansPhilo-sophical Transactions of the Royal Society of London. B, Biological Sciences 275:299–325
- [68]Distinct neural circuits control rhythm inhibition and spitting by the myogenic pharynx of c. elegansCurrent Biology 25:2075–2089
- [69]Satiety behavior is regulated by asi/ash reciprocal antagonismScientific reports 8:6918
- [70]Dissecting molecular and circuit mechanisms for inhibition and delayed response of asi neurons during nociceptive stimulusCell Reports 25:1885–1897
- [71]Neuronal npr-15 modulates molecular and behavioral immune responses via the amphid sensory neuron-intestinal axis in c. eleganseLife 12:RP90051
- [72]Glutamate signal-ing from a single sensory neuron mediates experience-dependent bidirectional behavior in caenorhabditis elegansCell reports 35
- [73]Forgetting generates a novel state that is reactivatableScience advances 8:eabi9071
- [74]Cholinergic sensorimotor integration regulates olfactory steeringNeuron 97:390–405
- [75]Past experience shapes sexually dimorphic neuronal wiring through monoaminergic signallingNature 561:117–121
- [76]Integration of spatially opposing cues by a single interneuron guides decision making in c. elegansCell Reports 42
- [77]Molecular and circuit mechanisms underlying avoidance of rapid cooling stimuli in c. elegansNature Communications 15
- [78]1 neuropeptide signaling modulates a neural circuit for mate-searching behavior in c. elegansNature neuroscience 15:1675–1682
- [79]Sex-specific pruning of neuronal synapses in caenorhabditis elegansNature 533:206–211
- [80]Novel amyloid-beta pathology c. elegans model reveals distinct neurons as seeds of pathogenicityProgress in Neurobiology 198
- [81]A reverse genetic analysis of components of the toll signaling pathway in caenorhabditis elegansCurrent Biology 11:809–821
- [82]Maintenance of c. elegansWormBook :1–11
- [83]Outcrossing and the maintenance of males within c. elegans populationsJournal of heredity 101:S62–S74
- [84]Enzymatic assembly of dna molecules up to several hundred kilobasesNature methods 6
- [85]Dbl-1, a tgf-β, is essential for caenorhabditis elegans aversive olfactory learningProceedings of the National Academy of Sciences 109:17081–17086
- [86]Starvation induces camp response element-binding protein-dependent gene expression through octopamine–gq signaling in caenorhabditis elegansJournal of Neuroscience 26:10082–10090
- [87]Dvc interneuron cgal driver in caenorhabditis elegansMicropublication Biology :2019
- [88]An aversive response to osmotic upshift in caenorhabditis elegansEneuro 4
- [89]Efficient and cell specific knock-down of gene function in targeted c. elegans neuronsGene 395:170–176
Article and author information
Author information
Version history
- Sent for peer review:
- Preprint posted:
- Reviewed Preprint version 1:
Copyright
© 2025, Wang et al.
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics
- views
- 12
- downloads
- 0
- citations
- 0
Views, downloads and citations are aggregated across all versions of this paper published by eLife.