Introduction

Locomotion requires both stable movement and the ability to transition quickly and smoothly between different motor states. Efficient motor transitions demand continuous and rapid adjustments of dynamic factors to maintain stability. For example, when shifting from forward to backward movement, locomotion velocity changes gradually in magnitude, rather than abruptly reversing direction1,2,3. These capabilities are crucial for animals to adapt to changing environments and navigate various challenges4,5.

In mammals, motor stability is regulated through hierarchical interactions among various neural structures, including the motor cortex, basal ganglia, cerebellum, and spinal cord6,7,8. Within specific neural structures, such as in species with limbed locomotion, stable movement is coordinated by a modular, reciprocal network of inhibitory and excitatory premotor interneurons9,10. These interneurons, positioned upstream of motor neurons, regulate flexor–extensor alternation and left–right coordination via crossed inhibition by commissural inhibitory neurons4,11. The crossed inhibition mechanism provides a robust explanation for the balance and coordination of motor rhythms; however, the hierarchical neural interactions and key signaling molecules that maintain motor stability remain poorly understood.

Caenorhabditis elegans (C. elegans) has emerged as a powerful model for dissecting motor control principles, with multiple circuit motifs reported to influence forward/backward transitions12,13;14,15,16. The conventional reciprocal inhibition model between premotor interneurons AVB and AVA, which drive excitatory B- and A-motor neurons (MNs) for forward and backward movements respectively, explains basic alternation patterns12,17,18,19,20,21,22,23,24,25,26. A neuronal flip-flop circuit, involving reciprocal inhibition between two populations of stochastic neurons, including AVB and AVA, successfully predicted random search behavior and demonstrates that the reciprocal inhibition model regulates motor stability within complex neural networks25,27. However, AVB-AVA mutual inhibition model does not fully explain the asymmetry observed in spontaneous movements, where forward locomotion predominates and is occasionally interrupted by backward initiation28.

Accumulating evidence reveals additional regulatory mechanisms, such as motor neuron asymmetry29,30, feedforward excitation29,30 and winner-take-all dynamics22, that regulate locomotion coordination and state persistence. Inhibitory motif AIY-AIZ-RIB31 and feedback network AIB-RIM-AVA21 influence spontaneous and olfactory-mediated motor stability. Head-bending motor neurons (e.g., SMD)32,33,34 regulate reversal duration and motor states, while multiple synapse types from a single interneuron (e.g., RIM)35 fine-tune motor transition. We recently identified a master‒slave configuration that formed by AVA and AVB neurons. They modulate each other’s activity through different polarities and timescales, resulting in necessary asymmetry for motor state dynamics36. These findings together suggest that neurons at different layers play significant roles in regulating motor stability. Indeed, brain-wide recordings and computational modeling in C. elegans indicate that neuronal activities of multiple interneurons upstream of AVB/AVA are tightly correlated with different motor states37.

Despite these advances, the hierarchy between circuit motifs, particularly those that modulate motor stability, is poorly defined. The molecular specificity of hierarchical signaling in stabilizing competing motor states requires systematic mapping. Moreover, most current models rely on calcium imaging correlations22,38,39,40, which may miss fast inhibitory signals essential for real-time motor control, owing to its inherent indirectness and nonlinearity41,42. To address this limitation, we examined both global neural network activities and local synaptic dynamics through in situ electrophysiological recordings43,44,45, with the goal of identifying circuit motifs that regulate motor stability in C. elegans.

Using cell-specific optogenetic and pharmacological manipulations, we identified hierarchical competing inhibition circuits that regulate motor stability by maintaining speed and enabling efficient motor transitions. The lower-order circuit motif, comprising the cholinergic interneuron PVP and the premotor interneurons AVB and AVA, stabilizes forward movement and limits backward initiation. PVP promotes forward locomotion by activating AVB and prevents backward movement by inhibiting AVA through different cholinergic receptors. The higher-order circuit motif involves the interneurons DVC, AVA, and PVP. DVC activates AVA to promote backward movement while simultaneously inhibiting PVP, thereby releasing the inhibition of AVA by PVP and forming a disinhibition circuit. We found that inhibiting PVP significantly enhances DVC’s ability to trigger backward movement, whereas activating PVP diminishes this effect. These inhibition and disinhibition modules work together as hierarchical competing inhibition circuits, regulating locomotion by preventing the activation of conflicting pathways, thus providing a framework for understanding the neural circuits underlying motor stability.

Results

The interneuron PVP regulates forward locomotion stability

To understand the neural circuit motifs and mechanisms that underlie motor stability, we examined the interneurons upstream of the two central pairs of premotor command neurons, AVB and AVA. The modulatory interneuron PVP has strong chemical synaptic connections with both AVB and AVA46,47. PVP also serves as a guidepost neuron, pioneering the left and right tracts of the ventral nerve cord48,49,50. Additionally, PVP has been proposed to promote long bouts of forward locomotion, or roaming states, may through the release of the neuropeptide pigment dispersing factor (PDF)51. However, whether PVP regulates locomotion via a hard-wired circuit remains unclear.

To investigate the role of PVP, we performed specific ablation using mitochondrially targeted miniSOG (mito-miniSOG), a flavoprotein that causes acute functional loss and subsequent death of neurons upon photoactivation52,53. PVP cell bodies are localized in the preanal ganglion (PAG), with axons extending forward along the opposite side of the ventral nerve cord (VNC) to the nerve ring (Fig. 1a, adapted from WormAtlas54). Ablation of PVP with miniSOG, indicated by the absence of its cell bodies and axons (Fig. 1b), led to significant locomotion defects (Supplementary Movie 1). Specifically, both the speed and duration of forward movement were greatly reduced (Fig. 1c–e, h). The total fraction of forward movement decreased from 82% in control animals to 57% (Fig. 1e, f). These results demonstrate that PVP is crucial for maintaining stable forward locomotion.

Fig. 1: PVP neurons promote forward movement and inhibit backward movement.
figure 1

a Schematic representation of C. elegans PVP neurons within an adult hermaphrodite, adapted from WormAtlas54. A pair of PVP somas located near the tail, with cross processes (green lines) extending anteriorly along the ventral midline (orange dashed line), terminating in the head nerve ring (NR). For clarity, the tail schematic is rotated 90 degrees counterclockwise. b PVP morphology before and after blue-light ablation (8.3 mW/cm2). GFP-highlighted PVP somas (white arrow, control group (+ PVP)) were eliminated after ablation (- PVP). This experiment was independently repeated more than three times (with 3–5 animals per trial), yielding consistent results. The white dashed lines outline the worms. Scale bar, 20 μm. c Five representative trajectories from 3 min free movement sessions before (+ PVP) and after (- PVP) PVP ablation. The gray diamonds indicate the starting positions of the worms. d Representative velocity in control (black, + PVP) and ablated (gray, - PVP) animals. e Raster plots displaying individual locomotion velocity for animals without (+ PVP) and with (- PVP) the ablation of PVP (n = 18 animals per group), biological replicates. f, g Analysis of the proportions of forward and backward locomotion in (e). Following PVP ablation, there was a decrease in forward movement and an increase in backward locomotion (p < 0.001, p < 0.001). h, i Measurement of velocity, duration, and initiation frequency across different motor states after the ablation of PVP in (e) (p < 0.001, p < 0.001, p < 0.001, p = 0.4079). j Raster plots displaying individual locomotion velocity for animals without (n = 16 animals) and with histamine (n = 15 animals), biological replicates. k, l Analysis of the proportions of forward and backward locomotion in (j). Following histamine application, there was a decrease in the velocity of forward movement and an increase in the initiation frequency of backward locomotion (p < 0.001, p < 0.001). m, n Quantification of velocity, duration, and initiation frequency across different motor states after the application of histamine in (j) (p < 0.001, p < 0.001, p < 0.001, p = 0.3098). Animals #, the animal number used in the experiments. ***p < 0.001; ns, not significant by two-tailed Student’s t test. Error bars, SEM. Source data are provided as a Source Data file.

