Introduction

Valence perception is the brain’s ability to assign emotional value—either positive or negative—to a stimulus1,2. It essentially reflects how we interpret a stimulus as either “good” or “bad”. Environmental stimuli inherently carry valence, which is detected by specialized sensory neurons1,3,4. In higher brain regions, valence encoding is often embedded in topographically distinct subregions, segregated projections, and specific neurotransmitters dedicated to processing valenced sensory stimuli5,6,7. For instance, the basolateral amygdala (BLA) comprises genetically and spatially distinct neuronal populations that drive valence-specific behaviors8,9,10,11.

Valence perception, however, is not a static process. Various factors, including environmental cues, prior experiences, emotional state, genetic variability, and acquired knowledge, can influence it1,12. The nervous system integrates sensory inputs, emotions, memory, and other cognitive functions to determine valence, thereby guiding decision-making and behavioral responses. Diverse circuit motifs have been proposed to explain valence processing, each offering varying degrees of robustness and flexibility1,2. Even within highly robust chemosensory circuits, instances of reversals in valence responses have been observed, particularly in lower model organisms13,14,15,16. Elucidating the precise molecular and cellular mechanisms underlying this flexibility in valence assignment remains a significant challenge.

The nematode C. elegans heavily relies on its olfactory capabilities to navigate its environment with a highly developed chemosensory system composed of a compact ensemble of sensory neurons17,18. When encountering a chemical gradient, C. elegans assigns valence based on its preference, indicated by its movement towards or away from the chemical. This preference is likely due to the neuron-specific receptor expression and the dedicated connections between chemosensory neurons and their downstream neural circuits19. For example, AWA and AWC specifically respond to attractive odors, while AWB neurons respond to repellents19,20. Consequently, distinct sets of chemosensory neurons drive inherent attraction or aversion responses to different chemicals17,18. However, the perception of an odor’s valence can be reshaped by other environmental cues, past experiences, and internal state, potentially altering valence processing at the level of sensory neurons, synapses, or circuit integration21,22,23,24,25,26,27,28,29. Despite the importance of this valence reshaping for animal adaptation and survival, the causal relationship between these neural alterations and the subsequent impact on valence changes remains to be established.

Ethanol has a distinct odor detectable by humans, Drosophila, and other animals30,31,32. However, whether C. elegans can sense and respond to ethanol remains uncertain. While some studies report weak attraction to ethanol, others show avoidance by naïve worms20,33. Here, we uncover the mechanism behind these controversial reports as a context-dependent reversal of ethanol odor valence in C. elegans. We found that C. elegans exhibits robust attraction to ethanol when the NaCl concentration on the assay plate is lower than that of its cultivation environment. However, when exposed to NaCl concentrations higher than those in its cultivation medium, the worms are strongly repelled by ethanol. Remarkably, a single sensory neuron, ASER, is capable of sensing and driving both attraction and aversion behaviors to ethanol.

Utilizing optogenetic methods to directly activate or inhibit neurons, we identified that the key determinant of this valence reversal is the level of calcium in the ASER neuron. When switching to lower salt environments, the initial calcium influx triggered by this switch activates calcium/calmodulin-dependent protein kinase-1 (CMK-1). Under these situations, the ethanol signal results in attraction via the downstream interneuron AIZ. Conversely, when switching to higher salt environments, calcium influx is inhibited, leading to ethanol avoidance through a distinct downstream interneuron, AIY. Our findings highlight the remarkable flexibility of a single sensory neuron in generating opposite valence behaviors. Through dynamic regulation of its calcium signaling, the ASER neuron instantaneously integrates the salt context and ethanol odor, enabling context-dependent behavioral responses without synaptic remodeling. This study demonstrates how sensory information from one modality can profoundly and instantaneously shape an organism’s valence perception and response to another modality, thereby contributing to our current understanding of valence modulation mechanisms.

Results

The valence of ethanol is reversed by the concentration of NaCl

C. elegans exhibits distinct sensitivity to a wide range of volatile odors, with the valence of each odor manifesting as inherent attraction or avoidance in chemotaxis assays. However, studies on ethanol response have been inconsistent. One study reported weak attraction20, while another observed avoidance in naive worms33. We noticed that a key difference between these studies might be the salt concentration in the assay plates. The first study employed a minimal buffer solution (5 mM KPO4, pH 6.0, 1 mM CaCl2, 1 mM MgSO4 and 1.6% agar), while the second study used nematode growth medium (NGM) which contains a higher salt concentration (50 mM NaCl, 25 mM KPO4, pH 6.0, 1 mM CaCl2, 1 mM MgSO4 and 1.6% agar).

Given that worms are typically cultivated on NGM plates, we investigated how assay plate composition affects ethanol chemotaxis (Fig. 1a). Intriguingly, when worms were transferred to assay plates with lower NaCl concentrations than NGM, they exhibited a robust attraction to ethanol (Fig. 1b). Conversely, switching to higher NaCl concentrations in the assay plates elicited ethanol avoidance (Fig. 1b). It is important to note that the NaCl concentration is uniform across the entire plate, eliminating the possibility of a chemical gradient influencing their behavior.

Fig. 1: C. elegans exhibits NaCl concentration-dependent modulation of ethanol valence.
figure 1

a A schematic illustration of the plate chemotaxis assay in this study (see Materials and Methods), with the chemotaxis index formula at the bottom to assess the ethanol-side accumulation. b Analysis of ethanol chemotaxis responses in wild-type animals on assay plates containing varying concentrations of NaCl. c Ethanol chemotaxis responses of wild-type animals on quadrant assay plates with 25 mM or 75 mM NaCl, ethanol on the agar or lid. Plate configuration is illustrated on the right and chemotaxis index measures animal accumulation in the two ethanol quadrants. d, e C. elegans raised on either 25 mM or 75 mM NaCl were tested as Day 1 young adults in ethanol chemotaxis assays on plates with varying NaCl concentrations. f Assessment of ethanol-induced reversal rates in single worms on assay plates with two NaCl concentrations. Population locomotion assays reveal the turn index (g) and backward index (h) of worms on assay plates with two NaCl concentrations. Statistics were analyzed by two-way ANOVA with Sidak’s correction. **P < 0.01, ****P < 0.0001, n.s. statistically not significant. From left to right, P is 0.9994 and 0.0751 (c), 0.929 and <0.0001 (g), 0.9721 and 0.0042 (h). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM. Source data are provided as a Source Data file.

This shift in ethanol preference is remarkably robust, with NaCl concentrations of 25 or 75 mM inducing nearly opposite maximum values in the ethanol chemotaxis index, approaching either +1.0 or -1.0, respectively, suggesting a strong reversal in ethanol valence. Employing a quadrant assay plate as used by Lee et al.33, we consistently observed the same results—C. elegans exhibited attraction to ethanol at 25 mM NaCl, while displaying avoidance at 75 mM NaCl (Fig. 1c). We propose the term “bidirectional ethanol chemotaxis” to characterize this phenomenon. When switching to lower NaCl environments, worms are drawn toward ethanol (positive valence), whereas they strongly repel it when switching to higher NaCl environments (negative valence). Notably, we identified a critical turning point at 50 mM NaCl, which coincides with their standard growth environment. To further explore the turning point of NaCl concentration in bidirectional ethanol chemotaxis, we cultivated worms on growth plates containing either 25 or 75 mM NaCl, with all other components held constant. Consistently, we observed the turning point of bidirectional ethanol chemotaxis corresponding to their growth condition (Fig. 1d, e), suggesting that the NaCl concentration in the growth plates serves as a determining factor for this turning point.

To ensure that worms respond to the odor of ethanol rather than its taste, we placed a small piece of filter paper (2 cm × 0.5 cm) saturated with 40 μl of absolute ethanol on one side of the lid of the assay plate, not on the agar surface (Fig. 1a). This setup achieved a maximum ethanol concentration of approximately 0.05% (v/v) on the agar surface (Supplementary Fig. 1b, c). We found that applying 40 μl of absolute ethanol on the filter paper placed on the lid and allowing worms to move freely for 20 min resulted in a stable chemotaxis index (Supplementary Fig. 1d, e). Subsequently, this setup was utilized for all following chemotaxis assays, unless noted otherwise.

