Regulation of forward and backward locomotion through intersegmental feedback circuits in Drosophila larvae

Animal locomotion requires spatiotemporally coordinated contraction of muscles throughout the body. Here, we investigate how contractions of antagonistic groups of muscles are intersegmentally coordinated during bidirectional crawling of Drosophila larvae. We identify two pairs of higher-order premotor excitatory interneurons present in each abdominal neuromere that intersegmentally provide feedback to the adjacent neuromere during motor propagation. The two feedback neuron pairs are differentially active during either forward or backward locomotion but commonly target a group of premotor interneurons that together provide excitatory inputs to transverse muscles and inhibitory inputs to the antagonistic longitudinal muscles. Inhibition of either feedback neuron pair compromises contraction of transverse muscles in a direction-specific manner. Our results suggest that the intersegmental feedback neurons coordinate contraction of synergistic muscles by acting as delay circuits representing the phase lag between segments. The identified circuit architecture also shows how bidirectional motor networks could be economically embedded in the nervous system.

A xial locomotion, where muscle contractions propagate along a chain of body segments, is a prevalent mode of motor outputs in bilateral animals. This motor pattern includes crawling, swimming, and walking in vertebrates and invertebrates [1][2][3][4] . Axial propagation of motor activity is also observed in back muscles during human walking 5 . In general, axial locomotion possesses the following organizational properties. (1) Intersegmental coordination: for the entire body to produce coherent behavioral outputs, motor activities have to propagate along a chain of segments in a phase-coupled manner 1,2,6 . (2) Muscle synergy: to enable efficient recruitment of a large number of muscles in the body during axial or other types of movements, groups of muscles with similar functions are thought to be activated in a modular manner [7][8][9] . (3) Bidirectionality: while some animals move only in the forward direction, many animals including nematodes, lampreys, and tadpoles, also move in the backward direction by reversing the propagation of motor activity [10][11][12][13][14] .
In spite of intensive studies on each of these regulations in crustacean, leech, lamprey, fish, tadpole, and salamander among others [1][2][3][4][5][6] , how these regulations are integrated to generate dynamic and orchestrated motor outputs during axial locomotion remains incompletely understood. Neuronal sub-circuits implementing each of these regulations likely converge in a larger circuit to generate a coherent sequence of axial movements. However, little is known about the mechanism of how the intersegmental propagation of motor activity is coupled to coordinated activation and inhibition of synergistic muscles in adjacent segments. Little is also known about the mechanism of how bidirectional sub-circuits generate flows of neural activity that recruit similar groups of muscles in opposite directions. Dedicated subnetworks including both interneurons and motor neurons (MNs) are known to actuate forward and backward locomotion in the unsegmented Caenorhabditis elegans 13 . However, such a circuit configuration would increase the number of component neurons and the complexity of the circuits.
Drosophila larvae provide an excellent model system for genetically dissecting the neural networks controlling axial locomotion 15,16 . The larvae normally locomote by forward crawling, in which segmental muscle contraction and the corresponding motor activity in the central nervous system (CNS) is propagated from the posterior to anterior body segments 12,17,18 . The larvae also exhibit backward crawling, in which largely the same sets of muscles in each segment are activated, but in the opposite direction from the anterior to posterior. Two major groups of antagonistic muscles are present in each body segment: longitudinal muscles whose activation leads to longitudinal contraction of the segment, and transverse muscles whose activation induces circumferential contraction 12,19 . During both forward and backward locomotion, these two groups of muscles are sequentially contracted in each segment, with the longitudinal muscles being activated first 12 . The relative timing (phase) of the activation of the two groups of muscles is synchronized both intrasegmentally and intersegmentally at varying cycle periods 20 . Furthermore, the phase-constancy is maintained during fictive locomotion in an isolated CNS 18 . These results suggest the presence of central pattern generators that intersegmentally and bidirectionally regulate the coherent activation of the two groups of muscles.
In this study we combined electron microscopy (EM) circuit mapping and functional analyses to identify the neural network that underlies this coordination. The core elements of the network are two bilateral pairs of 2nd order premotor interneurons in each abdominal segment. Each of the paired neurons is specifically activated in forward or backward locomotion, respectively, and through intersegmental feedback provides delayed excitation to the adjacent posterior or anterior neuromere. By linking sub-circuits regulating intersegmental activity propagation and synergistic muscle control in a direction-specific manner, these neurons realize intersegmentally coordinated activation of synergistic muscles. They share a group of premotor interneurons as their postsynaptic partners, which in turn connect with groups of antagonistic muscles in a cooperative manner, demonstrating how neural networks coordinating a bidirectional flow of neural activity could coexist in the CNS.

