Efficient pheromone navigation via antagonistic detectors in Caenorhabditis elegans male

Domain: neuroscience
Published: 2026-02-13
Editorial outcome: major_revision

Abstract
Chemotaxis to a moving potential mate that emits a volatile sex pheromone poses a navigation challenge requiring rapid, precise responses to maximize reproductive success. Volatile chemicals form gradients that differ from soluble compounds, potentially making navigation based on comparisons between spatially separated sensors unreliable for small-bodied animals. Here we show that, rather than a simple spatial comparison, Caenorhabditis elegans males employ an antagonistic strategy, comparing inputs from sex-shared head (AWA) and male-specific tail (PHD) sensory neurons with distinct response properties. Despite sharing a receptor, SRD-1, these detectors play different roles: AWAs promote forward movement and acceleration, while PHDs induce reversals and deceleration. In rising pheromone gradients, AWA activity dominates; in falling gradients, AWA inactivates, allowing PHD to correct trajectories. AWAs are essential for mate-searching, while PHDs are crucial for complex tasks. A minimal computational model reproduces these behaviors and infers how head–tail signals are combined. Thus, a sexually dimorphic, antagonistic sensory system enables adaptive navigation in dynamic environments.

Introduction
For most animals, finding a mate is an essential task and is an especially significant challenge for organisms that rely on volatile pheromones for mate detection, as the potential mate often moves in a complex environment and establishes a fleeting, low-concentration pheromone gradient. To obtain a mechanistic understanding of how animals can rise to this challenge, we studied navigation in Caenorhabditis elegans, as it has a highly accessible nervous system.

C. elegans produces both soluble and volatile sex attractants. Self-fertilizing C. elegans hermaphrodites emit a volatile pheromone when sperm are depleted1–5. Volatile chemosensory signals are fundamental to facilitating complex behaviors such as strategic navigation, active sampling, and sequential decision-making across diverse species; they are crucial for reproductive success6–8. As sex pheromones guide both innate and learned mate-searching activities in many animals, they provide an opportunity to study the neurobiological underpinnings of sexually dimorphic behaviors9–18. For example, the differential responses of males and females to identical stimuli, such as sex pheromones, raise questions about the sensory and neural circuit bases of sexual dimorphism in behavior19–22.

C. elegans produces both soluble and volatile sex attractants. Soluble nematode-specific ascarosides are modulators of social/sexual behaviors and developmental regulation23–41. In contrast, this study focuses on a volatile, non-ascaroside sex pheromone (hereafter referred to as “the volatile sex pheromone”) that remains chemically unidentified but plays a critical role in sexual communication by signaling fertility and sexual maturity, as it can only be produced by hermaphrodites with no sperm due to depletion or dysfunction3,5. As hermaphrodites with no sperm can be considered females, we classify this pheromone as a female sex pheromone. The only known receptor for volatile sex pheromone is the G protein-coupled receptor (GPCR) SRD-1, which is expressed in the sex-shared amphid neuron AWA in males only, implying underlying sexually dimorphic sensory processing by that neuron4.

The complexity of neural circuit questions makes studies in simple models such as C. elegans highly useful to rigorously define neural algorithms used by animals. The neural circuitry underlying chemoattraction in C. elegans has been mapped with increasing precision, suggesting that sensory neurons process environmental stimuli with remarkable reliability42. Besides of the sensitive sensory neurons, it also has a network of interneurons that play critical roles in processing sensory information and guiding behavioral responses that collectively facilitate navigation and avoidance behaviors: AIA amplifies olfactory signals, AIB controls reversals, AIY mediates response to gradients, AIZ modulates turns, and AVA initiates backward movement43–51. These circuits facilitate essential survival behaviors, employing mechanisms such as temporal integration42, rapid desensitization52, and the modulation of behavioral responses based on previous experiences and current conditions43,47,53–64. In short, the probabilistic nature of behavioral outcomes in C. elegans can be traced to the dynamic state of the neural network beyond sensory neurons, potentially explaining the variability in behavior outcomes from identical stimuli in the same individual53,65.

Previous studies have shown that C. elegans employs sensory detectors on opposite ends of its body for rapid avoidance responses to aversive stimuli like SDS, H2O2, and glycerin66–68, where quick response is prioritized over accuracy. In contrast, our study uncovers a volatile attractant chemotaxis mechanism in which dual detectors are instead used for target searching, a process that demands both rapid responses and high precision to successfully locate the target. Here, we describe a unique attractant dual-sampling algorithm that utilizes controlled expression of a single receptor to achieve sexually dimorphic chemosensory responses and an innate, adaptive navigation strategy for efficient volatile chemical chemotaxis.

In this study, we discover that the male tail-specific neuron, PHD, in addition to AWA, expresses SRD-1 and responds to the sex pheromone as well. We demonstrate that PHD is specifically required for navigation during challenging tasks. Using optogenetics, we compare the contributions of head and tail neurons to behavioral responses. To understand their interaction, we investigate the neural circuitry connecting them, and revisiting their response properties, we find that head and tail neurons detect distinct aspects of the pheromone gradient and concentration. Based on these findings, we propose a computational model to help elucidate navigation strategies.

Results
Volatile pheromone receptor SRD-1 is expressed in PHD, a male-specific neuron in the tail

Male C. elegans sense the volatile female sex pheromone via SRD-14,5, a GPCR. In hermaphrodites, it is expressed only in ASIs in the head region and PHAs in the tail region. Whereas in males, SRD-1 is expressed in the AWA and ASI sensory neurons in the head region. In males, SRD-1 was reported to be expressed in a pair of tail neurons69,70, which we now have identified as the newly discovered pair of PHD neurons using several transcriptional reporters, based on their location, morphology, and marker gene expression (Fig.1A showing an extrachromosomal array strain (srd-1P::mCherry); Figs.2A and S1B showing an integrated cGAL-UAS strain (srd-1P::cGAL; UAS::GFP); and Fig.S1C showing a marker for Ray B neurons, namely a cGAL-UAS strain pkd-2p::cGAL; UAS::GFP; srd-1P::mcherry). We further verified SRD-1 expression in PHD neurons using a split cGAL driver with lin-48d and srd-1 5’ transcriptional control regions, where lin-48 is known to be expressed in PHD neurons71. The expression of SRD-1 in PHD neurons was further supported by recent male-specific neuronal transcriptomics data, which revealed heterogeneous SRD-1 expression within these neurons72. RNA-seq indicates srd-1 is detected in ~40% of PHD neurons under standard conditions; however, our integrated srd-1P–driven cGAL with UAS::GFP reporter shows uniform PHD labeling (near 100%). Our approach also generated a PHD-specific driver for targeted manipulation of PHD neurons for subsequent experiments (See Fig.2). In C. elegans males, AWA is required for chemotaxis towards the sex pheromone4,5. While previous studies have linked male tail-specific neuron PHD to various aspects of male behavior71,73, their specific function remains unclear.

AWA neurons are known to respond to multiple volatile attractants74–78, whereas PHA neurons are involved in repellent avoidance behaviors66,75,79, and ASI mediates multiple sensory responses, including repulsion80. The sex-specific expression pattern of SRD-1 suggest that the differing behavioral responses to the sex pheromone—strong attraction in males and weak repulsion in hermaphrodites—may result from the sexually dimorphic expression of the chemoreceptor SRD-1. A In addition, the dual-site expression of SRD-1 in both head and tail neurons suggests that males may integrate SRD-1-mediated sensory inputs from the anterior and posterior regions to navigate effectively toward the volatile pheromone.

Male-specific PHD is activated by the volatile pheromone

We next tested if PHD neurons activate in response to the sex pheromone (Fig.1C). We observed that PHD is activated by the sex pheromone from both C. elegans fog-2 hermaphrodites and C. remanei females. To test if this response was mediated via SRD-1, we repeated the experiment in srd-1(eh1) loss-of-function mutant males. srd-1 mutant males showed no PHD activation upon sex pheromone stimulation (Fig.1C). Therefore, male-specific PHD neurons sense volatile sex pheromone via SRD-1. These findings, combined with the known role of PHD in mate-related behaviors71, suggest its potential involvement in pheromone-guided navigation. Calcium imaging demonstrates that SRD-1 expression in both head (AWA) and tail (PHD) neurons is not merely anatomical but functionally mediates pheromone responses, providing direct evidence that males employ dual detectors to sense pheromone sources.

PHD neurons enhance mate-searching efficiency in complex environments

To test the hypothesis that these spatially separated detectors for pheromone actually aid navigation, we used five types of chemoattraction assays designed to represent varying levels of difficulty males might encounter in natural conditions, comparing intact males to those with histamine inhibited-PHD neurons (Fig.2). We achieved specific expression of the HisCl effector (a chemogenetic silencer) in PHD under the control of a split cGAL-UAS line: lin-48dP::NLS::cGAL (DBD); srd-1P::NLS::cGAL (AD) (Fig.2A). Our experimental design included wild-type (him-5) males with/without histamine treatment and PHD-HisCl lines without histamine treatment as controls. Our data showed no significant differences between the three control groups in their response to sex pheromones under all test conditions (Fig.2C–G). Thus, the observed effects reflect histamine-induced PHD silencing, rather than genetic background or histamine alone.

We first challenged PHD-inhibited males to locate a sex pheromone source placed at the same distance (3cm) from the source, using two different diameters (6 and 8cm) agar-filled Petri dishes (Fig.2C, D). PHD-inhibited males refer to males expressing HisCl in PHD via split-cGAL (lin-48dP::NLS::cGAL[DBD]; srd-1P::NLS::cGAL[AD]) crossed to 15×UAS::HisCl::SL2::GFP and exposed to 10 mM histamine (see “Methods”). All males located the source within 30min. PHD-inhibited males performed as effectively as controls at both distances, indicating that tail neuron input is not essential for simple, close-range navigation tasks. By contrast, when we increased the distance and placed males 5cm from the source in an 8cm-Petri dish (Fig.2E), all test subgroup males were unable to locate the source.

We then tested males’ ability to locate a more dilute odor. We diluted the sex pheromone concentration 10-fold and observed the responses of histamine-treated/untreated wild-type male (him-5 male), histamine-treated/untreated PHD-specific driver with HisCl effector males (Figs.2F, S2A). PHD-inhibited males exhibited notable difficulties in identifying the diluted pheromone source, unlike the three control group males. This differential response underscores the essential role of male tail PHD neurons in navigating toward weak pheromone signals.

To understand the effects of increased distance versus stimulus dilution, we conducted Finite Element Simulations of the pheromone concentration field (Fig.S3). In our assay setup, the stimulus was placed on the lid of the plate that was half-filled with agar, creating a bilayer distribution of the pheromone. As illustrated in Fig.S3A, the volatile component diffuses rapidly in the air, while the agar absorbs and then slowly releases the volatile component. The concentration field simulation revealed that in experiments where males were positioned far away from the pheromone source, they encountered areas of low absolute concentration without a clear gradient. Conversely, when males were tested nearer to a diluted pheromone source (3cm), their performance, while reduced relative to controls, was better than in the 5cm experiment, likely because the diluted source still produced a weak but discernible Gaussian gradient despite its overall low concentration (Fig.S3B). These findings suggest that the concentration gradient plays a crucial role in guiding males to the pheromone source.