We further assessed worm locomotion in response to ethanol addition or removal on assay plates. Single-worm assays revealed a decrease in reversals on 25 mM NaCl plates compared to 75 mM NaCl plates upon ethanol addition (Fig. 1f), indicating attraction to ethanol at lower NaCl concentrations. Additionally, population locomotion assays showed increased turning and backward movement upon ethanol removal on 25 mM NaCl plates compared to 75 mM plates (Fig. 1g, h), suggesting avoidance to ethanol at higher NaCl concentrations. Collectively, these locomotion behavioral results confirm our finding regarding bidirectional ethanol chemotaxis.

Chloride concentration determines directionality of ethanol chemotaxis

To ensure our results were not confounded by water condensation attracted by pure ethanol, we tested several experimental conditions, including diluted ethanol solutions (80% and 50%), placing 40 μl of water on the opposite side of the ethanol, or adding desiccant to the plate. These modifications did not affect the bidirectional ethanol chemotaxis (Fig. 2a, b). Moreover, water alone on the lid did not elicit any chemotaxis behavior on either 25 or 75 mM NaCl assay plates (Fig. 2b).

Fig. 2: Chloride concentration drives ethanol valence switch.
figure 2

a Ethanol chemotaxis responses of wild-type animals to different ethanol concentrations on assay plates containing either 25 mM or 75 mM NaCl. b Chemotaxis responses of wild-type animals to H2O or ethanol across different assay settings, as illustrated on the right. c Chemotaxis responses of wild-type animals to different alcohols or volatile organic compounds. Ethanol chemotaxis responses of wild-type animals on assay plates supplemented with different concentrations of mannitol (d), potassium phosphate (e), sodium phosphate (f), or potassium chloride (g). Statistics were analyzed by two-way ANOVA with Tukey’s multiple comparisons test (a) or one-way ANOVA with Tukey’s multiple comparisons test (b, d, e, f, g). ****p < 0.0001, n.s. statistically not significant. From left to right, P is 0.9345, 0.2836, 0.9888, and 0.0569 (a), <0.0001, 0.9762, 0.201, <0.0001, 0.1964, and 0.9979 (b). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM. Source data are provided as a Source Data file.

Next, we investigated whether this phenomenon extended to other alcohols. Worms exhibited similar NaCl-dependent bidirectional chemotaxis specifically towards short-chain alcohols like methanol and isopropanol. However, this effect was not observed for longer-chain alcohols like butanol and isoamyl alcohol, nor for other volatile organic compounds like diacetyl and 2-nonanone (Fig. 2c).

Finally, we examined the influence of other components on ethanol chemotaxis such as osmolarity and other salts. Adjustments in mannitol concentration to alter osmolarity and KPO4/NaPO4 levels did not affect the directions of ethanol chemotaxis (Fig. 2d–f), indicating osmolarity, potassium, or sodium is not a determining factor for ethanol valence. Surprisingly, only KCl exactly mirrored the effect of NaCl (Fig. 2g), suggesting that the concentration of chloride ion plays a key role in how worms perceive ethanol valence.

Sensation of ethanol is mediated by redundant sensory neurons

Having established C. elegans’ robust response to ethanol, we sought to identify the sensory neurons responsible for ethanol detection. Since the behavior depends on the NaCl concentration, we first focused on the che-1 mutant, known to disrupt the function of ASE sensory neurons crucial for salt sensing34. Interestingly, che-1 mutants exhibited attraction to ethanol regardless of the NaCl concentration in the assay plate (Fig. 3a), suggesting ASE neurons mediate ethanol aversion at high NaCl concentrations.

Fig. 3: The ASER neuron controls both attraction and aversion responses to ethanol.
figure 3

a Ethanol chemotaxis responses of wild-type animals and mutants with neuronal functions on assay plates containing either 25 mM or 75 mM NaCl. Affected neurons in the mutants are highlighted with blue boxes. b Schematic diagram illustrating the roles of ASER, ASEL, and AWC neurons in mediating bidirectional ethanol chemotaxis. c Examination of the redundant role of ASER, ASEL, and AWC neurons in ethanol chemotaxis behaviors using worms with targeted neuronal ablations, conducted on assay plates with 25 mM or 75 mM NaCl. d tax-4 mutants lost ethanol chemotaxis on 25 mM or 75 mM NaCl. Re-introduction of TAX-4 using its own promoter or in ASER neuron rescues both positive and negative chemotaxis. Expression in ASEL or AWC neurons rescue negative and positive chemotaxis, respectively. e Ethanol chemotaxis responses of wild-type worms, mutants, and animals with genetically ablated neuron(s) on assay plates with either 25 mM or 75 mM NaCl. Statistics were analyzed by two-way ANOVA with Dunnett’s multiple comparisons test (a, c, e) or Tukey’s multiple comparisons test (d). *P < 0.05, ***P < 0.001, ****P < 0.0001, n.s. statistically not significant. From left to right, P is 0.9938, 0.9997, <0.0001, <0.0001, <0.0001, <0.0001, 0.7253, <0.0001, 0.9463, <0.0001, 0.9997, <0.0001, <0.0001, <0.0001, <0.0001 and <0.0001 (a), 0.9137, 0.9998, 0.2813, 0.3543, <0.0001, <0.0001, 0.9684, 0.9996, 0.9832, <0.0001, <0.0001 and 0.8904 (c), <0.0001, <0.0001, 0.6202, <0.0001, >0.9999, <0.0001, <0.0001, <0.0001, >0.9999 and <0.0001 (d, compared to WT), <0.0001, 0.0141, <0.0001, <0.0001, <0.0001, <0.0001, <0.0001 and <0.0001 (d, compared to tax-4), 0.1221, 0.8886, <0.0001, 0.0003, <0.0001, <0.0001, 0.2247, 0.4317, <0.0001, 0.9983, <0.0001 and <0.0001 (e). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM. Source data are provided as a Source Data file.

To pinpoint the sensory neurons responsible for the ethanol attraction at lower NaCl concentrations, we first examined the three pairs of olfactory neurons: AWA, AWB, and AWC. We analyzed functional mutants of AWA and AWB (odr-7 and lim-4, respectively), AWC neuron-ablated worms, and mutants affecting a G protein (odr-3) that largely disrupts the function of all three olfactory neurons28,35. The ethanol bidirectional chemotaxis was not affected in these mutants (Supplementary Fig. 2a), suggesting that other sensory neurons are mediating the ethanol attraction chemotaxis behavior.

We then tested the osm-3 mutants, which affect the function of a group of sensory neurons with exposed cilia, including ASE, ASI, ASJ, ASK, ASG, ASH, ADL and ADF neurons20. Similar to che-1 mutants, osm-3 mutants displayed attraction to ethanol regardless of NaCl concentration (Fig. 3a). This suggests that loss of function in these neurons does not abolish the attractive response to ethanol chemotaxis, indicating the existence of other neurons responsible for ethanol attraction. Indeed, several sensory neurons (ASI, ASK, and ASH) within this group do not respond to ethanol (Supplementary Fig. 2b–d).

Next, we investigated mutants that affect sensory neuron signal transduction. Amphid sensory neurons signal through OSM-9/OCR-2 TRP channels, or TAX-4/TAX-2 cGMP-gated cation channels17,36,37,38. The null mutants osm-9;ocr-2;ocr-1 exhibited normal ethanol chemotaxis in both attraction and aversion, while tax-4 null mutants displayed impaired ethanol chemotaxis in both directions (Fig. 3a). Single mutants of osm-9, ocr-2, or slo-1 (a gene affecting ethanol intoxification39) also exhibited normal chemotaxis behavior (Supplementary Fig. 2g). These results suggest the TAX-4/TAX-2 cGMP channel signaling pathway plays a crucial role in ethanol chemotaxis, prompting us to focus on identifying the specific ethanol-sensing neuron(s) within this pathway.

