Context-dependent coordination of movement in Tribolium castaneum larvae

Stored product insect pests, like Tribolium castaneum beetles, cause 20% of postharvest loss. However, how their nervous systems coordinate adaptive movements for successful infestation is unknown. Here, we assess how Tribolium larvae locomote over different substrates and analyze their gait kinematics across speeds. Unlike many hexapods, larvae employ a bilaterally symmetric, posterior-to-anterior wave gait during fast locomotion. During slow locomotion, thoracic intrasegmental coordination is disrupted, whilst intersegmental coordination is preserved. Additionally, terminal abdominal structures (pygopods) support challenging locomotion, such as climbing overhangs. The onset of pygopod engagement coincides with leg swing initiation, suggesting a stabilizing role. Surgically severing the connective between thoracic and abdominal ganglia impaired pygopod engagement and impeded flat-surface locomotion, climbing, and tunnelling without interrupting leg kinematics. These results suggest that thoracic-abdominal coordination underlies effective movement, and gait/limb recruitment is context-dependent. Our work provides the first kinematic analysis of Tribolium larval locomotion and insights into its neural control.


Introduction
Stored product insects are devastating agricultural pests.These animals have been estimated to cause 9% of postharvest loss in developed countries and 20% in developing countries (reviewed in 1 ).The red flour beetle, Tribolium castaneum (Tribolium), is representative of many stored product pest insects presenting a major challenge to global food security.Larvae and adults consume wheat products like flour by efficiently moving over and tunnelling through these unstable, shifting substrates 2 .Therefore, understanding how Tribolium adapt their movements to heterogeneous and challenging terrain could provide insights into conserved principles of motor control whilst aiding the development of new pest control approaches.
Animals use various strategies for adapting movement to the environments in which they live, continuously monitoring and adjusting movements on a cycle-by-cycle basis to cope with unexpected obstacles and/or drastic variations in the physical properties of 3-dimensional terrain.Studying the neural control of movement adaptability has been a long-standing focus of motor systems research across multiple species.
Terrestrial animals with internal, external, or hydrostatic skeletons have all evolved different strategies for movement control in different contexts (reviewed in insects 3,4 , mammals 5 and birds 6 ).Some animals deploy limbs [7][8][9] , some utilize soft outer cuticular features 10,11 and others adapt body parts not typically involved in locomotion to solve motor problems 12 .Similarly, Tribolium exhibit a diverse behavioral repertoire in response to different sensorimotor cues, and adult anatomy has been well-described.
Previous work has shown that Tribolium can move through a variety of stored grain, but prefer finely grained, whole wheat flour over coarser bran 13 .Moreover, adults can navigate in response to attractive and aversive odors 14,15 , shapes 16 , light levels 17 , colors 18 , and different habitat cues 19 .Both larvae and adults have articulated, jointed limbs 2 , with larvae being composed of both soft ventral cuticle and semi-hardened dorsal cuticle.While anatomical studies have begun to characterize the larval neuromuscular system 20 , knowledge concerning the specific kinematics of locomotion and how the Tribolium nervous system recruits thoracic limbs and abdominal segments to meet different locomotor demands is extremely limited.
Past studies have prioritized adult anatomy and behavior, although larval instars are equally capable of maneuvering and colonizing stored grain.Here we characterize locomotor parameters in late-instar Tribolium larvae to gain insights into how these animals adapt movements to their environment.We analyze how larvae negotiate different substrates and combine whole-animal and leg tracking to characterize and quantify leg kinematics underlying a range of locomotor speeds.We find larvae have an ethologically relevant preference for fibrous substrates and walk primarily with a posterior-to-anterior-propagating bilaterally symmetric gait, which shifts towards uncoordinated exploratory movements at slower speeds.Severing the connectives between thoracic and abdominal segments impairs walking, climbing, and tunneling but does not disrupt fundamental leg kinematics.In addition, we characterize a pygopod planting behavior, abolished in animals with severed connectives, which is used for stability and propulsion under different motor contexts (challenged locomotion vs tunnelling).These results provide first insights into the biomechanical underpinnings of Tribolium movement and the neural basis of ethologically relevant motor programs in an insect species with direct impacts on global food security.