Additionally, PVP ablation also resulted in a noticeable increase in spontaneous backward movements (Fig. 1e). The total fraction of backward movement increased from 16% in control animals to 38% in PVP-ablated animals (Fig. 1g), and the frequency of backward initiation increased nearly fourfold, although the average duration of backward movement remained unchanged (Fig. 1i). These observations suggest that PVP plays a role in regulating both spontaneous forward and backward locomotion.

Previous research has suggested that a group of neurons including AVB, PVP maintain long roaming state by releasing the neuropeptide PDF-151. To investigate whether PVP’s function is mediated by PDF-1 secretion, we specifically knocked down PDF-1 in PVP using RNA interference (RNAi). The results showed no significant changes in the total proportion of forward/backward movements, the duration of these movements, or the frequency of backward initiation (Supplementary Fig. 1a–e), although RNAi-treated animals exhibited a slight reduction in forward locomotion speed (Supplementary Fig. 1d). These findings suggest that while PDF-1 plays a role, it is not the primary factor regulating locomotion stability in PVP.

To further explore the function of PVP, we silenced it via an inhibitory Drosophila histamine-gated chloride channel (HisCl)55. When animals expressing HisCl specifically in PVP were exposed to histamine (10 mM), they exhibited reduced forward movement, lower forward speed, and shorter sustained forward duration (Fig. 1j–m, Supplementary Movie 2). Similar to the effects observed with PVP ablation, there was an increase in the frequency of backward initiation, but no change in the duration of backward movements (Fig. 1n). Moreover, transient inhibition of PVP using gtACR2, a light-activated chloride channel, resulted in rapid suppression of forward movement (Supplementary Fig. 2).

These findings demonstrate that PVP is essential for maintaining forward speed and preventing excessive backward initiation, thereby ensuring motor stability in C. elegans.

PVP promotes forward locomotion by depolarizing AVB

To understand how PVP regulates motor stability at the neural circuit level, we examined the effects of PVP activation on locomotion. We stimulated PVP with yellow light (5 s, 2.55 mW/cm2) by using Chrimson. This stimulation caused a rapid and sustained increase in forward speed (Fig. 2a, b). Specifically, in the presence of all-trans-retinal (ATR), a light-sensitive chromophore, the forward speed during light exposure (135.86 ± 4.56 μm/s) was significantly greater than that during pre-light conditions (110.13 ± 4.16 μm/s) (Fig. 2b i). Without the ATR, optogenetic stimulation had no effect on locomotion (Fig. 2b i). The average speed analysis and velocity difference (Δ Velocity) further confirmed that PVP activation enhances forward movement (Fig. 2b ii-iii). These findings, along with the inhibitory effects of PVP silencing on locomotion, indicate that PVP is both necessary and sufficient for sustaining forward movement.

Fig. 2: PVP facilitates forward locomotion through AVB.
figure 2

a Schematic diagram of the optical activation of PVP by a specific expression of Chrimson (PVP::Chrimson). b i, Raster plots and quantification analysis of forward velocity from individual animals evoked by yellow light (2.55 mW/cm2) with or without ATR (n = 20 animals per group) (b i: p < 0.001, p = 0.9747). ii, Comparison of average optogenetics evoked forward velocities for both groups. The activation of PVP neurons evoked robust forward locomotion. The error bars represent the SEM. iii, Statistical analysis of increased forward velocities caused by PVP stimulation (b iii: p < 0.001). c Schematic showing major forward premotor interneurons downstream of PVP. “n” indicates the chemical synapse number (adapted from Wormweb.org). d i, Raster plots and quantification analysis of light-stimulated forward velocity from individual animals before (n = 19 animals) and after (n = 20 animals) the ablation of AVB and PVC (d i: p < 0.001, p = 0.2621). ii, Comparison of average optogenetics evoked forward velocities for both groups. PVP-facilitated forward locomotion was eliminated in the absence of AVB or PVC. The error bars represent the SEM. iii, Statistical analysis of increased forward velocities by PVP stimulation before and after ablation of AVB and PVC (d iii: p < 0.001). eg Synaptic activity between PVP and AVB was analyzed by whole-cell recording on AVB (V clamp mode: n = 7 ( + ATR) and 5 (-ATR) animals. I clamp mode: n = 8 ( + ATR) and 7 (-ATR) animals.) (f ii: p = 0.0042, p = 0.2077, f iii: p = 0.0029, g ii: p = 0.001, p = 0.5004, g iii: p < 0.001). Black bars, light off. Yellow bars, light on. Yellow shaded, light stimulation. Yellow arrows: light stimulation for 5 s Animals #, the animal number used in the experiments. **p < 0.01; ***p < 0.001; ns, not significant by two-tailed Student’s t test. Error bars, SEM. Source data are provided as a Source Data file.

PVP is known to form neural circuits through both chemical and electrical synapses46. To investigate whether PVP promotes forward movement via synaptic neurotransmission, we selectively inhibited neurotransmitter release from PVP by expressing tetanus toxin (TeTx), which cleaves synaptobrevin, a protein essential for synaptic vesicle fusion56. Consistent with the results of PVP ablation and inhibition experiments, animals expressing TeTx in PVP presented a marked decrease in forward velocity (77.50 ± 5.43 μm/s compared with 104.32 ± 5.07 μm/s in the controls) (Supplementary Fig. 3a). Furthermore, TeTx expression completely blocked the acceleration of forward movement in the PVP::Chrimson animals upon light exposure (Supplementary Fig. 3a–c). These results indicate that PVP regulates forward movement via chemical synaptic signaling.

To identify neurons downstream of PVP, we referred to the neural connectome data of adult hermaphrodites. These data show that PVP receives inputs from RIF and AVH neurons and sends outputs to AVB, PVC, and AVA interneurons (Fig. 2c)46,47. Animals lacking AVB/PVC neurons exhibited significant movement impairment and did not respond to PVP optogenetic stimulation (Fig. 2d). Conversely, AVA-ablated animals responded normally to light exposure (Supplementary Fig. 3d–f).

Neural network transmission activity has been used to analyze the electrical activity flow from sensory and interneuron activation at the neuromuscular junctions44,57. To investigate the motor behavior changes induced by PVP activation from the perspective of electrical signal, we monitored neural network transmission activity by electrophysiologically recording from body wall muscle (BWM), the terminal effector of movement, following PVP optogenetic stimulation (Supplementary Fig. 4a). First, activation of PVP evoked robust neural network activity at the neuromuscular junction. Specifically, voltage‒clamp recordings (V clamp) demonstrated that a brief light illumination (yellow, 3.25 mW/cm²) of PVP activated bursting postsynaptic currents in BWMs (Supplementary Fig. 4b). PVP activation also increased the action potential (AP) firing frequency in muscles under current‒clamp configuration (I clamp) (Supplementary Fig. 4c). These results demonstrated that PVP activation effectively induces neural network transmission activity. Second, these neural network activities were not observed in the absence of ATR (Supplementary Fig. 4b, c), indicating that they specifically originate from PVP activation. Finally, ablation of AVB/PVC neurons eliminated PVP-induced bursting currents and blocked the AP frequency increase (Supplementary Fig. 4d–f), suggesting that PVP promotes forward movement through the involvement of AVB and/or PVC.