Since C. elegans navigate through three-dimensional (3D) soil and rotting fruit in their natural habitat, we examined the efficacy of PHD-inhibited males in a 3D search paradigm using gellan gum gel (see Methods), which likely better mimics natural conditions than a 2D Petri dish surface (Fig.2G, H). In this endpoint assay, we recorded the number of worms that reach the target spot every 5min. Worms must stop moving at the exact 3D location (depth included) of the pheromone to count as finding it. Control and test droplets are placed at the same depth to control for vertical bias, avoiding confounding from a preference for movement toward the surface or bottom. PHD-inhibited males had reduced proficiency in identifying pheromone sources within 3D spaces, underscoring the importance of PHD neuron inputs for environmental navigation that mirrors natural conditions (Figs.2G, S2A).

Analysis of the distribution of males at multiple time points after the addition of stimulus revealed a uniformly low chemotaxis index for the PHD-inhibited male group across all intervals in weak signal and 3D exploration tasks (Fig.S2B). In our 2D experiments involving weak signals, most control males successfully located the target within 10min. However, in 3D exploration tasks, the peak arrival time at the target extended to a significantly longer 20min (Fig.S2C). Notably, we observed distinct impairments in the navigational behaviors of PHD-inhibited males between weak signal detection and 3D spatial exploration tasks. In weak signal detection, the low chemotaxis index resulted from an equal distribution of males reaching both the test and control spots. Conversely, in 3D searching tasks, the low chemotaxis index stemmed from fewer males reaching both spots (Fig.S2B–D).

Optogenetic dissection of SRD-1 positive neurons and PHD neuron’s roles in male locomotion

To examine the effects of head versus tail SRD-1 positive neurons on sex pheromone-induced behavior, we used the red-shifted Chrimson variant of channelrhodopsin81. We first evaluated the UAS::Chrimson effector driven with a pan-neuronal cGAL driver, demonstrating the system’s efficacy (Fig.S4A): worms temporarily ceased movement during light stimulation, promptly resuming normal behavior once the light was switched off.

We then activated all SRD-1 positive neurons with Chrimson expressed under the srd-1 regulatory control, using an srd-1P cGAL driver (Fig.3A ATR- and S4C ATR+). The absence of ATR served as a control to negate any potential effects of light alone, confirming that the observed changes in speed were attributable from targeted neuron activation. Under ATR+ conditions (Fig.3A), males exhibited continuous forward movement throughout the 12.5s light stimulation period, transitioning to rapid steering or reduced speed after stimulation ceased, but not in ATR- males (FigS4C).

To further confirm the role of SRD-1-positive neuron stimulation in modulating locomotor behaviors, we investigated the effects using extended stimulation protocols (30s or 60s light-on intervals followed by 10s light-off intervals) (Fig.3C). During prolonged stimulation, forward movement was sustained, while turning behaviors remained consistently suppressed. Also, the cessation of stimulation was associated with reduced movement speed and an increase in turning rate, consistent with observed dynamics under shorter stimulation conditions.

Using an odr-10P cGAL driver crossed to a UAS::Chrimson effector, optogenetic activation of AWA in both sexes produced no detectable behavioral change, indicating that AWA activation alone does not drive forward locomotion or that odr-10P cGAL driver yielded insufficient Chrimson expression for activation (Fig.S4B).

We next targeted PHD neurons exclusively. Using a split cGAL driver under the control of lin-48d and srd-1 promoters, we achieved PHD-specific Chrimson expression (Fig.3B ATR+ and S4D ATR-). Under the ATR+ condition, PHD activation in males elicited a decline in average speed throughout the red-light stimulation period, after which males resumed movement. Under matched light stimulation, ATR− males exhibited no effect. This result contrasts with the overall movement patterns observed upon and after the activation of all SRD-1 positive neurons (See Fig.3A). Previous studies also suggest that PHD neurons have a potential role in maintenance of backward locomotion during the mating partner body scanning71. We also observed that repeated activation of PHD neurons also resulted in a gradual reduction in speed (See Fig.3B, right panel), suggesting a persistent slowdown effect on locomotor behavior after activation.

Since we also observed behavioral responses to light stimulation in hermaphrodites, we performed a quantitative analysis to distinguish the robustness of these responses in hermaphrodites and males (Fig.3). Hermaphrodite responses were more variable upon optogenetic activation, as also seen in the average speed (Fig.3c) and Fourier analyses (Fig.3d). Fourier analysis of total speed during SRD-1-positive PHD neuron stimulation revealed prominent peaks at 0.05 and 0.025Hz, corresponding to the 20 and 40s stimulation protocols, respectively (Fig.3d). The amplitude and sharpness of the spectral peak at 0.05Hz (or 0.025Hz) quantifies the strength of the signal, i.e., the consistency and robustness of the behavioral response to periodic stimulation, and it is consistently stronger in the males’ response than the hermaphrodites’ by about a factor of two. Hence, we concluded that males display a more robust response. The more variable response in hermaphrodites also manifested as larger inter-individual differences, as shown by comparing the error bars (shaded area) in Fig.3c in the left two panels. Both these analyses suggest a sex-specific effect of SRD-1-positive neuron activation. Upon PHD neuron stimulation, the male also showed a variable response.

Head and tail neurons mediate distinct micro-behavioral responses to optogenetic activation

To confirm and further investigate how activation of SRD-1 positive neurons in the head versus the tail affects behavior, we optically targeted either the head or tail of freely moving males expressing srd-1 Chrimson cGAL-UAS.

Initial observations showed that males predominantly moved forward in the absence of stimulation (ATR– controls; see Figs.4, S4 and S5), so a short observation window could lead to a false positive result on forward movement. To evaluate the duration and persistence of this response, red light is applied to the head region for 30s (Fig.4A). As shown in Fig.3, tail stimulation primarily induced reversals, a rapid transition from forward to backward movement. For the tail region stimulation, we chose short and repeated pulses alternating every 2s over a 15-cycle period to capture multiple reversals (Fig.4A).

After postprocessing, we divided the recording into 2-s segments. For each 2-s segment, we tabulated the behavioral motif displayed by the male or the first behavioral transition that occurred during that segment. We used two complementary behavioral classification frameworks to capture distinct aspects of locomotion dynamics. Four-Motif Analysis (Fig.S5) focuses on core locomotion states (forward, backward, forward-to-backward transition, backward-to-forward transition) to highlight macro-level movement changes during head/tail stimulation. Six-Motif Analysis (Fig.4) expands categorization to include nuanced behaviors like self-exploratory (where the worm attempts to probe its own body) and high-frequency direction transitions (marked by frequent direction changes within the 2-s window), which better capture micro-behavioral variability.

A short light pulse delivered to the tail region induced a transition from forward to backward movement, accompanied by increased directional hesitation (Fig.4B). During these hesitant periods, males frequently switched between forward and backward locomotion. However, we observed substantial individual variability in response to tail stimulation. While most worms reliably responded to light stimulation for 7 pulses, they responded an average of 4.3 times. A subset completely ignored the stimulus. This behavioral heterogeneity may arise from the variable expression of SRD-1 in PHD neurons72.

With 30s of head stimulation, we noted behaviors analogous to those from activating all SRD-1 positive neurons, including persistent forward movement during light exposure followed by rapid directional adjustment (Figs.4C, S5C). We also observed that after head stimulation, males exhibited self-exploratory behavior (Fig.4C), using their tails to probe against their bodies, a behavior that can persist for several minutes.

Circuit that combines head and tail inputs to control locomotion direction

The male connectome82 suggests locomotion command neurons are the likely locus of integration of the head and tail inputs. Specifically, PHDs have strong connections to PVN (ROI1) and EF (ROI2) interneurons82 (See Fig.1B), which connect to pre-motor command neurons. The direction of locomotion is controlled by reciprocal inhibition of forward and reverse command neurons43,49,83,84. To investigate the circuitry between sex pheromone sensory neurons and these motor command neurons, we specifically activated SRD-1 positive neurons with Chrimson and monitored pan-neuronal calcium dynamics using GCaMP6s (Fig.5A–C, see Method). SRD-1 positive neurons, including PHD, AWA, and ASI neurons in males, had robust responses to light stimulation (Fig.5C). In addition, two groups of neurons within the male tail region—presumably a pair of PVN neurons in one region of interest (ROI1) and a single EF neuron in ROI2 (Figs.5B, C, S6)—had a strong positive correlation with PHD activity in ATR+ and not in ATR- males (Fig.S7). Here, we used normalized activity for regions of interest (ROIs) to facilitate comparison across populations of neurons with varying baseline fluorescence, while raw activity was analyzed for single neurons to preserve their intrinsic activity dynamics and avoid potential distortions from normalization. In the male head region, we observed a more negative correlation with light stimulation. About 4 neurons in the head region are positively correlated with AWA neuron activity, and about 10 neurons are negatively correlated (Fig.S7).

We observed a strong negative correlation between the activity of the reversal command neurons (AVA) and SRD-1-positive neurons in the head region (AWA and ASI). Although this inverse relationship was also present in the ATR-untreated control group, it was less pronounced. In ATR-untreated worms, the decrease in AVA activity may have been influenced by factors such as movement of the microscope objective or non-specific light responses.

AWA and PHD have distinct response properties

It has been suggested that AWA neurons adjust their response based on fold-changes in odor concentration, reducing turning behavior with minimal increases in odor concentration52. We used prolonged, behaviorally relevant high concentrations sex pheromone stimulation with a thin layer micro-diffusion (TLMD) unit (Fig.S8A, see “Method”), facilitating pan-neuronal calcium imaging (Fig.5D, E)4. As shown in Fig.5D, upon pheromone application, AWA and ASI neurons showed immediate calcium influx followed by rapid desensitization to a low, steady state within 1.5min, maintaining this level for at least 5min. This pattern indicates robust desensitization to even relatively high pheromone concentrations. PHD neurons exhibited sustained activation for at least 9.5min with a gradual decline, indicative of their threshold-sensing properties (Fig.5E). 62.5% of imaged males exhibited a rapid response to pheromone exposure and sustained high levels of activity, whereas the remainder displayed a slow response, with delayed activation (2.5min post-stimulus) with a 40% reduced calcium signal amplitude (Fig.5E, cropped to 250s; D, full length 600s). The fast and slow responses of PHD neurons are particularly intriguing. Recent male neuron transcriptomics data revealed a heterogenetic expression of SRD-1 in male PHD neurons, which may result in this individual variation72. This pattern may also be caused by PHDs being actively inhibited by other neurons. According to the connectome, PHDs are post-synaptic to several neurons82, which may modulate their activity and contribute to the observed variability in response dynamics.

During the initial phase of neuronal activity, before the activation of PHD neurons, pheromone-stimulated calcium imaging revealed a negative correlation between reversal command neurons (AVA and AVE) and head sensory neuron activities (AWA and ASI) (Fig.5D). This negative correlation suggests that the inhibition of reversal command neurons by head neurons is pivotal for forward movement, suggesting that head neuron activity may override tail movement during gradient ascent. As demonstrated by the set of optogenetic experiments (see Figs.3 and 4), gradient-sensing neurons in the head region dominate PHD input and primarily drive forward movement.

In the subsequent phase of neuronal activity, AWA and ASI activity became hyperpolarized, and all PHD neurons were activated. This allowed us to examine the direct correlation between PHD neurons and reversal command neurons (AVA and AVE). We observed that reversal command neurons exhibited a negative correlation with head sensory neurons and a positive correlation with tail sensory neurons (PHD) (Fig.5F), suggesting PHD-mediated activation of reversal command neurons, consistent with the observed reversal behavior during optogenetic activation (see Figs.3, 4 and 6Ba).

PHD and AWA neurons drive AVA activity at distinct concentration thresholds

