A behavioral architecture for realistic simulations of Drosophila larva locomotion and foraging

  1. Panagiotis Parthenios Sakagiannis  Is a corresponding author
  2. Anna-Maria Jürgensen
  3. Martin Paul Nawrot  Is a corresponding author
  1. Computational Systems Neuroscience, University of Cologne, Germany
9 figures, 9 videos, 1 table and 1 additional file

Figures

Behavioral architecture for larva foraging.

(A) In the three-layer hierarchical architecture, the bottom layer (motor) consists of three basic sensorimotor effectors that constitute the locomotory model. The intermediate layer (reactive) features innate reactive behavior in response to sensory input that reflects changes in the environment. The top layer (adaptive) allows for behavioral adaptation through experience. Framed areas denote more complex behaviors that require subsumption of subordinate behaviors. The signal from feeding to the above layers is neuromodulatory, as indicated by the purple arrowhead. (B) The intermittent coupled-oscillator locomotory model implemented at the motor layer. The turner and crawler module are phasically coupled during forward locomotion (head casts and weathervaning are not separate modules; both emerge from this crawl–bend interference), while crawling and feeding are implemented as mutually exclusive sensorimotor primitives. Initiation or cessation of crawling is controlled by the intermittency module. Darker shades mark modules used in the present simulations; faded modules indicate possible extensions.

Kinematic analysis of a single Drosophila larva in locomotion.

(A) Individual larva trajectory tracking a posterior point along the midline of the animal. Trajectory color denotes the forward velocity v from 0 (red) to maximum (green). Inset focuses on a shorter track epoch analyzed in C and G. The full-length trajectory and the epoch in the inset are shown in Videos 1 and 2, respectively. Dark green rectangle denotes the single stride described in B. (B) Sketch of the single crawling stride indicated in A. The larva first stretches its head forward, anchors it to the substrate, and then drags its body forward via peristaltic contraction. Scaled stride displacement dS˚ is defined as the resulting displacement d divided by the body-length l. (C) Scaled forward velocity v during the 40-s track epoch selected in A (inset). Green and red markers denote the local maxima and minima used for stride annotation. Individual strides are tiled by vertical dashed lines. Successive strides constitute uninterrupted stridechains (white). Epochs that do not show any strides are annotated as crawl-pauses (gray). (D) Scaled forward velocity v of head, midpoint, and tail as a function of the stride cycle phase Φ. All detected strides have been interpolated to a stride oscillation cycle of period 2π. Solid lines denote the median, shaded areas the lower and upper quartiles across strides. (E) Same trajectory as in (A) now tracking the head segment. Color denotes the absolute orientation angular velocity ω from 0 (red) to maximum (green). The full-length trajectory and the epoch in the inset are shown in Videos 1 and 2, respectively. (F) Definition of bending angle θb and orientation angle θ for the original 12-segment (blue) and the simplified 2-segment (red) larvae. (G) Three angular parameters during the same track epoch shown in (C). Bending angle θb, bend and orientation angular velocities ωb, ω are shown. Background shadings denote left and right turning bouts. For illustration purposes only turns resulting in a change of orientation angle Δθ > 20° are shown. (H) Absolute orientation angular velocity ω during the stride cycle, as shown for v in (D).

Population-level analysis.

(A) Fourier analysis of the forward v (red) and angular ω (blue) velocity across 100 larvae. Inset shows the respective dominant frequencies within suitable ranges 1fC2.5 and 0.1fT0.8 for v and ω, respectively. Crawling exhibits a dominant frequency of around 1.4, while lateral bending has a slower, more variable rhythm of around 0.4. (B) Epoch-duration distribution. Dots describe the cumulative probability density over logarithmic bins for the length of stridechains and the duration of crawl-pauses pooled across the larva population. Lines indicate the distribution with the lowest Kolmogorov–Smirnov distance among the best-fitting power-law, exponential, log-normal, and Lévy distributions. Stridechain length and pause duration are best approximated by log-normal distributions. (C, D) Crawl–bend interference. The stride cycle kinematics are depicted for a single individual. All detected strides have been interpolated into a 64-bin oscillation cycle of period 2π. (C) Forward velocity of five points along the larva midline. Velocity is scaled to the larva body-length. (D) Absolute angular velocity ω (blue) normalized by the average value ω¯P computed during the pause epochs. Fitted Gaussian function (red) describes well the phase-dependent attenuation imposed on ω and is used for the implementation of the coupled-oscillator locomotory model. Solid lines denote the median, shaded areas the lower and upper quartiles. Vertical dashed lines denote the cycle phase where the respective velocity reaches its maximum value. Inset: Phase offset Δϕ between the peak phase of each midline point’s forward velocity ϕCvi and the peak phase of angular velocity ϕCω across a dataset of 100 tracked larvae. Notably, ω reaches its maximum just before the head forward velocity reaches its maximum.