However, AVB/PVC are bottleneck interneurons that bridge PVP and downstream forward motorneurons (B-MNs). Therefore, PVP may either directly activate AVB or indirectly modulate AVB through other neurons. To validate the direct interaction between PVP and AVB, we employed in situ electrophysiological recordings to measure synaptic activity in AVB neurons following optogenetic activation of PVP (Fig. 2e). PVP activation induced rapid postsynaptic currents (Fig. 2f) and depolarizing potentials (Fig. 2g) in AVB. These synaptic responses were absent without the application of ATR, indicating that AVB is activated by PVP, thus a direct postsynaptic partner of PVP.

Overall, these results demonstrate that PVP promotes forward locomotion via synaptic depolarization of the forward-promoting interneuron AVB and possibly PVC. This synaptic connection plays a critical role in maintaining locomotor stability in C. elegans.

PVP suppresses backward initiation by hyperpolarizing AVA

Ablation or inhibition of PVP neurons leads to increased spontaneous backward initiation, suggesting that PVP directly regulates backward movement. To explore this, we examined the response to brief mechanical stimuli, such as a gentle touch to the head with a hair from an eyebrow (Supplementary Fig. 5a)58. Intact animals without PVP ablation displayed a robust escape response by head gentle touch, with an average backward duration of 4.19 ± 0.32 s (Supplementary Fig. 5b). To prevent adaptation, we stimulated each worm only once under standard conditions (see Methods). In contrast, PVP-ablated animals presented a significantly longer backward duration of 5.80 ± 0.45 s (Supplementary Fig. 5b, c). Similar prolonged backward movements were observed when PVP was inhibited with histamine (Supplementary Fig. 5d–f). These findings indicate that PVP neuron limits the duration of sensory-evoked backward movement, underscoring the role of PVP in regulating both spontaneous and sensory-induced backward locomotion.

Animals with PVP ablation or inhibition exhibited reduced velocity (Fig. 1h, m), which might affect the touch-evoked backward response. To avoid this influence, we used an optogenetic approach to manipulate PVP activity (Fig. 3a). We first expressed the inhibitory optogenetic sensor gtACR2 specifically in PVP neurons. This sensor expression did not affect the velocity of spontaneous locomotion (Fig. 3b). We found that transient inhibition of PVP by 3 seconds of light stimulation (blue, 15.02 mW/cm²) significantly increased the duration of gentle touch-evoked backward movement (Fig. 3b, c). In this process, light was applied simultaneously at the onset of backward movement to ensure precise timing (see Methods). These findings demonstrate that the transient inhibition of PVP also prolongs backward duration, further reinforcing its role in controlling backward locomotion.

Fig. 3: PVP suppresses backward locomotion by inhibiting AVA.
figure 3

a, g Schematic diagram of head gentle touch (black arrows) evoked backward locomotion in different transgenic animals with the expression of gtACR2 (a) and Chrimson (g) in PVP. b, h Raster plots and average velocity response of individual animals. Blue light (3 s, 15.02 mW/cm2) was used to inhibit PVP (n = 32 (-ATR) or 20 ( + ATR) animals in (b), n = 19 (-ATR) or 17 ( + ATR) animals in (h)), biological replicates. Yellow light (3 s, 2.55 mW/cm2) was used to activate PVP (n ≥ 17 animals per group). c, i Quantification of the backward duration in different genotypes in (b, h), respectively (c: p = 0.0021, i: p = 0.0272). d, j Schematic diagram of the synaptic activity analysis from PVP to AVA. e, k Representative AVA depolarized (e) and hyperpolarized (k) the membrane potential response by inhibiting (e) and activating (k) PVP. f, l The average peak voltage evoked by light stimulation was analyzed (n = 6 (-ATR) or 5 ( + ATR) animals in (f), n = 5 (-ATR) or 7 ( + ATR) animals in (l).) (f: p < 0.001, l: p < 0.001). m PVP constitutes a functional excitatory synapse with AVB and an inhibitory synapse with AVA. Black arrows, gentle touching of the head. Blue or yellow arrows, light stimulation. Black bars, light off. Blue or yellow bars, light on. Blue or yellow shaded, light stimulation. Animals #, the animal number used in the experiments. *p < 0.05; ***p < 0.001; ns, not significant by two-tailed Student’s t test. Error bars, SEM. Source data are provided as a Source Data file.

AVA is a crucial interneuron that drives backward movement and receives synaptic inputs from PVP. To examine the interaction between PVP and AVA, we recorded AVA’s neuronal response during light-induced inhibition of PVP in vivo (Fig. 3d). Inhibiting PVP resulted in a strong excitatory postsynaptic potential (EPSP) in AVA, leading to significant depolarization of AVA’s membrane potential (Fig. 3e). No response was observed without ATR. These results suggest that PVP suppresses backward movement by hyperpolarizing AVA (Fig. 3d–f).

Inhibiting PVP, which leads to AVA depolarization, suggests that PVP activity has been suppressing AVA. To test this hypothesis, we activated PVP using Chrimson (yellow, 2.55 mW/cm²) and assessed both behavioral responses and AVA activity (Fig. 3g). In contrast to PVP inhibition, PVP activation shortened the duration of touch-evoked backward movements (Fig. 3h, i). Moreover, PVP activation inhibited AVA by inducing inhibitory postsynaptic potentials (IPSPs) in AVA membrane potential (Fig. 3j–l).

In summary, PVP facilitates forward locomotion by depolarizing the forward-promoting interneuron AVB, while it suppresses backward movement by hyperpolarizing the backward-promoting interneuron AVA (Fig. 3m). Through this competing inhibition of backward circuit, PVP plays a vital role in maintaining locomotion stability in C. elegans.

PVP employs ACh as a key neurotransmitter to promote forward stability

Having established how PVP maintains locomotion stability, we further explored the synaptic mechanisms involved, focusing first on neurotransmitters. PVP are cholinergic neurons, as evidenced by the expression of cha-1/unc-17 (ChAT/VAChT), as shown by a fosmid reporter and antibody staining59,60. To assess the role of acetylcholine (ACh) in the regulation of locomotion by PVP, we investigated the effects of blocking ACh release from the PVP.

cha-1 encodes the only choline acetyltransferase in C. elegans that is essential for ACh synthesis61. Given cha-1’s widespread expression and severe paralysis in cha-1 mutants, we used RNAi to target cha-1 specifically in PVP neurons. Animals subjected to PVP-specific cha-1 RNAi (PVP::cha-1 (RNAi)) presented a significant reduction in forward movement proportion, decreased forward speed, and shortened sustained forward duration (Supplementary Movie 3). Additionally, these animals also exhibited increased backward initiation and duration (Supplementary Fig. 6), similar to the effects observed with PVP ablation and inhibition (Fig. 1e–n).

These findings indicate that cha-1 is essential in PVP for regulating locomotion, highlighting acetylcholine’s crucial role as a neurotransmitter in maintaining forward stability. This synaptic mechanism underscores the importance of PVP cholinergic signaling in promoting stable locomotion.

The role of ACR-15 nAChR in AVB for PVP-mediated forward locomotion

To better understand how PVP regulates forward movement, we sought to identify acetylcholine receptors in AVB and AVA neurons. Since PVP activation leads to AVB depolarization, we hypothesized that the ACh receptor in AVB is a cationic nicotinic acetylcholine receptor (nAChR). Two major groups of nAChRs have been identified in C. elegans: levamisole-type nAChRs, represented by UNC-29/UNC-38, and nicotine-type nAChRs, such as ACR-15/ACR-1662,63,64.