To confirm the correlation between reversal command neurons and anterior and posterior SRD-1-positive neurons in different sex pheromone concentrations, and to determine the concentration threshold for behavior changes, we fabricated a head and tail multi-inlet microfluidic chip (Fig. 6A). We utilized immobilized worms within microfluidic chips to precisely control the delivery of varying concentration stimulations to the head or tail independently. This setup enabled accurate stimulus application to distinct regions and facilitates switching between a control buffer and three different stimulus concentrations.

C. elegans has five pairs of pre-motor command interneurons, two of which promote forward locomotion and three of which promote reverse locomotion. These groups are interconnected and control distinct motor neurons43,49,83,84. AVA neuron activity peaks at the start of a reorientation43,48,49,51,83 and AVA interneurons integrate opposing signals from head and tail sensory neurons, guiding behavior67,85. AVA’s diverse activities across time scales position it as a key neuron in coordinating forward and backward movements67,85. Therefore, monitoring AVA neuron activity provides a useful indicator of the animal’s forward and reversal behaviors.

Using diacetyl as a baseline attractant to validate our device (Fig. 6Bb), we observed that all tested concentrations led to decreased AVA neuron activity, suggesting an enhancement of forward movement. Diacetyl at higher concentrations, more effectively suppresses AVA neuron activity. We then tested pheromones at varying concentrations applied to both ends and separately to the head and tail (Fig.6Bc). Simultaneous stimulus of both ends immediately decreased AVA activity, indicating forward movement. Remarkably, head-only stimulation caused a greater reduction in AVA activity compared with stimuli to both ends, whereas tail-only stimulation resulted in increased AVA activity (Fig.6Bd, e); this difference suggests antagonism of head and tail input, consistent with our optogenetic and sex pheromone stimulation calcium imaging showing that head neurons activation promotes forward movement and tail PHD neuron activation triggers reversal (see Figs.3, 4 and 6Ba). These increases and decreases in AVA activity only last for 1min.

We performed area-under-curve (AUC) analysis on the AVA neural activity data (See Method). Notably, SRD-1 positive neurons in the head and tail show different preferences for sex pheromone concentrations. Higher pheromone concentrations more effectively suppress AVA activity when applied to both ends or exclusively to the head (Fig 6Bc–d). In contrast, AVA activation peaked at pheromone dilutions of 100–500X when applied only to the tail (Fig.6C). But, at dilutions of 500X, 1000X, and 2000X, AVA neurons displayed predominantly random oscillations when pheromones were applied to the head or both ends (Fig.S10D). These findings suggest that higher pheromone concentrations promote forward movement more effectively, with head neurons strongly inhibiting AVA activity and weaker tail neuron activation contributing to sustained forward movement and increased speed. At low concentrations, the inhibition from head neurons diminishes, and tail neuron activation becomes more prominent, reducing forward movement. We also noted significant spontaneous oscillations in AVA neuron signals across individuals, a finding shown in similar studies using microfluidic chips65,86,87. These fluctuations are likely due to the inherent spontaneous oscillation nature of AVA neurons, individual animals’ internal status, and the restrictive environment of the microfluidic channels, which may discomfort the worms and trigger attempts to escape, causing variable AVA neuron signal patterns.

Command neurons integrate antagonistic inputs from the head and tail

The integration of inputs from SRD-1-positive neurons in the head and tail regions reveals a sophisticated signal-processing algorithm that optimizes navigation. Optogenetic stimulation data (Figs.3 and 4) demonstrate that activation of tail-region neurons induces reversal behavior and slows locomotion, while stimulation of head-region neurons suppresses turning, promotes forward locomotion, and increases speed. Notably, head-region activation alone mimics the effects of activating all SRD-1-positive neurons, highlighting the dominant role of anterior SRD-1-positive neurons in guiding behavior. This aligns with findings from AWA-defective odr-7 mutants and AWA laser-ablated males4,5, where AWA neurons are critical for locating pheromone sources, while ASI and PHD neurons are insufficient on their own. Conversely, the absence of tail-region PHD neurons impairs pheromone localization under natural, complex conditions, though it has minimal effects in ideal laboratory settings with high pheromone concentrations, reduced noise, and simpler navigation challenges (Fig.2C, D). Together, these data suggest a dual-detector system in males integrating head and tail neurons’ sensory input, with tail neuron activation acting as a corrective mechanism during navigational errors to enhance chemotaxis efficiency.

Pheromone stimulation calcium imaging data further elucidates this integration (Fig.5D). By fitting AVA neuronal activity into a linear model incorporating AWA and PHD activity, the best-fit equation has AVA activity = −0.7 × AWA activity + 0.1 × PHD activity − 0.2, indicating that AVA responses are primarily driven by inhibitory input from AWA neurons in the head, with a smaller excitatory contribution from PHD neurons in the tail (Fig.5F).

Microfluidics chip-based experiments (Fig.6D) further validated this integration mechanism. The area under the curve (AUC) of AVA neuron activation during head-specific and tail-specific stimulation closely matches the trends observed with dual stimulation. This suggests that the neuronal response results from a combination of antagonistic inputs from head and tail regions, providing a computational framework for navigating pheromone gradients. This dual-system integration reflects a sex-specific chemoreceptor-driven behavioral adaptation for efficient navigation in complex environments.

A simple computational model for spatially separated detectors navigation in C. elegans

Sensory neuron inputs are typically conserved through the connectome and determine the behavioral outcomes52. Summarizing the experimental observations of the strong correlations between the AWA, PHD, and AVA neurons (Figs. 5 and 6), we propose a simple model to demonstrate the roles of head and tail sensory inputs. We focused on macroscopic navigation behavior and neglected details of microscopic traits and changes in worm body curvature in motion.

C. elegans exhibits a remarkable ability to navigate complex environments using chemical cues. Two established directional navigation strategies have been observed75,88–93: (1) Klinokinesis, a random walk biased toward the stimulus, such as in bacterial chemotaxis, requires comparing concentrations over time to adjust random turning that lacks directionality towards the correct heading. (2) Klinotaxis, a more refined navigation, utilizes directional turns to achieve more accurate gradient navigation88,94–97. Here, we modeled kinesis and taxis separately.

During kinesis searching, we modeled locomotion as a mixture of active Brownian motion98 and run-and-tumble motion99 (see “Methods”). Our first key assumption is that sensory inputs from the head and tail are converted into confidence variables QH and QT, which then determine the worm’s dynamical state (Fig.7A). As the activity of reversal command neurons AVA and AVE is found to correlate negatively with AWA activation but positively with PHD neuron activation, we propose a simple form to qualitatively capture these correlations:

γ=γ0e−λK(QH−QT), U=U0+U1(QH−QT)+η (1)

Here γ0 = 0.067/s is the baseline tumbling rate. U0 = 0.064 mm/s is the baseline average speed, and U1 = 0.03 mm/s is the magnitude of speed fluctuation. λK represents the strength of klinokinesis, and η represents a Gaussian noise in the speed. The worm’s dynamic state is characterized by its speed and tumble rate (U, γ). Loss of AWA or PHD input disrupts QH or QT computation, leading to impaired speed and turning regulation. The equations for (U, γ) connect the non-directional kinesis movements to confidence variables from head and tail inputs, which are subcircuit responses to stimuli on the head and tail sensory neurons. These mechanisms are also known as orthokinesis (for U) and klinokinesis (for γ).

Our model is based on the idea that sensory information coming from the worm’s head and tail is translated into a signal that is a measure of ‘confidence’ (Q), and these signals directly determine the worm’s behavior and movements (Fig.7A). AWA neurons become more active as sex pheromone concentration increases4. In our microfluidics chip-based experiment, we found that input from head neurons suppressed AVA neuron activity (Figs.5 and 6B-d). Therefore, in our model, the confidence signal based on head input (QH) will rise with increasing pheromone concentration until it reaches saturation (see blue line in Fig.7A). Interestingly, high pheromone concentrations applied to the tail suppress AVA neuron activity, in contrast to the activation observed at low concentrations (Figs.5 and 6B-e). Furthermore, continuous activation of the PHD neuron will result in a reduction in baseline speed and the sprint behavior exhibited upon proximity to the target, suggesting that QT should decrease below zero to capture these observations (see red line in Fig.7A). We propose using the QH−QT model (see purple line in Fig.7A) to represent the negative correlation between AVA/AVE command neurons and AWA activation, and the positive correlation with PHD neuron activation. Importantly, only QH−QT accurately captures the observed increase in speed toward the end of navigation, which wouldn’t be captured by simply adding the two signals together (compare purple and green lines in Fig.7A).

To determine the dynamics of QH and QT given external concentration field evolution, we adopt the simplest dynamics model with a single memory timescale:

dQH/dt = −k1QH+kH2fH(C, dC/dt), (2)
dQT/dt = −k1QT+kT2fT(C)

where the terms represent the sensory input to the head and tail neurons. The head sensory neurons sense the pheromone concentration change, while the tail neurons sense the absolute concentration. However, the head and tail neurons sense the pheromone concentration in the same way, as they share the SRD-1 receptor. The differences in their responses to the pheromone concentration are due to the distinct neural circuits they are connected to, which is consistent with our experimental observations in this work and AWA calcium dynamics in52 (see “Methods”). Key assumptions are: (1) the long decay time of PHD activity level during constant sex pheromone stimulation, as seen in Fig.5F, indicates that PHD sensory input mainly depends on the absolute concentration. Hence, fT is only a function of C. (2) PHD response is positive at intermediate concentration ranges but becomes strongly suppressed at high concentrations, as shown in Fig.6C. (3) The relatively short decay time of AWA activity level during constant stimulation, as shown in Fig.2 of ref.52, indicates that AWA sensory response mainly reflects the detected concentration change, with a mild increase as absolute concentration increases. For simplicity, in this model, worms will make directional (taxis) turns when they (1) detect a high enough concentration above a threshold value, and (2) if they currently experience a decrease in concentration. Such turns are assumed to be perfectly accurate toward the source direction. Based on our experimental observations, head-inhibited worms will not perform taxis turns.

We performed simulations for navigation on a small Petri dish with the concentration simulation for 30min (Fig.7B). Each simulation contains 10000 worms, initialized with random orientations. When both head and tail sensory inputs are missing, QH=QT=0, the worms perform a standard active random walk with constant mean speed and tumble rate (Fig.7C). Only a small fraction – about 10% of worms — were able to find the pheromone source by luck, as seen in the gray curve of Fig.7D and Supplementary Movie 2.

Adding tail sensory input alone significantly enhanced the chance of finding the pheromone source, almost doubling the probability (Fig.7D light blue curve). Adding head sensory input boosts the overall success rate to nearly 100%, simply due to the dominating effect of taxis turns (Supplementary Movie 1). Overall, with tail input, the trajectories are biased closer to the pheromone source, as shown in Figs.7E and S11. In each simulation, worms start from a small region around the center of the plate, and the pheromone source is located at the red point on the left side. We denote the direction from the pheromone source to the plate center as the x direction and measured the average x position of all worms during the entire simulation. This is denoted as <x> on top of each panel in Fig.7E. We notice that <x> is negative whenever tail input is present but becomes positive when tail input is absent. Hence, tail input enables worms to move on average to the left side of the plate, i.e., they behave more attracted to the pheromone source with tail inputs. We compute the maximum distance from the pheromone source that reaches worm reaches during the search, denoted as dmax. For successful worms with head inputs, the addition of tail input accelerates their search so that their dmax is slightly smaller compared with those without tails. In the absence of either head or tail inputs, worms only perform random walks and stay near the starting position; adding tail input effectively incentivizes them to explore larger areas and be more biased to the source, manifested in significantly larger dmax values. Overall, these simulations suggest that tail input significantly improves the success rate of mate-searching.