To this end, we took advantage of two tax-2 mutant alleles to further explore the sensory neurons involved in ethanol chemotaxis. One allele (p671) disrupts TAX-4 function in all sensory neurons, while the other (p694) affects only a subset of these neurons36. Interestingly, the p671 allele, which affects more neurons, displayed a complete loss of ethanol chemotaxis at both NaCl concentrations. Conversely, the p694 allele, affecting only a subset of neurons, exhibited attraction to ethanol regardless of NaCl concentration. This suggests that the attraction behavior is mediated by the neurons affected only by the p671 allele, but not by p694. These neurons include AWB, AWC, ASG, ASI, ASJ, and ASK, but ASG, ASI, ASJ, and ASK are already excluded by osm-3 mutant and calcium measurement (Fig. 3a and Supplementary Fig. 2b–d)

Therefore, we considered AWB and AWC neurons as the candidates mediating the attraction behavior, as they are affected by p671 but not p694 and haven’t been previously ruled out by osm-3 mutants. Surprisingly, however, AWC neuron ablation alone didn’t affect ethanol chemotaxis (Fig. 3c). In addition, AWB olfactory neurons typically drive repulsive chemotaxis behavior. This prompted us to formulate an alternative hypothesis: AWC might mediate attraction redundantly with ASE neurons (Fig. 3b). In this scenario, affecting either AWC or ASE singly (as seen in che-1, osm-3, or tax-2 (p694) mutants) cannot disrupt attraction, but defects in both neurons can. This redundancy hypothesis was confirmed using ceh-36 mutants and che-1;odr-1 double mutants, which affect both AWC and ASE neurons34,40, resulting in the loss of both attraction and aversion behaviors (Fig. 3a).

ASER neuron solely drives valence behavior of ethanol

C. elegans possesses a pair of ASE sensory neurons essential for salt taste chemosensation41. The left (ASEL) and right (ASER) neurons exhibit distinct molecular and functional asymmetry42,43. At the molecular level, they express unique sets of signaling molecules44,45. Functionally, ASER responds to decreasing NaCl concentrations, while ASEL is activated by increasing NaCl concentrations43,46. To understand their role in bidirectional ethanol chemotaxis, we meticulously ablated these neurons individually or in combination (Fig. 3b, c and Supplementary Fig. 2h) using miniSOG, a membrane targeted reactive oxygen species (ROS) singlet oxygen generator. This method efficiently induces neuronal death upon blue light illumination47,48.

Our results revealed that ASER plays a pivotal role in both attraction and aversion behaviors. Disrupting ASER function (through genetic ablation, neural activity inhibition, or neurotransmitter release blockade) significantly abolished both attraction and aversion (Fig. 3c, Supplementary Fig. 2k, l). Surprisingly, as long as ASER remained functional (in AWC-killed, ASEL-killed, and both AWC- and ASEL-killed worms), normal attraction and aversion behaviors were preserved (Fig. 3c, Supplementary Fig 2i, j). Conversely, ablating both ASER and AWC eliminated attraction to ethanol (Fig. 3c), while ablating both ASER and ASEL eliminated aversion (Fig. 3c). These findings corroborate our hypothesis that ASER and AWC neurons redundantly mediate attractive behavior, while ASER and ASEL neurons redundantly mediate aversion behavior (Fig. 3b). We affirmed this conclusion by rescue experiments. Reintroducing TAX-4 only in ASER neurons restored both attraction and aversion behavior in tax-4 mutants. Restoring TAX-4 in ASEL or AWC neurons selectively rescued aversion or attraction, respectively (Fig. 3d).

For further validation, we utilized mutant lines altering neuronal fate to generate either two ASER or two ASEL neurons49. Worms with two ASER neurons, even with AWC ablated, displayed normal attraction and aversion, confirming the sufficiency of ASER (Fig. 3e). Conversely, worms with two ASEL neurons exhibited only aversion behavior regardless of NaCl concentration, especially when AWC was ablated, confirming ASEL’s role in aversion (Fig. 3e).

ASER neuron exhibits inherent ethanol valence flexibility determined by NaCl concentrations

To directly assess the involvement of different sensory neurons in ethanol sensing, we measured calcium dynamics to monitor neuronal activity in the four sensory neurons that redundantly mediate ethanol chemotaxis: ASER, ASEL and AWC pairs.

Consistent with the key role of ASER in bidirectional ethanol chemotaxis, the ASER neuron displayed distinct neuronal responses to ethanol, depending on the NaCl concentration (Fig. 4a). Moreover, ASER neurons also displayed NaCl concentration-dependent neuronal responses to two other alcohols, methanol and isopropanol (Supplementary Fig. 1f, g). Specifically, at the lower NaCl concentration, ASER exhibited a decrease in calcium levels upon ethanol addition, followed by an increase after ethanol removal (Fig. 4a). Conversely, at the higher NaCl concentration, the initial decrease in neuronal activity in response to ethanol was modest, with a mean ΔF/F0 of −0.11, and the post-removal increase was more pronounced than at the lower NaCl condition (Fig. 4a). To ensure the observed modest reduction in neuronal activity upon ethanol exposure was real, we used InversePericam 2.0 (IP2.0), a calcium indicator that shows increased fluorescence when calcium levels decrease50. Using this inverse indicator, we observed a slight increase in fluorescence (Supplementary Fig. 2m), supporting the presence of a small reduction in neuronal activity upon ethanol addition at higher NaCl concentration. By contrast, AWC and ASEL neurons showed no difference in calcium responses to ethanol stimulation between 25 or 75 mM NaCl buffer conditions (Fig. 4b, c), consistent with their role in unidirectional ethanol chemotaxis. Two AWC neurons exhibited a typical decrease in activity during ethanol application followed by a typical increase in activity upon ethanol removal, while ASEL neuron showed minimal activity change during ethanol application but a substantial increase upon removal.

Fig. 4: ASER, ASEL, and AWC sensory neurons exhibit distinct neuronal responses to ethanol odor.
figure 4

Average changes (top) and corresponding heatmaps (bottom) of GCaMP6s fluorescence in ASER (a), ASEL (b), and AWC (c) neurons in response to a 45 s pulse of 1:100 diluted ethanol in buffers containing 25 mM or 75 mM NaCl. The quantitative data are shown on the right. Transgenic worms expressing either the inhibitory GtACR2 (d) or the excitatory ChR2 (e) blue light-activated channels specially in the ASER neuron were subjected to blue light treatment and simultaneously exposed to ethanol. The treatment groups exhibited diminished ethanol chemotaxis responses in both directions. Circles above each bar denote the treatment conditions and the corresponding calcium responses in ASER neurons. Solid lines depict actual ASER calcium responses, while dashed lines illustrate the hypothetical calcium activities after treatment. The red “not-allowed” and “lightning” symbols represent the inhibition and activation of neuronal activity, respectively. Statistics were performed by two-way ANOVA with Sidak’s multiple comparisons. *P < 0.05, **P < 0.01, ****P < 0.0001, n.s. statistically not significant. From left to right, P is 0.0237 and <0.0001 (a), 0.9979 and 0.9964 (b), 0.9095 and 0.4481 (c), <0.0001 and <0.0001 (d), <0.0001 and 0.0013 (e). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM (ad), or as medians with quartiles and whiskers indicating min and max (ac). Source data are provided as a Source Data file.

Notably, all four neurons showed dose-dependent response to ethanol (Supplementary Fig. 3). Lower ethanol concentrations, such as 1:10,000 and 1:1,000 ethanol, often did not elicit noticeable activity changes (Supplementary Fig. 3). However, at higher concentrations (1:200/85 mM or 1:100/170 mM)), the neurons exhibited robust ethanol responses. Importantly, each neuron senses ethanol independently, as removing any one or two neurons did not affect the ethanol response in the others (Supplementary Fig. 4). Together, these results suggest that both perceptivity and valence of the ethanol odor are inherently coded within these sensory neurons.