We focused on ACR-15, a key nAChR subtype in AVB known to influence nicotine-related behaviors65. Loss of ACR-15 significantly reduced the ability of PVP to increase forward speed (PVP::Chrimson) (Fig. 4a, b), suggesting that ACR-15 plays an essential role in mediating the response of AVB. Furthermore, restoring ACR-15 specifically in AVB rescued this PVP-induced increase in behavior (Fig. 4a, b).

Fig. 4: PVP activates AVB through ACR-15 and inhibits AVA through ACC-1/4.
figure 4

a, b PVP-facilitated forward velocity was declined in acr-15(ok1214) mutants than in the wild type, and specific expression of ACR-15 in AVB reversed this decrease (n = 20 (wild type), 13 (acr-15), or 19 (AVB::ACR-15) animals) (p = 0.7531, 0.0057, 0.0339). c Left, Schematic diagram of the electrophysiological configuration. Right, representative depolarizing membrane potential in AVB by light activation of PVP in different genotypes. d Quantification of the depolarized membrane potential (Δ Voltage) in AVB, which was decreased in the acr-15(ok1214) mutant and rescued by the specific expression of ACR-15 in AVB (n = 9 (wild type), 6 (acr-15), or 5 (AVB::ACR-15) animals) (p = 0.938, 0.0276, 0.0309). e, f Increased backward movement caused by the inhibition of PVP was significantly attenuated in acc-1; acc-4 double mutants, and specific expression of ACC-1/ACC-4 in AVA rescued this attenuation (n = 33 (wild type, -ATR), 33 (wild type, +ATR), 22 (acc-1, -ATR), 20 (acc-1, +ATR), 29 (acc-4, -ATR), 30 (acc-4, +ATR), 18 (acc-1; acc-4, -ATR), 17 (acc-1; acc-4, +ATR), 21 (AVA::ACC-1/ACC-4, -ATR), 26 (AVA::ACC-1/ACC-4, +ATR) animals). Head gentle mechanical stimulation and optogenetic stimulation were implemented simultaneously (p = 0.9945, < 0.001, 0.0014, < 0.001, < 0.001, 0.0191, 0.9938, > 0.9999, 0.0231). g Left, Schematic diagram of the electrophysiological configuration used to record AVA by optical stimulation of PVP. Right, representative hyperpolarized membrane potential in AVA in the different genotypes. h PVP hyperpolarized membrane potential (Δ Voltage) in AVA was impaired in acc-1; acc-4 mutants and rescued by the specific expression of ACC-1/ACC-4 in AVA in AVA. (n = 7 (wild type), 5 (acc-1; acc-4), or 5 (AVA::ACC-1/ACC-4) animals) (p = 0.7027, < 0.001, < 0.001). The above p-values are all listed in the order of significance symbols (from top to bottom, left to right). Black arrows, gentle touching of the head. Yellow arrows, light stimulation. Black bars, light off. Yellow or blue bars, light on. Yellow or blue shaded, light stimulation. Animals #, the animal number used in the experiments. Unless otherwise stated, *p < 0.05; **p < 0.01; ***p < 0.001; ns, not significant according to one-way ANOVA. Error bars, SEM. Source data are provided as a Source Data file.

To provide additional evidence, we conducted in situ electrophysiology recordings of PVP-evoked postsynaptic responses in AVB. In wild-type worms, optogenetic stimulation of PVP induced strong EPSP in AVB. These responses were notably weaker in acr-15-deficient worms (Fig. 4c, d). Consistent with the behavioral observations, the reintroduction of ACR-15 in AVB fully restored the synaptic response (Fig. 4c, d). While minor EPSP persists in ACR-15 mutants (Fig. 4c, d), suggesting that other nAChRs may also play a role.

Overall, these results identify ACR-15 as a crucial component of the postsynaptic ACh receptor in AVB, which is critical for PVP-mediated regulation of forward locomotion.

ACC-4 and ACC-1 are essential for PVP-mediated inhibition of backward movement

We next focused on identifying the postsynaptic acetylcholine (ACh) receptors in AVA. Both behavioral and electrophysiological evidence suggests that the PVP‒AVA synapse is inhibitory. This finding is intriguing since ACh typically acts as an excitatory neurotransmitter. However, C. elegans has four ACh-gated chloride (Cl-) channels: ACC-1, ACC-2, ACC-3, and ACC-466. Notably, two of them, ACC-1 and ACC-4, are expressed in AVA60,67.

We investigated the role of ACC-1 and ACC-4 in backward movement evoked by a gentle touch on the head. In wild-type animals, inhibiting PVP increased the duration of backward movement (Fig. 4e and Supplementary Fig. 7a). This increase was suppressed in ACC-4-deficient worms (Supplementary Fig. 7b) and modestly reduced in ACC-1-deficient worms (Supplementary Fig. 7c). These findings suggest that both ACC-4 and ACC-1 are required for the inhibitory effect of PVP on backward movement. Furthermore, in double mutants lacking ACC-1 and ACC-4, this inhibitory effect was completely absent (Fig. 4e, f; Supplementary Fig. 7a), indicating a complementary role of these channels.

Worms lacking both acc-1 and acc-4 exhibited prolonged backward durations even without PVP inhibition (Supplementary Fig. 7a), supporting their function as inhibitory ACh receptors. Reintroducing the wild-type acc-4 and acc-1 genes into the AVA neurons of acc-1; acc-4 double mutants restored the normal backward duration (Fig. 4e, f; Supplementary Fig. 7a). Additionally, whole-cell patch-clamp recordings demonstrated that the absence of ACC-1 and ACC-4 significantly reduced the IPSP in AVA neurons activated by PVP (Fig. 4g, h). The transgenic expression of wild-type acc-4 and acc-1 in AVA restored this IPSP (Fig. 4g, h).

These behavioral and electrophysiological results identify ACC-4 and ACC-1 as crucial components of the inhibitory ACh receptors in AVA, which mediate the ability of PVP to suppress backward movement.

DVC triggers backward movement by depolarizing AVA

PVP enhances forward motor stability by exciting AVB and inhibiting AVA, suggesting a neural circuit motif that stabilizes forward locomotion. This raises the question of whether a similar neural circuit motif exists for stabilizing backward movement. Since PVP-mediated inhibition of AVA disrupts backward locomotion, we hypothesize that certain neurons activate the backward circuit involving AVA while simultaneously inhibiting AVB or PVP.

Previous studies have shown that DVC, an excitatory interneuron located in the dorso-rectal ganglion, is crucial for initiating stable backward movement68,69,70. DVC is known to trigger backward locomotion by initiating muscle action potential bursting69, suggesting strong synaptic transmission. However, the specific synaptic connections and molecular mechanisms involved are still unclear.

Anatomically, DVC does not receive any synaptic input from sensory neurons but primarily connects to AVA, RIG, RMF, AIB, and AVK (Fig. 5a)46. To identify the functional downstream neurons involved in backward movement, we expressed Chrimson in DVC. Consistent with previous findings68,69,70, light illumination of DVC (yellow, 2.55 mW/cm2) triggered rapid and stable backward movement (Fig. 5b, c). Blocking synaptic transmission from DVC via tetanus toxin (DVC::TeTx) eliminated this backward response (Fig. 5d), suggesting that DVC triggers backward movement through chemical synaptic signaling. Further analysis revealed that ablation of AVA, but not other connecting neurons, significantly reduced the ability of DVC to promote backward movement (Fig. 5e; Supplementary Fig. 8a, b).

Fig. 5: DVC initiates backward locomotion by activating AVA.
figure 5