Methods
Inhibition of PHD neurons by the HisCl method and modified chemoattraction assay

Inhibition of PHD neurons was achieved through the histamine-gated chloride channel method, as outlined in the study117, with slight alterations. Nematode Growth Medium containing histamine (NGM-HA) was prepared by incorporating histamine dihydrochloride from Sigma Aldrich (1M stock solution) into NGM agar at approximately 65°C just prior to pouring the plate. Control plates without histamine were prepared simultaneously from the same batch of NGM. Plates supplemented with 10mM histamine remained effective for a minimum of 2 weeks when refrigerated at 4°C, verified by preliminary testing with a control strain possessing the myo-2 promoter-driven HisCl effector in the cGAL-UAS system. L4-stage males were selected and isolated a day in advance of the assays. Histamine treatments were conducted without the presence of food to eliminate confounding factors. Histamine-induced inhibition occurred within 10min of exposure. Once removed from histamine, the animals typically require 1–2h to fully recover. For PHD-specific inhibition, we used the split-cGAL driver (lin-48dP; srd-1P) crossed to 15×UAS::HisCl::SL2::GFP; animals on 10mM histamine (NGM-HA) are referred to as “PHD-inhibited,” whereas histamine-free condition worms served as controls The chemoattraction assay plates were prepared using 1.5% agar, 25mM NaCl, 1.5mM Tris-base, and 3.5mM Tris-Cl, and conducted according to the protocol described in the literature4, but included modifications to accommodate different plate dimensions, adjustments in the spatial distance between the stimulus source and the starting point of the animals, and alterations in the sex pheromone concentration, as depicted in the associated figures (see Figs.1 and S1). Stimulus droplets are placed on the lid of the plate, and the location of the worms is recorded every 5min up to 30min post-stimulation to assess their response to the introduced stimulus. In our research, we utilized two sizes of plates for the assays, with effective worm-moving surfaces measuring 5.5 and 8.4cm in diameter. For simplicity and clarity in labeling, these were referred to as 6-cm and 8-cm plates, respectively. In our study, we employed two types of 2D chemoattraction assays distinguished by the setup and calculation of the Chemoattraction Index (C.I.). For Type 1 assays, constrained by the smaller plate size, a control buffer spot was not included. Here, the C.I. was derived from the ratio of worms that reached the test spot to the total number of worms introduced. Conversely, in Type 2 assays, the C.I. was determined by subtracting the number of worms that reached the control spot from those that arrived at the test spot, divided by the total number of worms. In each chemoattraction assay, we placed 20 worms at a designated starting point. To ensure the reliability and robustness of our data, we repeated each assay 20 times across three distinct days. PHD-inhibited worms were prepared via the “Inhibition of PHD Neurons by HisCl Method”.

Chemoattraction assay

Male chemotaxis was quantified using a chemoattraction assay as previously described (Wan et al.). Briefly, 2µL of pheromone extract or M9 buffer (control) was applied to designated spots on the assay plate, each supplemented with 1M sodium azide to immobilize responding males. M9 buffer (3g KH₂PO₄, 6g Na₂HPO₄, 5g NaCl, 1mL 1M MgSO₄, water to 1L; autoclave). 20 one-day-old adult males were placed at the origin point, and the chemoattraction index (C.I.) was calculated after 30min using the formula: C.I. = (E−C)/(E+C+N), where E, C, and N represent the number of worms at the experimental, control, or neither spot, respectively. PHD-inhibited worms were prepared via the “Inhibition of PHD Neurons by HisCl Method”.

3D chemoattraction assay employing 0.3g of gellan gum in 100ml chemoattraction assay buffer to create a navigable gel environment. This composition ensures that worms can navigate through the gel freely, without becoming immobilized by water or causing structural damage to the gel through movement. The gellan gum solution is adjusted to match the salt concentration of the chemoattraction assay plates utilized in this research.

For plate preparation, 22ml of the gellan gum solution is poured into a 6-cm plate immediately after the gellan gum is dissolved by heating in a microwave. The solution is allowed to cool to room temperature before introducing the worms. To embed the worms within the gel, 0.5ml of the gellan gum gel is removed from the center of the plate by pipetting. Then, 20 worms are picked by a worm picker and placed. This cavity is then refilled with 0.7ml of gellan gum gel, ensuring the worms are fully embedded within the gel. Unlike traditional chemoattraction assays, the stimulus is applied directly onto the surface of the gel rather than on the lid of the plate (see Fig.2B). This approach ensures that the pheromone remains accessible to the worms and provides a localized and consistent gradient for them to follow. In this endpoint assay, trajectories are not recorded; instead, the number of worms reaching the target spot is documented every 5min for up to 30min post-stimulation to evaluate their responses to the introduced stimulus. This scoring method focuses on the culmination of navigational behavior, capturing the effectiveness of the worms’ ability to detect and respond to the pheromone gradient over time. To ensure the reliability and robustness of our data, we repeated each assay 20 times across three distinct days. PHD-inhibited worms were prepared via the “Inhibition of PHD Neurons by HisCl Method”. We remark that this C.I. quantification is not a projection onto the 2D plane, since worms at the target will stay still afterwards, but those not reaching the target will move in all directions. For example, a worm at the same (x,y) coordinate as the pheromone location but vertically below the stimulus droplet (so the z coordinate is different from the droplet) will continue to move around and will not be counted when computing the C.I. To control for vertical bias, the control solution and pheromone are placed on the same z-plane, preventing preference for movement toward the surface or bottom. Therefore, the C.I. reliably identifies worms at the target location in 3D space.

We prepared plates containing 0.3% (w/v) gellan gum in M9 buffer to generate a soft hydrogel substrate in which worms could enter and locomote within the gel volume, rather than being confined to surface crawling. Importantly, this “penetrable” behavior is not an intrinsic property of gellan gum, but depends strongly on gel concentration and the resulting mechanical properties. Higher gellan gum concentrations commonly used to cast firm gels (e.g., ~2–3% w/v) produce substantially stiffer matrices and are not expected to permit volumetric penetration. Accordingly, our statement refers specifically to the 0.3% (w/v) gellan-in-M9 plates used here, which we selected as the lowest concentration that maintained plate integrity while supporting robust 3D locomotion118. Gellan/Gelrite has been adopted for chemotaxis arenas in high-throughput screening and behavioral assays119,120. Penetrable gels and 3D habitats are known to elicit burrowing and other naturalistic behaviors121–123.

Optogenetics perturbation speed analysis

The optogenetics perturbation assay was conducted using Chrimson, a red-shifted channelrhodopsin, following protocols outlined by the literature81,124,125, with slight modifications. All-trans-retinal (Sigma-Aldrich) was incorporated at a concentration of 500µM into 6-cm diameter plates containing 20mL of chemoattraction assay solution. One-day-old adult animals were placed on these plates and subjected to a red LED stimulus using a WormLab Tracking system (MBF Biosciences). Prior to stimulation, allow 5 worms a 5-min acclimation period on the assay plate. Exclusion criteria: (1) any worm that physically contacted another worm during the assay; (2) any worm that reached the plate edge. Across 150 imaged worms per sex, ~120 trajectories passed quality control and were analyzed. The LED stimulus was administered in a pattern of 5s baseline record before stimulation, and 10–60s on, followed by 7.5–30s off, at 100% intensity across 6–8 cycles. Implement a 30-s inter-stimulus interval for PHD activation. This provides sufficient time for the worm to return to a stable forward movement state. Worm tracking was conducted using the same WormLab system.

Dissecting micro-behaviors under optogenetic perturbation

Experiments used 8-cm NGM agar plates seeded with a thin OP50 layer to prevent starvation-induced behaviors. Males were transferred from ATR+ and ATR- culture plates to an assay plate. The plate was mounted on a motorized stage controlled by a joystick. Individual males were tracked and recorded with a 10× 0.3 NA Nikon Plan Fluor objective at 10Hz. Illumination was provided by dim, red-filtered light using a HOYA 52mm R (25A) filter to minimize disturbance to the worms. For the stimulation, we used a Sola Light Engine (Lumencor) light source and a 607/36nm BrightLine excitation filter. The microscope’s field diaphragm was adjusted such that only a small area was illuminated when the excitation light was on. We used the SOLA-SE2 software to control the light source. Prior to stimulation, allow a single worm for a 5-min acclimation period on the assay plate. The male was tracked manually using the motorized stage, and the following stimulation regime was applied: 30s without light, followed by twenty 2-s tail pulses (2-s intervals), another 30-s dark period, then 30s of head stimulation, and a final 30-s interval without light.

After postprocessing, we divided the recording into 2-s segments. For each 2-s segment, we tabulated the behavioral motif displayed by the male or the first behavioral transition that occurred during that segment. The following behavioral motifs and transitions were included: forward, backward, transition from forward to backward, transition from backward to forward movement, high-frequency direction transitions (marked by frequent direction changes within the 2-s window), and self-exploration (where the worm attempts to probe its own body). This analysis provides a detailed account of the nuanced responses of male C. elegans to optogenetic perturbation, offering insights into the micro-behavioral dynamics elicited by targeted neural stimulation.

Our analysis employs two analyses: The four-motif analysis (Fig. S6) focuses on core locomotion states (forward, backward) and transitions (forward to backward, backward to forward). In the four-motif analysis, transitions (e.g., forward-to-backward, backward-to-forward) were classified based on the initial and final directions observed within the 2-s window. For example, a segment with rapid oscillations between forward and backward movement was categorized as “forward-to-backward” if the net directionality shifted from forward to backward, or vice versa.

The six-motif analysis (Fig.4) expands categorization to include self-exploratory and high-frequency direction transitions, which capture other behaviors that cannot be easily classified as the “four-motif”. The high-frequency direction transitions, motif specifically identifies intervals with more than 2 direction changes within a 2-s window, representing a distinct exploratory strategy that cannot be unambiguously assigned to single transitions (forward to backward or backward to forward).

Sex pheromone-induced pan-neuronal calcium imaging

For sex pheromone extraction, we processed 100 virgin fog-2 female C. elegans by isolating them in 1ml of NGM buffer within an Eppendorf tube, following a protocol slightly modified from the previous study4. These females were washed five times to clear bacterial contamination, then incubated in 100µl of NGM or M9 buffer for 6h. A parallel extraction process utilized for C. remanei involved similar steps but with only 5 females.

In Fig.1C, to evaluate PHD activation upon exposure to the volatile pheromone, we performed calcium imaging with a custom-built spinning disk confocal microscope setup48,73. Utilizing the ZM9627 strain, which marks all neuronal nuclei with GCaMP6s and mNeptune73 and incorporates him-5(e1490) mutation to enrich for males. We also crossed ZM9627 with the CB5414 srd-1(eh1) line. Preparation for imaging involved isolating L4 males 15–20h in advance, placing them on 10% agar NGM buffer slides.

