MDN brain descending neurons coordinately activate backward and inhibit forward locomotion

Command-like descending neurons can induce many behaviors, such as backward locomotion, escape, feeding, courtship, egg-laying, or grooming (we define ‘command-like neuron’ as a neuron whose activation elicits or ‘commands’ a specific behavior). In most animals, it remains unknown how neural circuits switch between antagonistic behaviors: via top-down activation/inhibition of antagonistic circuits or via reciprocal inhibition between antagonistic circuits. Here, we use genetic screens, intersectional genetics, circuit reconstruction by electron microscopy, and functional optogenetics to identify a bilateral pair of Drosophila larval ‘mooncrawler descending neurons’ (MDNs) with command-like ability to coordinately induce backward locomotion and block forward locomotion; the former by stimulating a backward-active premotor neuron, and the latter by disynaptic inhibition of a forward-specific premotor neuron. In contrast, direct monosynaptic reciprocal inhibition between forward and backward circuits was not observed. Thus, MDNs coordinate a transition between antagonistic larval locomotor behaviors. Interestingly, larval MDNs persist into adulthood, where they can trigger backward walking. Thus, MDNs induce backward locomotion in both limbless and limbed animals.


Introduction
Animals typically execute one behavior to the exclusion of all other possible behaviors (Briggman and Kristan, 2008). For example, leeches can either crawl or swim, but cannot do both simultaneously (Briggman and Kristan, 2006;Kristan, 2008); or using the same set of muscles, a locust is capable of either walking or flying but cannot execute both behaviors at the same time (Ramirez and Pearson, 1988). Such mutually exclusive choice of behavior has also been observed in several other systems, including Caenorhabditis elegans (forward vs backward crawling), Tritonia (crawling vs swimming), leech (feeding vs swimming), tadpole (struggling vs swimming), turtle (swimming vs scratching), and zebrafish (left vs right escape) (Berkowitz, 2002;Gaudry and Kristan, 2010;Koyama et al., 2016;Popescu and Frost, 2002;Roberts et al., 2016;Soffe, 1993). The selection of a locomotor program to the exclusion of all others is necessary to prevent injury and escape predation. Despite the paramount importance of rapid transitions between antagonistic motor programs, the underlying circuitry is only beginning to be understood in C. elegans (Lindsay et al., 2011;Piggott et al., 2011;Roberts et al., 2016).
Command-like neurons can elicit specific behaviors, such as forward locomotion, backward locomotion, pausing, escape, flight, grooming, feeding, courtship, egg-laying or sleep (Bidaye et al., 2014;Bouvier et al., 2015;Hägglund et al., 2010;Hampel et al., 2015;Hedwig, 2000;Hückesfeld et al., 2015;Kallman et al., 2015;Liu and Fetcho, 1999;Ohyama et al., 2015;Pearson et al., 1985;Sen et al., 2017;Tanouye and Wyman, 1980;von Philipsborn et al., 2011;Weber et al., 2015;Wu et al., 2015). However, much less is known about how antagonistic motor programs are suppressed during command neuron-induced behavior. On one hand, there could be a high degree of reciprocal inhibition between neurons in antagonistic circuits; on the other hand, the command neurons that activate one behavior may also suppress antagonistic behaviors (in which case there could be minimal reciprocal inhibition). Here, we use the Drosophila larva to characterize the neural circuits coordinately regulating two antagonistic behaviors: forward versus backward locomotion.
Drosophila larva have many distinct behaviors (Vogelstein et al., 2014), but forward locomotion is the default locomotor behavior (Berni et al., 2012) and consists of coordinated posterior-to-anterior waves of somatic body wall muscle contractions driven by corresponding waves of motor neuron activity within the segmented ventral nerve cord (VNC) (Clark et al., 2018;Heckscher et al., 2012;Hughes and Thomas, 2007;Pulver et al., 2015). There are~35 motor neurons per bilateral hemisegment, innervating 30 body wall muscles (Landgraf and Thor, 2006), about 250 interneurons per hemisegment (Rickert et al., 2011), and an unknown number of ascending and descending neurons traversing each segment of the VNC. The circuits for motor wave propagation , the coordination of muscle groups within each segment , and the bilateral adjustment of muscle contraction amplitude (Heckscher et al., 2015) have been recently investigated; however, much less is known about the circuits promoting backward locomotion, or the switching from forward to backward locomotion.
Larvae initiate backward locomotion upon encountering a barrier or experiencing mild noxious stimulation to the anterior body (Kernan et al., 1994;Robertson et al., 2013;Takagi et al., 2017;Titlow et al., 2014;Tracey et al., 2003). Backward locomotion consists of anterior-to-posterior waves of motor neuron and muscle activity (Heckscher et al., 2012;Pulver et al., 2015). A segmentally reiterated VNC neuron that triggers backward locomotion has been identified (Takagi et al., 2017), but high-order command-like neurons for backward locomotion and the circuit for executing backward wave propagation while simultaneously suppressing forward waves remain unknown. eLife digest When we choose to make one kind of movement, it often prevents us making another. We cannot move forward and backward at the same time, for example, and a horse cannot simultaneously gallop and walk. These 'antagonistic' behaviors often use the same group of muscles, but the muscles contract in a different order. This requires exquisite control over muscle contractions.
Neurons located in the central nervous system form circuits to produce distinct patterns of muscle contractions and to switch between these patterns. Smooth, rapid switching between behaviors is important for animal escape and survival, as well as for performing fine movements. However, we know little about how the activity of the neuronal circuits enables this.
Carreira-Rosario, Zarin, Clark et al. set out to identify the underlying neuronal circuitry that allows larval fruit flies to transition between crawling forward and backward. Results from a combination of genetics and microscopy techniques revealed that a neuron called the Mooncrawler Descending Neuron (MDN) induces a switch from forward to backward travel. MDN activates a neuron that stops the larvae crawling forward, and at the same time activates a different neuron that is only active when the larvae crawl backward. Carreira-Rosario et al. also found that MDN triggers backward crawling in the six-limbed adult fly.
Understanding how a single neuron -in this case MDN -can trigger a smooth switch between opposing behaviors could be beneficial for the medical and robotics fields. In the medical field, understanding how movement is generated could help to improve therapies that fix damage to the relevant neuronal circuits. Understanding how behavioral transitions occur may also help to design autonomous robots that can navigate complex terrain.
Here, we identify a bilateral pair of Drosophila brain descending neurons that coordinately activate backward locomotion and suppress forward locomotion, and identify the downstream premotor circuitry effecting the switch. Surprisingly, immortalization of CsChrimson (Chrimson) expression in these larval command-like neurons reveals that they survive metamorphosis, have the exact morphology of previously described adult 'moonwalker' neurons (Bidaye et al., 2014), and can induce backward walking in the adult. By analogy to the adult naming scheme, we refer to these larval brain neurons as 'mooncrawler descending neurons' (MDNs). We reconstruct the larval MDNs in an electron microscopy volume comprising the whole central nervous system , in which we also map its postsynaptic neuron partners. We identify the circuit motifs by which MDNs induce backward locomotion while simultaneously suppressing forward locomotion. The MDNs project their axons along the length of the nerve cord, where they directly activate an excitatory cholinergic pre-motor neuron (A18b) that is specifically active during backward waves. In parallel, the MDNs synapse onto a GABAergic inhibitory neuron (Pair1) that directly inhibits cholinergic premotor neurons (A27h) active specifically during forward locomotion ; optogenetic experiments showed that MDNs activate Pair1 neurons, which then inhibit A27h and block forward locomotion. The circuit structure therefore suggests that two behaviors such as forward and backward peristaltic locomotion can maintain mutually exclusive activity due to top-down excitation/ inhibition, rather than reciprocal inhibition. We conclude that the MDNs promote backward locomotion at all stages of the Drosophila life cycle: from the limbless crawling maggot to the limbed walking adult.