Next, we tested whether the ASER responses to ethanol drive ethanol valence behavior. Using optogenetic methods, we found that inhibiting ASER activity via the GtACR2 blue light-activated chloride channel51 effectively blocked both attraction and aversion behaviors in ethanol chemotaxis assay (Fig. 4d). Conversely, activating ASER via the ChR2 blue light-activated cation channel51 completely abolished attraction and largely inhibited aversion (Fig. 4e). Taken together, these findings suggest that ASER neuronal activity is required for ethanol bivalence behavior.

Opposite valences orchestrated by distinct downstream interneurons

How does ASER regulate downstream interneurons to execute attraction or aversion to display the appropriate valence? To understand this process, we focused on the four first-layer interneurons: AIA, AIB, AIY and AIZ. We systematically ablated each type of neurons and observed their impact on bidirectional ethanol chemotaxis. Disrupting AIA or AIB had no significant effect on ethanol chemotaxis in either direction (Supplementary Fig. 5a, c, e, f), and these neurons showed minimal calcium response to ethanol (Supplementary Fig. 5b, d). In stark contrast, selective ablation of AIZ neurons specifically impaired attraction at low NaCl concentrations (Fig. 5a), suggesting AIZ’s role in mediating attraction behavior under low NaCl conditions. Conversely, disrupting AIY function significantly impaired aversion at high NaCl concentrations (Fig. 5b), highlighting AIY’s role in mediating aversive behavior under high NaCl conditions.

Fig. 5: AIZ and AIY interneurons mediate ethanol attraction and aversion, respectively.
figure 5

a Ethanol chemotaxis responses of transgenic worms with AIZ neurons ablated. b Ethanol chemotaxis responses of transgenic worms with AIY ablation or ttx-3 mutation. c Ethanol chemotaxis responses in worm mutants of five glutamate receptors expressed in AIY. Average changes (top), corresponding heatmaps (middle) and quantitative data (bottom) of GCaMP6s fluorescence in AIZ (d) and AIY (e) neurons in wild-type and ASER-ablated worms, as well as in AIY neurons of glr-2 mutants (f). g Activating AIZ neuron impaired positive ethanol chemotaxis, but did not affect negative ethanol chemotaxis. h In contrast, activating AIY neurons impaired negative ethanol chemotaxis, but did not affect positive ethanol chemotaxis. Circles above each bar denote the treatment conditions and the corresponding calcium responses in AIZ or AIY neurons. Solid lines depict actual calcium responses, while dashed lines illustrate the hypothetical calcium activities after treatment. The red “lightning” symbols represent the activation of neuronal activity. i A candidate neuronal network regulating ethanol chemotaxis, illustrating connections between all neurons involved. This reconstruction is based on datasets 7 and 8 from Witvliet et al. (2020) and the nemanode website. Only connections identified in both datasets are included, with line thickness proportional to the number of synapses. j Proposed neural circuit for ethanol valence encoding. Statistics were performed by two-way ANOVA with Sidak’s multiple comparisons test (a, dh) or Dunnett’s multiple comparisons test (b, c). *P < 0.05, **P < 0.01, ***P < 0.001, ****P < 0.0001, n.s. statistically not significant. From left to right and top to bottom, P is <0.0001 and 0.5138 (a), 0.491, <0.0001, 0.7179, <0.0001 (b), 0.7705, <0.0001, 0.9977, >0.9999, 0.1315, 0.9997, 0.4877, 0.3997, 0.0003, 0.0001, 0.3006 and 0.3499 (c), 0.0018, 0.9244, 0.0005, 0.045, <0.0001, 0.9965, <0.0001 and 0.6121 (d), <0.0001, 0.3227, 0.9921, 0.0189, <0.0001, 0.1818, <0.0001 and 0.0636 (e), 0.0364 and 0.6938 (f), <0.0001 and 0.2358 (g), 0.9105 and P < 0.0001 (h). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM (ah), or as medians with quartiles and whiskers indicating min and max (df). Source data are provided as a Source Data file.

At lower NaCl concentrations, AIZ neurons exhibited an ethanol calcium response pattern similar to ASER, with a decrease upon initial ethanol exposure followed by an increase upon ethanol removal (Fig. 5d), in line with a previous report that ASER directly links to AIZ through electric synapses52. We confirmed that ASER drives this response in AIZ, as ablation of ASER almost completely abolishes AIZ’s response to ethanol (Fig. 5d). The initial decrease in AIZ activity is crucial for attraction, as optogenetic activation of AIZ neurons completely blocked attraction in the ethanol chemotaxis assay (Fig. 5g). However, inhibiting AIZ did not alter the behavioral direction (Supplementary Fig. 5g).

To investigate the role of gap junction in the ASER-AIZ connection, we tested various mutants and RNAi-fed animals targeting innexin genes expressed in both neurons. While none substantially affected bidirectional ethanol chemotaxis, deficiencies in che-7 or inx-7 reduced the attraction (Supplementary Fig. 8a). Feeding che-7 mutants with inx-7 RNAi did not completely abolish ethanol-induced attraction, but reduced the chemotaxis index to approximately 0.4. Given that ASER forms extensive chemical synapses with AIY, and AIY has substantial projections to AIZ (Fig. 5i), it is possible that at 25 mM NaCl, AIZ mediates ethanol-induced attraction redundantly through gap junctions with ASER along with inhibitory chemical synapses from AIY52,53.

At higher NaCl concentrations, where AIY mediates aversion, its ethanol calcium response displayed a slight but significant decrease upon initial ethanol exposure, followed by a subtle increase upon ethanol removal (Fig. 5e). Ablating ASER completely removes AIY’s activity upon ethanol stimulation, confirming the direct regulation of AIY by ASER (Fig. 5e). The initial decrease in AIY activity is essential for aversion, as optogenetic activation of AIY during ethanol exposure completely abolished aversion (Fig. 5h). Inhibiting AIY did not affect the behavioral direction (Supplementary Fig. 5h).

The ASER neuron in C. elegans is glutamatergic, releasing glutamate as its neurotransmitter54. To investigate the chemical synaptic properties between ASER and AIY, we examined mutants of five glutamate receptors expressed in AIY: one excitatory receptor, GLR-2; three inhibitory receptors, GLC-3, GLC-4, and AVR-14; and one metabotropic receptor, MGL-155. Among them, avr-14 mutants exhibited a partial reduction in ethanol chemotaxis in both directions, while glr-2 mutants completely abolished ethanol repulsion at 75 mM NaCl (Fig. 5c). In contrast, various mutants and RNAi targeting neuropeptides expressed in ASER or neuropeptide receptors expressed in AIY did not affect bidirectional ethanol chemotaxis (Supplementary Fig. 8b, c). Calcium imaging of AIY neurons revealed that the glr-2 mutation flattened ethanol induced AIY activity at 75 mM NaCl, but did not significantly alter AIY activities at 25 mM NaCl (Fig. 5f). In contrast, the unc-31 mutation did not affect the overall pattern of ethanol-induced AIY activity at either 25 or 75 mM NaCl, indicating that neuropeptide may not play a role in AIY ethanol responses (Supplementary Fig. 9b).

Together, these results demonstrate that ASER acts to orchestrate downstream interneurons to display the corresponding valence of ethanol: AIZ neurons, connected to ASER through gap junctions, play an important role in attraction, while AIY, linked to ASER through excitatory chemical synapses mediated by AMPA glutamate receptor GLR-2, is a key player for repulsion (Fig. 5j).

Ethanol valence is determined by ASER neuron calcium dynamics

Having established ASER as the only sensory neuron with ethanol bivalence, we sought to understand how variable calcium responses in ASER are encoded and impact behavioral decisions. To gain insight into this, we conducted calcium imaging while switching buffers between two different NaCl concentrations, mimicking the worm’s experience of being transferred from the culturing plate to the chemotaxis assay plate. ASER calcium responses were recorded in a 50 mM NaCl buffer, which was then switched to either 25 or 75 mM NaCl, followed by ethanol treatment for 1 min. Consistent with previous findings43,46, ASER exhibited a pronounced calcium increase in response to lower NaCl concentrations but a decrease with higher NaCl (Fig. 6a, b). Importantly, ASER showed a dramatic drop in calcium levels upon ethanol addition during a switch to 25 mM NaCl (Fig. 6a), which was not observed during a switch to 75 mM NaCl (Fig. 6b). Both conditions, however, showed a calcium increase after ethanol removal.