The Thin Layer Micro-Diffusion (TLMD) method was adapted from Wan et al.4 (see Fig.S9A). Neuronal excitation was detected by measuring changes in fluorescence intensity using a disposable worm-mounting and a chemical-loading device called the thin-layer micro-diffusion (TLMD) unit. The TLMD unit consisted of a 4% agarose pad (0.2mm thick, 1.3mm radius) sandwiched between two autoclave tapes. Before mounting, well-fed transgenic worms were transferred to an empty worm plate for 5min to remove residual bacteria. A 0.2µL of 1mM levamisole was then applied to the agarose pad to partially immobilize the worms, which were positioned uniformly with their heads facing outward. A clean 22×40mm coverslip was gently placed over the TLMD unit. At the 30-s time point, 8µL of the test chemical solution was loaded. Due to capillary action, the solution rapidly filled the space between the slide and coverslip. Chemical diffusion began immediately (within milliseconds) as the micro-gel pad became surrounded by the loaded solution. Approximately 5µl of 0.2µm latex beads (Polysciences, Inc.) were added to aid immobilization.

Imaging was conducted with a 40× 0.95 NA objective, achieving 200Hz to record 10 volumes per second, with each comprising 20 optical slices. Pheromone or control buffer introduction occurred 30s after initiating imaging, continuing for an additional 3.5–9.5min. Subsequent processing and registration allowed for tracking PHD neuron nuclei using semi-automated methods in MAMUT126,127. Intensities from GCaMP and mNeptune channels were extracted for analysis within defined ROIs, calculating neuronal activity ratios and smoothing data with Savitzky-Golay filters. The activity was quantified by normalizing GCaMP fluorescence against mNeptune. We used the ratio R = F(GCaMP)/F(mNeptune), after applying Savitzky–Golay filtering to each channel (polynomial order 1 and length 13) Relative intensity values (ΔR/R₀) were calculated as (R−R0)/R0, where raw fluorescence intensity ratio (R) was extracted from the region of interest (ROI) of the target neuron in the calcium imaging data, and R₀ is the baseline fluorescence, defined as the mean fluorescence during the quiescent period. Analyses were performed using custom code.

In Fig.5, our study employed the same custom-built spinning disk confocal microscope setup mentioned above and a sparse labeling markers pan-neuronal calcium imaging strain, ADS1046, which features a dual expression of the calcium indicator GCaMP6s and the red fluorescent protein mNeptune in all neuronal nuclei, alongside the lite-1(ce314) mutation to eliminate undesired light-induced neural activity. This strain also has sparse labeling markers (Pift-20:BFP, Peat-4:cyOFP1, Punc-17:mScarlet, Pacr-5:BFP) for neuron identification. Intracellular calcium dynamics were quantified by tracking the calcium indicator GCaMP6s signals, which enhance green fluorescence intensity within cells. Concurrently, mNeptune signals were captured to serve as a reference. The intensity ratio of GCaMP to mNeptune (GFP/RFP) at each time point was plotted. To aid neuron identification, after the recording session, we acquired additional volumes using the following combination of excitation lasers and emission filters: 30% 640nm 617/73nm (200Hz), 40% 561nm 578nm (200Hz), 35% 488nm 578nm (200Hz), 15% 488nm (200Hz), 95% 405nm 440 or 450nm (50Hz).

We fit the activity of AVA neurons by a linear combination of AWA and PHD neurons by minimizing the least-square error (Fig.5F).

Neuron tracking

Each neuron was automatically tracked through all 3D volumes with targettrack. We first applied a strong low-pass filter to blur the whole image and thresholded it to find the general location of the head or tail. After centering each volume by the region found above, we cropped a rectangular ROI that covered the whole region for 99% of the recording. Then, we manually identified AWA, ASI, AVA, AVE, and PHD neurons in each recording and annotated an average of 5 frames per recording. We used targettrack128 to automatically segment and track each neuron in every volume. We trained the 3D CN of targettrack for 10K gradient steps with a batch size of 3. The quality of the tracking was manually verified after tracking.

The xyz coordinates were used to extract pixel intensities around neuronal nuclei. These changes were then standardized against the baseline pre-stimulation background, resulting in the relative intensity values (ΔR/R0) being displayed. Data representation is in the form of mean ± standard error of the mean (s.e.m.), processed using Graphpad Prism 6 and Microsoft Excel for comprehensive analysis. Custom Matlab code was utilized for graphing, with the ΔR/R0 depicted by a black line and the s.e.m. by a gray-shaded envelope. The duration of stimulation is visually encoded on the plots with a pink color bar.

Pan-neuronal calcium imaging with optogenetic activation

This experiment used the same sparse labeling makers, the pan-neuronal calcium imaging strain mentioned previously. For optogenetic activation, we expressed Chrimson using an srd-1P::Gal4(sk)::VP64 driver crossed to 15×UAS::Chrimson effector in the pan-neuronal imaging background; animals were reared ± ATR. During imaging, we delivered defined light stimuli; only ATR+ animals under light showed Chrimson-dependent responses. For the experiments, males were prepared on 10% agar NGM buffer slides. Using a spinning disc confocal setup, we navigated the challenge of simultaneous neuronal imaging and optogenetic stimulation of Chrimson, which responds to both 488 and 578nm light, by implementing a strategy to exploit the GCaMP signal delay post-stimulation, as outlined in Lu et al.129. This involved interlacing five 10-s imaging/stimulation intervals with 50-s breaks, applying 12 and 35% intensities for the 488nm and 561nm lasers, respectively, while acknowledging potential mechanical stimulation from objective movement as a confounding variable. During each 5-s imaging/activation period, the piezo-controlled objective was moving, whereas it was not moving between these periods. We therefore cannot rule out mechanical stimulation that coincided with light stimulation as a confounding factor. To aid neuron identification, after the recording session, we acquired additional volumes using the following combination of excitation lasers and emission filters: 30% 640nm 617/73nm (200Hz), 40% 561nm 578nm (200Hz), 35% 488nm 578nm (200Hz), 15% 488nm (200Hz), 95% 405nm 440 or 450nm (50Hz).

The same pre-processing and neuron activity tracking via Targettrack was performed as outlined in “Neuron Tracking”. For each neuron, we created 3 ground truth points, 100 volumes apart. Activities of PHD neurons in ATR+ and ATR- males were extracted and averaged. We calculated the correlation between the mean PHD activity in ATR+ males and activity traces of other neurons in both ATR+ and ATR- males. A subset of 12 neurons was identified across all males, and we used Generalized Procrustes analysis130 and thin plate splines131 to register all male tail neurons to a common coordinate space. These landmark neurons were: PHDR, PHDL, PLMR, PCAR, PCAL, HOA, PVY, PDC, PVX, VD12, VA10, and VA11. A visual inspection identified two regions that contain neurons highly correlated with PHD (correlation cutoff > 0.55). Here we refer to these regions as ROI1 and ROI2 (see Figs.5 and S6). AWA, ASI, AVA, and AVE are identified based on sparse labeling makers, positioning, and cell body size. The relative intensity values (ΔR/R0) are plotted following the methodology outlined in “Sex Pheromone-Induced Pan-neuronal Calcium Imaging in C. elegans” with minor modifications. We normalized the ΔR/R0 values for each neuron in the ATR+ and ATR- groups to a range of 0–1. The dashed line indicated the starting point of each light stimulation.

Microfluidic chip design and manufacturing

The design of our microfluidic devices is accomplished using SolidWorks software, tailored to the specific requirements of our experiments. The fabrication process utilizes both photolithography and polydimethylsiloxane (PDMS) soft lithography, as detailed in the literature50,132. Initially, 3-inch silicon wafers were prepared by coating with a layer of SU-8 photoresist. This layer was subsequently patterned through photolithography, transforming the wafer into a mold for PDMS casting. For constructs intended for male worm imaging, the SU-8 2015 photoresist was spun at 1450rpm to achieve a thickness of 24–25µm. Following PDMS casting, the microfluidic devices were bonded to glass coverslips using a plasma cleaner, employing settings of 50mW power for 30s to ensure a robust bond. This fabrication procedure is designed to produce precise microfluidic devices, enabling the simultaneous and individual delivery of stimulus to the head and tail regions of C. elegans males, while also facilitating concurrent calcium imaging. This chip allows for accurate delivery of stimulus to both the head and tail regions separately, with 4 inlets dedicated to each region and an additional outlet for waste. An optimized worm trapper adapter from a previous study133, secures males for imaging while ensuring both ends remain exposed to the stimulus channels. Designed stoppers within the tail inlet channels prevent the worms from escaping during injection, without disrupting fluid flow. This approach allows for the detailed study of neural responses to localized stimuli in a controlled environment.

Sex pheromone preparation for microfluidics chip-based experiments

To obtain large quantities of crude sex pheromone for microfluidics chip-based experiments, we modified the standard extraction protocol to avoid the time-consuming isolation of L4-stage fog-2 females. We used 5-day-old daf-22 mutant C. elegans hermaphrodites, which lack ascaroside synthesis, to ensure the absence of confounding neuronal responses from this water-soluble sex pheromone stimulus. Bleach-synchronized daf-22 mutant worms were washed five times with M9 buffer. L1 stage arrest was induced by rotating worms in M9 buffer for 12h before seeding on culture plates (8-cm NGM with OP50, approximately 500 L1 worms/plate). Adult worms were collected after 3 days (at the onset of egg-laying). Adults were washed from culture plates with M9 buffer and separated from eggs using the precipitation method (repeated 5–7 times until eggs were absent). Separated adults were transferred to new OP50-seeded plates, and this washing process was repeated for 6 days to exhaust self-sperm. Sex pheromone extraction was performed as described in “sex pheromone-induced pan-neuronal calcium imaging” with the following modification: instead of 100 worms/mL, we used 50µl of packed worm volume per 1mL of M9 buffer (see Fig.S10A–C). Three batches of extracted pheromone were tested for quality using a chemoattraction assay and combined to create a 100ml homogenous stimulus for microfluidics chip-based experiments.

Microfluidics chip-based experiment calcium imaging and data analysis

Young adult C. elegans males (PS10181) were loaded into a custom microfluidic chip that allows selective exposure of head and tail to odor solutions of choice. Solution administration was directed by an array of 8 memory-shape alloy valves (Takasago Fluidics Inc., Japan), individually addressed by an ESP32 microcontroller. Imaging was performed using a Leica DM6000 B microscope equipped with a X-Cite XLED1 Multi-Triggering LED illumination system (Excelitas Technologies) and iXon EMCCD detectors (Oxford Instruments Andor). Image acquisition and microfluidic stimulation administration were controlled and synchronized by a custom Python graphic interface using the Pycro-Manager interface for the Micro-Manager microscope control software134. Time-lapse image segmentation was performed using the pixel classification function of the Ilastik software135, and intensity values of GCaMP and RFP were extracted using a custom Jupyter notebook. The calcium imaging traces were calculated as the ratio of GCaMP6s/RFP fluorescence to correct for out-of-plane imaging artifacts. Because of the high background activity of the AVA neuron, baseline values for the calculation of the ΔR/R0 metric were estimated using the peakutils Python package. The relative intensity values (ΔR/R0) are plotted following the methodology outlined in “Sex Pheromone-Induced Pan-neuronal calcium imaging in C. elegans,” with minor modifications. To quantify the effect of suppression/excitation on the AVA neuron, we performed area-under-curve (AUC) analysis. We first compute the baseline AVA activity by averaging over 3min before stimulation given at the most dilute concentration, and subtract this baseline value from all signals. Then we integrate the area under the curve for each worm data for 2min after the stimulation. For suppression, we only account for time intervals when the signal is lower than the baseline value; for excitation, we only account for time intervals when the signal is higher than the baseline value, so that we naturally terminate the integration of area when the signal disappears. In Fig.6D, we compute the linear combination of AVA neuron activities with only head or tail stimulation (AVAhead + AVAtail) and compare that with the AVA neuron activity with simultaneous head and tail stimulation (AVAdual).