Identification of brain neurons sufficient and necessary for larval backward locomotion
We previously showed that activating neurons labeled by the Janelia R53F07-Gal4 line could induce backward larval locomotion, but this line has broad expression in the brain, subesophageal zone (SEZ), and both motor neurons and interneurons of the VNC (Clark et al., 2016). To identify the neurons within this population that can induce backward locomotion, we used intersectional genetics (Dolan et al., 2017;Luan et al., 2006) to find lines labeling small subsets of the original population. We identified three lines called Split1, Split2, and Split3 labeling different subsets of the original pattern; the only neurons present in all three Split lines are a bilateral pair of neurons with cell bodies located in the ventral, anterior, medial brain with descending processes to A3-A5 in the VNC ( Figure 1A-C, arrowheads).
All three Split lines could induce backward locomotion following Chrimson expression and activation ( Figure 1D, Videos 1 and 2). Neuronal activation immediately switched locomotion from forward to backward ( Figure 1E,F), without a significant change in the number of peristaltic waves per second (Split1, 0.48; Split2, 0.50; Split3, 0.65 before activation; Split1, 0.48; Split2, 0.56; Split3, 0.56 after activation). Conversely, using Split2 or Split3 to express the light-inducible neuronal silencer GtACR1 (Mohammad et al., 2017) significantly reduced backward locomotion induced by a noxious head poke ( Figure 1G,H). It is likely that these activation and silencing phenotypes arise from the pair of ventral, anterior, medial brain descending neurons common to all three lines, although it is possible that there are different neurons in each Split line that can induce backward locomotion. We distinguish between these alternatives in the next section.
A single pair of brain neurons can induce a switch from forward to backward locomotion To determine whether Chrimson expression in just one or two of the ventral, anterior, medial brain neurons is sufficient to induce backward locomotion, we stochastically expressed Chrimson:Venus within the Split2 pattern via the 'FLP-out' method ( Figure 2A). We screened populations of larvae for Chrimson-induced backward locomotion (obtaining 1-2 larvae per 100 screened), and stained the CNS to identify the Chrimson:Venus + neurons that were sufficient to induce backward locomotion. All larvae with a backward locomotion phenotype (n = 10) expressed Chrimson:Venus in one or both neurons from the anterior, medial pair that had descending projections to A3-A5 (three examples shown in Figure 2B-D). Conversely, all larvae that lacked Chrimson-induced backward Figure 1. Neurons sufficient to induce backward larval locomotion. (A-C) Split1-Split3 lines driving expression of membrane localized Venus in the third instar CNS. Corazonin (not shown) labels a single neuron in segments T2-A6, and was used to identify VNC segment identity. The only neurons potentially common to all three lines are a pair of bilateral ventral, anterior, medial neurons (arrowheads). Maximum intensity projection of entire CNS shown. Anterior, up; scale bars, 50 mm. Genotypes: R49F02-Gal4 AD R53F07-Gal4 DBD UAS-Chrimson:mVenus (Split1); R49F02-Gal4 AD R53F07-Gal4 DBD Figure 1 continued on next page locomotion (n = 20) never showed Chrimson:Venus expression in the ventral, anterior, medial descending neurons (data not shown). Based on similarity to the 'moonwalker' neuron adult backward walking phenotype (Bidaye et al., 2014), we name this bilateral pair of neurons the 'mooncrawler' descending neurons (MDNa and MDNb), subsequently called MDNs. The MDNs are likely to be excitatory, as they are cholinergic ( Figure 2E). We conclude that activation of as few as two of the four MDNs (either both in the same brain lobe or one in each brain lobe) is sufficient to induce a behavioral switch from forward to backward locomotion.
To determine if a short pulse of MDN activation can trigger one or more backward waves, we provided a brief 300 ms Chrimson activation of MDN and assayed the number of backward waves induced in both intact larvae and fictive CNS. We found that both the intact larvae and fictive CNS invariably performed a backward motor wave in response to a pulse of MDN activation, with the fictive CNS occasionally generating a second wave at variable times during the 25 s after Chrimson activation ( Figure 2F). We next asked, if forced activation of MDNs can induce backward locomotion, perhaps the MDNs are normally active specifically during backward locomotion. To test this hypothesis, we used CaMPARI to monitor MDN activity during forward versus backward locomotion within the intact crawling larva. CaMPARI undergoes an irreversible green-to-red conversion upon coincident exposure to elevated Calcium (i.e. neuronal activity) and 405 nm illumination (Fosque et al., 2015). We used Split2 to express CaMPARI in MDNs and exposed crawling larvae to Number of backward or forward waves in third instar larvae over 15 s with or without Chrimson activation. N = 10 for all genotypes. Genotypes: pBD-Gal4 UAS-Chrimson:mVenus (Empty) and see A-C above for Split1-3 genotypes. (F) Split1, Split2, or Split3 activation induces backward locomotion. Percentage of time performing forward locomotion (green), backward locomotion (magenta) or paused (grey) in third instar larvae over 15 s with or without Chrimson activation. N = 5 for all genotypes. Genotypes, see A-C. (G) Split2 or Split3 silencing reduces initiation of backward locomotion. Backward waves induced by a noxious head poke, with or without active GtACR1. Genotypes: pBD-Gal4 UAS-GtACR1:mVenus (first two bars, n = 20), R49F02-Gal4 AD R53F07-Gal4 DBD tsh-lexA lexAop-killer zipper UAS-GtACR1:mVenus (middle two bars, n = 8), ss01613-Gal4 UAS-GtACR1:mVenus (last two bars, n = 25). (H) Split2 or Split3 neuron silencing stops ongoing backward locomotion. After each larva initiated a backward run (two backward waves), light was used to activate GtACR1 or a no Gal4 control, and the number of backward waves was counted. n = 6 for both groups; each bar represents the average of two trials for the same larva. See G for genotypes. DOI: https://doi.org/10.7554/eLife.38554.003  405 nm illumination for 30 s while larvae moved either backward or forward. We detected little or no activity-induced red fluorescence during forward locomotion, but significant red fluorescence during backward locomotion ( Figure 2G). We conclude that MDNs are active during backward but not forward locomotion.