Fig. 6: Initial calcium influx during NaCl changes in the ASER neuron impacts ethanol valence.
figure 6

a, b Average changes (top) and corresponding heatmaps (bottom) of GCaMP6s fluorescence in wild-type ASER neuron in response to two sequential exposures of NaCl followed by ethanol. a 30 s in 50 mM NaCl and 60 s in 25 mM NaCl, followed by 60 s to 1:100 diluted ethanol in 25 mM NaCl, and back to 25 mM NaCl. b 30 s in 50 mM NaCl and 60 s in 75 mM NaCl, followed by 60 s to 1:100 diluted ethanol in 75 mM NaCl, and back to 75 mM NaCl. The quantitative data are shown on the right. c, d Transgenic worms expressing either the inhibitory GtACR2 or the excitatory ChR2 blue light-activated channel in wild-type ASER neuron were subjected to optogenetic treatment prior to ethanol exposure. On the 45 mM NaCl assay plate, control worms exhibit positive ethanol chemotaxis, whereas a 10-min blue light treatment to activate the inhibitory GtACR2 channels blocked this chemotaxis (c). On assay plates with either 55 or 75 mM NaCl, control worms displayed negative ethanol chemotaxis. However, a 5-min blue light pulse activating the excitatory ChR2 channels reversed the direction of ethanol chemotaxis (d). Statistics were performed by two-way ANOVA with Sidak’s multiple comparisons test (b), one-way ANOVA with Dunnett’s multiple comparisons test (c, d 55 mM) or two-tailed unpaired t test (d 75 mM). **P < 0.01, ***P < 0.001, ****P < 0.0001, n.s. statistically not significant. From left to right and top to bottom, P is <0.0001, >0.9999, <0.0001, 0.9971 and 0.1054 (b), 0.5333, 0.0003 and <0.0001 (c), 0.0026, 0.0002, <0.0001 and <0.0001 (d). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM (ad), or as medians with quartiles and whiskers indicating min and max (b). Source data are provided as a Source Data file.

We hypothesized that the basal calcium level set by the switch in NaCl concentration prior to ethanol application determines the degree of calcium changes between pre- and post-ethanol application. Switching to lower NaCl concentrations raises the basal calcium level higher, resulting in a substantially greater drop in calcium levels upon ethanol exposure, a feature essential for attraction. Conversely, switching to higher NaCl concentrations sets the basal calcium level low, resulting in a small decrease in calcium levels upon ethanol exposure. This difference in calcium levels between pre- and post-ethanol exposure becomes more prominent when comparing NaCl concentration switch alone with NaCl switch coupled with ethanol exposure. For example, we noticed a much smaller calcium increase upon NaCl switch coupled with ethanol compared to NaCl switch alone (Supplementary Fig. 6a), indicating that ethanol treatment induces decreased activity in ASER neuron. This postulate is further supported by calcium imaging experiments using varying NaCl concentrations in addition to 25 or 75 mM NaCl (Supplementary Fig. 7).

Given that the basal calcium level prior to ethanol exposure is set by a switch of NaCl concentrations, we propose a working model wherein the degree of calcium drop in the ASER neuron upon ethanol exposure determines the directionality of valence. Specifically, when the basal calcium level is set high by switching to a lower NaCl concentration, the following ethanol exposure creates a decrease in calcium levels, facilitating attraction. Conversely, when worms are switched to a higher NaCl concentration, the basal calcium level is set low, and the ethanol exposure induces only a slight decrease in calcium levels, promoting aversion.

To test this working model, we optogenetically manipulated ASER’s calcium levels during NaCl concentration switches. We transferred worms to a lower NaCl assay plate (45 mM NaCl), a condition that increases the basal calcium levels, and inhibited ASER neuronal activity using GtACR2 to prevent the calcium increase prior to ethanol exposure. Surprisingly, after 10 min of blue light exposure, worms completely lost the positive valence of ethanol and even began to show a slight aversion (Fig. 6c). In contrast, to test the opposite valence process, worms were transferred to higher NaCl conditions (55 and 75 mM NaCl), and ASER neuron was activated using the blue light-activated cation channel ChR2 to increase the basal calcium level, counteracting the decreased neuronal activity induced by switches to higher NaCl concentrations. Remarkably, with just 5 min of blue light exposure, worms exhibited a valence switch from aversion to attraction (Fig. 6d). Together, these results demonstrate that the basal calcium levels in ASER prior to ethanol exposure determine the directionality of ethanol valence.

CMK-1, a key calcium signaling effector, regulates ethanol valence

Our results suggest that calcium influx in ASER neuron during switches to lower NaCl concentrations is essential for ethanol attraction (Figs. 4a, 6a). To confirm this, we studied worms with mutations in CMK-1, a major neuronal protein kinase that senses neuronal activity and calcium levels. It transfers signals within the neuron by phosphorylating target proteins or to other neurons via modulating synaptic transmission56,57. CMK-1 is the sole C. elegans homolog of mammalian calcium/calmodulin-dependent protein kinases I/IV (CaMKI/IV)58. Interestingly, unlike wild-type worms that exhibit positive valence to ethanol at lower NaCl concentrations, two cmk-1 null mutants, as well as worms with cmk-1 RNAi specifically induced in ASER neurons, displayed ethanol valence of aversion at a lower NaCl. However, their aversion to ethanol at higher NaCl remained unaffected (Fig. 7a). This suggests that CMK-1, crucial for sensing calcium influx59, is essential for positive ethanol valence in ASER. Consistently, reintroducing CMK-1 specifically in ASER, or both ASER and ASEL, but not only ASEL, rescued ethanol attraction behavior (Fig. 7a, b), confirming its crucial role in ASER for positive ethanol valence.

Fig. 7: CMK-1 mediates calcium signaling to ethanol response.
figure 7

a, b Two cmk-1 null mutants and ASER-specific cmk-1 RNAi worms exhibit negative ethanol chemotaxis on 25 mM NaCl, opposite to wild-type. Re-introducing CMK-1 using its own promoter or in either ASE neurons or ASER neuron alone restores wild-type attraction (a). Expression in AWC neurons also rescues this response, but not in ASH, FLP, AIZ, AIY, or AIB neuron (b). c In cmk-1 mutants, negative ethanol chemotaxis behavior on both 25 and 75 mM NaCl assay plates is completely abolished by AIY neuron ablation, but remains unaffected by AIZ neuron ablation. d A 5 min blue light pulse to activate ChR2 failed to converts negative ethanol chemotaxis to positive in cmk-1 mutants, unlike in wild-type. See Fig. 6d for wild-type behavior. e In cmk-1 mutants, ASER calcium responses to ethanol are similar between different NaCl concentrations unlike wild-type animals. GCaMP6s fluorescence in AIZ (f) or AIY (g) neurons of cmk-1 mutants (in blue) or in worms with CMK-1 expressed specifically in ASER neuron (in red). See Fig. 5d, e for the calcium responses of wild-type AIZ and AIY neurons in response to ethanol, respectively. The quantitative data for calcium imaging are shown on the right (e) or on the bottom (f, g). Statistics were performed by two-way ANOVA with Tukey’s multiple comparisons test (a, b, f, g), Sidak’s multiple comparisons test (e), Dunnett’s multiple comparisons test (c), or two-tailed unpaired t test (d). **P < 0.01, ***P < 0.001, ****P < 0.0001, n.s. statistically not significant. From left to right and top to bottom, P is <0.0001, <0.0001, <0.0001 and 0.43 (a), <0.0001, 0.9887, 0.2339, 0.9723, 0.9975 and >0.9999 (b), 0.4303, 0.5137, <0.0001 and <0.0001 (c), 0.0052 (d), 0.8794 and 0.4428 (e), 0.0002, 0.1078, 0.7022, >0.9999, >0.9999, 0.9955, 0.8011 and >0.9999 (f), <0.0001, >0.9999, <0.0001, 0.9887, 0.9995, <0.0001, 0.9742 and <0.0001 (g). Data represent >3 biological replicates performed on different days, with animal numbers shown in parenthesis. Data are shown as means ± SEM (ag), or as medians with quartiles and whiskers indicating min and max (eg). Source data are provided as a Source Data file.

