NeuroMechFly, a neuromechanical model of adult Drosophila melanogaster

Victor Lobato Ríos, Pembe Gizem Özdil, Shravan Tata Ramalingasetty, Jonathan Arreguit, Auke Jan Ijspeert, Pavan Ramdya

Preprint posted on 17 May 2021

Article now published in Nature Methods at

Neuromechanical models - a route towards a unified model of an animal?

Selected by Dinesh Natesan


Movement is complicated. Body movement, be it walking, swimming, or flying, is an outcome of the biomechanics of the limbs that propel the animal and the neural circuits that exert control over limb movements. Because animal behaviors typically occur in response to environmental cues, it is easy to forget the importance of biomechanics and assume that neural circuits control all locomotion.

The active control of movement via muscles depends on the timing of muscle activation, based on which muscles can function as motors, brakes, or even as struts and springs[1]. Even the sensory input to the nervous system is affected by the biomechanics of the limb. Proprioceptors, which are sensors that provide the nervous system with real-time information of body position, velocity, etc., are strongly influenced by their position on the body and the mechanics of body movement[2]. All these suggest that biomechanics have a critical influence on the computations that need to be performed by neural circuits and the type of control required for locomotion.

One way to understand this interplay is to build neuromechanical models that integrate both biomechanics and neural control. However, this is easier said than done, as these models sit at the interface of biology, mechanics, and neuroscience. Traditionally, such models are made for one type of locomotion, like for swimming in fish and for walking in stick insects. It is difficult to build neuromechanical models of the whole animal that can be potentially used to simulate the whole behavioral repertoire of an animal.

In this preprint, Ríos et al. develop the first data-driven neuromechanical model of the fruit fly, Drosophila melanogaster, a widely studied model organism with complex behaviors and a mapped neural connectome. Using this model, dubbed NeuroMechFly, the authors show how such models can be used to investigate the interplay between biomechanics and neural control that gives rise to behavior.

Key Findings

Figure 1: Construction of the biomechanical model
A figure that shows that different steps involved in construction of a biomechanical model of the fly – from the use of x-ray microtomography to scan the fly (A) to the use of polygon meshes to reconstruct the 3D segments (D-E) and assemble them back to a model fly (G).


  1. The authors used x-ray microtomography to scan an adult fruit fly (Fig. 1). Using this data, they created 3D meshes for the exoskeleton of the fly, and segments for individual parts such as the wings, legs, antennae, and halteres. Joints were added between the segments, which allowed the body parts to be moved (Video 1). This model formed the base over which joint biomechanics, and active control via muscles and neural circuits were built.
  2. Next, the authors focused on walking and grooming behaviors in insects. To each leg joint in the neuromechanical model they added known degrees of freedom (DoF), which is essentially the axis along which the joint can move. By capturing 3D movement data from live flies walking and grooming, the authors could now compare the performance of the neuromechanical model with data from live flies. Surprisingly, they found a clear difference – the model based on known DoFs were not sufficient to explain all the poses seen in walking/grooming flies. To get the model to behave like a live fly, they needed to add an extra DoF to the trochanter-femur joint, one of the joints of the insect leg. This joint was earlier thought to be fused in fruit flies and act like a rigid structure. The use of the model to assess the current understanding of joint movement provided a prediction that could be experimentally tested, i.e., is the trochanter-femur joint capable of movement along one axis?
  3. Using a physics-based simulation environment, the authors explored a way to extract contact forces and joint torques from the model. As a first step, the neuromechanical model was made to move in a fly-like manner by adding a controller to each of the joint legs and tuning them using movement data from live flies. By simulating the model fly walking, the authors were then able to measure the contact forces on the fly’s legs and torques on individual leg joints (Video 1). Although the forces and torques obtained from these simulations still require experimental validation, they serve as a proofs-of-concept of the use of such (calibrated) models to estimate hard-to-measure quantities.
  4. Finally, to illustrate the use of such models in understanding neuromuscular dynamics, they authors added in muscles and neurons to the neuromechanical model. For these simulations, they restricted the model by only adding muscles to the joints that were critical for walking. Each joint consisted of two muscles – a flexor and an extensor – and a neural controller that controlled these two muscles. Using this, they were able to find control parameters that produced tripod gaits and look at the dynamics of neural control and muscle activation that gave rise to the gait (Video 2). This too served as a proof-of-concept of using such models to glean the workings of neural circuits that can control these movements.

Why I think this work is important

I feel that a complete neuromechanical model, such as the one described in this paper, enable scientists who work on different parts of the fly to pool their data in a scalable manner. For instance, it potentially allows two groups that work on walking flies and flying flies to pool their data and obtain a model that can do both. In a sense, it attempts to solve the chaos in the brickyard problem[3], at least for the interface of biomechanics and the neural control of movement.

Future directions / Questions to authors

  1. MicroCT data also provides information about the muscles, their attachment points, etc. and about proprioceptors and mechanosensors embedded on the insect cuticle. Incorporating this would constrain inputs to and outputs from the neural controllers.
    • Do you have guesses on how easy/hard it would be to incorporate this information into the biomechanical model?
    • Getting information about muscles and proprioceptors would require microCT scans with different resolutions (a guess – microCT novice here). If so, are there challenges in incorporating data with different resolutions (voxel sizes maybe)?
  2. Validation of predictions and calibration of the neuromechanical model is a critical step before the model can be used in place of experimental measurements. However, I presume this is going to be incredibly challenging. If possible, could you share your plan on how you will go about it?
  3. This neuromechanical model is a brilliant resource that can be scaled up and developed together as a community. The code is open source, but often this is not sufficient to develop a community that will use this resource. Building a platform around it usually helps. Do you plan to build one that makes it easy to generate models and add features?


[1] Dickinson, M. H., Farley, C. T., Full, R. J., Koehl, M. A. R., Kram, R., & Lehman, S. (2000). How animals move: an integrative view. Science, 288(5463), 100-106.

[2] Sane, S. P., & McHenry, M. J. (2009). The biomechanics of sensory organs. Integrative and Comparative Biology, 49(6), i8-i23.

[3] Check out the comic adaptation and the associated paper: Forscher, B. K. (1963). Chaos in the brickyard. Science, 142(3590), 339-339

Tags: computation, grooming, insects, model, simulation, walking

Posted on: 23 June 2021


Read preprint (No Ratings Yet)

Have your say

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up to customise the site to your preferences and to receive alerts

Register here