Identification of MDNs in a serial section TEM reconstruction of the larval CNS
To understand how MDNs induce backward locomotion, we next identified the MDN synaptic partners. To do this, we identified the MDNs in an existing serial section TEM reconstruction of the newly hatched larva . Our first step was to determine the precise morphology of both MDN neurons. We generated individually labeled neurons within the Split2 pattern using MultiColor FlpOut (MCFO) (Nern et al., 2015). These single neurons serve as the 'ground truth' for matching morphological features of individual neurons by light and electron microscopy (Heckscher et al., 2015;Schneider-Mizell et al., 2016). We identified single MDNs in Split2 MCFO preparations based on morphological similarity to the behavior flip-out neurons described in  (Landgraf et al., 2003) ( Figure 3F). Each neuron in the pair share all these features, but the two MDNs can be distinguished from each other by their ipsilateral arbor, which is either linear ( Figure 3C, arrow) or bushy ( Figure 3D, arrowhead). We next searched for the MDNs in the TEM volume using CATMAID (Schneider-Mizell et al., 2016). We found two pair of neurons that showed an excellent morphological match to the MDNs in every distinctive feature ( Figure 3A'-D'); we annotate them as MDNa and MDNb in the TEM volume. Hereafter, we call these neurons simply MDNs due to their similarity in morphology and connectivity (see next section). Importantly, none of the 50 neurons with cell bodies nearest to the MDNs have a similar morphology (data not shown). Thus, we can be certain that the MDNs in the TEM reconstruction are identical to the MDNs visualized by our Split-gal4 lines. This is also confirmed by functional optogenetics (see below). We conclude that the MDNs can be uniquely identified by light microscopy and by TEM. Identification of the MDNs in the TEM volume is a prerequisite for identifying their pre-and post-synaptic partners (next section).