Similarly, given that AWC is another sensory neuron displaying the positive ethanol valence, cmk-1 mutants expressing CMK-1 only in AWC neurons, but not in others, restored attraction behavior (Fig. 7b). While cmk-1 mutants displayed aversion regardless of NaCl concentration, ablating the AIY interneuron, which play a role in executing aversion, abolished aversion in both low and high NaCl conditions. In contrast, AIZ ablation did not cause any change, suggesting that the ethanol aversion behavior in cmk-1 mutants is mediated by AIY (Fig. 7c).

Activating the ASER neuron before ethanol exposure during a switch to higher NaCl concentrations converts aversion to attraction in wild-type worms (Fig. 6d), but not in cmk-1 mutants (Fig. 7d), further supporting the necessity of cmk-1 as a signaling molecule downstream of the calcium or neuronal activation for ethanol attraction. In contrast to wild-type animals (Fig. 4a), cmk-1 mutants show similar ASER calcium responses to ethanol regardless of NaCl concentration (Fig. 7e and Supplementary Fig. 9c, d). This suggests that the lack of ethanol bivalence in ASER calcium dynamics alters the precise regulation of downstream AIZ and AIY neurons. As expected, AIZ and AIY in cmk-1 mutants do not display distinct calcium responses in different NaCl switches (Fig. 7f, g), as compared to those seen in wild-type worms, features essential for executing bidirectional ethanol behaviors (Fig. 5d, e).

In addition, introducing CMK-1 specifically in the ASER neuron of cmk-1 mutants largely restored the loss of distinct calcium responses during NaCl switches, bringing them back to the wild type patterns, especially in AIZ neurons (Fig. 7f, g), thereby recovering ethanol bivalence (Fig. 7a). This highlights the important role of CMK-1 in transmitting positive valence signals from ASER, particularly when there is a large calcium increase in ASER that drives attraction behavior under the switch to lower NaCl conditions.

Discussion

Here, we report an important paradigm wherein the valence of a stimulus (ethanol) transitions between attraction and avoidance upon switching the environmental NaCl concentrations. This behavioral inversion arises from distinct responses in a single olfactory neuron, ASER, which can sense both ethanol odor and NaCl and engage distinct downstream interneurons depending on the NaCl concentration. Switching to lower salt environments triggers a large initial calcium influx, establishing a high baseline calcium level in ASER. When exposed to an ethanol odor gradient under these conditions, the combined signal of lower salt and ethanol is likely transmitted from ASER through gap junctions to the downstream interneuron AIZ, driving attraction chemotaxis behavior. By contrast, switching to higher salt environments decreases the intracellular calcium level in ASER, setting the basal calcium level low in ASER. The combined signal of higher salt and ethanol induces a slight reduction in calcium levels, driving aversion through a different downstream interneuron, AIY, via chemical synapse (Fig. 8). While our model offers a plausible simple explanation, it is possible that more complicated neural connections play a role in the ethanol attraction circuit.

Fig. 8: A possible model of ethanol valence encoding in C. elegans.
figure 8

Different salt concentrations in the environment induce distinct basal calcium levels in the ASER neuron, triggering signaling pathways that engage specific interneurons to mediate either attraction or aversion to ethanol.

Our speculation regarding the selective signaling to distinct downstream interneurons is that, during the attraction response, the rapid and robust initial calcium influx in ASER upon switch to lower NaCl concentrations may preferentially signal to AIZ interneurons via gap junctions. This may help to explain why selective ablation of AIZ neurons impaired ethanol-induced attraction (Fig. 5a). This intricate interplay highlights the complexity of sensory perception and valence plasticity, emphasizing the dynamic interactions between sensory inputs and neuronal pathways.

Biphasic valence of ethanol and its evolutionary implications in C. elegans

The valence of an odor to C. elegans is commonly evaluated by a classic chemotaxis assay20. In this assay, 1 μl of diluted or undiluted odor substance is placed at one side of a 9 cm petri dish. Worms are placed in the center of the assay plate and given a period of time to monitor their movement toward or away from the odor source20. C. elegans has a sensitive olfactory system capable of detecting a variety of alcohols including butanol, hexanol and octanol20. However, it has been noted that 1 μl of ethanol elicits only weak attraction20. Considering that humans require ethanol odors to be at least 100 times more concentrated than longer-chain alcohols for detection60, we increased the amount of ethanol in our chemotaxis assay. By adding 20 or 40 μl of ethanol to one side of the assay plate, we observed robust chemotaxis behavior in C. elegans.

While ethanol is considered a potential food source for C. elegans61,62,63, which possesses enzymes capable of metabolizing ethanol64, research suggests that the energy derived from ethanol are poorly utilized by certain organisms, such as flies15. Conversely, salt (NaCl) is an essential ingested nutrient for all organisms. Bacteria thrive within a range of NaCl concentrations65, rendering this range optimal for C. elegans as they primarily feed on bacteria. C. elegans shows increased attraction to bacteria metabolic odors in NaCl-containing plate66, indicating that NaCl serves as an indicator of nutrient availability.

We speculate that the bidirectional chemosensory response of C. elegans to ethanol, dependent on NaCl levels, may represent an energy utilization strategy. Under lower NaCl conditions, signaling a scarcity of bacterial food sources, worms may choose ethanol as an alternative energy source. By contrast, in higher NaCl environments indicating abundant bacterial resources, worms may avoid ethanol in favor of more optimal energy sources. This aligns with our observation that worms are more likely to approach ethanol than bacteria (OP50) on low NaCl assay plates compared to high NaCl conditions (Supplementary Fig. 1a). Additionally, previous studies have shown that pre-exposure to a low dose of ethanol, which does not impair worm locomotion, diminishes their attraction to both bacterial food sources and the bacterial odor diacetyl67,68. Together, our study may support the evolutional role of ethanol bivalence in C. elegans to enhance their survivability in a wild environment with various levels of food sources.

A single sensory neuron governs both positive and negative valence

Our study identifies ASER as the primary sensory neuron governing bidirectional ethanol chemotaxis. ASER functions as a gustatory neuron, detecting ions such as potassium, chloride, and iodide through receptor guanylate cyclases expressed specifically within this neuron41,45. While ASE neurons are known to be primarily linked with AIY and AIB as downstream interneurons26,46,54,69, it has been not established whether they are functionally or structurally linked to AIZ neurons. Early electron microscopy studies of C. elegans synapses failed to uncover any synaptic connections between ASE and AIZ70. However, our multiple approaches utilizing neuron ablation, calcium imaging, and optogenetics strongly indicate that ASER engages AIZ interneurons to transmit the signals for positive ethanol chemotaxis. Interestingly, a recent connectome study revealed multiple electrical synapses between ASER and AIZ neurons (2 and 8 in the two adult worms examined)52 but no chemical synapses. Additionally, the similar calcium responses observed in ASER and AIZ neurons under lower NaCl conditions (Figs. 4a, 5d, 6a, Supplementary Fig. 5i) further support the notion of their connection via electrical synapses (Fig. 5j).

Ethanol chemotaxis, which integrates environmental NaCl concentration and ethanol to drive chemotactic behavior, shares similarities with salt chemotaxis26,54,71 or thermotaxis72,73,74,75 conducted in NaCl or temperature gradients. In both salt and temperature chemotaxis, worms cultivated in high-salt or high-temperature environments prefer the respective high sides of the gradient, exhibiting positive chemotaxis. Conversely, worms raised in lower-salt or low-temperature conditions favor the low sides and exhibit negative chemotaxis.