Tribolium castaneum life cycle, morphology, and substrate preference
Tribolium beetles take approximately 35 days at 29ºC to undergo complete metamorphosis, comprising four distinct developmental stages -egg, larval, pupal, and adult 21 (Fig. 1a).The larval stage is characterized by three thoracic segments, each supported by a pair of legs, and nine abdominal segments.Larvae possess two small, rounded ventral pygopods in the most posterior abdominal segment, and two spiked urogomphi dorsally (Fig. 1b).
We first established larval substrate preference based on ease of locomotion.We found larvae crawl best on textured, fibrous, wood-based substrates such as paper, cardboard, and lens paper (Fig. 1c).In contrast, they had substantial difficulty gripping smooth surfaces like plastic and glass, thus preventing forwards momentum.Similarly, their legs slipped on or stuck to deformable substrates like Sylgard™ and agarose, also impeding coordinated progress (Fig. 1d-e).Notably, on these substrates, we observed pygopod planting for substrate engagement in an anchoring motion, which, when released, propelled the larvae forwards (Supplementary Movie 1).This abdominal engagement was rarely observed on fibrous substrates.Surprisingly, crawling was heavily impeded over whole wheat flour and white flour (Fig. 1c-e), as larvae attempted to tunnel upon contact with these substrates.

Quantifying larval locomotor parameters
Next, movement parameters during free locomotion were analyzed to quantify the spectrum of larval motor capabilities.Paper was used as the default substrate in subsequent experiments given larval preference, accessibility, and ease of imaging.
Tribolium larvae exhibited heterogeneous walking patterns, and favored edge exploration, i.e., they rarely strayed from arena edges once they found them (Fig. 2a).Additionally, we observed persistent burrowing attempts at the paper edges during preliminary trials in which the paper substrate was not fully adhered to the arena platform.
Locomotion on paper had a mean instantaneous velocity of 1.8 ± 0.1 mm/s (range = 0.9 to 3.0 mm/s; larval sizes ranged 4-6 mm), and animals displayed a spectrum of intra-animal velocity variability during only 2 minutes of exploration (Fig. 2b).Faster animals were not constantly fast, but instead varied speed throughout locomotion, whereas slower animals were limited to lower speed ranges (Fig. 2c).Larvae spent equal time walking straight (49.6%) and turning (50.4%) (Fig. 2d).Animals decelerated to turn but rarely stopped completely, thus staying immobile only 0.5% of the time (Fig. 2d).Finally, most larvae did not show a bias in turning direction, engaging equally in left and right headsweeps during exploration (Fig. 2e).
We observed a larval motor program we termed "backtrack and redirect" (Supplementary Movie 2), defined as a headsweep/turn in one direction, followed by visible backwards locomotion, and a contralateral headsweep/turn and forwards locomotion (Fig. 2f), which on average lasted 3-6 seconds.This behavior followed a distinct sequence of instantaneous velocity and body angle changes.First, velocity dropped as the animal turned (body angle deviating from 180º), followed by an increase in velocity at 180º body angle due to backtracking, and ended with another deceleration and deviation from 180º in the opposite direction from the animal's original trajectory (Fig. 2g).While 63.3% of larvae displayed this motor program at least once during 2 minutes of free locomotion (Fig. 2h), some displayed it a maximum of 8 times, and a third never engaged in this behavior.