Results
Bidirectional feedback connections in the premotor circuits. In each abdominal hemi-segment of Drosophila larvae, two major groups of antagonistic muscles, longitudinal muscles, and transverse muscles, are innervated by distinct sets of motor neurons (Fig. 1a). Previous studies identified several groups of segmental premotor interneurons that are active during forward/backward locomotion 15,[20][21][22][23][24][25][26][27][28] , including the PMSIs (period-positive median segmental interneurons) 22 . Since PMSIs in each neuromere are sequentially activated in a phasic manner both during forward and backward waves (see below), we reasoned that key regulatory neurons of intersegmental coordination should be present in the common upstream circuits of these neurons. We therefore used reconstructions from a serial section transmission electron microscopy (ssTEM) image data set of an entire first instar larval CNS 29,30 to investigate the upstream circuits of PMSIs. We first identified in the ssTEM images, two PMSIs, A02e and A02g ( Fig. 1b-d), which form synapses to MNs locally in the same segment ( Supplementary Fig. 1A-F. For details on the characterization of PMSIs see Supplementary Methods and Supplementary Fig. 1). We then reconstructed the presynaptic neurons of A02e and A02g, and identified Ifb-Fwd and Ifb-Bwd as the only common upstream neurons (Fig. 1e-h and Supplementary  Fig. 2), except for the DnB (Down and back) neuron, which had been previously shown to be involved in the regulation of nociceptive escape behaviors 31 . Interestingly, as detailed below, we found that Ifb-Fwd and Ifb-Bwd form symmetric intersegmental feedback circuits (Fig. 2). Furthermore, Ifb-Fwd and Ifb-Bwd were only active during forward and backward motor propagation, respectively (Fig. 3). These observations suggested that these 2nd order premotor interneurons play reciprocal roles in the regulation of bidirectional locomotion.
Ifb-Fwd receives inputs in the dendrites located in the same neuromere as the cell body and projects its axon to the next posterior neuromere to innervate A02e and A02g of that subsequent neuromere, as revealed by the circuit mapping from EM ( Fig. 2a-c) and single cell analyses (Fig. 2d, e). Ifb-Fwd expresses a cholinergic marker choline acetyltransferase (ChAT) (Fig. 2f), suggesting that Ifb-Fwd forms excitatory synapses on A02e 32 . Dual-color calcium imaging of Ifb-Fwd and A02e showed that Ifb-Fwd is activated during forward but not backward fictive locomotion (Fig. 3a-c. Correlation coefficients between Ifb-Fwd and A02e are 0.82 ± 0.07 (64 waves) in forward waves and −0.02 ± 0.06 (8 waves) in backward waves (p = 2.6 × 10 −42 , the twosided Student's t-test, n = 8 larvae)). We named this neuron Ifb-Fwd (intersegmental feedback during Forward propagation) because the neuron is specifically active during the forward activity propagation (Fig. 3a-c) and sends signals back to the posterior neuromere in the opposite direction to wave propagation ( Fig. 2a-f). The circuit configuration and temporal profile of its activity is consistent with Ifb-Fwd having roles in intersegmental coordination of motor activity.
Similar analyses showed that Ifb-Bwd was the counterpart of Ifb-Fwd but during backward locomotion, as follows. Ifb-Bwd received inputs in dendrites present in the same segment as the cell body and projected its axon to the adjacent anterior segment to innervate PMSIs ( Fig. 2g-k). Like Ifb-Fwd, Ifb-Bwd expressed ChAT and thus is likely excitatory (Fig. 2l). Ifb-Bwd was activated during backward but not forward locomotion ( Fig. 3e-g. Correlation coefficients between Ifb-Bwd and A02e are 0.23 ± 0.18 (10 waves) in forward waves and 0.75 ± 0.18 (19 waves) in backward waves (p = 7.3 × 10 −8 , the two-sided Student's t-test, n = 3 larvae)). We therefore named it Ifb-Bwd (Intersegmental feedback neuron in Backward propagation). The morphology and activity of Ifb-Fwd and Ifb-Bwd neurons are summarized in Fig. 3d, h.
Ifb-Fwd and Ifb-Bwd neurons share postsynaptic neurons. The circuit configuration of Ifb-Fwd and Ifb-Bwd neurons, where a segment receives feedback signals from the next segment that is activated later in propagation, suggests that these neurons provide delayed excitatory inputs to the adjacent neuromere during wave propagation. We therefore wondered whether these neurons also target other premotor neurons, beyond the PMSIs, to regulate their timely activation during axial locomotion. To test this possibility, we extended the circuit mapping from EM to the downstream circuits of Ifb-Fwd and Ifb-Bwd ( Fig. 4a-d). The analyses revealed that these two neurons intersegmentally share a number of postsynaptic target interneurons ( Fig. 4e and Supplementary Fig. 3A), including premotor interneurons (Fig. 5d), further supporting the notion that they play reciprocal roles in bidirectional locomotion. Also, Ifb-Fwd and Ifb-Bwd were major sources of inputs to these common target neurons (Supplementary Fig. 3B). We found five common target interneurons in addition to the two glutamatergic and putatively inhibitory PMSIs A02e and A02g described above (and an MN LT1). Two of the five common neurons, A01c and A03g, appeared to be cholinergic and thus excitatory, and one, A14b, was putatively GABAergic and thus inhibitory (Fig. 4e, f). Interestingly, the axons of Ifb-Fwd and Ifb-Bwd overlapped in a restricted region in each neuromere, and the dendritic arbors of the seven common target neurons extended toward this restricted region in various directions (Supplementary Fig. 4; see below), which may represent a functional domain for information processing (see Discussion section).
The downstream circuits synergistically innervate MNs. Since Ifb-Fwd and Ifb-Bwd neurons likely convey delayed excitation to the neighboring neuromere, they may innervate premotor circuits that activate later-contracting transverse muscles and/ or that inhibit earlier-contracting longitudinal muscles. Probing further downstream to MNs in the premotor circuits, we found that both appear to be the case (Fig. 5a-d and Supplementary Fig. 5). The two putative excitatory downstream neurons, A01c and A03g, directly form synapses to MNs that target transverse muscles (hereafter called transverse MNs) ( Fig. 5d and Supplementary Fig. 5). A01c also provided putative excitatory inputs via the A01ci neuron ("A01c with ipsilateral dendrites"), which appears to be cholinergic ( Supplementary Fig. 6), to transverse MNs. Conversely, inhibitory A02e and A02g neurons directly innervated MNs that target longitudinal muscles (called longitudinal MNs). Furthermore, the excitatory A03g neuron, in addition to directly forming putative excitatory synapses with transverse MNs, provided putative inhibitory inputs via two GABAergic interneurons (A23a and A31k, Supplementary Fig. 6) to longitudinal MNs 12,19 . Thus, the circuit diagram is consistent with the idea that Ifb-Fwd and Ifb-Bwd neurons control muscle movement in a synergistic manner, activating the shared downstream circuits that excite the transverse muscles and inhibiting the antagonistic longitudinal muscles. Previous studies identified A27h and EL as candidate premotor interneurons that excite the longitudinal muscles 23,27 .
The shared neurons are bidirectionally active. Since Ifb-Fwd and Ifb-Bwd neurons are active in forward and backward waves, respectively, the shared target neurons might be activated in both waves. Convergence of the Ifb neurons on a common set of premotor interneurons which are active in both waves may decrease the number of neurons required to realize the bidirectional locomotion. To test this, we studied the activity of five downstream neurons, A01ci, A03g, A02e, A23a, and A31k, and found that all of them are indeed activated in both forward and backward waves ( Fig. 6 and Supplementary Fig. 7). We also studied the time difference between the activity of the downstream neurons, Ifb-Fwd and Ifb-Bwd neurons, and aCC motor neurons using the activity of A02e as the reference time point (in dual-color calcium imaging-see Methods section for details, Fig. 6 and Supplementary Fig. 7). The temporal sequence thus obtained (Fig. 6g) showed that all downstream neurons are activated at a similar time to, or slightly later than, the Ifb neurons, consistent with their being activated by the Ifb neurons during forward and backward waves. This observation suggests that the local circuit of the shared neurons regulates segmental muscle activity under the directionality-specific operation from Ifb neurons. In addition, detailed observation indicates that the phase relationship between the shared neurons depends on the direction of wave propagation (Fig. 6g), suggesting the existence of additional higher-order (2nd or higher) premotor interneurons with direction-specific activity properties. We also noted that the activity of some of the downstream neurons is more closely related to that of other downstream neurons than to others (A01ci/A02e and A03g/A23a, Fig. 6g).
Contraction of transverse muscles requires Ifb neurons. Since likely outputs of Ifb-Fwd and Ifb-Bwd are excitation of transverse muscles and inhibition of longitudinal muscles (Fig. 5d), Ifb neurons may regulate contraction and relaxation of these muscles. Indeed, we observed decreased contraction in transverse muscles when the activity of Ifb neurons was blocked. We blocked the activity of Ifb neurons by expression of the rectified potassium channel Kir and studied the effect on the dynamics of muscle contraction that occurred during motor wave propagation in open-filleted larvae (muscle contractions imaged by using the mhc-GFP transgene, Fig. 7). In control larvae, transverse muscles contracted both during forward and backward waves, which is consistent with previous studies 12 . When the activity of Ifb-Fwd is blocked, contraction of the transverse muscles was significantly reduced during forward but not backward waves (Fig. 7a, b and  e). Thus, Ifb-Fwd is required for proper contraction of transverse muscles during forward motor propagation. Conversely, when the activity of Ifb-Bwd was blocked, contraction of transverse muscles was compromised in backward but not forward waves (Fig. 7c-e). These observations indicate that Ifb-Fwd and Ifb-Bwd neurons together are critical for delayed activation of the transverse muscles in bidirectional axial locomotion.
We also temporally inhibited the transmission of Ifb-Fwd neurons and studied the effects on larval locomotion. The speed of larval locomotion was significantly decreased (Supplementary Fig. 8; Ifb-Fwd>shi, 0.51 ± 0.01 s per wave (n = 22); driver control, 0.44 ± 0.02 s per wave (n = 20); effector control, 0.38 ± 0.01 s per wave (n = 16), p = 0.003 (driver control) and p = 8 × 10 −8 (effector control) by the two-sided Student's t-test with the Bonferroni correction), suggesting that Ifb-Fwd neurons contribute to the regulation of axial wave propagation.

Ifb-Fwd > GCaMP
A02e > RGECO n n+1 n n-1 We next asked whether activation of Ifb neurons or shared downstream neurons is sufficient to drive contraction of transverse muscles. We activated these neurons by optogenetics and found that activation of Ifb-Fwd or Ifb-Bwd did not induce any muscle movement (Ifb-Fwd: six trials; Ifb-Bwd: five trials). However, we found that activation of the downstream A01ci induces contraction of transverse but not longitudinal muscles ( Supplementary Fig. 9). This is consistent with the idea that activation of the excitatory neurons in the downstream circuits by cooperated activation of Ifb neurons and other 2nd order premotor interneurons induces contraction of transverse muscles. Taken together, our results suggest that the intersegmental feedback neurons Ifb-Fwd and Ifb-Bwd mediate delayed activation of transverse muscles via shared downstream circuits and additional synaptic steps in the feedback path.

Discussion
Sequential recruitment of distinct groups of segmental muscles is commonly seen in axial locomotion 1,2,6 . One previously proposed mechanism for the sequential recruitment is regulation by local circuits present within each segmental unit. For instance, during leech swimming, antiphasic contraction of dorsal and longitudinal muscles is regulated in part by central oscillator circuits present in each ganglion 2,3 . In Drosophila larvae, a local inhibitory interneuron (iIN1) regulates delayed contraction of transverse muscles by preventing their precocious activation and thus by acting as an intrasegmental delay circuit 20 . In this study, we revealed a novel mechanism for the sequential muscle recruitment in which intersegmental feedback neurons deliver delayed excitation on premotor circuits. Thus, in Drosophila larvae, two delay circuits, one intrasegmental and inhibitory and the other intersegmental and excitatory, function in a complementary manner to ensure timely contraction of the transverse muscles.
The intersegmental delay circuits feedback a signal in the opposite direction to wave propagation, from the wave front to the adjacent segment behind the front. This circuit configuration would enable simultaneous activation of transverse muscles in one segment (via the delay circuit) and longitudinal muscles in the forward adjacent segment (by the wave front) regardless of the speed of wave propagation. The circuit configuration would also maintain the relative timing (phase) of the two groups of muscles: in many axial motions including larval crawling, phase of individual muscle movements is maintained independent of the axial speed, in order to generate functional motor outputs 1-6,33-36 . As shown in Fig. 8a, each segment receives excitatory inputs at two distinct time points: at the arrival of the wave front (time 0) and at a later phase via the intersegmental delay circuits (time 1). Since the time delay (between time 0 and time 1) depends on wave propagation along the neighboring segments and thus scales with the cycle period (or speed), this circuit configuration phase-locks the time delay between the two groups of muscles (Fig. 8a).
Calcium imaging of Ifb and the downstream neurons revealed complex yet precise control of the activity of each premotor interneuron (Fig. 6g) and suggests for the presence of intricate segmental networks. While previous studies identified several interneurons that are implicated in the control of motor activity and/or wave propagation 15,20-28 , the segmental CPG mechanism of rhythm generation remains largely unknown. Further investigation of the circuits upstream and downstream of Ifb neurons will shed light on the nature of the CPG mechanism.
The bidirectional information flow mediated by the intersegmental feedback neurons, Ifb-Fwd and Ifb-Bwd, converge in the immediate downstream circuits on a group of premotor interneurons. This circuit configuration would greatly decrease the number of neurons required to regulate bidirectional locomotion and simplifies the neural wiring as compared with dedicated subnetworks for each direction. Thus, our results suggested an efficient and economical mechanism for implementing bidirectional propagations in the nervous system.
Is a similar strategy used for the bidirectional feedforward circuits? Previous work identified a chain of intersegmental neural connections implicated in feedforward activity propagation during forward locomotion 23 . The key element of the circuits is the intersegmental interneuron A27h, which like the Ifb-Fwd neurons extends its axon into the neighboring segment and is active only during forward motor propagation. Identifying the counterpart of A27h during backward locomotion and studying whether the downstream circuits are also shared will determine whether and how intersegmental inputs are converged in the bidirectional feedforward circuits. The shared targets of the bidirectional feedback neurons include two premotor interneurons, A01c and A03g, that directly and indirectly provide putative excitatory drive to MNs targeting transverse muscles. When the activity of the delay circuit neurons was blocked, the transverse muscles LT1-4 failed to contract (Fig. 7a-e). Furthermore, activation of A01ci, one of the interneurons in the excitatory pathways, is sufficient to contract these muscles ( Supplementary Fig. 8). These observations are consistent with the idea that the feedback neurons act via the common excitatory pathways to mediate synergistic activation of the group of muscles with similar function. The feedback neurons also provide putative inhibitory inputs on the antagonistic longitudinal muscles via the common target neurons, A02e, A02g, and A03g. Thus, the circuit configuration allows simultaneous activation of a group of muscles and inhibition of the antagonistic group of muscles in an intersegmentally coordinated manner. Such circuit configurations may also underlie synergistic motor control observed in other systems (e.g., muscle synergies 7-9 ).
All shared target interneurons arborize dendrites in a centrolateral region of the neuropil and receive inputs from the bidirectional feedback neurons in the same domain (arrowheads in Fig. 8b, c). The domain is distinct from the dorsal motor domain and ventral somatosensory domain, thus identifying a novel neuropil compartment where circuits responsible for higher-order motor regulation are integrated. The common target neurons are derived from different progenitor cells (neuroblasts; A01c and A01ci from NB1-2 37 , A02e and A02g from NB 2-1 37 , A03g from NB7-1, and A23a from NB7-4 37 ) and their cell bodies are scattered across the CNS. Therefore, there must be intricate axon and dendrite guidance mechanisms independent of progenitor identity 38 that incorporate these neurons into the integrated circuits and thus enable the higher-order motor coordination. Our circuit mapping and analysis revealed exquisitely and economically constructed neural circuits for motor coordination, and provides a starting point for future studies of how these circuits self-assemble during embryonic development and have appeared through evolution.

Methods
Drosophila melanogaster strains. All animals were raised on standard cornmealbased food. Prior to optogenetic experiments, yeast paste containing all-trans retinal (1 mM) was fed for 1-2 days. We used the following fly lines: period-Gal4 22,39 (Bloomington #7127), the split-Gal4 drivers 40,41 20,29,30 . PMSIs in the A1 segment were identified and reconstructed within the ssTEM volume based on the axonal projection patterns and dendritic branches ( Supplementary Fig. 1). All synapses onto A02e and A02g were annotated and used to find all presynaptic partners including Ifb-Fwd and Ifb-Bwd. Then, all synapses onto or from Ifb-Fwd and Ifb-Bwd were annotated and used to identify presynaptic and postsynaptic neurons of Ifb-Fwd and Ifb-Bwd. All synapses from A02e, A02g, A01ci, A03g, A23a, and A31k were annotated and used to identify the downstream of these interneurons.
Immunohistochemistry. Immunohistochemistry was performed in the 3rd instar CNS by fixation with 3.7% formaldehyde for 30 min at room temperature, washing with 0.2% Triton X-100 in PBS for 30 min at room temperature, blocking with normal goat serum for 30 min at room temperature and staining with the following antibodies at 4°C overnight. Primary antibodies: rabbit or guinea pig anti-GFP (Frontier science, Af2020 and Af1180, 1:1000), mouse anti-Fas2 54 (DSHB #1D4, 1:10), rabbit anti-vGluT 55  . e Plot of the calcium signal from presynaptic sites of A23a (green) and A02e (magenta) (71 forward waves and 23 backward waves from five larvae). f Histogram of the time delay as in (c). A23a compared with A02e. A23a follows A02e during forward waves, whereas A23a precedes A02e during backward waves. g Scatter plot of activity peaks of the shared module interneurons during forward and backward waves. The timing of the activity peaks in different neurons measured by GCaMP were plotted using the A02e activity, which was monitored by RGECO1, as a reference at each motor wave. Note that the spread of the A02e points is not always at zero phase, despite it being the reference, because peaks of GCaMP and RGECO1 signal in the same A02e do not perfectly coincide. Each horizontal line indicates a single trial. Sample size: 3-8 larvae for each neuron. h A wiring diagram of the shared module. A part of Fig. 5d is shown. Scale bar, 20 µm (a, d) Calcium imaging. Third-instar larvae were dissected by microscissors 22 . The CNS was isolated by cutting off the nerves, tracheae and imaginal discs, and then placed in a drop of saline on a MAS-coated slide glass (Matsunami glass, Japan). The saline was replaced with TES buffer (TES 5 mM, NaCl 135 mM, KCl 5 mM, MgCl 2 4 mM, CaCl 2 2 mM, sucrose 36 mM; pH = 7.15). The fluorescence of GCaMP6f was detected by a spin-disk confocal unit (CSU21, Yokogawa, Japan) and an EMCCD camera (iXon, Andor Technology, Germany) attached to an upright microscope, Axioskop2 FS (Zeiss, Germany) with a 60x water immersion objective lens. Dual-color calcium imaging of GCaMP6f and R-GECO1 was carried out by using a dual view system (CSU-DV, Solution Systems, Japan) 22 . For detecting peaks of the calcium imaging data in Fig. 6 and Supplementary Fig. 7, the original raw data were smoothed by the Savitzuky-Golay filter. Data analyses were conducted by ImageJ (NIH, USA) and Python3 scripts. For evaluating correlated activity between Ifb neurons and A02e for each wave (Fig. 3), we calculated the correlation coefficient between A02e activity (which was fit to the Gaussian function) and a raw trace of Ifb neuron activity by Python3.
Larval locomotion assay. To conditionally inhibit neural activity using temperature-sensitive dynamin mutant Shibire ts48 , an agar plate (about 9 cm in diameter) was held at 32°C on a heat plate (ThermoPlate, Tokai Hit, Japan). Thirdinstar wandering larvae were gently washed in deionized water and lifted on the agar plate for acclimation (60 sec). The larvae were then videotaped under stereoscopic microscopy (SZX16, Olympus, Japan). The speed of the propagation was measured manually using ImageJ software (NIH).
Statistical analysis. In Fig. 7e, we performed a normality test by using the Shapiro-Wilk test, with a = 0.05. Since data in Fig. 7e passed this test, we performed the two-sided Student's t-test with the Bonferroni correction for comparisons between multiple groups.
Analysis of muscle activity. We pinned down third-instar larvae on a Sylgardcoated dish, cut along the dorsal side, and removed the internal tissues, while leaving the CNS and all neuromuscular contacts intact. These larva fillets, expressing GFP in muscles, were illuminated with the blue light of a mercury lamp (X-Cite, Olympus, Japan) and monitored for spontaneous forward and backward waves in TES buffer (see Calcium Imaging section), which were recorded by an EMCCD camera (iXon, Andor Technology, Germany).  *** *** In the case of optogenetic stimulation, the same light source was used to activate ChR2 expressed in interneurons. The length of transverse muscles was traced manually using ImageJ (NIH, USA). The length of longitudinal muscles was measured by a custom Python3 script. In Fig. 7e, the minimum lengths of transverse muscles (TMs) during wave propagations were normalized by the lengths of relaxed TMs.
Reporting summary. Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability
The data that support the findings of this study are available from the corresponding authors upon reasonable request.