a Schematic showing major interneurons downstream of DVC. “n” indicates the chemical synapse number (adapted from Wormweb.org). b Schematic diagram of the locomotion response to optical activation of DVC. c Average velocity and quantified backward duration in response to light stimulation in different genotypes (n = 15 animals per group) (p < 0.001). DVC initiated robust backward locomotion. Error bars, SEM. d, e Blocking the chemical synapses of DVC (d) (n = 14 (-TeTx) or 15 (+TeTx) animals) (p < 0.001) and ablation of AVA (e) (p < 0.001) (n = 15 animals per group) disrupted the DVC-evoked backward locomotion. Error bars, SEM. f-i Upper, Schematic diagram of the in situ electrophysiological configurations. By activating DVC, neural network activity was recorded in BWMs. Representative postsynaptic PSCs traces (f i) and APs’ diagrams (g i) from different conditions. Lower, quantification of the altered average current (f ii, iii) and AP frequency (g ii, iii) after light illumination (For V clamp, n = 9 (-ATR), 12 ( + ATR), 19 (+TeTx, +ATR) animals in (f), and n = 11 (AVA + ), 18 (AVA-) animals in (h). For I clamp, n = 8 (-ATR), 10 ( + ATR), 9 (+TeTx, +ATR) animals in (g), and n = 8 (AVA + ), 8 (AVA-) animals in (i)) (f ii: p = 0.1206, <0.001, = 0.7062, f iii: p = 0.5139, <0.001, g ii: p = 0.2012, 0.0015, 0.4865, g iii: p = 0.8815, <0.001, h ii: P < 0.001, = 0.2579, h iii: p < 0.001, i ii: p < 0.001, = 0.4463, i iii: p < 0.001). j, k Upper, Schematic diagram of the in situ electrophysiological configurations. By activating DVC, synaptic activity was recorded from AVA neurons. Lower, Representative postsynaptic PSC traces (j i) and membrane potential traces (k i) and the quantified Δ Average current (j ii, iii) and Δ Voltage (k ii, iii) are shown (For V clamp, n = 6 ( + ATR), or 5 (-ATR) animals. For I clamp, n = 7 ( + ATR), or 7 (-ATR) animals) (j ii: p = 0.0355, 0.9144, j iii: p = 0.0299, k ii: p < 0.001, = 0.7497, k iii: p < 0.001). The above p-values are all listed in the order of significance symbols (from top to bottom, left to right). Δ, difference between illumination and preillumination. AP freq., action potential frequency. Yellow shaded, light stimulation. Yellow arrows, light stimulation. *p < 0.05; ***p < 0.001; ns, not significant by two-tailed Student’s t test (comparison between the two groups) or one-way ANOVA (comparison among the three groups). Error bars, SEM. Source data are provided as a Source Data file.

We then investigated neural network neurotransmission within the potential DVC-AVA circuit. Similar to activating the PVP-AVB neural circuit, activation of DVC induced prominent bursting postsynaptic currents and increased the AP firing frequency in BWMs (Fig. 5f, g). These neural network activity were specifically derived from DVC, as they were blocked either by the absence of the cofactor ATR or by the expression of tetanus toxin (TeTx) in DVC (Fig. 5f, g). Furthermore, ablation of AVA also abolished the DVC-activated bursting postsynaptic currents and increased AP frequency in BWMs (Fig. 5h, i). In contrast, ablation of other downstream neurons connecting to DVC did not produce this effect (Supplementary Fig. 8c, d). These results together suggest that DVC promotes backward movement through its interaction with AVA.

AVA is a bottleneck interneuron that bridges DVC and downstream backward motorneurons (A-MNs). Therefore, AVA may be directly activated by DVC, but it is also possible that AVA is indirectly modulated through other intermediary neurons. Similar to our investigation of the PVP-AVB circuit, we employed the in situ electrophysiological recordings to measure synaptic activity in AVA following optogenetic activation of DVC (Fig. 5j). Activation of DVC induced robust postsynaptic currents (Fig. 5j) and depolarizing potentials (Fig. 5k) in AVA. These synaptic responses were absent without ATR application (Fig. 5j, k). These results collectively demonstrate that DVC triggers backward movement by depolarizing AVA.

DVC activates AVA through the glutamate receptors NMR-1/GLR-4

After establishing the DVC-AVA neural circuit, we investigated the synaptic mechanisms involved. DVC is a glutamatergic neuron expressing the vesicular glutamate transporter EAT-460,71. We found that DVC activation promotes backward movement in an EAT-4-dependent manner, as disrupting eat-4 impaired the backward response to DVC photoactivation (Fig. 6a, b). Specifically, both the reversal velocity and duration were reduced, but the reversal initiation rate remained unchanged (Supplementary Fig. 9a). This aligns with findings from previous studies that DVC promotes reversal69,70, indicating that glutamate release plays a critical role in DVC-mediated backward movement. Electrophysiological recordings revealed that eat-4 mutants presented reduced DVC-evoked EPSCs and lower AP frequency in BWMs, suggesting that DVC functions as a glutamatergic neuron that promotes backward movement (Fig. 6c–f).

Fig. 6: DVC excites AVA by activating NMR-1 and GLR-4.
figure 6

a Raw velocities of WT, mutant (eat-4, nmr-1, glr-4, and nmr-1; glr-4) and rescued (nmr-1; glr-4;AVA::NMR-1/GLR-4) animals are shown by color maps and velocity traces, respectively (n = 15 (wild type), 15 (eat-4), 18 (nmr-1), 22 (glr-4), 20 (nmr-1; glr-4), 14 (AVA::NMR-1/GLR-4) animals), biological replicates. Error bars, SEM. b Quantification of backward duration in (a). NMR-1 and GLR-4 are involved in DVC-induced backward locomotion (p = 0.0093, 0.0447, <0.001, <0.001, 0.3835, 0.0011, 0.0307, <0.001). *p < 0.05; **p < 0.01; ***p < 0.001; one-way ANOVA. Error bars, SEM. c, e Representative postsynaptic PSCs traces (c) and APs’ diagrams (e). d, f The quantification of the ∆ Average current (d) and ∆ AP frequency (f) of the above animals are shown (d, n = 8 (wild type), 8 (eat-4), 10 (nmr-1), 9 (glr-4), 7 (nmr-1; glr-4), 7 (AVA::NMR-1/GLR-4) animals; f, n = 5 (wild type), 6 (eat-4), 7 (nmr-1), 6 (glr-4), 8 (nmr-1; glr-4), 8 (AVA::NMR-1/GLR-4) animals) (d: p < 0.001, < 0.001, < 0.001, < 0.001, = 0.5689, 0.0094, 0.0431, <0.001, f: p < 0.001, = 0.0207, 0.0186, <0.001, = 0.0666, 0.0168, 0.0365, 0.0081). *p < 0.05; ***p < 0.001; one-way ANOVA. Error bars, SEM. g Left, Schematic diagram of the neuron-patching experiment. Right, Representative membrane potential traces of WT, nmr-1; glr-4, and nmr-1; glr-4; AVA::NMR-1/GLR-4 animals with ATR. h Comparisons of the Δ Voltage among the three groups of animals are shown (n = 7 (wild type), 6 (nmr-1; glr-4), 5 (AVA::NMR-1/GLR-4) animals) (p = 0.8489, 0.0043, 0.0232). Δ Voltage, the potential difference between illumination and preillumination. AP freq., action potential frequency. Yellow shaded, light stimulation. Yellow arrows, light stimulation. *p < 0.05; **p < 0.01; ns, not significant; one-way ANOVA. Error bars, SEM. i The functional neural circuit of DVC neurons. DVC excites AVA by activating NMR-1 and GLR-4. The above p-values are all listed in the order of significance symbols (from top to bottom, left to right). Source data are provided as a Source Data file.