Gait coordination and leg kinematics across walking speeds
To characterize natural gait, leg kinematics and the coordination between thoracic segments, we tracked legs during straight walking bouts on paper.We found Tribolium larvae walked with a bilaterally symmetric posterior-to-anterior wave gait (Fig. 3a).
Then, we determined the frequency of locomotion for each animal by performing a Fourier transform on leg velocities and selecting the frequency with highest power of an anchor leg (left T1).We defined swing phases by a leg's lifting and planting on the substrate and stance phases as the duration in which legs are in contact with the ground.An average cycle period was then calculated for each leg.After a swing, legs usually stanced next to the legs of the segment in front, and these often began their swing phase before the previous contacted the ground (Fig. 3a).This pattern was observed most prominently within the T2 to T1 transition as their swing phases overlapped more visibly (Fig. 3b-d).
Fast (Fig. 3b, d, f) and slow (Fig. 3c, e, g) walk cycles differed markedly.In faster animals, typical walk cycles averaged 0.2 ± 0.007s and were initiated by a T3 swing phase, followed by T2 with a phase delay of approximately 120º, then T1 with another 120º delay.These delays were largely consistent between legs and across animals, independent of speed (Fig. 3h).In fast animals, many legs were significantly coherent with each other (Fig. 3j).In slower animals, average cycle period was 0.7 ± 0.1s, and some legs often swung alone during walk cycles (Fig. 3e).Furthermore, not all six legs were required to swing during each cycle.Absent leg swings consequently impaired intrasegmental coordination; phase differences between contralateral leg pairs increased (binned mean for 5 slowest larvae = 41.0 ± 7.5º) compared to faster animals (binned mean for 5 fastest larvae = 15.1 ± 3.4º) (Fig. 3i).As such, fewer legs were significantly coherent to each other in slower animals (Fig. 3j), but the T3 to T1 sequence was largely preserved (Fig. 3h).Finally, analysis of all swing and stance phases against cycle period showed stance duration increased with cycle period, whilst swing duration was constant (Fig. 3k).Therefore, swing and stance duty cycles, defined as the proportion of time normalized to the cycle period, showed opposing 176 exponential relationships with cycle period (Fig. 3l).177

Effects of severing thoracic-abdominal connectives on locomotion and climbing
To begin to understand the neural control of movement in Tribolium larvae, we severed the connective between thoracic and abdominal ganglia (Fig. 4a-b) to assess the effects of interrupting ascending and descending connections between brain and suboesophageal ganglion (SOG) and ventral nerve cord (VNC) on unrestrained locomotion.Severed animals travelled significantly less far (mean = 5.83 ± 0.58cm) on paper than controls (mean = 13.3 ± 2.0cm, p = 0.020) and sham treated animals (mean = 14.4 ± 2.0cm, p = 0.008; Fig. 4c-d).Moreover, they displayed a narrower range of body bending angles (range = 115.8 to 224.1º) than controls (range = 122.7 to 245.4º) and shams (range = 111.0 to 273.2º) (Fig. 4e).To see how these impairments affected performance during a locomotor challenge, we first performed preliminary experiments gauging control larvae performance on different inclinations (Supplementary Figure 1): 180º (flat surface), 135º (uphill), 90º (vertical wall), and 45º (overhang).We found control animals walked progressively less far with greater deviations from 180º but were still able to cling onto and climb 45º overhangs.
Interestingly, larval paths became straighter, and fewer animals approached arena edges with greater inclination.Next, we used inclines as a motor challenge for severed animals to investigate how disconnecting the abdominal nervous system would affect clinging and climbing during challenged locomotion.Control, sham, and severed animals were tested on 180º, 135º and 45º.Severed animals exhibited prominent clinging and climbing impairments -42.9% at 135º and 71.4% at 45º of larvae failed to cling on and fell (represented as 0mm/s points for velocity in Fig. 5b).Severed animals that could cling and climb had straightening paths and slower speeds with increasing incline, as was observed in control and sham treated animals (Fig. 5a-h).As expected, severed speeds were significantly lower for baseline 180º (control-severed, p<.001; sham-severed, p=.002) and 135º (control-severed, p<.001; sham-severed, p=.007).Nonsignificant differences at 45º may reflect an overall speed limitation at such extreme inclinations.
To assess leg kinematics and coordination differences across treatments and inclinations, we observed locomotor performance on 180º and 45º inclines on an upclose incline behavioral rig as opposed to the top-down view (Supplementary Movie 3, Supplementary Movie 4).At 45º, 14.3% of severed animals fell, and 42.9% clung on but remained immobile.Consequently, these animals were excluded from locomotor and kinematic analysis.Notably, no control or sham animals fell at any inclination in either experiment.To effectively compare locomotion across conditions, walk cycles following the T3 to T1 gait sequence were analyzed.Severed animals were slower overall but followed locomotor parameter trends in control and sham for 180º.However, they were indistinguishable from controls and shams at 45º as overall locomotion slowed.Swing/stance durations and duty cycles followed the same trends with speed observed previously (Fig. 3k-l) independent of inclination; stance duration was modulated, whilst swing duration remained constant across speeds (Fig. 5i-j, mn).Stride lengths increased linearly with speed at both 180º (r 2 = .754,p<.001; Fig. 5k) and 45º (r 2 = .387,p<.001; Fig. 5o), and intersegmental differences were proportional across treatments and inclinations (Fig. 5l, p).At 45º, only control and sham larvae engaged their pygopods to assist climbing (Supplementary Movie 4), which suggested climbing required descending inputs to the abdomen.Moreover, larvae consistently attempted to maintain abdominal contact with the substrate, suggesting sustained contraction of body wall muscles whilst climbing.
Pygopod planting events were defined as visible pygopod extensions, and a change from a parallel alignment with the substrate to a perpendicular pointed orientation into it (Fig. 5q).Analysis of their relation to leg kinematics in all walk cycles showed that most pygopod planting events coincided temporally with the initiation of leg swing phases (Fig. 5r), and pygopod planting-triggered analysis showed the sequence from T3 (blue) to T1 (magenta) as seen by the peaks in the distributions (Fig. 5r).Moreover, pygopod engagement was preceded by an increase in velocity and followed by a decrease (Fig. 5s), consistent with the association between pygopod planting events and leg swings.Although most control and sham larvae engaged their pygopods on the overhang (mean rate = 0.76Hz, range = 0 to 1.20Hz), this did not significantly correlate with their maximum velocity (r 2 = .123,p = .092)(Fig. 5t).