Free exploration in simulation and experiment.

(A) Dispersal of 200 larvae in experiment (left) and simulation (right) during 40 s. Individual tracks have been transposed to originate from the center of the arena. The entire temporal course is shown in Video 4. (B) Dispersal from origin (Euclidean distance during the initial 40 s; larvae approach arena edges thereafter). Line indicates the group median while the shaded area denotes first and third quartiles. (C) Histograms for total number of strides, time ratio allocated to crawling, and pathlength (cumulative distance). (arena dimensions = 500 × 500 mm, N = 200 larvae, experiment duration = 3 min, simulation timestep = 1/16).

Simulation of chemotaxis.

(A) Experiment 1: A single odor source of µM peak concentration is placed on the right side of the rectangular arena creating a chemical gradient as indicated by the color scale. Larvae are placed on the left side facing to the right. Larvae are expected to navigate up the gradient approaching the source. A single-larva trajectory is shown. This setup mimics the first experiment in Gomez-Marin et al., 2011. (B) Experiment 2: A single odor source of µM peak concentration is placed at the center of the rectangular arena. Larvae are placed in close proximity to the odor source. Larvae are expected to locally explore generating trajectories around and across the source. A single-larva trajectory is shown. This setup mimics the second experiment in Gomez-Marin et al., 2011. (C, D) The trajectories of 25 virtual larvae during the two experiments. (E, F) The odor concentration encountered by the virtual larvae as a function of time, measured in µM. Red curves refer to the single larva in A and B. Gray denotes the mean and quartiles of all 25 larvae in C and D. The simulation results fit well to the experimental estimates of concentration sensing during larval chemotaxis in Gomez-Marin et al., 2011 (arena dimensions = 100 × 60 mm, N = 30 larvae, experiment duration = 3 and 5 min, respectively, simulation timestep = 1/16). Because the present chemotaxis implementation is a qualitative reproduction of the behavioral patterns reported by Gomez-Marin et al., 2011 and not a quantitatively calibrated model, we do not report success rates, approach distances, or track-length statistics; these metrics depend strongly on the specific odorscape geometry and experimental constraints and therefore lie outside the scope of the proof-of-concept simulations presented here. Parameterization of the motor layer was kept identical to exploration simulations.

Simulation of innate and learned odor preference.

(A) A total of 252 simulations are shown with the resulting Preference Index for different gains of the left and right odor. On the top left, the initial state is shown with the larvae randomly generated at the center of the dish. The final state of three additional simulations is depicted on the top right and bottom left and right. See Video 6 for videos of two sample simulations. (B) The pipeline used for coupling the mushroom body (MB) model with the behavioral simulation. First, an MB model is trained via a classical conditioning experiment where olfactory input is combined with reward. The resulting odor valence MBout is then converted to odor gain G via a simple linear transformation and used to generate a virtual larva. Finally, the odor preference of a virtual larva population is evaluated in a behavioral simulation. (C) The spiking neural network comprising the MB model. The number of neurons comprising each layer is indicated. (D) The resulting PIs for 100 simulations per number of training trials. In each of the 100 simulations per condition a population of 30 virtual larvae was generated and evaluated using a different random seed, always bearing the exact same 30 odor gains derived from the respective group of 30 trained MB models (arena dimensions = 100 × 100 mm, N = 30 larvae, experiment duration = 3 min, simulation timestep = 0.1).

Individuality: empirical (blue) and fitted (red) parameter distributions.

Diagonal panels show histogram and kernel density estimates (KDEs) for body-length l, crawling frequency fC, and mean scaled displacement per stride d˚S across a population of 200 larvae in the experimental dataset. Lower off-diagonal panels depict bivariate projections of the empirical three-dimensional KDE. Upper off-diagonal panels show the corresponding projections of the fitted multivariate Gaussian distribution, with ellipses indicating 0.5, 1, 2, and 3 standard deviations. In the virtual population, parameter sets for individual larvae are generated by sampling from this multivariate Gaussian. Blue dots represent empirically measured larvae.

Appendix 1—figure 1
Segmentation and velocity definition.

(A) Forward velocity definition. Thirteen candidate velocity metrics are compared for use in stride annotation of 3-min tracks of a population of 30 larvae. For each candidate, the mean coefficient of variation of temporal duration cv¯t and spatial displacement cv¯s of the annotated strides is shown. Midline point 9 velocity provides the most temporally and spatially stereotypical strides; therefore, it is selected as the reference forward velocity for stride annotation and model fitting. vcen : centroid velocity, v1v12 : 1st-12th point’s velocity. (B) Regression analysis of individual and cumulative angular velocities ωi=110 to orientation angular velocity ω. When considered individually, ω2 best predicts reorientation, with the ω3 and ω1 following. When considered cumulatively, the anterior 4 ωi allow optimal prediction of reorientation velocity. (C) Correlation analysis of the sum of all possible ωi combinations to ω. The sum i=14ωi shows the highest correlation; therefore, we define θb=i=14θi as shown in A. For illustration purposes, only the five highest correlations are shown.