We then identified the postsynaptic glutamate receptor in AVA. The rapid depolarization of AVA by DVC suggests that the postsynaptic glutamate receptor in AVA is likely a cation channel, such as the NMDA and AMPA receptors. The C. elegans genome encodes at least six excitatory glutamate subunits, including NMDA (nmr-1 and nmr-2) and non-NMDA (glr-1, glr-2, glr-4, and glr-5) subunits. Loss of nmr-1 and glr-4 significantly reduced the ability of DVC to induce backward movement, whereas the other nmr and glr mutants had no effect (Fig. 6a, b; Supplementary Fig. 9). This finding indicates that NMR-1 and GLR-4 are required for DVC-induced backward movement. The nmr-1; glr-4 double mutant abrogated the activation ability of DVC (Fig. 6a, b), suggesting that NMR-1/GLR-4 functions complementarily. Indeed, in both the nmr-1 and glr-4 single mutants, DVC-evoked EPSC and AP firing were impaired (Fig. 6c–f). In the nmr-1; glr-4 double mutant, the EPSC and AP frequencies further decreased (Fig. 6c–f).

Both nmr-1 and glr-4 are expressed in AVA67,72,73. The expression of wild-type nmr-1 and glr-4 specifically in AVA fully rescued the backward movement, EPSC frequency and AP frequency of the nmr-1; glr-4 mutants (Fig. 6c–f). Direct recordings of AVA postsynaptic activity in nmr-1; glr-4 double mutants during DVC activation revealed fewer EPSPs than in the wild type. This defect was reversed by expressing nmr-1 and glr-4 in AVA (Fig. 6g, h). Thus, these behavioral and electrophysiological results demonstrate that NMR-1 and GLR-4 are essential postsynaptic glutamate receptors in the DVC-AVA circuit that stabilize backward movement (Fig. 6i).

DVC hyperpolarizes PVP but not AVB

To determine whether the DVC-AVA circuit enhances backward stability through a competing inhibition mechanism similar to that observed with PVP, we tested the effect of DVC activation on AVB. Optogenetic activation of DVC (DVC::Chrimson) and recorded the postsynaptic response in AVB showed that activating DVC did not inhibit AVB (Fig. 7a), indicating that DVC does not directly regulate AVB and thus does not enhance backward stability by inhibiting AVB.

Fig. 7: DVC hyperpolarizes PVP to facilitate backward movement.
figure 7

a, b Upper: Schematic diagram of the neuron-patch recording setup, showing excitation of DVC and simultaneous recording of the membrane potential in AVB (a) and PVP (b). Lower: Representative membrane potential traces and comparisons of the membrane potential between the illumination and preillumination phases (n = 5 animals in each group). Activation of DVC caused hyperpolarization of PVP but did not affect AVB. Yellow shaded, light stimulation. ***p < 0.001; ns, not significant; two-tailed Student’s t test. Error bars, SEM. c, e Heatmaps showing the proportion of DVC-evoked reversal movements. Optogenetic inhibition of PVP (c) and histamine inhibition of PVP (e) increased the proportion of reversals. Gradually increasing blue light intensity was applied. d, f Plots of the reversal response proportion versus light intensity in (c, e), respectively, showing downward shifts in the activation curves following the inhibition of PVP. The 50% activation intensity in (d) was 3.39 mW/cm2 (Control) and 1.31 mW/cm2 (PVP::gtACR2). In (f), it was 2.89 mW/cm2 without histamine and 1.73 mW/cm2 with histamine. n = 10 animals per trial, 8 trials in total, biological replicates in (d, f). Error bars, SEM. g Heatmap showing the proportion of DVC-evoked reversal movements following activation of PVP. h An upward shift in the reversal response proportion curve was observed after light illumination to activate PVP. The 50% activation intensity was 2.89 mW/cm² (Control) and 5.72 mW/cm² (PVP::Chrimson). Nonlinear regression analysis was used to analyze the 50% activation intensity. n = 10 animals per trial, 8 trials in total. Error bars, SEM. i Diagram illustrating the functional neural circuit between DVC and PVP. Inhibiting PVP enhanced DVC-induced backward locomotion, emphasizing the role of PVP in modulating DVC-triggered motor responses. Source data are provided as a Source Data file.

We then explored the effect of DVC on PVP, considering that PVP directly activates AVB. By activating DVC and recording the postsynaptic response in PVP, we observed inhibitory postsynaptic potentials in PVP upon DVC activation (Fig. 7b). This finding shows that DVC activation inhibits PVP but does not affect AVB. Since PVP promotes forward locomotion by depolarizing AVB, and inhibiting PVP reduces forward speed, we expected that activating DVC should inhibit AVB. However, we did not find evidence supporting this. One possibility is that DVC may not receive a strong enough stimulus. Alternatively, DVC’s inhibition of PVP specifically modulates AVA activity, might not be sufficient to suppress AVB. Further investigation into the biophysical mechanisms underlying selective neuronal modulation is needed. Nonetheless, these findings suggest a higher-order competing inhibition circuit involving DVC and PVP, which plays a role in regulating motor behavior.

Inhibition of PVP enhances the efficiency of DVC activated backward movement

To further understand the role of the higher-order DVC-PVP circuit, we examined how manipulating PVP affects DVC-induced backward movement. We used gtACR2 to inhibit PVP and Chrimson to activate DVC, both of which are simultaneously triggered by blue light (0.5–41.21 mW/cm²). Comparing conditions with and without PVP inhibition, we found that inhibiting PVP significantly increased the proportion of backward movement triggered by DVC (Fig. 7c). This enhancement occurred across various light intensities, leading to a noticeable downward shift in the energy dependence curve (Fig. 7d).

Given that optogenetic inhibition of PVP decreases with lower light energy, potentially leading to inconsistent results, we aimed for more stable inhibition. We expressed the HisCl channel in PVP and used histamine as an inhibitor, achieving continuous PVP inhibition. Under these conditions, histamine also enhanced the ability of DVC to initiate backward movement across different light intensities (Fig. 7e, f). These findings confirm that PVP inhibition enhances DVC-triggered backward movement.

Past experiments have shown that activating PVP reduces the duration of backward movement evoked by gentle touch via AVA inhibition (Fig. 3g–l). To determine whether this phenomenon applies to DVC-induced backward movement, we co-expressed Chrimson in both DVC and PVP neurons and examined the effect of PVP activation. The results showed that activating PVP significantly decreased the proportion of backward movement initiated by DVC (Fig. 7g), which was consistent across light intensities and caused an upward shift in the energy dependence curve (Fig. 7h).

In conclusion, inhibiting PVP enhances the efficiency of DVC-induced backward movement, whereas activating PVP suppresses it. These findings highlight the critical role of the DVC-PVP higher-order circuit in regulating motor stability (Fig. 7i).

Discussion

Understanding behavior at a higher level requires distilling general explanatory principles74. By revealing how layered inhibition motifs coordinate motor stability, we provide a unifying framework that complements existing models22,75. Specifically, this study reveals a neural principle: hierarchical competing inhibition circuits that ensure motor stability through asymmetrical regulation. During forward locomotion, PVP activates AVB and inhibits AVA, maintaining forward stability. For the transition from forward to backward movement, the interaction between DVC and PVP forms a high-order competing inhibition circuit motif. DVC activates AVA and simultaneously inhibits PVP, enhancing the DVC-AVA pathway and promoting stable backward movement. Notably, these two competing inhibition circuit motifs are not symmetrical in their neural assembly, as DVC inhibits PVP but not AVB. This asymmetry is key to optimizing motor transitions by preventing conflicting signals, leading to efficient and precise behavioral responses.