The MDN circuit: three pathways to distinct premotor neurons
Annotation of the MDNs in the TEM reconstruction revealed bilateral arbors in the brain and descending processes to abdominal segments ( Figure 4A). Pre-synapses are restricted to the descending processes ( Figure 4A, green), whereas post-synapses are present in brain arbors and descending processes, suggesting information flow from brain to VNC. A representative MDN output synapse shown in Figure 4B; it is polyadic (multiple postsynaptic neurons clustered around the MDN pre-synapse) and electron dense with associated presynaptic vesicles.
Due to the ability of the MDNs to induce backward locomotion when activated, we focused on identifying MDN post-synaptic partners, with the goal of understanding the relationship between (F) A brief pulse of MDN activity can trigger a backward wave. Intact larvae: individual L3 larvae were subjected to 300 ms of 561 nm light and the number of backward waves was quantified (n = 20). Genotype: ss01613-Gal4 (Split3); UAS-Chrimson::mVenus. Fictive CNS: isolated L3 CNS was subjected to 300 ms 561 nm light and the response of the downstream neuron A18b was monitored for a backward wave of GCaMP6f activity. All MDN activations led to at least one backward wave, but there are also backward waves that occur independently of MDN activation (see Discussion), and these may account for the observed second waves. Genotype: ss01613-Gal4 (Split3)/R94E10-lexA; lexAop-GCaMP6f,UAS-Chrimson:mCherry. (G) MDNs are preferentially active during backward (BWD) not forward (FWD) locomotion in the intact larva. CaMPARI in MDN descending projections within the SEZ of third instar larvae. Top, fluorescence emission following excitation by 488 nm (green) or 561 nm (magenta); bottom, emission from 561 nm imaging alone. Right, quantification of red fluorescence over green fluorescence, mean intensity. Each value represents data from an individual descending projection. See Materials and methods for details. n = 22 for FWD and 19 for BWD. Scale bar, 10 mm. Genotype: R49F02-Gal4 AD R53F07-Gal4 DBD UAS-CaMPARI.   Neuronal skeletons are colored to show post-synapses in the presumptive dendritic arbors of the brain (blue) and pre-synapses in the presumptive axonal descending process (green). Anterior, up. (B) Representative MDN output pre-synapse (blue) onto a post-synaptic Pair1 neuron (pink). (C) MDNs and their partners with the greatest number of synapses (synapse number shown next to connection arrows, and line width is proportional to synapse Figure 4 continued on next page the previously described premotor neuron A27h , both directly and indirectly ( Figure 4C,F,J). Lastly, A18b is a premotor neuron present in all abdominal segments, but it only receives MDN input in segment A1 ( Figure 4C,I). Thus, the MDNs provide mono-and di-synaptic connectivity to premotor neurons. The activity and function of the MDN-A18b and MDN-Pair1 pathways in locomotion will be addressed below; we lack genetic tools to investigate the MDN-ThDN pathway (no known lines for ThDn or A27k, and the A27l line has many off-targets).
There are numerous MDN inputs (an average of 396 post-synapses per MDN neuron) and we have not attempted to reconstruct them; this is beyond the scope of a single paper. However, we note that each MDN has similar inputs. We do not detect mono-synaptic sensory input into the MDNs (data not shown), but based on the role of MDNs in generating a backward crawl in response to a noxious head touch, we predict that there will be, minimally, polysynaptic connections from head mechanoreceptors to the MDNs.

MDNs activate A18b, a backward-active premotor neuron
The MDNs show anatomical connectivity to the A18b premotor neuron, which has not previously been characterized. We identified a LexA line that labels A18b within the VNC (R94E10, subsequently called A18b-LexA) along with a small, variable number of brain and thoracic neurons (Figure 5-figure supplement 1). A18b has local, contralateral projections that match the morphology of A18b in the TEM reconstruction ( Figure 5A), is cholinergic ( Figure 5B), and is connected directly to the dorsal-projecting motor neurons aCC/RP2 and U1/U2 ( Figure 5C) among other motor neurons.
We showed above that MDNs are significantly more active during backward than forward locomotion, raising the question of whether the A18b neurons are also preferentially active during backward locomotion. To answer this question, we performed three experiments. First, we used dual color calcium indicators in a fictive CNS preparation to simultaneously monitor motor neuron activity (GCaMP6m) and A18b activity (jRCaMP1b). We observed robust forward and backward motor waves ( Figure 5D, top), with A18b only active during backward motor waves, not forward motor waves ( Figure 5D, bottom; quantified in Figure 5E). Second, we performed dual color calcium imaging within intact larvae, and again observed that A18b was only active during backward motor waves ( Figure 5D;quantified in Figure 5E). Third, we used CaMPARI within intact larvae to determine if A18b was preferentially active during backward locomotion. We expressed CaMPARI in A18b and tested for activity-induced green-to-red photoconversion during either forward locomotion or backward locomotion. We found that illumination during forward locomotion generated minimal CaM-PARI red fluorescence, whereas illumination during backward locomotion resulted in a significant increase in CaMPARI red fluorescence ( Figure 5F). We call the A18b neuron backward-active rather than backward-specific because we do not know its pattern of activity in rolling or other larval behaviors. We conclude that A18b neurons are preferentially active during backward not forward locomotion.
To determine if MDNs activate A18b, we used Split1 to express Chrimson in MDNs and A18b-lexA to express GCaMP6f in A18b in fictive preparations. MDN stimulation led to a significant increase in GCaMP6f fluorescence in A18b, and this was not observed in controls lacking all-trans  Figure 5G). Interestingly, MDN activation triggered a backward wave of A18b activity from A2 to A6 ( Figure 5G). We propose that MDN activates A18b in segment A1, which is the only segment we detect direct synaptic contacts, and this is transformed into an anterior-to-posterior wave of A18b activity.
We showed above that A18b has direct synaptic connectivity to motor neurons and is cholinergic, indicating that is likely to be an excitatory pre-motor neuron. Consistent with this expectation, we observed co-activity of A18b and motor neurons during backward motor waves in fictive preparation ( Figure 5H), and A18b stimulation led to a significant increase in GCaMP6f fluorescence in motor neurons, which was not observed in controls lacking ATR ( Figure 5I).
We wanted to test whether activation of A18b in segment A1 could induce backward waves of motor neuron activity. Unfortunately, the A18b-Gal4 line is not expressed in A1 (only A2-A7), precluding this experiment; moreover, it has 'off-target' expression in the brain and in the VNC; these off-target neurons do not prevent monitoring A18b activity because they do not overlap with A18b arbors, but they make it impossible to selectively activate or silence A18b. In conclusion, our data support the following model: MDN activates A18b in segment A1, which initiates a coordinated anterior-to-posterior wave of A18b/motor neuron activity that drives backward locomotion.

MDNs activate Pair1, a backward-active descending interneuron
Connectomic data shows that MDNs have many synapses with the bilateral Pair1 neurons, which send a descending projection to the VNC where they form synapses with A27h in posterior abdominal segments. A27h neurons are only active during forward locomotion (Fushiki et al., 2013). This leads to the hypothesis we test below: MDNs activate Pair1 to inhibit A27h, which terminates forward locomotion.
To determine if MDNs activate Pair1 we used Split1 to express Chrimson in MDNs, and R75C02-lexA (hereafter Pair1-lexA) ( Figure 6A) to express GCaMP6f specifically in Pair1. Stimulation of MDNs led to a significant increase in Pair1 GCaMP6f fluorescence, and this was not observed in controls lacking ATR ( Figure 6B). We conclude that the MDNs activate Pair1 neurons. In addition, we observed that every time MDNs were active, the Pair1 neurons were co-active (n = 5; Figure 6C), although Pair1 could be active alone (n = 5; Figure 6-figure supplement 1). We conclude that MDNs activate the Pair1 neurons, and that other mechanisms exist for activating Pair1 as well (see Discussion).
We next used two methods to determine whether Pair1 neurons are preferentially active during backward locomotion. First, we used GCaMP6m to simultaneously monitor Pair1 and motor neuron activity in a fictive CNS preparation; this is possible because Pair1 and motor neuron processes are GCaMP6m in U1-U5 motor neurons (green). In fictive preparations, A18b and motor neurons are co-active during backward waves. Both show similar initiation of activity, but A18b peak activity precedes motor neuron peak activity (vertical lines). Data are acquired every 168 ms from eight A18b/motor neuron pairs from three animals; peak activity of the motor neurons followed that of A18b by 0 ms (two pair), 168 ms (four pair), or 336 ms (two pair). Dashed lines, individual neurons; solid lines, average. Genotype: CQ-lexA/+; lexAop-GCaMP6m/R94E10-Gal4 UAS-jRCaMP1b.'. (I) A18b is an excitatory pre-motor neuron. A18b expresses Chrimson and aCC/RP2 motor neurons express GCaMP6f. Left: DF/F 0 traces of GCaMP6f before and after 561 nm Chrimson activation (red bar) of three aCC/RP2 axons/dendrites within an animal. Solid bars represent means and shaded regions represent standard deviation from the mean (SDM). ATR +is shaded in green and ATR-in grey. Five animals were used in each group. GCaMP6f signal was not acquired during the Chrimson activation (dashed lines); t-test analysis for the first DF/F 0 value after Chrimson activation between +ATR and -ATR showed significance (p=0.0071). Right: images of motor neuron GCaMP6f fluorescence pre-and post-Chrimson activation in ATR +and ATR-larvae. Genotype:  Figure 6D; left, center). In cases where Pair1 activity is coupled with motor neuron activity, we find that Pair1 activity precedes motor neuron activity ( Figure 6D, right). Second, we expressed CaM-PARI in Pair1 neurons and performed photoconversion during forward locomotion or backward locomotion. We found that illumination during forward locomotion generated a small amount of red fluorescence, whereas illumination during backward locomotion resulted in a significant increase in red fluorescence ( Figure 6E). Taking all our anatomical and functional data together, we conclude that MDNs activate the A18b and the Pair1 neurons, which are both active during backward but not forward locomotion.