Abdominal contributions in tunnelling
As evidenced, abdominal inputs (ascending or descending) facilitated free locomotion on flat surfaces and during locomotor challenges.Although clinging and climbing behavior may assist Tribolium in navigating and infesting food storage systems, we wanted to probe the effects of severing thoracic-abdominal connectives on tunnelling into their food source.Larvae (control, sham and severed) were individually dropped onto a dish filled with approximately 6mm deep whole wheat flour and visible body length was measured 0s and 120s afterwards (Fig. 6a-f).Control and sham animals immediately tunneled into flour on contact, as observed previously during substrate preference tests, with 100% of control and 75% of sham larvae being fully submerged after 2 minutes (Fig. 6g).Strikingly, 0% of severed animals tunneled effectively into flour, and on average, 90.7% of their original body lengths was exposed after 2 minutes (Fig. 6h).Severed animals still visibly displaced flour with their legs, albeit without making any progress (Fig. 6f).Therefore, the abdominal segments are essential for larval submergence into flour.

Discussion
To study and understand the Tribolium larval abdomen's roles in locomotion and its relationship to the legs, we first characterized the larva's general locomotor performance across a range of conditions.We found larvae relied on their legs for unchallenging locomotion on preferred substrates, which mostly consisted of fibrous materials.This supports the hypothesis that their original habitat consisted of tree bark 2,22 , and explains why wet, slippery surfaces present a challenge.While adults are capable of locomotion across flour 23 , tunnelling is the primary motor program for navigating their food source during pre-pupal instars.This behavior reflects ethologically relevant photophobic preferences 17 and their propensity to tunnel deeper when approaching pupation 24 .The locomotor patterns underlying their exploratory behavior consist of straight runs and continuous turning, with little to no periods of immobility.This differs from Drosophila larvae, which combine repeated straight runs with pauses followed by headsweeps, redirecting them to a new trajectory 25,26 .
Tribolium larvae also show no evidence of handedness in their exploratory movements, again in contrast with Drosophila adults 27 and larvae 28 but also other insects such as ants 29 and cockroaches 30 .This may reflect the requirements for Tribolium to navigate a 3-dimensional environment of constantly shifting substrate.We also found a larval preference for edge exploration, which may represent photophobicity, centrophobicity or a thigmotactic drive to maximize body contact with their environment to mimic how they are naturally enveloped in substrate.This behavior is also found in Drosophila adults, but not for centrophobic or thigmotactic reasons 31 .
The most common gait in insects is the alternating tripod gait, in which the first and third leg on one side of the body move together with the contralateral second leg 32 .
Tribolium larvae, however, use a travelling wave gait, involving posterior-to-anterior sequences of swings propagating from T3 to T1 across all walking speeds.Their contralateral leg pairs move synchronously, and phase delays between segments are largely maintained across speeds.This bilaterally symmetric travelling wave gait is found in the larvae of other beetles, including leaf beetles 33,34 .Since environmental conditions do not differ between larval and adult stages in these animals, the wave gait could therefore reflect developmental constraints on the circuit architecture driving locomotion in the Cucujiformia infraorder of beetles.However, the travelling wave gait pattern is found more widely.For example, in krill and crayfish, it generates the forces required for locomotion in an aquatic medium 35,36 , and in some millipedes it is used to generate the required forces for burrowing in soil 37 .A similar bilaterally symmetrical gait has been observed in the dung beetle Pachysoma endroedyi.In their 'galloping' gait, the anterior two leg pairs move in a travelling wave, with the hind leg pair dragging behind them and contributing little to forwards motion 38 .In these desert dwelling species, in-phase contralateral coordination may be energetically favorable for traversing constantly shifting terrains like sand, a constraint they might share with aquatic species.These considerations are equally relevant for Tribolium, as they consume and inhabit a constantly deformable substrate.This gait may become particularly beneficial during Tribolium pre-pupal stages, when larvae tunnel deeper for warmth and lower population densities to prepare for pupation 24 .
Many animals display speed-dependent gait transitions.For example, adult Drosophila gaits have been shown to transition from a pentapodal wave (one leg is in swing phase at a time) to a tetrapodal (two legs, but not bilateral pairs) and finally tripodal wave (three legs) by modulating stance phases as the animal progresses from slow to fast speeds 39 .Gait adjustments tune movement to the requirements of different terrains and speeds of locomotion 38,[40][41][42][43][44] .We therefore also characterized the kinematic changes accompanying different speeds of locomotion in Tribolium larvae.
They similarly have increasing numbers of limbs in swing phase at a time during increasingly fast locomotion, but do not appear to adopt a gait other than their bilaterally symmetrical metachronal wave.Moreover, larval stride length increases linearly with speed, following a highly conserved locomotor strategy across invertebrates and vertebrates [45][46][47] .A similar in-depth analysis of adult Tribolium gait kinematics in the future will allow further comparison.
The Tribolium VNC is unfused, with a separate ganglion in each body segment, chained together by longitudinal connectives, and each thoracic ganglion innervating a leg pair 48,49 .This anatomical arrangement is found across arthropods 50 and tardigrades 51 , and suggests gait variation across and within species might be derived from one single modifiable control strategy 52 .This raises the question whether the neural control of its behavior shares similarities with that of the more well-studied and soft-bodied Drosophila larva, which is legless and moves by means of abdominal peristaltic waves 26 , and has a segmentally fused central nervous system 53 .
Qualitatively observed pygopod planting during unrestricted motor programs (backtrack and redirect, see Fig. 2f) first suggested a prominent role for the abdomen in assisting natural movement.We present several lines of evidence that pygopods act to support locomotion in challenging conditions.First, while fast animals crawling on level fibrous surfaces do not necessitate pygopod engagement, they do while climbing 45º overhangs.Furthermore, pygopod planting events are largely temporally locked to leg swing phases, during which the animal needs to maintain static stability, and these events are preceded by a temporary increase in crawling speed.This shows a correlation between situations that compromise the animal's stability and likelihood of pygopod engagement.Furthermore, the weak, non-significant correlation between pygopod planting rate and maximum velocity further implicates its role in stability over a mechanism to boost/propel overall speed.Second, severing the A1-A2 connective, thus removing descending and ascending inputs between the brain, thorax and abdominal segments, resulted in lower speeds during walking and climbing.Some severed animals dragged their abdomen during walking (Supplementary Movie 3), which may contribute to decreasing velocity as the lack of abdominal sensory inputs may impair its ability to support itself during locomotion.However, impairments on inclines varied, ranging from some severed animals falling off mild (135º) inclines to a select few matching control and sham performance on 45º overhangs.The latter may reflect the overhang limiting the feasible speeds larvae can produce in this motor challenge.Like the variability in inter-animal velocities in normal larvae, the severity of severing is likely equally dependent on the individual.Nevertheless, severed animals never engaged their pygopods, and most tended to fall off 45º overhangs.These animals' inability to engage their posterior segments therefore particularly impaired their locomotor capabilities under challenging conditions.Furthermore, this phenotype is unlikely due to a failure to coordinate leg movements, since severed animals fall into the same speed-dependent distributions of kinematic patterns including swing and stance duration, duty cycle, stride length and intrasegmental phase difference as control and sham larvae.This suggests that abdominal regions are not required for fundamental leg coordination but provide a crucial support role in larvae.
Other species that have abdominal anchoring points with potential stabilizing roles include Labidomera clivicollis larvae, which use pygopods during body extension whilst climbing tree branches 33 ; and blackfly larvae, which are adapted to anchor into riverbeds to avoid getting swept away by strong currents 54 .The Tribolium larval anatomical adaptations we describe that confer stability and allow the animal to stay upright may similarly help evade predation, for example by the parasitoid wasp Holepyris sylvanidis 55 , either by enhancing locomotion efficiency in shifting terrain or avoiding falling off tree branches in their original habitat.The use of posterior terminal organs for substrate engagement during locomotion is also found in other soft-bodied animals including Drosophila larvae 11 , Gastrophysa viridula, which deploy their pygopods phase-locked to leg movements during the locomotor cycle 56 ; and Manduca sexta, whose locomotor cycle starts with the terminal prolegs lifting off the substrate 4 .silencing 63 .Forward genetic screens uncovered previously unknown genetic regulators of leg and body wall muscle development 20 , and recent studies have described the structure and function of the Tribolium cryptonephridial system, which is essential for the animal's exceptional tolerance to desiccation 64 .The structures and locations of brain regions in larval and adult Tribolium showed broad similarities to other insect model organisms [65][66][67] .In addition, comparison of Tribolium and Drosophila larval neuromuscular systems revealed resemblances in somatic muscle composition 20 .Its similarities to both ancestral and highly derived insects therefore make it an attractive comparative model.
Overall, this study has emphasized how the kinematic analysis of movement and underlying neural control provides insights into natural behaviors that govern Tribolium's success as a pest.We identified the importance of abdominal segments and pygopods to both locomotor challenges and tunnelling, suggesting that studying the structure and function of its connectives has important potential implications for behavioral neuroscience and food security.How far our findings extend to earlier instars and adults remains a promising question for future study.