Concentration field simulation

The concentration evolution inside the petri dishes was simulated using the FEM. The simulated plates consist of a top layer of 4mm thick air and a bottom layer of 9mm thick agar. The diffusion coefficient of the sex pheromone was estimated 1:6mm2/s in the air and 10−3mm2/s in the agar. The initial condition was set as a concentration at the surface of the droplet c0 = 0:01mol/m3 while c = 0 elsewhere. No-flux boundary condition was applied to the walls of the plate. For the dynamical simulations of worm searching, we take the 2D cross-section of the concentration field at z = −0.5mm inside the agar (the air-agar interface is at z = 0).

Navigation simulation

The navigation processes were simulated using an in-house extension of the HOOMD-Blue package. Mathematically, worm locomotion dynamics are described by the following equations:

dr=Uqdt, q=(cosθ,sinθ), dθ=sqrt(2DR)dW_S + γdW_T (3)

Here r is the position of the worm, U the speed magnitude, q the orientation direction, DR the rotary diffusivity of the orientation angle θ. dW_S and dW_T denote the standard Brownian motion on a circle −π<θ<π and a Poisson jump process, respectively. γ is the intensity of the jump process, i.e., the tumbling rate. It has been observed136 that during tumbles (large angle turns), the turning angle distribution displays a peak near π. Empirically, we represent the turning angle distribution as a mixture of a uniform distribution and a wrapped Gaussian distribution:

T(θ,θ0) = αT0 + (1−α)T1 (4)

Here the turning kernel T(θ,θ0) is the probability of turning from θ0 direction to θ direction. T0 = 1/(2π) is the uniform distribution and T1 = e^((θ−θ0−π)^2/σ^2) is a wrapped Gaussian distribution.

We adopt the following functional forms to reflect the above observed sensory neuron dynamics:

fH = C/(C0) * (1+tanh(log(C/C0)))/2, (5)

fT = e^−(log(C/C0))^2 if C≤C0 : 1−log(C/C0)^2 if C>C0