Appendix 2—figure 1
Average locomotory model summary.

(A) Distribution of stride-cycle-related parameters over the empirical dataset. Red dotted line denotes the median value used in the crawler module of the average locomotory model. (B) Normalized average curves of angular metrics during the stride cycle for each individual larva. Red line denotes the group median. (C) Pooled distribution of runs and pauses over the entire dataset (blue). Runs are detected as chains of concatenated strides (stridechains). Stridechains and pauses generated by the fitted distributions are shown in red. These distributions are used in the Intermitter module of the average locomotory model. (D) Sample simulation of the model with all modules active. The model features additionally bend correction due to forward motion and crawling phase-coupled suppression of angular motion.

Videos

Video 1
Full-length larva trajectory.

The full-length trajectory shown in Figure 2A, E; colored according to angular and forward velocity.

Video 2
Short larva trajectory epoch.

The short track epoch depicted in the insets of Figure 2A, E; colored according to forward and angular velocity.

Video 3
Free-exploration simulation.

A population of 25 real (left) or virtual (right) larvae is placed on a dish and left to freely explore. The body of the real larvae has been simplified into two segments as described in Video Bisegmental body.

Video 4
Dispersal simulation.

The temporal course of dispersal for real (left) and virtual (right) larvae is shown in Figure 4A.

Video 5
Chemotaxis simulations.

Time course of the two simulated chemotaxis experiments described in Figure 5.

Video 6
Odor preference simulations.

Two odor preference simulations, one with an appetitive and one with an aversive odor source placed on the left side of the dish. A non-valenced odor source is placed on the right side.

Video 7
Filter selection.

The effect of inadequate or excessive filtering of the empirical larva recordings is illustrated. The left video shows the jittery original recording while the effect of lowpass filtering at cutoff frequencies of 4, 2, and 0.5 Hz is shown on the rest. Selection of an intermediate 2 Hz cutoff frequency eliminates the unrealistic jitter while preserving the behaviorally relevant crawling frequency.

Video 8
Locomotory model for Drosophila larva.

The function of the intermittent coupled-oscillator locomotory model in Figure 1B is illustrated by adding its four modules stepwise: (1) crawler only, (2) turner only, (3) crawler + turner uncoupled, (4) crawler + turner coupled (stride-phase attenuation of bending), (5) crawler + turner uncoupled + crawl intermittency (runs/pauses), and (6) crawler + turner coupled + crawl intermittency (complete intermittent coupled-oscillator model). The inset indicates active modules per clip.

Video 9
Bisegmental larva-body simplification.

The first panel shows the original tracked larval body with 12 midline points and a 22-point contour. Subsequent panels illustrate successive simplifications: removal of the contour, replacement with rectangular segment proxies, and finally a two-segment representation. The absolute head orientation angle θ is preserved, and the single bending angle θb is defined as θb=i=15θi across the anterior body.

Tables

Table 1
Locomotory model configuration.

The parameters of the calibrated average locomotory model, organized per module.

ParameterSymbolValueUnit
PhysicsTorque coefficientcT0.5s−2
Angular dampingz1.0s−1
Body spring constantk1.0s−2
Bend correction coefficientcb1.0
BodyLengthl4.0mm
Number of body segments2# segments
TurnerTonic inputIT021.43
Input range[ITmin,ITmax][10, 40]
Time constanttauT0.1s
Spike response steepnessnT2.37
CrawlerCrawling frequencyfc1.42Hz
Maximum scaled velocityv˚max0.51body-lengths/s
Stride distance meand˚¯s0.24body-lengths
Stride distance stdd˚~s0.04body-lengths
Max velocity phaseϕCV3.49rads
InterferenceSuppression coefficientCCT00.46
Suppression relief coefficientCCT10.54
Max relief phaseϕcω2.05rads
IntermitterRun length distributionNRLog-normal (m = 1.4, s = 1.15)
Run length range[NRmin,NRmax][1, 142]# strides
Pause duration distributiontPExp(b = 1.0)
Pause duration range[tPmin,tPmax][0.12, 16.0]s

Additional files

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Panagiotis Parthenios Sakagiannis
  2. Anna-Maria Jürgensen
  3. Martin Paul Nawrot
(2026)
A behavioral architecture for realistic simulations of Drosophila larva locomotion and foraging
eLife 14:RP104262.
https://doi.org/10.7554/eLife.104262.3