Animals
Wild-type Tribolium castaneum (San Bernardino strain) were reared in 500ml borosilicate bottles with perforated lids (VWR SCOT291182809) at 29°C in organic wholewheat flour and 5% dried active yeast per weight.4-5 th instar larvae approximating 4-6mm in length were used in all experiments.

Statistics
Main text results and box plots are given as mean ±SE, and box whiskers are ±SD unless otherwise stated.Details of statistical analysis are included under each experiment's subsection below.

Substrate testing
Basic locomotor ability was tested on twelve substrates -white printer paper, cardboard, parafilm, lens paper, Sylgard™, glass, velvet, sandpaper, plastic, packing anchor's fundamental frequency was determined as the frequency with greatest power density (i.e., during swing phases) in the power spectrum.If the highest power frequency was ambiguous (i.e., appeared as blocks of plateaus on the spectrum), the middle value within the plateau was chosen, and the higher frequency block was used in cases with two adjacent blocks.Coherence and phase relationships of the other five legs to the anchor was compared at the determined fundamental frequency.
Groundswell uses coherence magnitude as a measure of the linear relationship between two waveforms at the determined fundamental frequency, and calculates a coherence magnitude threshold with the formula: Where degrees of freedom (dof) = 2*R*K, in which R is the number of observations of the waveforms together and K is the number of tapers.This threshold determines the minimum coherence magnitude required for significant coherence between two signals with α = 0.05.
Locomotion was filmed with an MQ022RG-CM XIMEA CMOS (Ximea GmbH, Münster, Germany) camera for 1 minute at 30fps with a Thorlabs OSL1 Fiber Illuminator (Thorlabs Inc, NJ, USA) with gooseneck lights at lowest intensity.Raw videos were optimized for FIMTrack in Fiji with custom-written macros.Statistical analysis on mean instantaneous velocity was performed as one-way ANOVA.