Pair1 inhibits the A27h premotor neuron, arrests forward locomotion, and facilitates MDN-mediated backward locomotion
We confirm previous work  showing that A27h is active during forward not backward locomotion (Figure 7-figure supplement 1). This raises the interesting possibility that the MDNs coordinately switch locomotor behavioral states: concurrently promoting backward locomotion via A18b, and suppressing forward locomotion via Pair1 inhibition of A27h.
To test whether Pair1 inhibits the A27h neuron, we expressed Chrimson in Pair1 and GCaMP6m in A27h. We used Chrimson to stimulate Pair1 just as A27h activity was rising as part of a forward motor wave, and observed a significant decrease in A27h GCaMP6m fluorescence; this was not observed in controls lacking ATR ( Figure 7A,B). Furthermore, we found that Pair1 neurons are GABAergic ( Figure 7A''), consistent with Pair1 direct repression of A27h activity. In addition, we found that Chrimson stimulation of Pair1 immediately and persistently blocked forward larval locomotion; control larvae lacking ATR briefly paused in response to illumination onset but rapidly resumed forward locomotion ( Figure 7C; Videos 3 and 4). Consistent with an inhibitory relationship, we observed that Pair1 and A27h activity is anti-correlated, with A27h often rising in activity as Pair1 declines in activity (Figure 7-figure supplement 1). We conclude that activation of the GABAergic Pair1 neurons inhibit A27h and prevent forward locomotion.
Our results suggest that Pair1 suppression of forward locomotion may be an essential component of MDN triggering a switch from forward to backward locomotion. If so, silencing Pair1 activity should reduce the effectiveness of MDN-induced backward locomotion; alternatively, MDN may be able to induce backward locomotion equally well without Pair1 function. Thus, we expressed Chrimson in MDNs and the neuronal silencer Shibire ts in Pair1; Shibire ts blocks vesicle release at 32˚C but not at 25˚C (experiment summarized in Figure 7D). We observed that silencing Pair1 alone had no effect on forward locomotion ( Figure 7E,i-ii), but silencing Pair1 prior to low light or high light Figure 6 continued green and ATR-in grey. Six animals were used for ATR +and five for ATR-. GCaMP6f signal was not acquired during the Chrimson activation (dashed lines); t-test analysis for the first DF/F 0 value after Chrimson activation between +ATR and -ATR showed significance (p=0.0004). Bottom: images of Pair1 GCaMP6f fluorescence pre-and post-Chrimson activation in ATR +and ATR-larvae. Genotype: R49F02-Gal4 AD /R75 C02-lexA; R53F07-Gal4 DBD /lexAop-GCaMP6f UAS-Chrimson:mCherry. (C) MDN and Pair one are co-active. Top: MDN and Pair1 expressing GCaMP6m in different regions of the neuropil, and show concurrent activity. Bottom: MDNs (white arrowhead) and Pair1 (yellow arrowhead) show similar timing of GCaMP6m fluorescence during a BWD wave. Anterior, up; midline, right side of panel. MDN and Pair1 co-activity was observed in 5 out of 10 brains examined; the other five brains showed Pair1 activity but no MDN activity (see Figure 6-figure supplement 1). Genotype: ss01613-Gal4/UAS-GCaMP6m; R75C02-Gal4. (D) Pair1 is active during backward (BWD) but not forward (FWD) waves in fictive preparations. Left: Pair1 GCaMP6m activity (bottom) and motor neuron activity (top) during fictive BWD and FWD waves in the same animal. Pair1 is not active during FWD waves. Center: quantification. N = 53 BWD waves from seven different animals, and 14 FWD waves from four different animals. Right: Pair1 GCaMP6m activity (arrowheads) precedes U1-U5 motor neuron activity (circled). Genotype: CQ-lexA/UAS-GCaMP6m; lexAop-GCaMP6m/R94E10-Gal4. (E) Pair1 is preferentially active during backward locomotion in the intact animal. CaMPARI was expressed in Pair1 and photoconversion was activated during FWD or BWD locomotion in intact third instar larvae. There is significantly more CaMPARI photoconversion during BWD locomotion. Graph, quantification of red fluorescence over green fluorescence mean intensity. Triangle or square, data from an individual axon. n = 36 for FWD and 34 for BWD. Scale bar, 10 mm. Genotype: R75C02-Gal4 UAS-CaMPARI..   Figure 7E,iii-vi). We conclude that MDN triggers robust backward locomotion by coordinately activating the backward locomotion program and suppressing the forward locomotion program; we find no evidence for direct, monosynaptic reciprocal inhibition between these pathways (Figure 7-figure supplement 1).