Salt chemotaxis behavior is believed to be mediated by synapses between the chemosensory neuron ASER and the interneuron AIB. ASER releases neurotransmitter glutamate, while AIB expresses both excitatory (GLR-1) and inhibitory (AVR-14) glutamate receptors, mediating positive and negative chemotaxis, respectively. The different affinities of these receptors for glutamate explain why GLR-1 is activated under positive chemotaxis conditions (in high-salt environments), while AVR-14 is activated under negative chemotaxis conditions (in low-salt environments)54,71. In thermotaxis, temperature stimuli are detected by AFD thermosensory neurons, which transmit information to downstream interneurons, primarily AIY. The AFD-AIY synapse is both excitatory and inhibitory, with glutamate mediating excitatory transmission and neuropeptides mediating inhibitory transmission72,73,74.

There are notable similarities between ethanol chemotaxis and salt chemotaxis. For instance, ASER is the primary chemosensory neuron in both cases, and the synaptic connections between ASER and AIY in ethanol chemotaxis, as well as between ASER and AIB in salt chemotaxis, appear to involve both excitatory and inhibitory synapses. However, there are some differences. In ethanol chemotaxis, the valence output requires ASER to integrate sensory signals from two modules, whereas in salt chemotaxis, only one sensory signal is involved. In addition, in ethanol chemotaxis, the valence behavior is driven by differential calcium dynamics within the ASER neuron. In contrast, the valence output in salt chemotaxis results from a balance between excitatory and inhibitory synapses between the sensory neuron and the interneuron54,71,76.

The modulation of valence encoding is embedded within the intricate interactions among a network of neural ensembles77,78,79. Traditionally, it has been suggested that valence switches are linked to changes in synaptic transmission over an extended period of time, involving either synaptic modification or the recruitment of additional neural circuits. However, in our experiments, the brief exposure times to ethanol odor (20 min in chemotaxis assays and less than 1 min in locomotion assays) suggest the valence switch occurs at the signaling level and neuronal activity without synaptic remodeling. This represents an interesting paradigm wherein valence switching is driven by calcium signaling dynamics rather than synaptic plasticity.

CMK-1 in regulating ethanol bivalence behavior

Our results demonstrate that CMK-1 primarily functions at 25 mM NaCl, where behavioral defects are observed in cmk-1 mutants. We propose that CMK-1’s major role at this condition arises from large calcium increases at this concentration, which are likely to activate CMK-1, a calcium-dependent kinase.

We think the AIZ interneurons might be involved in ethanol aversion at 25 mM NaCl in the cmk-1 mutants. However, we also speculate that CMK-1 is essential for the release of inhibitory neurotransmitters from ASER to AIY at this condition. At 25 mM NaCl, WT worms show a decrease in calcium levels in ASER neurons upon ethanol stimulation (Fig. 4a), while AIY neurons exhibit an increase in calcium levels (Fig. 5e). This suggests an inhibitory synaptic connection between ASER and AIY, potentially mediated by glc-3, an inhibitory glutamate receptor (Supplementary Fig. 9a). In cmk-1 mutants, ASER neurons continue to display a decrease in calcium levels similar to those in wild-type worms (Fig. 7e), but AIY neurons now show a decrease in calcium levels (Fig. 7g). This leads us to speculate that CMK-1 is necessary for inhibitory neurotransmitter release from ASER to AIY. This mechanism appears to resemble the inhibitory synapse between AFD and AIY, where the synapse becomes inhibitory in response to large calcium increases in AFD neurons72,73. Further investigation is needed to understand how this release contributes to ethanol chemotaxis behavior at 25 mM NaCl.

Interestingly, during a switch to 75 mM NaCl, where aversion to ethanol remains normal in cmk-1 mutants, the AIY interneuron in cmk-1 mutants, important for executing aversion, displays the same calcium response as in wild-type worms (Fig. 7g, right half). This suggests the cmk-1 mutation does not disrupt the function of AIY in executing ethanol aversion when switching to 75 mM NaCl, supporting our hypothesis that CMK-1 deficiency specifically affects ethanol attraction behavior.

Taken together, Previous studies propose a simple logic for odor valence in C. elegans: specific sensory neuron types dictate behavior via connections to motor programs for either attraction or avoidance19. However, our findings unveil a unique paradigm – two opposite valences can be encoded within a single sensory neuron. Previous research has also demonstrated that asymmetry in neuron pairs can modulate valence in innate chemotaxis behavior, or even switch the valence, as seen in the AWC neuron pair80,81. In our study, ASE neuron pairs are known to exhibit morphological and functional asymmetry42,43. Notably, we discovered an intriguing phenomenon of valence switching, wherein distinct neuronal activation patterns within ASER can selectively engage different downstream interneurons. This highlights how a simple organism with limited neurons can encode complex valence information through versatile mechanisms. The unique properties of ASER neurons may arise from their asymmetric nature.

Methods

C. elegans strains

All C. elegans strains were cultured on nematode growth medium (NGM) seeded with Escherichia coli strain OP50 at 20 °C according to standard methods82. To obtain age synchronized animals, prior to behavioral assays, ten L4 larvae per genotype were picked to 6 cm NGM growth plates, and young adults from their progeny were tested in behavioral and calcium imaging assays 4 days later. Animals were maintained under well-fed conditions at all times.

All transgenic strains were constructed using standard genetic procedures83. All plasmids were injected at 20–50 ng/μl to generate transgenic strains. Expression patterns and phenotypes were validated in initial experiments using multiple independent transgenic lines. At least two independently lines were used in each assay. A complete list of strains used in this work is provided in Supplementary Data 1.

cDNA generation

Total RNA was extracted from approximately one thousand synchronized young adult worms according to standard protocols. Freshly extracted RNA was subjected to reverse transcription PCR (RT-PCR) using oligo (dT) primer to generate a cDNA library (SweScript RT I First Strand cDNA Synthesis Kit, G3330-50, Servicebio). tax-4, glr-2 and cmk-1 cDNA were amplified from the cDNA library.

Molecular biology

All constructs were generated using standard restriction enzyme cloning or Gibson assembly. Promoters used for tissue-specific expression were: odr-7p (4.8 kb), str-1p (4 kb), odr-1p (1 kb), ceh-36Δp (0.57 kb), str-2p (3.7 kb), gcy-7p (1.2 kb), gcy-5p (3 kb), flp-6p (2.7 kb), gcy28dp (2.8 kb), npr-9p (2 kb), ttx-3p (0.8 kb), ser-2(2)p (4.7 kb), odr-2bp (2.6 kb), sra-6p (3.8 kb), gpa-4p (2.5 kb), sra-9p (4 kb), cmk-1p (3.1 kb), tax-4p (2 kb), and sto-5p (3 kb).

Plate chemotaxis assays