The competing inhibition mechanism has been observed at different neural levels in regulating motor states. For example, the first-layer interneuron AIY promotes forward movement20,76,77,78 and precisely modulates locomotion speed and reversal initiation by activating RIB and competitively inhibiting AIZ through distinct postsynaptic ACh receptors31. AIB activates AVA while inhibiting RIM79. Since RIM stabilizes reversals through gap junctions and chemical synapses35,75, the AIB-RIM interaction thus forms a disinhibition circuit that regulates reversal initiation and motor transitions21,78,79,80. In contrast to these circuits, we defined a hierarchical competing inhibition circuit involving two previously unexplored interneurons, PVP and DVC. PVP ensures the stability of forward movement through a competing inhibition circuit, while DVC, with its higher response priority compared to PVP, maintains the stability and continuity of backward movement. The hierarchical architecture of competing inhibition and disinhibition may represent a conserved circuit principle, suggesting that layered inhibitory control could similarly coordinate motor stability across species.

PVP is a key interneuron that regulates motor stability

PVP was proposed to be a neuromodulatory interneuron that regulates movements on longer time scales, such as roaming and dwelling51. It cooperates with AVB and SIAV to release the neuropeptide PDF-1, activating AIY and RIA. In addition to regulating the long-term motor state, our study revealed that PVP refines forward locomotion stability through single acetylcholine-dependent neurotransmitter but different receptors. PVP excites AVB via the acetylcholine receptor ACR-15, and inhibits AVA through the acetylcholine receptors ACC-4 and ACC-1. Activation of AVB by PVP potentially enhancing PDF-1 release from AVB and forming a feedforward excitatory loop to sustain roaming behavior. In our model, PVP is positioned in the second layer of the neural circuitry. It forms a lower-order motif with AVB and AVA, and also participates in the DVC-AVA circuit to form a higher-order motif. This nested configuration gives PVP a pivotal role in the motor stability regulation.

In addition, PVP appears to persistently suppress AVA, as both continuous inhibition of PVP via histamine and transient inhibition through optogenetic sensor significantly increased sensory-induced backward locomotion. In spontaneous movement, removing or suppressing PVP did not affect the average backward duration. This differs from sensory stimulus-induced reversal behavior, where gentle touch significantly increases the duration of reversal when PVP is ablated or inhibited. The possible reasons for this include the degree of PVP’s inhibition of AVA, which may depend on AVA’s own activity state, or the involvement of additional neurons and neural circuits that contribute to the different regulation of spontaneous and evoked reversals35,75. Nonetheless, PVP suppression of AVA contributes to reduce AVA’s interference with forward movement, thereby increasing forward stability. Moreover, PVP is reported to extend a sensory cilium over the egg laying apparatus81, suggesting structural features that could indicate additional PVP-dependent mechanical or chemical mechanisms linking locomotion to egg laying behavior. This multifunctionality of PVP may be essential for the navigation ability of C. elegans. Our findings on PVP-associated neural circuits and synaptic mechanisms provide insights into the regulation of locomotion stability.

DVC enhances smooth transition and stable backward by inhibiting PVP

DVC and DVA have been suggested to act as proprioceptive neurons by expressing the mechanotransduction channel TRP-4, potentially sensing local stretch to regulate body bending82. However, ablation of DVC did not eliminate the changes in body curvature caused by trp-4 mutations82. Activation of DVC promotes robust backward movement. Our study reveals that DVC ensures backward movement by both directly activating AVA and removing AVA’s suppression by PVP, creating a dual activation pathway. This suggests that DVC functions as a higher-order interneuron for maintaining backward stability. Since DVC inhibits PVP, it may function similarly to inhibitory interneurons such as basket or stellate cells in the cerebellum, which regulate motor coordination by inhibiting Purkinje cells83,84.

DVC is a glutamatergic neuron that mainly targets interneurons such as AVA, RIG, AIB, RMF, and AVK but not PVP46,47. Although no strong chemical synapses exist between DVC and PVP, strong electrical synapses are present via co-expressed hemichannel innexins85. Electrical synapses usually facilitate quick, direct excitation between neurons86,87, contradicting the observed inhibition of PVP by DVC. It is possible that DVC inhibits PVP indirectly through intermediary neurons that relay inhibitory signals from DVC to PVP. Or, electrical synapses with novel rectification exhibit inhibition. Identifying these intermediaries and revealing novel electrical synapses are essential for further understanding the competing inhibition circuit.

Our in situ electrophysiology data show that DVC inhibits PVP, whereas PVP excites AVB. Theoretically, activating DVC should inhibit AVB, but we did not find evidence that DVC inhibits AVB. In addition to the possibility that DVC may not have received a strong enough stimulus, DVC’s inhibition of PVP might not be potent enough to suppress AVB. The inhibition of PVP by DVC specifically modulate AVA activity, highlighting the need to explore the biophysical mechanisms behind selective neuronal modulation. Nonetheless, DVC plays dual roles as an inhibitory interneuron (inhibiting PVP) and as an excitatory interneuron (activating AVA), which are critical for maintaining stable backward movement. These hierarchical competing inhibition circuits not only ensure stability in forward and backward movements but also allow rapid adaptation to environmental changes, preventing conflicts in motor pathways. This provides a neural foundation for adaptability in dynamic environments.

Compactness of functionality and efficiency of these circuit motifs

Competing inhibitory neural circuits are widely studied in sensory systems such as lateral inhibition in vision, where they enhance contrast and edge detection by suppressing adjacent neuron activity88. Similar circuits are also found in the auditory and olfactory systems89. Unlike these sensory systems, the inhibition circuits in C. elegans motor system exhibit a hierarchical structure. The lower PVP-AVB-AVA circuit motif where PVP activates AVB and inhibits AVA is crucial for maintaining stable forward locomotion. This configuration prevents irrelevant environmental or internal signals from triggering an AVA-mediated evasive response, and facilitates the smooth transition from backward to forward movement. Although the inhibition of AVA by PVP cannot be directly analogized to the tonic symmetric inhibition of neighboring cells that enhances perception in the visual system, both forms serve to enhance the efficient transmission of specific excitatory signals by suppressing competing signals in their surroundings.

At a higher hierarchical level, DVC and PVP are distinct in both their neurotransmitter profiles and functional roles: DVC is a glutamatergic neuron, whereas PVP is cholinergic. DVC inhibits PVP, but the reverse is not true. This high-order inhibition from DVC to PVP ensures not only stability in backward movements but also transition from forward to backward movement. This balance between stability and flexibility may provide a neural foundation for adaptability in dynamic environments. Remarkably, this entire regulatory system relies on just four interneurons—DVC, PVP, AVB, and AVA—demonstrating how complex functions can be executed through highly compact neural circuits. This compact framework provides testable hypotheses for investigating neural dynamics in mammalian systems and artificial intelligence design.

Methods

C. elegans strains and transgenic lines

Caenorhabditis elegans was grown on standard nematode growth medium (NGM) plates seeded with OP50 and maintained at 22 °C90. Wild-type animals were used as control transgenic strains. All optogenetic strains were cultured in darkness on NGM plates supplemented with 0.5 mM ATR (control groups were grown without ATR)91. Genetic mutants for constructing transgenic and compound lines were obtained from the Caenorhabditis Genetics Center (CGC).