MDNs persist through metamorphosis and induce backward walking in adults
Larval MDNs share several features with the moonwalker descending neurons characterized in the adult (Bidaye et al., 2014;Sen et al., 2017). Both larval and adult neurons have anterior, medial somata with ipsilateral and contralateral arbors, and descending projections into the VNC. Both have presynaptic output into the SEZ and VNC. Could they be the same neurons? We tried to trace the MDNs through pupal stages using the Split1-Gal4 and observed the MDNs at early pupal stages Figure 7 continued (B') DF/F 0 was significantly inhibited in ATR +animals relative to ATR-controls. A total of 26 events from seven animals were averaged for ATR +and 16 events from four animals for ATR-group. See Materials and methods for further details. Genotype: R75C02-lexA/+; lexAop-Chrimson:mCherry/R36 G02-Gal4, UAS-GCaMP6m.. (C) Activation of Pair1 halts FWD locomotion for the duration of neuronal activation. Top, time-lapse images of ±ATR larvae expressing Chrimson in Pair1 neurons before and during light stimulation. Bottom left, backward and forward wave number over 15 s without Chrimson activation (Off) or during Chrimson activation (On) in third instar larvae. n = 12 for all groups. Bottom right, percent time performing forward locomotion (green), backward locomotion (magenta) or not moving (grey) over 15 s without Chrimson activation (Off) or during Chrimson activation (On) in third instar larvae. n = 5 for all groups. Genotype: R75C02-Gal4 UAS-Chrimson:mVenus.. (D) Schematic illustrating the experiment in (E). Arrows, excitatory connections; T-bar, inhibitory connection; line width proportional to synapse number. (E) Pair1 activity is necessary for efficient Chrimsoninduced backward locomotion. Chrimson was expressed in MDNs, and shibire ts was expressed in Pair1 neurons. Low (0.07 mW/mm 2 ) or high (0.275 mW/mm 2 ) light intensities were used to induce MDN activity; a temperature shift to 32˚C was used to inactivate Shibire ts and thus silence Pair1 neurons. Silencing of Pair1 alone had no detectable phenotype (i, ii). Silencing Pair1 decreased the efficacy of MDN-induced backward locomotion at low or high light levels (iii-vi). Genotypes: R49F02-Gal4 AD R53F07-Gal4 DBD UAS-Chrimson:mVenus pBD-lexA lexAop-Shibire ts (i, iii and v) and R49F02-Gal4 AD R53F07-Gal4 DBD UAS-Chrimson:mVenus R75C02-lexA lexAop-Shi ts1 (ii, iv and vi).   Figure 8A) and mid-pupal stages, where they began to prune their dendritic arbors ( Figure 8B). However, Split1 was down-regulated by adulthood (data not shown), requiring us to use alternate methods to follow the larval MDNs into adulthood. To permanently mark the larval MDN neurons, trace their morphology, and test their gain-offunction phenotype in the adult brain, we used two distinct intersectional genetic methods. First, we generated an intersection between a larval MDN line and an adult MDN line to express the optogenetic activator ReaChr (genetics schematized in Figure 8C). If the larval MDNs become adult moonwalker neurons, they will express ReaChr:citrine and show light-induced backward walking. We observed light-induced backward walking in 8 of 10 adult flies assayed ( Figure 8D; Video 5); all eight had ReaChr::citrine expression in neurons matching the moonwalker neuron morphology ( Figure 8E,F), whereas the two flies that did not walk backward also did not have ReaChr:citrine expression in moonwalker neurons (data not shown). Second, we used 'immortalization' genetics (Harris et al., 2015) to permanently mark larval MDNs and assay their function in the larva and adult (genetics schematized in Figure 8G). We used Split1 to express an RU486-inducible FLP recombinase (hPR:FLP), allowing us to chemically induce FLP activity in first instar larva when Split1 is only expressed in the MDNs and a few off-targets. FLP activity resulted in permanent expression of lexA in the MDN neurons, which immortalizes expression of LexAop-Chrimson:Venus in these neurons. We identified larvae that crawled backward in response to Chrimson activation, and all grew into adults that showed Chrimson-induced backward walking (n = 20; Figure 8H). Importantly, all the backward walking adults that were successfully stained showed expression in the adult moonwalker neurons (n = 5; Figure 8I,I'); although each brain showed staining in a few additional neurons (blue shading), only the MDNs were present in all the brains.
We conclude that the larval MDNs are descending neurons that are born embryonically, persist throughout larval stages, and survive into the adult. Surprisingly, activation of MDNs can induce backward crawling in the limbless larva, as well as backward walking in the six-limbed adult ( Figure 9A). How much of the MDN larval circuitry persists into the adult is an interesting open question (see Discussion).