In the simulations, we fix DR = 0:02, η = 1, k1 = 1/60, kH,T = 1.

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_2": "The authors have used a delightful variety of methods to dissect the role of anterior and posterior chemosensory neurons in the ability of C. elegans males to detect and respond to sex pheromone. The findings are noteworthy and interesting; they have the potential to change how we think about navigation toward pheromones. The manuscript has been revised and edited and figures have been improved and reordered. These revisions address some but not all of the concerns raised by myself and the other reviewers. Nonetheless, the text and the presentation of the data lack sufficient clarity and consistency to recommend publication. It is beyond my capacity as a reviewer to identify all of the elements requiring further attention. To aid the authors, however, I identify some themes that hamper readability and undermine confidence in the rigor of the study.\nThe text is dense and meandering, in places For instance, the manuscript primarily concerns the response of C. elegans males to sex pheromone and the role of the anterior AWA and the posterior and male-specific PHD sensory neurons in this behavior. However, the reader is not informed of this focus for the study or that PHD is a male-specific sensory neurons in the Abstract or Introduction. Another example is the treatment of sexually dimorphic expression of SRD-1, which is emphasized in the text surrounding Figure 1. Imagine if the multiple lines of evidence that SRD-1 is expressed in PHD were consolidated into a single figure (currently in Figure 1 and Figure 2A). This could precede a clear statement in the text that the rest of the manuscript will focus on male C. elegans, using SRD-1 as a tool to dissect behavioral and cellular responses to sex pheromone.\nThe text and figure legends rely on shorthand to refer to strains and reagents, compromising clarity and rigor. An example is the phrase “Using the odr-10p cGAL driver to activate AWA neurons” (line 218). This is not accurate, as written. The cGAL driver cannot by itself activate anything without an effector. From context, I am guessing that the authors mean that they combined an odr-10p cGAL driver with a UAS Chrimson effector and then used light to activate AWA neurons. This is not the only instance in which the authors are using shorthand to describe their experiments, leaving the reader to guess what reagents were used for each experiment and the value of this experimental design.\nThe main figures are improved, but remain dense and imprecise. Many figures and figure legends have at least one error, omission, or design element that compromises clarity. Below are specific examples of aspects of the figures and legends that impair the reader's ability to evaluate the evidence.\n• Figure 1A: The image shows green fluorescence, but the legend only mentions mCherry and RFP expression\n• Figure 1C: The legend says that shaded areas indicate the s.e.m. of calcium traces. No shaded areas are visible in the panel on the far left and the one of the far right. In the far right, the only visible trace is rendered in black while in the other panels the traces are rendered in green.\n• Figure 2: Tic labels are too small to read\n• Figure 3: What is meant by \"total velocity\"?\n• Figure 3C: The pink/red bars are not mentioned in the figure legend and what the authors mean by 30 samples is not clear.\n• Figure 3Dd: typo/missing words “represent the std.”\n• Figure 4: Tic labels are too small to read\n• Figure 4Cd: “Fourier analysis of V(t) from Figure 2A and B” Figure 2A and 2B do not contain V(t) traces.\nMissing control experiments, unsubstantiated claims\n• Along with optogenetic tools for activating neurons, the authors also use chemogenetic silencing by application of histamine to animals expressing HisCl in specific neurons. Whereas animals expressing HisCl are tested in the presence and absence of histamine to control for non-specific effects of HisCl expression, the effect of histamine itself on pheromone responses is not tested. Without this control, the authors cannot exclude the possibility that histamine itself, rather than histamine-induced silencing, is responsible for the phenotype observed.\n• What is the evidence that gellan gum “better mimics natural conditions”? (line 218). It seems that the authors embedded animals in a gellan gum layer (Methods), the authors should either show that animals moved vertically in this environment or cite prior studies demonstrating this.", "reviewer_3": "This paper reports a detailed analysis of the neural mechanism underlying a C. elegans male’s ability to follow a volatile female-produced pheromone to find the female mating target. The investigators find that the mechanism involves integration of the outputs of two different sensory neuron classes that both express the same receptor for the pheromone but have different response properties to it. The investigative approach exploits all of the experimental and other advantages provided by C. elegans to tackle the general problem, widespread among animals, of how to use the information in a rapidly changing and likely shallow gradient of a volatile substance to find the source of the gradient. The methods include the powerful tools available to measure, activate, or inhibit single neuron activity, determine gene expression patterns, behavioral assays including behavioral tracking of individual worms, and known connectivity. A detailed analysis at this depth could not be carried out at present in another organism. The authors provide support for the sufficiency of their interpretation of the mechanism by mathematical modeling. The conclusions are interesting and convincing.", "reviewer_4": "This manuscript by Wan et al. has been extensively reviewed by three reviewers, who provided many valuable critiques and suggestions. As a new reviewer in this second round, I did not have the opportunity to read the previous version, but judging from the rebuttal, it is clear that the authors have made substantial revisions to address all points raised. In my opinion, the three major concerns from Reviewer 1 have been sufficiently ameliorated. The decision to remove the section related to orthokinesis, which appeared to be the most problematic, is also appropriate.\nIn its current form, I do not find any major issues that would require further substantial revision. Nevertheless, I have two minor points that the authors may wish to consider discussing:\n1. Variability and heterogeneous SRD-1 expression:\nThe authors attributed much of the variability observed in the study (e.g., Lines 242, 274, and 320) to the partial penetrance of SRD-1 expression in only ~40% of PHD neurons, as reported by the Murphy group. It is not clear to me whether the positive expression of a transgene (such as Chrimson) driven by the srd-1 promoter in the various strains used in this study can serve as an indicator of SRD-1 expression. If so, the lack of SRD-1 expression in PHD neurons should not be invoked to explain the variability (I would assume that only worms with positive marker expression in PHD neurons were selected for experiments). If not, is there a way to determine SRD-1 expression directly—for instance, by fluorescently tagging the SRD-1 protein and comparing PHD neuron function with or without SRD-1? This approach would be useful for specifically testing SRD-1 function in PHD neurons in future studies. In addition, if SRD-1’s function in PHD is important for mate-finding behavior, it would be interesting to discuss how such heterogeneous expression could be maintained evolutionarily.\n2. Spatial separation of AWA and PHD neurons on chemotaxis:\nI am not entirely convinced that the spatial separation of these two neurons—in the head and tail, respectively—has no impact on chemotaxis, as the authors argue but this has not been tested. When a worm crawls toward a pheromone source in a gradient, the head neuron AWA would experience a higher pheromone concentration than the tail neuron PHD, and vice versa when crawling away. According to this paper, where AWA and PHD neurons have distinct concentration thresholds, I can’t help wondering if the following could be true: when the worm moves in the correct direction, AWA experiences stronger stimulation than PHD, AVA is suppressed, and the worm continues moving forward; conversely, when the worm moves in the wrong direction, AWA receives weaker stimulation than PHD, AVA is activated, and the worm reorients. Although the authors argue that the distance between the head and tail (~1 mm) is too small to matter, this likely depends on how steep the gradient is—particularly when the worm is near the female, where the gradient may be sharp enough to influence the “final sprint.” It would be interesting to know whether the mathematical model could test this hypothesis, or whether it could be experimentally examined by exposing AWA and PHD to different pheromone concentrations using the microfluidic setup shown in Figure 6A and monitoring AVA activity.\nBoth points are merely suggestions and should not be taken as conditions for publication. The authors have undergone a lengthy review process and have addressed all previous reviewers’ concerns. It would not be fair to request additional revision from a new reviewer at this stage to cause further delay. If Reviewers 2 and 3 are satisfied with the revisions, I would recommend expedited publication, as this paper provides a significant contribution and will be of broad interest to the field."}, "author_response": "We have revised the Abstract and Introduction to explicitly state that AWA is a sex-shared head sensory neuron and PHD is a male-specific tail sensory neuron.\nPage 1: “Contrary to this model of simple spatial comparison, C. elegans males employs an antagonistic strategy, comparing inputs from sex-shared head (AWA) and male-specific tail (PHD) sensory neurons with distinct response properties.”\nPage 3: “In this study, we discover that the male tail-specific neuron, PHD, in addition to AWA, expresses SRD-1 and responds to the sex pheromone as well.”\nIn the manuscript, we consolidate the evidence for sexual dimorphic srd-1 expression in a single figure (Fig. 1). In Fig. 2A, we validate the split cGAL–UAS driver (lin-48p::NLS::cGAL[DBD]; srd-1p::NLS::cGAL[AD]) by crossing it to 15×UAS::GFP, which drives GFP in PHD in male tails. We placed this panel in Fig. 2 because its primary purpose is tool validation and experimental control for the manipulation assays (“driver → effector → behavior”), not expression mapping. While the result corroborates srd-1 expression in PHD (since lin-48 is known to be expressed in PHD neurons), its central role is to establish a PHD-specific split-cGAL driver used immediately in Fig. 2 for functional inhibition/activation; therefore, it belongs with the manipulation experiments rather than the expression summary in Fig. 1.\nWe have revised the text and figure legends to explicitly state the driver, UAS effector, and stimulation/ATR conditions throughout.\nPage 5: “Using an odr-10p cGAL driver crossed to UAS::Chrimson, optogenetic activation of AWA in both sexes produced no detectable behavioral change, indicating that AWA activation alone does not drive forward locomotion or that odr-10p cGAL driver yielded insufficient Chrimson expression for activation (Fig. S4B).”\nBeyond this instance, all occurrences of shorthand have been corrected to name (i) the specific cGAL driver(s), (ii) the UAS effector(s), and (iii) illumination and ATR or HisCl status in both text and figure legends, removing ambiguity about reagents and experimental design (highlight with red color in the file):\nPage 4: “PHD-inhibited males refers to males expressing HisCl in PHD via split-cGAL (lin-48dP::NLS::cGAL[DBD]; srd-1P::NLS::cGAL[AD]) crossed to 15×UAS::HisCl::SL2::GFP and exposed to 10 mM histamine (See Method).”\nPage 6: “Under matched light stimulation, ATR− males exhibited no effect.”\nMethod, Page 17: “ For PHD-specific inhibition we used the split-cGAL driver (lin-48dP; srd-1P) crossed to 15×UAS::HisCl::SL2::GFP; animals on 10 mM histamine (NGM-HA) are referred to as ‘PHD-inhibited,’ whereas histamine-free condition worms served as controls”\nMethod, Page 21: “For optogenetic activation we expressed Chrimson using an srd-1P::Gal4(sk)::VP64 driver crossed to 15×UAS::Chrimson effector in the pan-neuronal imaging background; animals were reared ± ATR. During imaging we delivered defined light stimuli; only ATR+ animals under light showed Chrimson-dependent responses.”\nFigure 2 figure legend, Page 26: “ (A) Split cGAL construction of a PHD neurons-specific driver and validation of SRD-1 expression. Male tail fluorescence from lin-48dP::NLS::cGAL(DBD); srd-1P::NLS::cGAL(AD) crossed to 15×UAS::GFP demonstrates GFP labeling of PHD, verifying SRD-1 expression and providing a driver for targeted PHD manipulation.”\nFigure 3 figure legend, Page 28: “ (A)(B) Schematic of optogenetics with region-specific genetic targeting: (A) head and tail region AWA, ASI and PHD neurons (srd-1P–cGAL > UAS::Chrimson) versus (B) tail PHD neurons (split cGAL: lin-48dP::NLS::cGAL[DBD]; srd-1P::NLS::cGAL[AD] > UAS::Chrimson). Light stimulation in freely moving males tests locomotor consequences of activating specific neurons.”; “(B) PHD neurons were activated by expressing Chrimson via a split-cGAL driver (lin-48dP::NLS::cGAL[DBD]; srd-1P::NLS::cGAL[AD]) crossed to 15×UAS::Chrimson; animals were treated with or without ATR and stimulated with light during the assay. ATR− and light-off served as negative controls.”\nFigure 4 figure legend, Page 29: “(A) Summary of all characterized micro-behavioral and their portion among all behaviors. With srd-1 drivers and Chrimson effectors in cGAL-UAS lines (srd-1P–cGAL > UAS::Chrimson) combined with region-specific light sources, we precisely targeted the head (AWAs and ASIs) or tail regions (PHDs) of freely moving males to analyze locomotion effects and characterize specific micro-behaviors. Behavioral segments were classified in 2-s windows as forward (fwd), backward (bwd), fwd→bwd reversal, bwd→fwd reversal, high-frequency direction transitions, or self-exploratory. High-frequency direction transitions, defined as >2 direction changes within a 2-s window, reflecting an exploratory strategy that cannot be unambiguously assigned to fwd→bwd or bwd→fwd. Self-exploratory, in which the worm engages in near-body probing behavior. Short labels used in panels: bwd→fwd reversal, fwd, fwd→bwd reversal, bwd, high-freq transitions, self-exploratory. (B) Tail-restricted illumination increases high-frequency transitions during light stimulation. All animals carried srd-1P–cGAL > 15×UAS::Chrimson and were reared ± all-trans-retinal (ATR). To probe tail-region circuits (PHDs), we delivered posterior-restricted light (illumination geometry and parameters in Methods). During light-on, ATR+ animals exhibited a robust increase in high-frequency direction transitions; this effect was absent in ATR− controls and in light-off trials. Behavior returned toward baseline after light-off. (C) Head-restricted illumination suppresses transitions during light stimulation and promotes transitions and self-exploration after light-off. Using the same srd-1P–cGAL > UAS::Chrimson genotype, we applied head-restricted light to engage head-region circuits (including AWAs/ASIs). In ATR+ animals, light-on suppressed direction transitions (both bwd→fwd and fwd→bwd). Following light-off, both transitions rebounded above baseline, and animals displayed increased self-exploratory “body-probing” behavior (tail pressed against/near the body). No significate changes were observed in ATR− or light-off controls.”\nFigure 5 figure legend, Page 32: “(B )-(C) For optogenetic activation and calcium imaging we expressed Chrimson by crossing an srd-1P::Gal4(sk)::VP64 driver to a 15×UAS::Chrimson effector in the pan-neuronal imaging background. Animals were reared ± ATR, and defined light stimuli were delivered during imaging; Chrimson-dependent responses were observed only in ATR+ light-on trials.”; “(D)-(F) Pheromone odor stimulation and calcium imaging. All panels use the pan-neuronal imaging strain and are exposed to volatile sex-pheromone extract; stimulus and the delivery method/protocol are detailed in Methods.”\nFigure S2 figure legend, Page 40: “(B) Worm counts at each spot across time points. Different navigational deficits in PHD-inhibited males across different exploration tasks: in weak signal tasks, their even distribution between test and control spots led to a low chemotaxis index; in 3D tasks, the low index resulted from fewer males reaching the target. Inhibition was achieved by crossing the indicated PHD neurons-specific driver line to 15×UAS::HisCl::SL2::GFP and assaying on 10 mM histamine; him-5 and genotype-matched animals maintained on histamine-free plates served as controls (See Methods).”\nThank you for pointing out the error. The panel displays GFP, not RFP. We corrected the legend to match the image (See Method, Key Resource Table: syEx1972 [srd-1P::mCherry]; syEx1974 [unc-119::gfp]).\nAll subpanels were plotted as mean ± s.e.m.; however, in the far-left and far-right panels the PHD activity was essentially absent, so the traces lie near zero and the s.e.m. envelope is extremely tight, making the shading difficult to see. To avoid confusion, we added a zoomed-in view of the far-left and far-right conditions in Fig. S1 to make the (very small) s.e.m. shading visible.\nIn the previous version, WT traces were green and mutant traces were black, which may have been confusing. We have re-plotted the figure using green for all calcium traces.\nFigure S1D, Page 39: “(D) Zoomed view of Figure 1C first and last panel ( y-axis -5 to 5). Pan-neuronal calcium imaging of male PHD neurons expressing rgef-1P::GCaMP6s, with rgef-1P::mNeptune marking all neuronal somata. WT males received M9 buffer (control); srd-1 mutant males received volatile sex pheromone. Traces show mean ΔR/R₀ (R = GCaMP/mNeptune fluorescence ratio) ± s.e.m.; n = 5–7 animals per condition. The green trace denotes the mean calcium ratio (ΔR/R₀). Shading denotes pre-stimulus (white), M9 control buffer application (yellow), and pheromone application (pink).”\nIncreased axis tick label and title fonts across Fig. 2 to ensure legibility at print scale.\nIt just means the velocity of the worm. In the context here, we decomposed the velocity into radial and tangential components for analysis. We change the wording now to “velocity” since the discussions on radial velocity analysis has been removed for clarity and focus of this manuscript.\nWe fixed the legend to define the color coding and replaced “30 samples” with the exact worm count and unit of replication. We also clarified exclusions in Methods.\n1. Shaded pink/red bars show the stimulus-on periods.\n2. Sample size clarified: ~120 worms per sex (30 assay × 5 worms per assay)\n3. Exclusions added: worms that contacted another worm or reached the plate edge were excluded.\nFigure 3 figure legend, Page 28: “(c) V(t) averaged over about 120 worms.” ; “Pink/red bars indicate periods of light stimulation.”\nMethods, Page 19: “Prior to stimulation, allow 5 worms a 5-minute acclimation period on the assay plate. Exclusion criteria: (1) any worm that physically contacted another worm during the assay; (2) any worm that reached the plate edge. Across 150 imaged worms per sex, ~120 trajectories passed quality control and were analyzed.”\nWe corrected the wording and standardized error display to “(c), (d) Shaded regions indicate ± s.d.; solid lines are means.”\nIncreased axis tick and title fonts across Fig. 4 for legibility.\nCorrected the reference to the figure that actually contains V(t).\nFigure 3 figure legend, Page 27: “Fourier analysis of V(t) from Fig. 3A–B.”\nAdded this control to Figure 2, Page 25. him-5 males with same concentration histamine treatment (10 mM). No histamine specific effect on the chemotaxis assays.\nFigure 2, Page 26 : “Males expressing lin-48dP::NLS::cGAL (DBD); srd-1p::NLS::cGAL (AD) (driver) × UAS::HisCl (effector) were inhibited by HisCl to silence PHD. Controls were the same genotype on without HisCl, and WT him-5 with or without HisCl, as indicated. (C)-(E) Baseline chemotaxis: PHD-inhibited males locate sex pheromone comparably to controls. (E) Sensitivity test (10× diluted pheromone): PHD inhibition significantly reduces detection and targeting performance. (G) 3D navigation (gellan gum/gel arena): PHD-inhibited males show impaired source finding relative to controls.”\nPage 4: “Thus, observed effects reflect histamine-induced PHD silencing, rather than genetic background or histamine alone.”\nWe agree that this claim should be supported. Semi-fluid gellan gum media have been shown to permit three-dimensional distribution and free movement of nematodes and food bacteria, thus more closely approximating soft, structured natural substrates than hard agar surfaces. Accordingly, we now cite Brinke et al., 2011 and note that gellan/Gelrite is also used for chemotaxis arenas in recent work (Fryer et al., 2024). Related 3D gel/habitat studies (Lesanpezeshki et al., 2019; Beron et al., 2015; Guisnet et al., 2021; Wan et al., 2025) similarly show that penetrable, 3D environments reveal naturalistic behaviors not observed on flat agar.\nMethods, Page 19: “We used gellan gum to provide a semi-fluid, penetrable matrix that supports 3D distribution and locomotion, which is closer to the worms’ native substrates than regular agar [Brinke 2011]; gellan/Gelrite has been adopted for chemotaxis arenas in high-throughput screening and behavioral assays [Fryer 2024; Wan 2025]. Penetrable gels and 3D habitats are known to elicit burrowing and other naturalistic behaviors [Lesanpezeshki 2019; Beron 2015; Guisnet 2021].”\n1. Brinke, M., Heininger, P., & Traunspurger, W. (2011). A semi-fluid gellan gum medium improves nematode toxicity testing. Ecotoxicology and Environmental Safety, 74(7), 1824–1831. https://doi.org/10.1016/j.ecoenv.2011.07.007\n2. Fryer, E., et al. (2024). A high-throughput behavioral screening platform for measuring chemotaxis by C. elegans. PLOS Biology, 22(6): e3002672. https://doi.org/10.1371/journal.pbio.3002672\n3. Lesanpezeshki, L., et al. (2019). Pluronic gel-based burrowing assay for rapid assessment of neuromuscular health in C. elegans. Scientific Reports, 9:15246. https://doi.org/10.1038/s41598-019-51608-9\n4. Beron, C., Vidal-Gadea, A. G., Cohn, J., Parikh, A., Hwang, G., Pierce-Shimomura, J. T. (2015). The burrowing behavior of the nematode Caenorhabditis elegans: A new assay for the study of neuromuscular disorders. Genes, Brain and Behavior, 14(4), 357–368. https://doi.org/10.1111/gbb.12217\n5. Guisnet, A., et al. (2021). A three-dimensional habitat for C. elegans environmental enrichment. PLOS ONE, 16(1): e0245139. https://doi.org/10.1371/journal.pone.0245139\n6. Wan, X., Sternberg, P. W., et al. (2025). GelDrop array high-throughput screening in nematodes. microPublication Biology. https://doi.org/10.17912/micropub.biology.001809\nWe thank the reviewer for the thoughtful and generous assessment of our work and its significance for understanding navigation in shallow, rapidly fluctuating odor gradients. In keeping with the reviewer’s emphasis on clarity and rigor, our revision further strengthens the manuscript in several ways:\nClarity of experimental design. We rewrote all relevant captions and Methods passages to explicitly state the driver × effector genotype, ATR status, and light parameters for optogenetic experiments, and to define the HisCl + histamine condition at first use for inhibitory manipulations.\nFigure corrections and legend precision. We corrected the annotation issues and the font size suggestions.\nAdded a WT animal control for histamine. We added a control experiment showing that 10 mM histamine alone does not affect pheromone chemotaxis (Fig. 2), ensuring that phenotypes in HisCl experiments reflect neuron silencing rather than histamine per se.\nReport the time-dependent concentration difference at 1 mm predicted by the two-layer concentration simulation (mathematical model).\nWe thank Reviewer #4 for carefully evaluating our revised manuscript and for the supportive assessment. We appreciate the recognition that (1) the three major concerns from Reviewer 1 have been fully addressed and (2) removal of the orthokinesis section was appropriate. We also thank the reviewer for recommending expedited publication contingent on the satisfaction of Reviewers 2 and 3. We are grateful for the reviewer’s time and positive recommendation.\nWe appreciate this thoughtful point and have revised the manuscript accordingly. In the original text we referenced ~40% PHD positivity for srd-1 from RNA-seq. On re-examination, we note that single-cell/single-nucleus RNA-seq can under-detect low or intermittent transcripts due to technical dropouts and limited sensitivity, particularly for sparsely expressed GPCRs. We now remove the claim that variability arises largely from partial penetrance. We added citations on scRNA-seq detection limits and dropout/zero-inflation modeling. Also, it is very important to mention that the integrated both srd-1P::cGAL × UAS::GFP and split-cGAL (lin-48dP::NLS::cGAL[DBD]; srd-1P::NLS::cGAL[AD] × UAS::GFP) reporter line exhibited uniform PHD labeling (~100%) across assayed animals.\nPHD neurons remained active for ≥9.5 min with a slow decay (Fig. 5E). Across animals, we observed two response types: fast responders (62.5% of males) showed an immediate, sustained increase at pheromone onset, whereas slow responders (37.5%) showed a ~2.5-min delay and a ~40% lower peak ΔF/F (Fig. 5E, 0–250 s; Fig. 5D, 0–600 s). Two non-exclusive explanations could account for this heterogeneity. First, molecular variability: single-cell datasets report variation in srd-1 abundance in PHD. Although our two cGAL-UAS reporter lines label PHD uniformly (~100%), the GAL–UAS system amplifies weak expression and can mask moderate differences in receptor level; thus, the heterogeneity is likely quantitative (more vs. less SRD-1) rather than all-or-none presence/absence. Second, circuit gating: PHD receives postsynaptic inputs from multiple neurons; tonic or state-dependent inhibition from these partners could delay onset and reduce amplitude in some animals. We therefore interpret the fast/slow classes as reflecting threshold-sensing in PHD modulated by receptor dosage and/or inhibitory tone. Distinguishing these mechanisms will require targeted experiments (e.g., srd-1 dosage manipulation and selective silencing of candidate presynaptic inputs during PHD imaging). We add this to discussion as well.\nPage 3: “RNA-seq indicates srd-1 is detected in ~40% of PHD neurons under standard conditions; however, our integrated srd-1P–driven cGAL with UAS::GFP reporter shows uniform PHD labeling (near 100%).”\nDiscussion, Page 12: “PHD neurons remained active for ≥9.5 min with a slow decay (Figure 5E). Across animals, responses segregated into two classes: fast responders (62.5% of males) showed an immediate, sustained increase at pheromone onset, whereas slow responders (37.5%) exhibited a ~2.5-min delay and ~40% lower peak ΔF/F. Two non-exclusive mechanisms could underlie this heterogeneity. (1) Molecular variability: single-cell datasets report variation in srd-1 abundance in PHD. Although both of our cGAL–UAS reporter lines labeled PHD uniformly (~100%), cGAL–UAS amplification can mask modest expression differences; thus, the heterogeneity is likely quantitative (more vs. less SRD-1) rather than all-or-none. Moreover, single-cell/single-nucleus RNA-seq can under-detect low or intermittent transcripts due to limited capture efficiency and technical dropouts/zero inflation—issues known to disproportionately affect sparsely expressed GPCRs (Qiu, 2020; Ziegenhain et al., 2017; Jiang et al., 2022; Bakken et al., 2018; Ehrlich et al., 2018). (2) Circuit gating: PHD receives postsynaptic inputs from multiple neurons; state-dependent inhibition from these partners could delay onset and reduce amplitude in some animals. We therefore interpret the fast/slow classes as reflecting threshold-sensing in PHD modulated by receptor dosage and/or inhibitory factors. Discriminating between these mechanisms will require targeted experiments (e.g., srd-1 dosage manipulations and selective silencing of candidate presynaptic partners during PHD imaging).”\nThank you for discussing this point. Indeed, a more quantitative result will help rationalize our assumption that the concentration difference sensed by AWA (we denote as C(head)) and PHD (we denote as C(tail)) is not significant and the choice of ignoring it.\nWe now include a figure in the SI (Fig.S3C) to show the distribution of the relative difference in concentration sensed by head and tail, i.e., |C(head)-C(tail)|/C(body). We average this quantity over (1) the entire plate space, (2) the entire simulation time, and (3) the worm orientation in (0,2 pi). As shown in this figure, this distribution is concentrated near 0 (notice the left y-axis for the probability density function is in log-scale). The 99% quantile for this distribution is 0.1056, which means that worms will have a |C(head)-C(tail)|/C(body)<0.1056 for more than 99% of the space-time. A closer examination shows that the larger values for |C(head)-C(tail)|/C(body) are mostly associated with the edge of the plate, where C itself is very small and taking the ratio becomes noisy.\nIn the model, we included noise for Q_H (head confidence) and Q_T (tail confidence), and we tested with relative noise magnitude 0.01~0.1, showing not much difference in the results. If |C(head)-C(tail)|/C(body) is similar or weaker than the noise amplitude, we do not expect this head-tail concentration difference to be significantly informative for the worm.\nFigure S3 figure legend, Page 42: “(C) Distribution of concentration difference between head and tail sensory neurons, normalized by the concentration of body center and averaged over all spatial locations on the plate, the entire simulation time, and worm orientation. Yellow bars correspond to the left y-axis, showing the empirical probability density distribution (EPDF). We show the y-axis in log-scale to assist visualization since the EPDF is strongly concentrated near 0. The red line corresponds to the right y-axis, showing the empirical cumulative distribution function (ECDF). The 99% quantile is 0.1056.”\nDiscussion, Page 14: “To assess whether spatial separation between AWA (head) and PHD (tail) produces a concentration disparity in what they sense, we quantified the relative difference ∣𝐶 (head)− 𝐶 (tail)∣/ 𝐶 (body) (𝐶, concentration) across our concentration field simulated arenas (Fig. S3C). Specifically, we computed this metric and then averaged over (1) the full plate area, (2) the entire simulation duration, and (3) all worm orientations θ∈[0,2π]. The resulting empirical distribution is strongly concentrated near zero (probability density shown on a log scale), with a 99th percentile of 0.1056. Thus, for >99% of space-time-orientation, ∣𝐶 (head)− 𝐶 (tail)∣/ 𝐶 (body)<0.1056. The rare larger values arise predominantly near plate edges where 𝐶 is itself very small and the ratio becomes numerically noisy, rather than reflecting meaningful signal gradients. Consistent with this result, our model already incorporates stochasticity in head and tail confidence. Across relative noise magnitudes of 0.01–0.1, model outputs changed minimally. Because the typical head–tail concentration contrast is of the same order or smaller than this noise amplitude, we do not expect it to carry reliable information for navigation under our conditions. These quantitative results justify our simplifying assumption to ignore explicit head–tail concentration differences in the main model without altering the qualitative conclusions.”\nWe thank the reviewer for the supportive assessment and for recommending expedited publication."}, {"round": 2, "reviewer_comments": {"reviewer_2": "The authors have improved the presentation of the findings in the text, figures, and figure legends. There are some concerns that remain regarding methodology and these concerns bear on the rigor of the study and its presentation:\n1) Gellan Gum — The authors claim that this material by itself creates a \"penetrable medium\" and, by inference that Agar does not. The authors have added text and citations in support of this claim, but simply citing these other studies is not convincing. Why? Because it is not only the material itself, but also the concentration of the material. Fryer et al use 2.5% (w/v) gellan gum and do not report that this medium is penetrable. By contrast, Wan and Sternberg use 0.3% (w/v) gellan gum to generate a droplet in which single worms can thrive. To avoid misleading others in the field about the performance of gellan gum as an alternative growth medium, please revise the methods to be more precise.\n2) Throughout the manuscript the authors use \"velocity\" to describe the rate of animal movement. Strictly speaking, velocity is a vector quantity consisting of both direction and rate. Please consider revising the language to use the term \"speed\" in its place.", "reviewer_4": "The revised manuscript has addressed all the points raised by me and the other reviewers, and it is much improved in both clarity and rationale. I especially appreciate the addition of Fig. S3C, which quantitatively addresses my previous concern. Only one very minor point: the “red line” in Fig. S3C does not appear red, at least in the version of the PDF I received."}, "author_response": "Thank you for raising this point. We have revised the Methods to be explicit that “penetrable” is a property of the low gellan concentration and resulting mechanics, not of gellan gum per se.\nIn our experiments we used 0.3% (w/v) gellan gum (Gelrite) in M9 buffer on plates, under which worms can enter and locomote within the gel volume. We now avoid implying that gellan gum at higher concentrations (e.g., ~2–3% w/v used in other applications) is similarly penetrable, and we clarify that those stiffer formulations are not expected to permit volumetric penetration.\nLine 738-747:“We prepared plates containing 0.3% (w/v) gellan gum in M9 buffer to generate a soft hydrogel substrate in which worms could enter and locomote within the gel volume, rather than being confined to surface crawling. This ‘penetrable’ behavior is not an intrinsic property of gellan gum, but depends strongly on gel concentration and the resulting mechanical properties. Higher gellan gum concentrations commonly used to cast firm gels (e.g., ~2–3% w/v) produce substantially stiffer matrices and are not expected to permit volumetric penetration. Accordingly, our statement refers specifically to the 0.3% (w/v) gellan-in-M9 plates used here, which we selected as the lowest concentration that maintained plate integrity while supporting robust 3D locomotion [123]. Gellan/Gelrite has been adopted for chemotaxis arenas in high-throughput screening and behavioral assays [124,125]. Penetrable gels and 3D habitats are known to elicit burrowing and other naturalistic behaviors [126-128].”\nWe have revised the manuscript and figures to replace “velocity” with “speed” throughout.\nThank you for these very helpful suggestions and feedback. We appreciate the opportunity to address this point quantitatively. It helped make the discussion more interesting. We have revised the legend/description to refer to the line as orange (rather than red)."}]

Decision letter