Ethanol chemotaxis assays were performed following a slight modified protocol20 (Fig. 1a). Standard assay plates contained 1.6% agar, 25 mM potassium phosphate (pH 6.0), 1 mM calcium chloride, 1 mM magnesium sulfate, and either 25 mM, 75 mM, or the indicated concentration of NaCl. For investigating specific assay plate components (Fig. 2d–g), plates contained only 1.6% agar, 1 mM calcium chloride, and 1 mM magnesium sulfate, along with the indicated concentrations of the test component. After pouring, assay plates were then left uncovered to dry for 1 h at room temperature. A central line and two flanking lines (~1.4 cm apart) were drawn on the plate bottom. At the conclusion of the assay, worms found between the two flanking lines were disregarded in the count. At the onset of the assay, ~50 synchronized young adult worms were picked and placed onto the center of the assay plate. A piece of 2 cm × 0.5 cm filter paper was positioned on one side of the lid, parallel to the lines drawn on the bottom of the plate, and 40 μl of ethanol (Cat#E7023, Sigma-Aldrich) or another indicated component was added. After either 20 min or a specified duration, a photo was taken, and worms were counted from both sides of the assay plate. The chemotaxis index was calculated as: (number of animals at the ethanol side - number of animals at the opposite side of ethanol)/total number of animals on both sides.

For quadrant assay of ethanol behavior, assay plates prepared as described above. Two perpendicular lines were drawn on the plate bottom to divide the plate into four quadrants. Approximately 50 synchronized young adult worms were picked and placed onto the center of the assay plate. Two pieces of 1 cm × 0.5 cm filter paper were positioned at opposite ends of the lid, and 20 μl of ethanol was added to each. After 20 min, a photo was taken, and worms were counted. The chemotaxis index was calculated as: (number of animals on the two ethanol quadrants - number of animals on the other two quadrants)/total number of animals on all four quadrants.

Chemotaxis assays for other odorants followed a previously described protocol20. A solution containing 1.6% agar, 25 mM potassium phosphate, 1 mM calcium chloride, and 1 mM magnesium sulfate were prepared and microwaved until agar had completely melted. It was allowed to cooled to ~60 °C. Subsequently, 10 ml of the solution was dispensed into each 9 cm Petri plate, which was then left uncovered to dry for 1 h at room temperature. Two 1 μl spots of odorant and diluent ethanol were placed at opposite ends of the plate, together with 1 μl of 1 M potassium azide at each spot to immobilize worms. Freshly diluted odorants included: butanol (undiluted, Cat#B802835, Macklin); diacetyl (1:1000, Cat#B85307, Sigma-Aldrich); isoamyl alcohol (1:1000, Cat#M823039, Macklin); 2-nonanone (1:10, Cat#N814618, Macklin). Approximately 50 synchronized young adult worms were picked and placed onto the center of each assay plate. After 60 min, worms anesthetized by potassium azide were counted. The chemotaxis index was calculated as: (number of animals at the odor spot - number of animals at the counter spot) / total number of animals at the two regions. Chemotaxis indexes are presented as mean ± SEM and individual data points in all figures.

Single worm reversal assay

35 mm assay plates were prepared with 4 ml of solution using the same formula as that for the ethanol chemotaxis assay plates. Individual day 1 worms, devoid of bacteria, were selected and placed on the assay plate. Each worm was allowed to acclimate freely for 2 min before testing. Under a stereomicroscope, 2 μl of ethanol was pipetted and delivered to the area near the worm’s nose, approximately 100 µm above the worm, for 5 s. Care was taken not to touch the worm or the plate throughout the process. The avoidance response was recorded if the worm ceased forward movement and initiated a reversal within the 5-s timeframe. Each worm was tested only once. The worm reversal rate was calculated by dividing the number of worms exhibiting reversal behavior by the total number of worms tested.

Locomotion behavioral assays

35 mm assay plates were prepared with 4 ml of solution using the same formula as that for the ethanol chemotaxis assay plates. Approximately 50 synchronized young adult worms were picked and placed onto the center of the freshly poured assay plate. A 3-min movie was recorded, capturing 1 min of worm dispersal, 1 min of ethanol stimulation, and 1 min of ethanol removal. Ethanol stimulation was achieved by placing the lid on the assay plate, containing a 30 mm diameter filter paper soaked with 40 μl of ethanol. Removal of ethanol involved simply taking off the lid. Multi-worm locomotion was captured using a stereomicroscope equipped with a Sony Exmor CMOS camera with a resolution of 3072 ×2048 pixel, at 10 frames per second. Subsequently, the captured movies were analyzed using Tierpsy Tracker (http://ver228.github.io/tierpsy-tracker/), from which worm locomotion parameters were extracted84.

C. elegans RNAi

RNAi through feeding was accomplished by administering E. coli clones from the Vidal RNAi library to wild-type animals. NGM plates were prepared with 100 μg/ml ampicillin and 3 mM IPTG, then seeded with the RNAi E. coli bacteria. Control RNAi was performed using HT115 E. coli strain carrying the empty pL4440 vector. Prior to the ethanol chemotaxis assay, wild-type animals were transferred to the RNAi plates at the L4 stage and allowed to develop for 22–26 h into young adults before testing. Clone identity was verified by sequencing.

For ASER neuron-specific RNAi, a 736 bp sequence from both sense and antisense cmk-1 cDNA was cloned downstream to the gcy-5 promoter. The resulting two plasmids were injected into wild-type worms to generate transgenic lines. Succeed transgenic worm were selected and prepared for ethanol behavior assay.

Calcium imaging

Calcium imaging experiments were performed as described with some modifications85. Transgenic worms expressing the calcium sensor GCaMP6s in specific neuron were loaded into the microfluidic chip. The animal’s nose was exposed to a stream of liquid that could be manually switched between diluted odor and buffer. The buffer consisted of 25 mM potassium phosphate (pH 6.0), 1 mM CaCl2, 1 mM MgSO4, along with either 25 mM, 75 mM, or indicated concentration of NaCl. Unless indicated otherwise, ethanol was diluted 1:100 in the buffer. Before recordings, the nose tips of worms trapped in the chip were allowed to adapt for 2 min in the exposure of the buffer solution stream. Imaging was conducted on a Nikon Ti2-E inverted microscope with a 40X air objective and an sCMOS camera (PCO. Edge 4.2 bi). The processes of AIY and AIZ neurons were imaged due to their robust calcium signals, while for all other neurons, the cell bodies were imaged. Time-lapse images were recorded at 1 frame per second. The fluorescence intensity during the first 15 s before the ethanol stimulus or during the first 30 s at the beginning of the calcium recording was averaged and defined as F0. Fluorescence intensity change ΔF/F0 was calculated as (background-corrected fluorescence - F0)/F0. Calcium responses are presented as average changes, with shaded regions indicating SEM, and heatmaps of individual traces.

Genetic ablation with miniSOG

Transgenic L4 worms, expressing miniSOG in specific neurons, were subjected to 2.5 mW/mm2 LED blue light for 1 h to induce cell death. Subsequently, the animals were allowed to recover for 24 h at 20 °C. Successful neuronal ablation was confirmed by the loss of fluorescence in mNeptune2.5, co-expressed in the same neuron, evidenced by either disappearance or fragmentation of the fluorescence.

Optogenetic stimulation

Transgenic L4 worms, expressing either Channelrhodopsin-2 (ChR2) or Guillardia theta anion channel rhodopsins 2 (GtACR2) in specific neurons, were transferred to seeded NGM plates supplied with 100 μM all-trans-retinal (ATR, Cat#R2500, Sigma-Aldrich) and incubated for 24 h in darkness. Control worms were grown on seeded NGM plates without ATR. For concurrent optogenetic and ethanol treatment, worms were exposed to 2.5 mW/mm2 LED blue light while undergoing the 20-min ethanol chemotaxis assay. For optogenetic pretreatment, worms were initially exposed to 2.5 mW/mm2 LED blue light for a specified duration (1, 5 or 10 min), followed by placing the lid containing filter paper soaked in ethanol onto the assay plate to initiate the ethanol chemotaxis assay. The assay concluded after 10 min of ethanol exposure.

Histamine supplementation

Stocks of 1 M histamine dihydrochloride (Cat#59964, Sigma-Aldrich) were diluted to a final concentration of 10 mM in the assay plate agar cooled to ~60 °C. Transgenic young adult worms expressing HisCl1 in specified neurons were transferred onto the histamine assay plates for behavior assays. Histamine-free assay plates served as controls.

Quantification and statistical analysis

Image stacks from calcium imaging were aligned using the Template Matching plugin in FiJi (http://fiji.sc RRID:SCR_002285). Each stack was then cropped on a smaller region around the cell body. The region of interest (ROI) was defined by outlining the desired neuron cell body or neurite. The background-subtracted average fluorescence intensity within the ROI was used for subsequent analysis. Average fluorescence intensity of the neuron for the first 15 or 30 s in each recording was defined as baseline (F0). Change in fluorescence intensity relative to the baseline, ΔF/F0, was plotted as a function of time. Peak amplitude was calculated as maximum change in fluorescence (F-F0) during odor addition or removal.

Statistical analysis was performed with GraphPad Prism. Data are presented as mean ± standard error of mean (SEM). All statistical tests used are indicated in the corresponding figure legends. Difference significance are indicated as *P ≤ 0.05; **P ≤ 0.01; ***P ≤ 0.001; ****P ≤ 0.0001; and n.s. statistically not significant (P > 0.05).

Reporting summary

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