Discussion
We have shown that MDNs are brain descending interneurons that activate two neuronal pathways: one to stop forward locomotion and one to induce backward locomotion ( Figure 9B,C). This is similar to C. elegans, where in response to a head poke the ASH sensory neuron activates AVA, a command neuron for backward locomotion (Lindsay et al., 2011), and indirectly inhibits AVB, a command neuron for forward locomotion (Roberts et al., 2016), although AVB inhibition may also arise from reciprocal inhibition between AVA and AVB. It is also similar to the role of the eighth nerve in simultaneously exciting the ipsilateral Mauthner neuron while inhibiting, via a feed-forward inhibitory neuron, the contralateral Mauthner neuron (Koyama et al., 2016). Our results raise the question of whether previously described command-like neurons in Drosophila (Bidaye et al., 2014;King and Wyman, 1980;Sen et al., 2017), leech (Kristan, 2008), lamprey (Dubuc et al., 2008), zebrafish (Kimura et al., 2013;Medan and Preuss, 2014), mouse (Bouvier et al., 2015;Grillner and El Manira, 2015;Hägglund et al., 2010;Jordan et al., 2008;Juvin et al., 2016;Roberts et al., 2008) and other animals may not only induce a specific behavior, but concurrently inhibit an antagonistic or incompatible behavior.
MDNs can induce backward locomotion within intact larvae or isolated CNS. In each case, a pulse of Chrimson activation as short as 300 ms can induce a full, multi-second long backward wave, suggesting that MDN activity triggers a backward wave without persisting throughout the wave. These results are consistent with detection of MDN-A18b synapses only in segment A1, and support our  Figure 9 continued on next page conclusion that MDNs trigger but do not persist throughout, a backward wave. Noxious stimuli that produce multiple waves of backward locomotion are likely to continuously activate MDNs.
We do not know how sensory stimulation of MDNs produce a bilateral backward motor wave. It may be that noxious sensory stimuli typically activate both left/right MDNs. Alternatively, there is a single contralateral synapse in both directions between A18b left/right neurons in A1, and the number could increase with the age of the larva. Perhaps, the single synapses between contralateral A18b neurons transform unilateral MDN activation into bilateral motor waves. Lastly, unilateral MDN activation may produce bilateral A18 activation via uncharacterized contralateral neurons.
MDNs are necessary for a normal backward locomotor response following mild noxious touch to the head. It is unclear how the tactile sensory cue is transduced to the MDNs: we find no monosynaptic sensory inputs to the MDNs in the current TEM connectome (data not shown). It is also unknown whether MDNs are used for backward crawling in response to other noxious sensory modalities, such as high salt, bright light, or bitter taste. MDNs may be dedicated to responding to noxious mechanosensation, or they may integrate multimodal inputs to initiate backward locomotion.
The discovery of MDN command-like neurons that switch locomotion from forward to backward raises the question: are there command-like neurons that induce the opposite transition: from backward to forward locomotion? Whereas the MDN descending projection extends to A3-A5, and thus well past the thoracic and upper abdominal segments that initiate backward locomotion (Berni, 2015;Heckscher et al., 2012;Pulver et al., 2015), a descending command-like neuron that induces forward locomotion is likely to project into the posterior abdominal segments, where forward waves are initiated (Berni, 2015;Heckscher et al., 2012;Pulver et al., 2015). Exploring the function of the latter type of descending neuron would help answer this question, as would the characterization of inhibitory inputs into the Pair1 or A18b backward-active neurons.
Our model is that the activation of A18b in A1 induces backward locomotion. This model is based on several observations. (1) A18b is only active during backward locomotion. (2) MDN forms excitatory synapses on A18b in A1 but not more posterior segments. (3) Stimulation of MDN produces an A18b backward activity wave. (4) The A18b backward wave is always concurrent with a motor neuron backward wave. Unfortunately, we are unable to directly test the function of A18b in triggering backward locomotion due to the A18b Gal4 line having off-target expression in the brain and in the VNC, and lacking expression in A1 or thoracic segments ( Figure 5-figure supplement 1). Backward motor waves are initiated from the thorax (Pulver et al., 2015), and it is likely that stimulation of A18b in A1 or thoracic segments would be required to induce a backward motor wave. We attempted to find A18b in the thoracic segments, but failed, either due to incomplete annotation, segmental differences in morphology, or lack of thoracic A18b neurons. Similarly, the A02o 'wave' neuron can only induce backward motor waves following stimulation in anterior abdominal segments (Takagi et al., 2017). The relationship between A18b and A02o is unclear (they are not directly connected), nor is it known how activation of either produces a backward motor wave. This level of understanding would require a comprehensive anatomical and functional analysis of larval premotor and motor circuits.
We propose that MDNs directly excite Pair1 neurons to halt forward locomotion. But there are also additional mechanisms to induce Pair1 activity, as many Pair1 activity bouts occur without MDN activity. These alternate mechanisms are likely to be used for Pair1-induced pausing that is not followed by backward locomotion, for example during a pause-turn behavior. The MDN-independent inputs that activate Pair1 remain to be discovered. To initiate backward locomotion, MDNs activate Pair1 descending neuron which inhibits the forward-active A27h premotor neuron in segments A5-A7 to halt forward locomotion. MDNs also activate A18b in A1 and/or in more anterior segments which triggers a backward motor wave. DOI: https://doi.org/10.7554/eLife.38554.020

Electron microscopy and CATMAID
We reconstructed neurons in CATMAID using a Google Chrome browser as previously described . Figures were generated using CATMAID graph or 3D widgets.

Chrimson and GtACR behavioral experiments
Embryos were collected for 4 hr on standard 3.0% agar apple juice collection caps with a thin layer of wet yeast, and transferred to standard cornmeal fly food supplemented with 0.5 mM all-trans retinal at 48 hr after collection. Following another 48 hr (96 ± 6 hr larval age), animals were collected and transferred to 3.0% agar apple juice caps and relocated to the room were behavioral data was collected. Five minutes after acclimation to the room, one animal at a time was transferred to of 3.0% agar apple juice square arenas, 2 cm thick with an area of 81.0 cm 2 , and crawling was then recorded at 5 Hz using an Axiocam 506 mono under low transmitted light from below for 15 s follow by 15 s under 0.275 mW/mm 2 561 nm green light. For the intact larvae experiment in Figure 2F, a 300 ms pulse of 0.275 mW/mm 2 561 nm green light was followed by 5 s of recording in the absence of green light. For the fictive CNS experiment in 2F, a 300 ms pulse of 561 nm green light was followed by 25 s of recording in the absence of green light. Temperature of the room was kept at 24 ± 2C˚. Number of forward waves and backward waves, and percent of time engaged in either forward, backward or paused were quantified using the recorded movies. Behavioral data was acquired, given an unique identifier, and scored blind; except Figure 7E, where it was a binary assay (forward wave/backward wave) that did not require blind scoring. Unpaired Student's t-test was performed to determine significance in the number of waves over 15 s.
The Chrimson together with Shibire silencing experiment ( Figure 7D-E) was performed as the Chrimson only experiments described above except that the agar arena was placed on top of a heating plate which was kept at 25C˚or at 32C˚for Shibire Off or On groups respectively. Animals were individually placed on the arena. After 1 min to reach the desired temperature, we manually quantified the number of forward and backward waves with no light, under 0.07 mW/mm 2 green light or 0.275 mW/mm 2 green light.
For GtACR1 experiments ( Figure 1G-H), instead of square arenas, animals were placed into a 0.75 mm wide agar lane to limit their movement to forward or backward locomotion only. To quantify backward wave probability ( Figure 1G) larvae were gently poked in the most anterior part of their body and scored whether the animal responded with backward crawling (regardless of how many backward peristaltic waves). We then calculated the probability by dividing the number of times the animal began backward crawling immediately after a poke by the total number of times that each animal was poked, which was always five times. For each animal, this was done with no light first and then under 0.96 mW/mm 2 561 nm green light. We performed one-way ANOVA with Bonferroni post-hoc test between light ON groups. For panel 1H, we induced a backward run and turned on the 0.96 mW/mm 2 green light immediately after the second backward wave. We define a backward run as two or more consecutive backward peristaltic waves after being poked in the most anterior part of the animal. We scored how many backward waves animals performed after the light was turned on.