Connective severing assay
In preliminary control assays, six larvae were anesthetized on ice and sequestered between 0.1mm tungsten pins ventral side up on a dissection dish.A cut was made with fine microdissection scissors on the cuticle line separating A1 and A2 segments.
The blades were inserted at a ~45° angle to the cuticle and pulled upwards to sever the connective.Sham larvae were given lateral lesions on A1.Control larvae were not lesioned but anesthetized on ice for equal time.Surgeries were verified via fillet microdissection post-experimentally.Larvae without clear, visible connective severing were discarded from results.Behavior was filmed with the setup outlined in Free locomotion assay 2 hours after surgery; raw videos were processed in Fiji and tracked with FIMTrack.Statistical analysis on mean instantaneous velocity was performed as a between-subjects one-way ANOVA.
For following incline and tunnelling experiments, surgeries were repeated on seven larvae; sham animals' lateral lesions alternated between left and right sides to minimize biases in turning.Different animals were used for incline and tunnelling assays to avoid excessive fatigue on lesioned animals.

Top-down connective severing incline assay
Same methodology as Preliminary incline assay, excluding 90° due to short lifespans of severed animals. 2 larvae (1 control and 1 severed) could not be tracked with FIMTrack, thus mean velocity was obtained with wrMTrck (https://www.phage.dk/plugins/wrmtrck.html) and their tracks are therefore absent in Fig. 5a.Statistical analysis on mean instantaneous velocity was performed as a repeated-measures ANOVA with Bonferroni corrected post-hocs.

Up-close connective severing incline assay
Control, sham and severed larvae were individually placed onto a walled 70mm x 3mm paper platform on a custom-built rig; incline was adjusted with a micromanipulator and verified with a protractor.Locomotion was filmed until the animal walked out of view with a MQ042RG-CM XIMEA CMOS (Ximea GmbH, Münster, Germany) camera connected with a 1"-32 C-mount (Thorlabs Inc, NJ, USA) to a Canon FR1048KWN lens (Canon Inc, Tokyo, Japan).If the animal remained immobile, filming was stopped at the experimenter's discretion.180° videos were filmed at 100fps and illuminated by an overhead Thorlabs M850L3 850nm light (Thorlabs Inc, NJ, USA).45° overhang trials were illuminated from the bottom with a Stemmer Imaging CCS LDL100 850nm light (Stemmer Imaging Ltd, Tongham, UK) and limited to 50fps by the field of view.
135° and 90° were not tested due to the short lifespans of severed animals.For analysis, velocity was tracked with FIMTrack; pygopod planting events and start and stop frames of leg swings were manually tracked with Fiji's Manual Tracking plugin.
The constricted arena walls promoted exploration, therefore to effectively analyze locomotor parameters and gait kinematics, walk cycles following the T3 to T1 sequence were extracted and stance durations above median ± 1SD were discarded to filter out pause periods.Mean percentage of sequences extracted out of total tracked time (including pauses) per animal were: 55.4% (control 180°), 47.2% (sham 180°), 34.2% (severed 180°), 28.3% (control 45°), 24.9% (sham 45°) and 26.0% (severed 45°).Cycle period, stance duration and duty cycle retained their definitions in Gait characterization, but swing duration was calculated as the time between swing start and swing stop frames.
A pygopod plant event was defined as a visible extension of the pygopods, forming almost a blunt triangular point, into the substrate, regardless of whether the abdomen is in contact with the substrate.The Freedman-Diaconis rule was used in Fig. 5r, using the formula: (2*IQR) / 3√n to calculate x-axis bin length.Planting rate was used for Fig. 5t to normalize for variable video lengths, calculated as number of events over total tracked time.Pearson's correlations were applied for regression analyses.

Tunneling assay
Post-surgery animals were allowed to wake and begin walking on paper before testing.
A circular dish was filled with ~10mm of flour; control, sham and severed larvae were individually placed and filmed with an MQ0113RG-E2 XIMEA CMOS (Ximea GmbH, Münster, Germany) at 15fps under a Nikon SMZ745T dissection scope at 0.63x magnification.Filming stopped at 2 minutes regardless of how deep larvae tunneled.
Body lengths at time 0s and 120s were measured in Fiji.Statistics was performed as a Kruskal-Wallis test and Dunn post-hoc analysis with Bonferroni correction (given non-normal data distribution).

Figure 1 :
Figure 1: Tribolium castaneum life stages, larval morphology, and locomotor capability over different substrates.(a) Diagrammatic representation of Tribolium castaneum life cycle.(b) Morphology of 4 th -5 th instar larva under a 10x objective.Full body image at 2x magnification and insets at 5x magnification showing three thoracic leg pairs, nine abdominal segments, pygopods (white arrow) and urogomphi (red arrow).Scale bars = 1mm.(c) Larval paths over select substrates during first 15 seconds of free locomotion.Scale bar = 10mm.(d) Box plot of mean instantaneous velocity across fifteen substrates, ordered highest to lowest.(e) As (d), for total distance travelled.White squares = mean, boxes = mean ±SE, whiskers = ±SD overlayed on raw data; n = 10.

Figure 2 :
Figure 2: Inter-and intra-animal variability in free locomotion parameters.(a) Select larvae's paths of free locomotion across white paper for 2 minutes.Colored paths represent fast (blue), intermediate (yellow) and slow (red) larvae based on mean instantaneous velocity.Scale bar = 5cm.(b) Violin plot showing intra-animal variability in instantaneous velocity.White squares = mean.(c) Instantaneous velocity traces across 2 minutes of colored animals in (a) highlighting inter-and intra-animal variability.(d) Proportion of time spent in distinct locomotor behaviors: straight = 180° body angle and >0mm/s velocity, bent = non-180° body angle and >0mm/s velocity, still = 0mm/s velocity regardless of body angle.Whiskers = mean ±SE, n = 30.(e) Total headsweep events by individual larvae.Left headsweep = ≥210° body angle, right headsweep = ≤150° body angle.(f) 3 frame sequence during a backtrack and redirect behavior.Frames are color-coded for total time (3.73s); temporal larval trajectory is overlayed beneath current frame (white).Note the center frame showing more posterior body position relative to preceding frames, indicative of "backtracking".Scale bar = 5mm.(g) Instantaneous

Figure 3 :
Figure 3: Gait coordination and leg kinematic coherence are largely speed dependent.(a) Left: example top-down view of Tribolium larva with labelled legs across three thoracic segments: T3 (blue), T2 (green) and T1 (magenta).Scale bar = 1mm.Right: select frames of tracked leg positions showing progression from T3 to T1 in one representative walk cycle.Note the bilateral symmetry as leg pairs swing.Scale bar = 1mm.(b-c) Example velocity traces of legs for (b) fast and (c) slow animals across three walk cycles.Note the greater intersegmental coordination in (b) than (c).(d-e) Swing (black) and stance (white) phases in the same (d) fast and (e) slow animals in (b-c).(f-g) Polar plots of coherence phase and magnitude of waveforms in (b-c) using T1L as anchor/0° for (f) fast and (g) slow animals.Negative phase values temporally precede positive ones.Dark grey dotted inner circle indicates α = 0.05 for coherence magnitude.(h) Scatter of phase difference between left legs of each segment and T3 across fundamental frequencies (proxy for walking speed).(i) Scatter of phase difference between legs of each segment.(j) Percentage of significantly coherent legs (out of 5) to anchor (T1L).(k) Mean swing and stance durations and (l) duty cycles for individual legs as a function of cycle period averaged across 3-5 tracked cycles per leg.N = 10.

Figure 5 :
Figure 5: Abdominal inputs are not required for thoracic coordination and pygopods

Figure 6 :
Figure 6: Abdominal inputs are crucial for larval tunnelling into natural food source.(af) Top-down frames at 0s and 120s after placement on flour for (a-b) control, (c-d) sham and (e-f) severed animals.Severed animals struggle to tunnel; black arrow indicates displacement of flour from thoracic leg movements despite no body submergence.Scale bar = 2mm.(g) Change in body length between 0s and 120s across treatments.(h) Percentage of original body length exposed after 120s.Whiskers = mean ±SE; *** p<.001, ** p<.01, Kruskal-Wallis test, n = 8.