Transgenic animals carrying nonintegrated, extrachromosomal arrays (gaaEx) were generated via microinjection following standard protocols. The target DNA plasmids (5 ~ 30 ng/µL) were injected alongside the coinjection markers. To create integrated transgenic arrays (gaaIs), gaaEx animals were subjected to UV irradiation. All the transgenic lines were backcrossed with the N2 strain at least four times before analysis. L4 stage or young adult hermaphrodites were used in the behavioral experiments. A complete list of the strains used in this study is provided in Appendix Supplementary Table 1.

Molecular biology and RNA interference (RNAi)

All expression plasmids, including those used for RNAi, were constructed via the Multisite Gateway system (Invitrogen, Thermo Fisher Scientific)92. Three entry clones—promoter, target gene, and fluorescent marker gene (referred to as slot1, slot2, and slot3, respectively)—were recombined into the pDEST™ R4-R3 Vector II via an LR reaction33. The genes acr-15, acc-1, acc-4, eat-4, nmr-1, nmr-2, glr-1, glr-2, glr-4, and glr-5 were subsequently cloned from wild-type genomic DNA. The cDNA sequence was amplified via 2× Phanta Max Master Mix (Dye Plus) (Vazyme Biotech Co., Ltd., P525-01) Taq DNA Polymerase (Vazyme). Plasmid sequence fidelity was verified by sequencing and enzyme digestion.

For neuron-specific RNAi experiments, exon-rich regions (500–700 bp) were selected for targeting. The sense strand was used for forward interference sequences (RNAi, sense), and the antisense strand was used for reverse interference sequences (RNAi, antisense). Plasmids containing both forward and reverse sequences of the target gene were coinjected to generate dsRNA. Worms prepared using the injection method with an empty vector, containing the same promoter and fluorescent protein sequences but lacking the forward and reverse sequences of the target gene, served as control strains in the experiment. Detailed information about the plasmids and primers is listed in Appendix Supplementary Table 2, 3.

MiniSOG-based neuron ablation

MiniSOG fused with the outer mitochondrial membrane tag TOMM20 (tomm20-miniSOG)53 was expressed in target neurons. The construction and sequence information followed previously described protocols26. L2 stage animals on standard NGM culture plates were exposed to 470 nm blue light (8.3 mW/cm2) for 40–45 minutes at 22 °C in a homemade LED box. To verify the specificity and effectiveness of cell ablation, cytoplasmic RFP or wCherry was co-expressed with miniSOG (tomm20-miniSOG-SL2-RFP or tomm20-miniSOG-SL2-wCherry) under the same promoter in targeted neurons. The ablation effect was assessed via confocal fluorescence microscopy. Following ablation, the animals were randomly assigned to different experimental groups for quantitative analysis, and the success rate of target neuron ablation exceeded 90%.

Behavioral analyses

All behavioral experiments were conducted on standard NGM plates at 20–22 °C. A single, well-fed young adult hermaphrodite was transferred to a fresh NGM plate with OP50 to observe free-moving behavior. To help the animals adapt to their new environment and achieve stable movement, their locomotion was recorded one minute after transfer using a modified stereo microscope (Axio Zoom V16, Zeiss) equipped with a digital camera (acA2500-60um, Basler). The video was collected by pylon Viewer (x64) for at least 3 min at 10 frames per second. Postimaging analysis was performed via a custom MATLAB script. The movement of the worm was tracked by tracing the central line of its body. For locomotion velocity analysis, the worm’s image was divided into 33 body segments, and the midpoint of the central line was used to calculate the velocity26. Images were captured at 10 Hz using a 10X objective.

For optogenetic assays, yellow light (2.55 mW/cm2, 590 nm) and blue light (15.02 mW/cm2, 470 nm) were used to activate Chrimson and gtACR2, respectively. Gentle touches on head were applied via an eyelash. In head-touch assays, worms are exposed to both light and touch stimuli simultaneously. For PVP::HisCl transgenic animal experiments, worms were cultured on NGM plates containing 10 mM histamine for at least two generations55,93, with other culture conditions following standard protocols.

In situ electrophysiology

Dissection and recording were performed according to established protocols45,63,94. Briefly, 1- or 2-day-old hermaphrodite adults were immobilized using Histoacryl Blue (Braun) on a Sylgard-coated cover glass filled with bath solution (Sylgard 184, Dow Corning) via Histoacryl Blue (Braun) under a stereoscopic microscope (M50, Leica). The viscera were removed by suction through a glass pipette, and the cuticle flap was gently glued down with WORMGLU (GluStitch, Inc.) to expose the neurons and neuromuscular system.

Body wall muscle cells and neurons were patched via borosilicate pipettes with resistances of 4–6 MΩ and 15–20 MΩ, respectively (1B100F-4; World Precision Instruments). Pipettes were pulled via a P-1000 micropipette puller (Sutter) and fire-polished with an MF-830 microforge (Narishige). Membrane currents, membrane potentials, and action potentials were recorded in the whole-cell configuration via pulse software and an EPC9 amplifier (HEKA). The data were processed with Igor Pro (WaveMetrics) and Clampfit 10 (Axon Instruments, Molecular Devices). Membrane currents were recorded at a holding potential of -60 mV, whereas membrane potentials and action potentials were recorded at 0 pA. The data were digitized at 10 kHz and filtered at 2.6 kHz.

The pipette solution contained the following (in mM): K-gluconate, 115; KCl, 25; CaCl2, 0.1; MgCl2, 5; BAPTA, 1; HEPES, 10; Na2ATP, 5; Na2GTP, 0.5; cAMP, 0.5; and cGMP, 0.5, pH 7.2 with KOH, 320 mOsm. cAMP and cGMP are included to maintain neuronal activity and prolong longevity. The bath solution contained (in mM): NaCl 150; KCl 5; CaCl2 5; MgCl2 1; glucose 10; sucrose 5; and HEPES 15, pH 7.3 with NaOH, 330 mOsm. All chemicals were obtained from Sigma unless otherwise noted. The experiments were conducted at room temperature (20–22 °C). Optogenetic stimulation was performed via yellow light at 590 nm with a light power of 3.25 mW/cm2.

Confocal fluorescence microscopy

Fluorescence images were captured from live worms via a confocal microscope (FV3000, Olympus) with a Plan-Apochromatic 60X objective. Young adult hermaphroditic transgenic animals expressing fluorescence markers were selected for imaging. Worms were immobilized with 2.5 mM levamisole (Sigma‒Aldrich) in M9 buffer. Neurons labeled with GFP, RFP or wCherry were imaged at 488 or 561 nm, respectively. Image processing and analysis were performed via ImageJ (National Institutes of Health).

Statistical analysis and display

All behavioral and electrophysiological action potential data were visualized as heatmaps and AP diagrams via MATLAB (MathWorks). Scatter plots, bar graphs, and cumulative fraction curves were generated via GraphPad Prism 8 (GraphPad Software, Inc.). Representative electrophysiology traces (excluding APs) were produced with Igor Pro (WaveMetrics). The data are presented as the means ± SEMs. Statistical analyses were conducted via two-tailed Student’s t test, one-way ANOVA, and nonlinear regression analysis. Two-tailed Student’s t tests were used for comparisons between two groups. One-way ANOVA was used for comparisons among multiple groups. Nonlinear regression analysis was used to compare differences between curve shifts. All the diagram images were created using PowerPoint (Microsoft), and the movies were compiled using ImageJ software (a free, open source image processing program). All the statistical analyses were performed via GraphPad Prism 8 (GraphPad Software Inc.). P-values are indicated as follows: ns, not significant, *p < 0.05, **p < 0.01, ***p < 0.001. Error bars, SEM.

Reporting summary

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