Calcium imaging
For dual-color and single-color calcium imaging in fictive preps, freshly dissected brains were mounted on 12 mm round Poly-D-Lysine Coverslips (Corning BioCoat) in HL3.1 saline, which were then were placed on 25 mm Â75 mm glass slides to be imaged with a 40 Â objective on an upright Zeiss LSM-800 confocal microscopy. To do calcium imaging in intact animals (e.g. Figure 5D'), a second or third instar larva was washed with distilled water, then moved into a drop of halocarbon oil 700 (Sigma, St. Louis, MO) on the slide. A 22 mm Â 40 mm cover glass was put on the larva and pressed gently to restrict larval locomotion. The larva was mounted ventral side up so that the ventral nerve cord could be imaged using 40 Â objective on an upright Zeiss LSM800 confocal microscope. To simultaneously image two different neurons expressing GCaMP, we imaged neuronspecific regions of interest (ROI). In addition, we imaged two neurons using neuron-specific GCaMP6m and jRCaMP1b. Image data were imported into FijI (https://imagej.net/fiji) and GCaMP6m and jRCaMP1b channels were separated. The DF/F 0 of each ROI was calculated as (F-F 0 )/ F 0 , where F 0 was averaged over~1 s immediately before the start of the forward or backward waves in each ROI.

Functional connectivity assays
Freshly dissected brains were mounted in HL3.1 saline as described above, with the exception that the dissection was done under the minimum level of light possible to prevent activation of Chrimson. GCaMP6m or GCaMP6f signal in postsynaptic neurons were imaged using 2-4% power of the 488 nm laser with a 40 Â objective on an upright Zeiss LSM800 confocal microscope. Chrimson in presynaptic neurons was activated with three pulses of 561 nm laser at 100% power delivered via the same 40 Â objective using the bleaching function in the ZEN Zeiss software. The total length of the pulses carried was depend on the ROI size which was kept consistent across ATR +and ATR-samples within an experiment. For A18b activation ( Figure 5I), the light pulse was 700 ms; for activation of MDN ( Figure 6B) or Pair1 ( Figure 7B), the light pulse was 440 ms. To quantify DF/F 0 traces we used MAT-LAB. Before extracting any fluorescence, our script first performs rigid registration to correct for movement while recording. F 0 was set as the average fluorescence of the three frames acquired before each Chrimson stimulus analyzed. For predicted excitatory connections ( Figures 5I and  6B), we first average DF/F 0 traces for two consecutive 561 nm Chrimson stimuli separated by 20 488 nm acquisition frames. This was enough time to let GCaMP6f levels return to ground state. For predicted inhibitory connections ( Figure 7B), we gave multiple 440 msec Chrimson stimuli separated by 5 s. After recording, we then selected all events where the start of the Chrimson stimulus coincided with an A27h forward activity wave, which was necessary to elevate the GCaMP6m levels sufficiently to see subsequent Chrimson-induced inhibition. We selected the A27h segmental neuron with the highest mean fluorescent intensity in the frame before the Chrimson stimulus from segments A4-A7 (where Pair1 synapses with A27h). For all Chrimson experiments, traces were averaged across animals.

CaMPARI experiments
Larvae were collected 96 hrs days after egg laying and place in agar apple collection caps for at least 5 min to acclimate animals to the environment. Using a soft brush, larvae were placed into a 0.75 mm wide agar lane to limit their movement to forward or backward locomotion only. We let the animals start crawling forward for at least 5 s in the lanes. For forward data collection, the photoconverting 405 nm light was turned on at 0.5 mW/mm 2 while the larvae crawled forward for 30 s. For backward, same light was turned on and backward locomotion was immediately induced by gentle touch on the most anterior part of the larva with a semi-blunt pin. Brains were dissected in HL3.1, then green and red CaMPARI signals were imaged with a 40 Â objective on Zeiss LSM-800 confocal microscope in the regions of interest. ROIs were manually selected using the green channel. Fluorescence within ROIs were quantified using Image J.
Adult behavioral intersectional experiment ( Figure 8C,D,F) After eclosion adults were transferred to standard cornmeal fly food supplemented with ATR (0.5 mM) for 4 days changing to fresh food after two days. Wings were clipped and animals were placed in ring arenas made of 3.0% agar apple juice. The ring arena size was 1.4 cm outer diameter, 1.0 cm inner diameter and 0.2 cm height. After 5 min for environmental acclimation, animal behavior was recorded at 5 Hz using an Axiocam 506 mono under low transmitted light for 10 s followed by 10 s under 0.28 mW/mm 2 red light. This was done three times for each animal. To quantify backward locomotion probability upon light stimulus, we divided the amount of times the animal began backward walking within 2 s after light stimulus over the total number of times the animals was presented with light. To calculate significance, we used Student's t-test unpaired analysis.
Adult behavior immortalization with RU486 experiment ( Figure 8G-I) Adult flies were allowed to lay eggs on standard culture medium that was supplemented with 1 mM RU486 and 2 mM ATR. After 24 hr, light-induced backward crawling larvae were transferred to culture medium supplemented with 2 mM ATR and grown to adulthood. Two-to 6-day-old adult flies were individually transferred into a 10-ml serological pipette for walking assay. Red-orange light from a 617 nm high-power LED was fiber-coupled to a 200 mm core optical cable that was triggered via a T-Cube LEDD1B driver (ThorLabs, Newton, NJ). Optogenetic stimulation was measured via a photodiode power sensor (S130VC, ThorLabs) to be~4.6 mW/mm 2 . We performed the same analysis for the intersectional experiment (above) to quantify backward locomotion probability upon light stimulus.