Musculoskeletal simulation of limb movement biomechanics in Drosophila melanogaster
Authors: Pembe Gizem Ozdil
Chuanfang Ning
Jasper S. Phelps
Sibo Wang-Chen
Guy Elisha
Auke Ijspeert
Pavan Ramdya
Venue: ICLR 2026 Poster (2026)
Keywords: Musculoskeletal Modeling
Drosophila melanogaster
Imitation Learning
Primary area: applications to neuroscience & cognitive science
TL;DR: We present the first 3D, data-driven musculoskeletal model of Drosophila legs that links neural activity to movement, supports experimental tests of motor control, and helps train embodied agents with naturalistic behaviors.

Abstract: Computational models are critical for advancing our understanding of how neural, biomechanical, and physical systems interact to orchestrate animal behavior. Despite the availability of near-complete reconstructions of the Drosophila melanogaster central nervous system, musculature, and exoskeleton, anatomically and physically grounded models of fly leg muscles are still missing. Such models provide an indispensable bridge between motor neuron activity and joint movements.
Here, we introduce the first 3D, data-driven musculoskeletal model of Drosophila legs, implemented in both OpenSim and MuJoCo simulation environments. Our model incorporates a Hill-type muscle representation based on high-resolution X-ray scans from multiple fixed specimens. We present a pipeline for constructing muscle models from morphological imaging data and for optimizing unknown muscle parameters specific to the fly.
We then combine our musculoskeletal models with detailed 3D pose estimation data from behaving flies to achieve muscle-actuated behavioral replay in OpenSim. Simulations of muscle activity across diverse walking and grooming behaviors predict coordinated muscle synergies that can be tested experimentally. Furthermore, by training imitation learning policies in MuJoCo, we examine the effect of different passive joint properties on learning speed and find that damping and stiffness facilitate learning.
Overall, our model enables the investigation of motor control in an experimentally tractable model organism, providing insight into how biomechanics contributes to the generation of complex limb movements. Moreover, it can be used to control embodied artificial agents to generate naturalistic and compliant locomotion in simulated environments.

Published as a conference paper at ICLR 2026
MUSCULOSKELETAL SIMULATION OF LIMB MOVEMENT BIOMECHANICS IN DROSOPHILA MELANOGASTER
Pembe Gizem Özdil"
Chuanfang Ning*
EPFL Kempner Institute, Harvard University harvard. hww.aaa..aaaa.... edu mrozdil@fas
EPFL
chuanfang chuanfang.ningeerpe ninggepfl.geecccccc
Jasper S. Phelps
Sibo Wang-Chen EPFL
Guy Elisha EPFL
Auke Ijspeert EPFL
Pavan Ramdya EPFL
EPFL
ABSTRACT
Computational models are critical for advancing our understanding of how neu- ral, biomechanical, and physical systems interact to orchestrate animal behav- ior. Despite the availability of near-complete reconstructions of the Drosophila melanogaster central nervous system, musculature, and exoskeleton, anatomically and physically grounded models of fly leg museles are still missing. Such models provide indispensable bridge between motor neuron activity and joint move- ments. Here, we introduce the first 3D, data-driven musculoskeletal model of Drosophila legs, implemented in both OpenSim and MuJoCo simulation environ- ments. Our model incorporates Hill-type muscle representation based on high- resolution X-ray scans from multiple fixed specimens. We present a pipeline for constructing muscle models from morphological imaging data and for optimizing unknown muscle parameters specific to the fly. We then combine our muscu- loskeletal models with detailed 3D pose estimation data from behaving flies achieve muscle-actuated behavioral replay in OpenSim. Simulations of muscle activity across diverse walking and grooming behaviors predict coordinated mus- cle synergies that can be tested experimentally. Furthermore, by training imita- tion learning policies in MuloCo, properties on learning speed and find that damping and stiffness facilitate learning. Overall, our model enables the investigation of motor control in an experimentally tractable model organism, providing insight into how biomechanics contributes to the generation of complex limb movements. Moreover, it can be used control embodied artificial agents to generate naturalistic and compliant locomotion in simulated environments.
examine the effect of different passive joint
INTRODUCTION
Understanding how to coordinate multiple limbs with many degrees freedom (DoFs) accom- plish diverse motor tasks is a standing challenge in both motor control neuroscience and robotics. Performing such systems-level investigations hinges upon detailed knowledge mus- culoskeletal structures and their mechanical properties. Neuromechanical models, therefore, serve as a crucial tool enabling rapid experimentation and hypothesis testing under controlled conditions
(Edwards) 2010 Ausborn al. 2021 Kim et al. 2022 Delp al.) 2007 Ramdya and Ijspeert
2023).
Muscle-driven systems characterized by intrinsic compliance and redundancy, which sim- plify the control problems faced by artificial agents, as they do for animals in the real world (Gei- jtenbeek al., 2013 Lee al. 220 Wang al. 2012). However, many existing models abstract away key elements of musculature and passive biomechanics (Aldarondo et al. 2024
Wang-Chor Jaag-Chhen
"These authors contributed equally.

---

Published as a conference paper at ICLR 2026
Anatomical reconstruction
Musculoskeletal model
3D pose and kinematics
annotations
X ray data
Figure 1: Pipeline to develop Drosophila leg musculoskeletal models. (Left) Anatomical data from multiple flies were used to determine muscle attachment points and fiber paths, providing constraints for constructing the muscle model in OpenSim. (Right) 3D pose estimation data from behaving animals were then used to train the muscle-actuated agent to recapitulate detailed kinemat- ies in OpenSim and MuJoCo. (Middle) The resulting muscle model is informed by both leg anatomy and joint kinematics.
ctt al. 2024), limiting their ability to capture the richness of neuromuscular coordination. This, in turn, limits their utility for understanding how the nervous system generates robust, adaptive be- haviors. Overcoming this gap will require modeling a system that generates sufficiently complex limb-dependent movements using tractably small neuromuscular controller.
The fruit fly, Drosophila melanogaster, represents an ideal organism for this reverse-engineering challenge. Flies generate complex behaviors using compact, well-characterized, and genetically
accessible nervous system (Bellen et al., 2010 Rubin and Spradling 1982). Despite substantial progress in anatomical (e.g., connectomic (Dorkenwald et al. 2024 Phelps al. 2021)), neural (Aimon et al. 2019 Simpson Chen
Chen et al. 20188). and behavioral characterization (Aranha and Vasconcelos 2018 Ozdil et al. 20244, , recently published biomechanical models of Drosophila legs (Vaxenburg et al. 20255 Wang-Chae Chen et al. 2024 Sabato-Rios et al. 2022) lack the anatomical and
physiological accuracy required to model and investigate how motor networks coordinate muscles, limb kinematics, and behavior.
Here, we present the first biologically detailed musculoskeletal model of Drosophila legs across two widely used physics engines, OpenSim and MuJoCo. Our model extends NeuroMechFly (Wang- Chen et al. 2024) Lob4too by incorporating anatomically detailed muscle representations and physiological properties. Specif- ically, we implement a Hill-type muscle model informed by anatomical data (Azevedo et al. 2024] Lesser et al.) 2024; Dinges et al. 2021) to actuate seven DoFs in three leg joints. Using this model, we predict the relative contributions of individual muscles to joint movements generated by real behaving flies. Furthermore, we study the influence of passive joint properties on the successful im- itation of animal behavior. Our work integrates anatomical, physiological, and behavioral data into a unified modeling framework, providing critical foundation for future investigations of Drosophila neuromuscular coordination and behavioral control. This modeling framework [Figure 1} can also accelerate the development of musculoskeletal models for other species, inform machine learning- based algorithms for embodied agents, and facilitate the control of bioinspired robots.
al., (022). a whole-body biomechanical simulation of the adult fly,
2 RELATED WORK
2.1
MUSCULOSKELETAL MODELS ANIMALS
Musculoskeletal models have emerged as powerful tools for investigating animal biomechanics. Open-source simulation platforms such as OpenSim (Delp et al. [2007). MyoSuite (Caggiano et al.) 2022 and DART (Lee et al. 2018b), as well commercial frameworks like HyFyDy (Geijten-) beek 2021). have made it possible to test state-of-the-e learning algorithms on complex, high- dimensional systems. Use cases include the control of human arms for manipulation and legs for locomotion (Song et al., [201]] Caggiano et al.] 2024). Although primarily developed to simulate human bodies (Sylvester et al. 2021 Seth et al. 2018), these tools have enabled the creation of
2

---

Published as a conference paper at ICLR 2026
musculoskeletal models for a wide range of species, including rodents (Charles et al. 2018 Tata Ra- malingasetty et al. 2021: Gilmer et al. 2025; De Wolf et al. 2024). primates (Ogihara et al., 2009 Chan and Moran 2006), horses (van Bijlert et al. 2024). and birds like ostriches (Rankin et al. 2016 La Barbera et al. 2021). Researchers have also developed custom tools to study the interplay between neural circuits and biomechanics in worms (Zhao al. 2024). insects (Guo et al. 2018),
and other animals (Arreguit et al. (2023).
Recently, the fruit fly, Drosophila melanogaster, has become an increasingly prominent animal model for musculoskeletal simulations. The first anatomically realistic fly body model, NeuroMech- Fly, used micro-computed tomography (micro-CT) scans to construct morphologically accurate 3D fly simulation. In its carliest incarnation, simplified antagonistic used in the legs of NeuroMechFly to simulate locomotor dynamics (Lobato- Rios al., 2022). More recent efforts in this [Wang-Cher Chen et al., 2024) and other (Vaxenburg et al., 2025) fly body models have enhanced simulations by adding, for example, multimodal sensorimotor transformations ac- complish wider range of behavioral tasks. However, these models still rely abstract pposition or baqque-baeed-a joint controllers and lack realistic muscle actuation. We address this gap bi- ological fidelity in our work by explicitly modeling individual fly leg muscles based detailed anatomical data.
damper muscles were
2.2 MOTOR CONTROL AND MUSCLE SYNERGIES
Coordinating the activities of many muscles is a fundamental challenge in motor control. It has been proposed that the nervous system simplifies this complex problem by using muscle synergies- groups of muscles that are co-active, acting as functional units (Bizzi and Cheung, 2013; Ting and McKay, 2007). By combining a limited number of these synergies, the brain can more efficienlly produce diverse movements without needing to control cach muscle independently (Bizzi and Che- ung 2013: Saito et al.] 2018). Muscle synergies have been identified and analyzed in real exper- imental data (Tresch al., 2006 Sponberg et al. 2015 Al Borno et al., 2020). and inspired the development of controllers that operate within reduced-dimente
muscle activation spaces (Berg al. 2024). These synergy-based approaches facilitate robust coordinated movements while sig- nificantly reducing control complexity. For instance, human walking can be performed across a range of speeds and directions using just a few lower-limb synergies (Saito et al. 2018).
Muscle synergies have also been studied extensively in insects with respect to how sensory feedback reinforces coordinated muscle activation (Bidaye et al. 2018 Zill al. 2018). By leveraging the complete wiring diagram of the Drosophila nervous system- known as the connectome-rrcem studies have identified specific neural circuits that may coordinate fly limb movements (Syed al,, 2026 Lesser et al.) 2024). Nevertheless, because of the anatomical and functional complexity of Drosophila leg muscles, we cannot predict muscle activity patterns for a given behavior based on neural connectivity or neural recordings alone. In this work, we address this gap by (i) developing an anatomically detailed muscle model of Drosophila legs and (ii) simulating this model to reproduce measured joint kinematics across behaviors, allowing us to predict underlying active muscle synergy groupings.
2.3 DROSOPIILLA LEG MUSCULATURE
Each fly leg is a multi jointe appendage with at least seven DoFs across five joints Siobato-Rios al., 2022. Haustein al. 2024). These joints are actuated by approximately 19 muscles, which in turn are controlled by approximately 69 motor neurons (Azevedo et al.) 2024 Lesser et al. 2024 Soler et al. 2004p. Notably, the muscle structure across legs is nearly identical, with few ex- ceptions including tergal depressor of the trochanter muscles in the middle legs that facilitate jump escape (Swank 2012). Leg biomechanics are further complicated by biarticular muscles that span multiple joints coordinate movements across body segments (Lesser et al.) (024). Additionally, the passive properties of joints, including their elasticity and damping, can either resist, or assist motion depending on the direction of movement (Ache and Matheson 2013).
3

---

Published as a conference paper at ICLR 2026
3 METHODS
3.1 ACQUISITION OF ANATOMICAL DATA
To reconstruct the front leg muscles, used publicly available datasets (Kuan al. 2020
Dinges et al. (022)) and one custom dataset collected for this study. The custom dataset was acquired using synchrotron radiation JCT.. Each of the three datasets captured different foreleg postures, allowing us to better understand how muscle attachment points vary across joint configurations. We focused on annotating muscle fibers that span the thorax-coxt coxa trochanter, and femur-tibe joints Figure 2/A) and grouped them by function described in (Azevedo et al. 2024 [ooler al.) p.04]. For muscles located the thorax, we used data from (Dinges et al. 2021] 1); for remaining leg muscles, we relied on (Kuan al. 2020). Muscle attachment points were then cross-validated using our custom scan. Together, these datasets provided the anatomical basis for our muscle model.
Anatomical dataset
B OpenSim model
Tergen salk Pleurnl promicttr
Thorax
Pleurs remotor
Stennal anterior rosator (Bar)
(Spr)
Sternal addustor (Ba)
Coxa
Trocha ser Texor (TT_h
hnshwarer woleee (S1
tibia
femur
Accessory to. fevoo (Atr_))
left frint leg
Trochar nter excensor (Tr_n)
Femur
Tibra flesor
anterior
poster
Figure 2: Front leg muscle reconstructions. (A) Muscles of the thorax, coxa, and femur segmented from high-resolution X-ray scans (Kuan et al. 2020 Dinges et al. (02T) and visualized within 3D mesh of the foreleg in Blender. Colors denote anatomically grouped muscles. includ- ing biarticular and joint-specific actuators. (B) Corresponding muscle-tendon units implemented in OpenSim preserve anatomical attachment points and fiber routing. Color coding the same in panel A.
3.2 MUSCLE MODEL CONSTRUCTION AND OPTIMIZATION
We modeled 15 muscle-tendon units (MTUs) per foreleg- in the thorax, 6 in the coxa, and 2 in the femur-capturing 12 of the 19 muscle groups in our anatomical datasets (Fiurre 2B. Muscles housed the tibia were excluded because the tibia segment was partially captured in the X-ray data. In the femur, we modeled the fast tibia flexor and extensor, which dominate force generation at the femur- joint (Azevedo et al. (020). Trochanter muscles were omitted because their function remains unclear (Soler et al., 2004).
Each muscle group was modeled using one or two MTUs, based on a Hill-type formulation (Hill, 1938). This formulation includes a contractile element, passive parallel elastic component, and series elastic component, assuming rigid tendons (Millard al. 2013) (Figure 3). To keep the model computationally manageable in OpenSim (Delp al. 2007 we selected up to two represen- tative MTUs per muscle group to capture the main muscle fiber functions (see Section A.5 for more details). Muscle-tendon lengths and initial attachment points were initialized using anatomical data (Figure 3), right). We estimated maximum isometric forces from the physiological cross- cross-sectional areas (PCSAs) of the muscles, scaling them with specific tension of 28mN /mm This value falls between those reported for Drosophila jump muscles (37mN/ /mm") (Elred et al. 2010)) and indi- rect flight muscles (9mN/mmt Swank 2 We estimated maximum contraction velocity using a recorded X-ray video muscle contraction during leg movements.
Because experimental data limited, initial parameters may not faithfully reflect biological reality. Therefore, we refined parameters through optimization in OpenSim. For each candidate parameter proposed by the optimizer, static optimization (SO) inferred muscle activations from reference

---

Published as a conference paper at ICLR 2026
joint angles, and forward dynamics (FD) simulated joint trajectories based those activations. We used NSGA-II to identify parameter sets that produced kinematics best matching the experimental optimized parameters to track kinematics of the front legs during two behaviors- behaviors-antennal antennal grooming and locomotion-retainingg solutions that performed well for both behaviors (Figure 3F). Each joint (1 or 3 DoFs) was optimized independently. For 3-DoF joint, optimization took approximately 8 h with 200 individuals over 40 generations. The full foreleg optimization (7 DoFs, 15 MTUs) would require ~ 20 hours if each optimization were run sequentially using an Intel 19-14900 processor with 64 GB of RAM.
data (Figure 3B). To avoid overfitting,
To assess the biological plausibility of our resulting muscle models, we analyzed muscle moment arms relative to joint motion. Our model correctly reproduced opposing signs for flexor and extensor moment arms, and predicted the dominant contributors to joint movements (thorax-coxa and coxa- trochanter yaw. pitch, and roll, and femur-tibia pitch) in agreement with their known functional roles Figure 3D) (Azevedo et al. 2024 Soler al. 2004).
3.3 REAL LIMB KINEMATICS DATA
2D and 3D limb kinematics were measured from tethered flies behaving spontaneously on an air- supported spherical treadmill. Foreleg and head movements were tracked in 2D using DeepLabCut (Mathis et al.] 2018). Separate models were trained for each camera angle. Annotations were refined over multiple iterations improve accuracy. Five synchronized cameras were calibrated using a ChArUco board, and 3D poses were reconstructed using Anipose (Karashchuk et al.) 2021) with Viterbi filtering and spatiotemporal regularization. The resulting 3D pose data were then used to estimate leg and head joint angles via inverse kinematics using SeqlKPy (Ozdil et al. 2026). Behavioral videos were recorded at 100 Hz and interpolated to 500 Hz to ensure simulation stability- We focused on two distinct behaviors, forward walking and antennal grooming, because they involve different patterns of joint coordination in the front legs and can thus test the capacity of our muscle model to reproduce a wider range of movements.
3.4 IMITATION LEARNING
To reproduce control strategies that animals use to drive efficient limb movements, we trained poli- cies using imitation learning of reference motion trajectories. Imitation learning has been widely applied in both computer graphics and motor control, providing powerful framework for learning
complex behaviors in simulated agents (Vaxenburg et al. 2025 La Barbera et al. 202T Chentanez
et al. 2018 Peng et al.) 2018 Merel et al.) 2017, Peng et al. 2020; Hasenclever et al.) 2020). Here, we trained neural network models to drive limb movements by activating muscles. Using MyoConverter (Caggiano et al. 2022). we converted our OpenSim model with optimized muscle format. We then created the control task in the MuJoCo physics engine (Todorov et al. 2012), using don (Tunyasuvunakool et al.) 2020), to track the measured kinematics in muscle-actuated manner. To improve speed and stability, we omitted body-environment contacts by suspending the fly in air.
parameters into a MuuloCo-compatiin
We trained multilayer perceptron (MLP) policies with Proximal Policy Optimization (PPO) (Schul- 2017) for 15 x 10th steps control frequency of 500 Hz, while running the physics engine at 10 kHz to ensure stability. We used PPO due to its well-known stability and robustness in high-dimensional continuous control tasks and based on its prior use in animal imitation learning tasks (Peng et al. 2018 2020 The MLPs have 2 hidden layers of 512 units followed by layer of 256 units each and use the ReLU activation function. Policies are trained with a learning rate of 10-5 and discount factor of 0.99, chosen through hyperparameter search. Each training episode was initialized from a random frame in the motion capture sequence and terminated once the end of the clip was reached.
man et al.
At each timestep, the agent received an observation including joint angles, 3D positions of selected body parts, muscle states, and the remaining time in the clip as described in (La Barbera et al.) (021]. The observation space had 86 dimensions: 3D coordinates of four leg landmarks (12-D), joint angles and velocities for the 7 DoFs (14-D), and muscle activations, forces, lengths, and velocities for all 15 muscles (60-D). The policy produced continuous muscle excitation levels (i.e., motor neuron activities) within the range of (0, 1] for each muscle (15-D).
5

---

Published as a conference paper at ICLR 2026
A Hill Fiil-Lype muscle model
Inilial muscle paramelers
B Oplimization of musilee paramelers
Anatomical parameters
Muscle
Imst munedeeeettoon unti length
X-nry dada
Ophmml fiber tberrangth
model
lsc: loncon lnngth
FE: parailel element
lee: murcle lengh
CE contaucile clamens.
CE W PE
Pennelion angle
Tendon longth
Attachment points
Static Optimization
muscle aclivation
tt: sana element
Physiological parameters
Dynemice
asha: ongle
Maximum isometric force
Maximum contractin velocity Fibor damping Activation time constant Deaclivation lime consrant
joint ungles
ground truth mation
resulling motion
Loss
upçaale open! por
C Oplimization results
Nonmalized RMSE: sim vs. ref
Squared correlation: sim vs. ref
0.8
1.0
locomotion
RMSE
grooming
0.6
NIA
0.0
View
pitch
roll
yaw
pitch
roll
pitch Femur-Tibia
0.2
yaw
pitch
roll
pitch
roll
pitch
Thorax-Coxa
Coxa-Trochanter
Thorax-Coxa
Coxa- Trachanter
Femur-
Joint DoF
Joint DoF
D Muscle moment
Thorax Coxa yaw
Thorax Coxa pitch
Thorax Coxa roll
Moment arm (mm)
0.00
Tegeopeural Pleur promoter
0.05
0.0
020
Ficural abductor
Stenral ontenior rotator
0.001
0.000
Stamal postatoor rosalor
Sterral addtrtor
-0.05
0.00
0.0 020
Coxal musslls
Terge Stemo trachanter exiensor
-0.050
-0.10
-0.05
0.075
flcser
-20
-25
25
10
30
Coxa- Trochanter yaw
Coxa- Trochenter pitch
Trochatrr roll
Femur- Tibia pitch
Moment arm (mm)
0.02
0.02
Tille unlieaar Tibia flesor
0 00
0.00
0.00
0.02
-002
-0.04
-50
-25
1000 Joint angle (degrees)
-150
50 Joint angle (degrees)
100 Joint angle (degrees)
50
Joint angle (degrees)
Optimization and assessment of muscle model parameters. (A) Schematic repre- sentation of Hill-type muscle model. The contractile element (CE) produces active force, the parallel clastic element (PE) provides passive stiffness, and the series clastic element (SE) repre- sents tendon elasticity. I. is the fiber length, the pennation angle, and the tendon length. The total muscle-tendon length 7m = Im cos(a) + 4. Anatomical parameters (fiber length, attach- ment points, pennation angle) are initialized from X-ray data; physiological parameters (maximum isometric force, activation dynamics) from experiments and literature. Parameters indicated with asterisks are modified through optimization match measured limb movements. Otherwise param- eters were kept at fixed values. (B) Optimization pipeline for muscle parameters. Muscle parameters are jointly tuned minimize the error between measured and simulated joint angles for two behav- iors (antennal grooming and locomotion). (C) Performance of muscle parameter optimization. Left: root mean squared error (RMSE), normalized with respect to joint movement range. Right: square of the Pearson correlation between simulated and reference joint angles across 7 DoFs (3 joints). not shown and has
Figure 3:
Because the coxa-trochante roll joint does not move during locomotion, constant values. Data from the top 10 individuals are shown and indicated (dots). (D) Moment arms of thoracic, coxal, and femoral muscles with respect to a single joint DoF. Other joints are fixed at mid-range positions. Plots show means and standard deviations across 10 individuals.
The reward function was designed to encourage accurate tracking of reference trajectories in Carte- sian space, joint angle space, and joint velocity space. At each timestep, the reward was defined as:
Ft = 3 exp( - exp(-wPdk.0) ) + exp(- - w Apos) + exp(- w"d..u))
(1)

---

Published as a conference paper at ICLR 2026
where d, cl and d!fe denote the mean Euclidean distances between the simulated body and the reference trajectory in key point position, joint position, and joint velocity, respectively. The reward was clipped to the range [0, 1]. The weights were set wP = 5, and w² 3. To increase robustness, joint angles were initialized with white noise of variance 0.02. For a 7-DoF leg model with 15 MTUs, imitation learning took approximately 96 hours to complete 12700 processor with 128 GB of RAM.
Intel Core i7-
4 RESULTS
4.1 MUSCLE SYNERGIES DURING WALKING AND GROOMING
To investigate how individual muscles contribute to movement, we analyzed activation patterns dur- ing forward walking and grooming. Each walking trial contained three stance-swing cycles, and each grooming trial contained three bouts of leg sweeps (Figure 4A).. Using OpenSim's 's static opti- mization, we estimated joint torques, muscle forces, and activations from our musculoskeletal model for both behaviors.
Among thoracic muscles, the pleural remotor abductor (Pra) was active at stance onset, consistent with its known role in initiating stance motion (Figure 4B, top) (Azevedo et al. 2024). The ter- gopleural promotor and pleural promotor were elevated during stance-to-swing transitions, driving the coxa forward (Figure 4B, top). During grooming, by contrast, the trochanter flexor and ex- tensor showed rhythmic, overlapping activity, whereas they were out of phase during locomotion Figure 4B, bottom).
How are muscles acting in fixed groups (i.e., synergies) to produce these movements? To address this question, applied Non-negative Matrix Factorization (NMF), widely used method for un- covering low-dimensional structure in muscle activity (Rabbi et al.) 2020). to our muscle activity data. Remarkably, just three muscle primitives explained over 90% of the variance (Fiuree 4C); therefore, we proceeded with these first three primitives (see Section A.6 for more details). Each primitive exhibited distinct, non-overlap temporal dynamics (Figure 4D). The first primitive alone captured more than 80% and aligned with stance onset during locomotion and half of the grooming cycle.
We further examined synergy weights to reveal both invariance and flexibility. Sar and Sa con- tributed consistently across all synergies and behaviors (Figure 4E), suggesting that they were task- invariant muscles. By contrast, coxal muscles showed task-specific specializations: flexors con- tributed primarily to synergy 2, whereas extensors contributed synergy 3 for grooming. This specialization was absent in locomotor primitives (Figure 4E), suggesting that these muscles might have broader roles during locomotion.
Together, these findings predict that muscle coordination is highly behavior-dependent and that the fly might flexibly repurpose the same musculature by engaging distinct, task-specific synergies.
4.2 PASSIVE JOINT PROPERTIES FACILITATE AUSCLE-DRIVEN CONTROL
Movement shaped not only by active muscle forces but also by passive biomechanical forces in the legs that can be either resistive or assistive (Ache and Matheson 2013). These properties are thought to offload some control effort from the nervous system, suggesting that they may also facilitate learning in musculoskeletal models.
To test this hypothesis, we systematically varied the passive properties of our MuloCo model's joints. We considered three parameters: stiffness, which produces spring-like forces that return joints to their reference angles; damping, which resists velocity; and armature, which adds joint inertia (Figure 5/A). Armature
included in all conditions to stabilize simulations, while stiff- ness and damping were selectively added or removed, yielding four different biomechanical models (Figure 5B). Each model was then trained with PPO to imitate locomotor kinematics for 15 million steps. We quantified learning performance by measuring the average reward early (2.5-3M steps) and late (14.5-15M steps) in training (Figure SC).
We found that the combination of stiffness and damping yields the fastest learning and the highest performance, outperforming models with either property alone (Figure 5), left). This advantage
7

---

Published as a conference paper at ICLR 2026
A
LF joint angles
Thoracic muscles
Coxal muscles
Femoral muscles
100
0.75
Tpp Pp Pis See Spr
0.75
Smm
The
0.02
Tie
Grooming Locamotion
0.
0.50
0.50
Rudde activatton (AU)
0.01
Jaim angles (deg)
-100
0.25
0.25
1..00
0.00
0.00
100
ground truth
pitct
0.7b
0.70m
0
0.50
yow
ThC pito
-100
0
0.20
pitch
1.00
0.00
0.00
0.2
Time (9)
Time (9)
Time (s)
Time (8)
C
Variance explained vs.
D
Muscle synergies
Muscle synergy weights
number synergies Locomotion
Grooming Locomation
first syn.
second syn.
100.0
Actiation (au)
third syn.
Synergies
9 2
Weight
1.0
Variance (%)
0.0-
0.4
0.0
0.1
Top-b-
Pra
PP
Saf
Sgt
Tinlo
Tho Tifaa
0.0
Number synergies
Time (s)
Muscles
Figure 4: Predicting musele synergies from simulated muscle activations in OpenSim. (A) Simulated joint angle trajectories of the left foreleg (LF) during locomotion (top) and grooming (bottom), obtained from the Static Optinization-Forwarr Dynamics pipeline. The dashed lines indicate the ground truth joint angles. (B) Simulated muscle activation dynamics for thoracic (left), coxal (middle), and femoral (right) muscles during locomotion (top) and grooming (bottom). (C) Variance explained by increasing numbers of synergies for locomotion (black) and grooming (red). Three primitives capture over 90% of the variance. (D) Time courses for the first three extracted synergies (black, gray, and green). (E) Synergy weight matrix showing each muscle's contribution; darker values indicate stronger loading.
persisted to the end of training Figure 5DD, right), although final kinematics were qualitatively indis- tinguishable across models (Figure 5J... We asked how passive properties shape muscle control. Averaging muscle activations across time and seeds revealed similar mean levels across conditions, but with different temporal dynamics (Figure 5F Figure S7).
Overall, these results support the idea that passive joint mechanics can substantially improve the learnability and robustness of muscle-driven control. We speculate that this because they stabi- lize motion and reduce the need for constant correction, allowing the policy to focus on producing effective coordinated muscle patterns rather than correcting instability. In biology. similar divi- sion of labor between passive mechanics and active control might support movement efficiency and robustness (Ache and Matheson 2013).
DISCUSSION
Here, we present an end-to-end pipeline for constructing morphologically realistic Hill-type mus- cle models based on annotated anatomical data. Our framework extracts each muscle's 's anatomi- cal features, estimates physiological parameters, and optimizes unknown parameters using multi- objective optimization. To our knowledge, similarly comprchensive and automated approach linking anatomical inputs to functional, muscle-driven simulations currently lacking in the field, particularly for widely used model organisms like Drosophila melanogaster.
We modeled 15 muscle-tendon units (MTUs) per front leg in NeuroMechFly. biomechanical model of adult Drosophila (Lobato-Rios Rios al. 2022 Wang- Chen--Chen&e al. 2024). After optimizing muscle parameters, we evaluated how each MTU contributes to different joint DoFs during locomotion and grooming. Our results predict that grooming and locomotion employ distinct muscle synergies.
8

---

Published as a conference paper at ICLR 2026
In addition, show that incorporating passive joint properties such damping and stiffness provides useful priors for musculoskeletal control, improving learning efficiency. Together, these results demonstrate that combining detailed musculature with biologically inspired joint mechanics enables fast, robust, and scalable simulations of muscle-driven behavior and facilitates the efficient training of neural controllers.
Passive joint properties
Test cases
C
Motion imitation reward curves
Stifiness
(spring)
Damping
Armature
Armature only
Mean Aoopaan ponard (AU)
407
30*
Armature damping
201
Armature damping sliffness
101
Armature & stiffness
5
15
Steps (M)
Early performance
Late performance
E
Rollout vs. ground fruth joint angles
Muscle activities
Anmeture only (seed 3) Arnature ciapping (seed
Ipp-a-
Tpp-b
Mean reward (AU)
Joint angles (rad)
Muscle
Sar
Spr
8c2
24-
36-
-2.5
Armature damping & stifiness (seed 3)
Armature stifiness (seed 4)
Stte.
00.
+
Stta-D
Att
000
EeT. pithh
Tre
20
34
T&C: ml
Thi yow
Tie
pitsh
add addas als Properties included
a8d 48d adc&e aßs Properties included
0.
0.4
0.4
Time (s)
Time (s)
Exp. type
Figure 5: The impact of passive joint properties on imitation learning of limb kinematics. (A) Schematic of passive joint properties modified in MuJoCo: stiffness (spring). damping, and armature (inertia). (B) Experimental conditions combining these properties: (i) armature only, (ii) armature and damping, (iii) armature and damping and stiffness, and (iv) armature and stiffness. (C) Motion imitation rewards at the evaluation stage over the training period, averaged across 5 random seeds (lines) with 5th-95th percentile ranges (shaded regions). Gray boxes indicate evaluation windows for early and late performance in panel D. (D) Mean rewards early (left) and late (right) training stages. Each point is seed. Statistical comparisons used two-sided Mann- Whitney U tests with correction (* < 0.05, ns: not significant). (B-D) Color code is the same across panels. (E) Joint angle trajectories from ground-truth kinematies (dashed) and policy rollouts (solid) for each condition for seeds with the highest final reward. (F) Time-averaged muscle activities across conditions; darker shading indicates higher activation.
Our work provides a critical interface between the outputs of neural network controllers and physical movements. In our framework, the possible actions taken by the policy sit in space that, through the musculoskeletal model, can only generate physically plausible movements. This eliminates many unrealistic even catastrophic actions that would otherwise burden the learning process. In other words, whereas a model that naively controls target joint states would have to first learn (explicitly or implicitly) world model of physics before learning a policy that operates within physical constraints, our model only needs to learn the latter. This approach enables efficient training scale, offering promising path to reduce the sim-to-real gap (Wechsler al.) 2024) without requiring costly task-specific real-world data, Furthermore, integrating state-dependent exploration strategies like DEP-RL (Schumacher et al., 2022) could further enhance sample efficiency these high-dimensional muscle action spaces. Our work focuses Drosophila, animal with the most complex leg kinematics whose entire nervous system has been mapped. This opens the door to testing neural architectures which are optimized through evolution in embodied settings. We believe our work can impact neuroscience, robotics, and machine learning, areas that share a common focus of understanding and replicating motor control in physically grounded systems.

---

Published as a conference paper at ICLR 2026
6 LIMITATIONS AND FUTURE WORK
Our model has several limitations that can be addressed in future work. One major challenge is the scarcity experimental data and high uncertainty in our chosen physiological parameters. For example, key properties such the maximum isometric forces and contraction velocities were not directly measured but instead were estimated and optimized using a combination of anatomical and physiological data. Our model will benefit from the acquisition of further experimental data that will allow users to narrow down the space of possible parameter values.
Another limitation is that body-body and hody-envinonment contact forces omitted during training. To assess robustness, we rolled out the trained policy with ground contacts enabled us- ing hybrid controller in which the left foreleg was muscle-driven while the remaining legs were ceattion-controlled using recorded locomotion kinematics. Remarkably, without any additional tun- ing, the muscle-driven leg generated sufficient forces to maintain stable posture and propel the body forward (Figure S8p.
Despite these limitations, our work represents the first hiologically-gronndee muscle modeling framework for studying motor control in adult Drosophila melanogaster. It enables researchers to test hypotheses of muscle function and provides foundation for uncovering unmodeled passive dynamics and emergent biomechanical properties. Integrating this framework with emerging exper- imental datasets, such as in vivo muscle imaging (Melis et al. 2024), will help refine physiological and anatomical constraints, narrow down the parameter space, and thereby improving the predictive power of musculoskeletal models.
CODE AND DATA AVAILABILITY
All simulation videos and links to the full source code required to reproduce the results are publicly available at the project website: https::/gizeezzd..cco gi io/flyymaaii -iiiic_mmiic
ACKNOWLEDGEMENTS
We thank Alexander Blanke for providing the Drosophila X-ray dataset. P.R. acknowledges sup- port from a Swiss National Science Foundation (SNSF) Project Grant (175667) and SNSF Ec- cellenza Grant (181239). A.I. and C.N. were funded by the ERC Synergy Salamandra grant (No 951477). S.W. S.W. acknowledges support from a Boehringer Ingelheim Fonds PhD fellowship. J.S.P. was supported by postdoctoral fellowships from EMBO (award ALTT 762-2022), HFSP (award LT0029/2023-L), and the Helen Hay Whitney Foundation. P.G.O, acknowledges support from a Swiss Government Excellence Scholarship for Doctoral Studies and Google PhD Fellowship.
REFERENCES
Donald H Edwards. Neuromechanical simulation. Frontiers in behavioral neuroscience, 4:40, 2010.
Jessica Ausborn, Natalia A Shevtsova, and Simon M Danner. Computational modeling of spinal locomotor circuitry in the age of molecular genetics. International Journal of Molecular Sciences, 22(13):6835, 2021.
Yongi Kim, Shinya Aoi, Soichiro Fujiki, Simon M Danner, Sergey Markin, Jessica Ausborn, Ilya A Rybak, Dai Yanagihara, Kei Senda, and Kazuo Tsuchiya. Contribution of afferent feed- back to adaptive hindlimb walking in cats: neuromusculoskeletal modeling study. Frontiers in Bioengineering and Biotechnology, 10, 2022.
Scott Delp, Frank C Anderson, Allison Arnol, Peter Loan, Ayman Habib, Chand John, Eran Guendelman, and Darryl G Thelen. Opensim: open-source software to create and analyze dynamic simulations of movement. IEEE transactions on biomedical engineering. 54(11):1940- 1950, 2007.
Pavan Ramdya and Auke Jan ljspeert. The neuromechanics of animal locomotion: From biology to robotics and back. Science Robotics, 8(78)xeadg027, 2023.
10

---

Published as a conference paper at ICLR 2026
Thomas Geijtenbeek, Michiel Van De Panne, and A Frank Van Der Stappen. Flexible based locomotion for bipedal creatures. ACM Transactions on Graphics (TOG), 32(6):1-11, 2013.
Seunghwan Lee, Ri Yu, Jungnam Park, Mridul Aanjaneya, Eftychios Sifakis, and Jehee Lee. Dex- terous manipulation and control with volumetric museles. ACM Transactions on Graphics (TOG), 37(4))1-13, 8a.
Jack Wang. Samuel Hamner, Scott L Delp, and Vladlen Koltun. Optimizing locomotion con- trollers using biologically-basee based actuators and objectives. ACM Transactions Graphics (TOG), 31(4):1-11,2012 2012.
Diego Aldarondo, Josh Merel, Jesse D Marshall, Leonard Hasenclever, Ugne Klibaite, Amanda Gellis, Yuval Tassa, Greg Wayne, Matthew Botvinick, and Bence P Ólveczky. virtual rodent predicts the structure of neural activity actoss behaviors. Nature, pages 1-3, 2024.
Sibo Wang-Chen. Victor Alfred Stimpfling, Thomas Ka Chung Lam, Pembe Gizem Özdil, Louise Genoud, Femke Hurtak, and Pavan Ramdya. Neuromechfly v2: simulating embodied sensorimo- tor control in adult drosophila. Nature Methods, pages 1-10, 2024.
Hugo Bellen, Chao Tong, and Hiroshi Tsuda. 100 years of drosophila research and its impact on vertebrate neuroscience: a history lesson for the future. Nature Reviews Neuroscience, 11(7): 514-522, 2010.
Gerald M Rubin and Allan C Spradling. Genetic transformation of drosophila with transposable element vectors. Science, 218(4570):348-335) 1982.
Sven Dorkenwald, Arie Matsliah, Amy R Sterling, Philipp Schlegel, Szi-Chich Yu, Claire E McKel- lar, Albert Lin, Marta Costa, Katharina Eichler, Yijie Yin, et al. Neuronal wiring diagram of an adult brain. Nature, 634(8032): 124--3888 2024.
Jasper S. Phelps, David Grant Colburn Hildebrand, Brett J. Graham, Aaron T. Kuan, Logan A. Thomas, Tri M. Nguyen, Julia Buhmann, Anthony Azevedo, Anne Sustar, Sweta Agrawal, Mingguan Liu, Brendan L. Shanny, Jan Funke, John C. Tuthill, and Wei-Chung Allen Lee. Re- construction of motor control circuits in adult Drosophila using automated transmission electron microscopy. Cell, 184(3):759-774.. 774.e18.. 2021. ISSN 0092-8674. doi: 10. c2.06/6.....2000.12......
Sophie Aimon, Takeo Katsuki, Tongqiu Jia, Logan Grosenick, Michael Broxton, Karl Deisseroth, Terrence J Sejnowski, and Ralph Greenspan. Fast near- brain imaging in adult drosophila during responses to stimuli and behavior. PLoS biology, 17(2):e2007732. 2019.
Julie H Simpson. Descending control of motor sequences in drosophila. Current opinion in neuro- biology, 84:102822, 2024.
Chin-Lin Chen, Laura Hermans, Meera C Viswanathan, Denis Fortun, Florian Aymanns, Michael Unser, Anthony Cammarato, Michael H Dickinson, and Pavan Ramdya. Imaging neural activity in the ventral nerve cord of behaving adult Drosophila. Nature communications, 91), 2018.
Márcia M Aranha and Maria Luisa Vasconcelos. Deciphering drosophila female innate behaviors. Current opinion in neurobiology.
2018.
Pembe Gizem Özdil, Jonathan Arreguit, Clara Scherrer, Auke Ijspeert, and Pavan Ramdya, Cen- tralized brain networks underlie body part coordination during grooming. bioRxiv, 2024. doi: 10.1101/2024.12.17 7.88844.
Roman Vaxenburg. Igor Siwanowicz, Josh Merel, Alice A Robie, Carmen Morrow, Guido Novati, Zinovia Stefanidi, Gert-Jan Both, Gwyneth M Card, Michael B Reiser, et al. Whole-body physics simulation of fruit fly locomotion. Nature, pages 1-3, 2025.
Victor Lobato-Rion Rios, Shravan Tata Ramalingasetty. Pembe Gizem Özdil, Jonathan Arreguit, Auke Jan Ijspeert, and Pavan Ramdya. NeuroMechFly, neuromechanical model of adult Drosophila melanogaster. Nature Methods, 19(5):620-6) 627, May 2022. ISSN 1548-7105. doi: 10.1038/ 541592-022-01466

---

Published as a conference paper at ICLR 2026
Anthony Azevedo, Ellen Lesser, Jasper S Phelps, Brandon Mark, Leila Elabbady, Sumiya Kuroda, Anne Sustar, Anthony Moussa, Avinash Khandelwal. Chris J Dallmann, et al. Connectomic reconstruction of a female drosophila ventral nerve cord. Nature, pages 2024.
Ellen Lesser, Anthony W Azevedo, Jasper S Phelps, Leila Elabbady, Andrew Cook, Duraf- shan Sakeena Syed, Brandon Mark, Sumiya Kuroda, Anne Sustar, Anthony Moussa, al. Synap- tic architecture of leg and wing premotor control networks in drosophila. Nature, 631(8020):
369-377, 2024.
Gesa F. Dinges, Alexander S. Chockley, Till Bockemühl, Kei Ito, Alexander Blanke, and Ansgar Büschges. Location and arrangement of campaniform sensilla Drosophila melanogaster. Jour- nal of Comparative Neurology, 529(4):005-925, 2021. ISSN 1096-9861. doi: 10.1002/ene.
24987.
Vittorio Caggiano, Huawei Wang, Guillaume Durandau, Massimo Sartori, and Vikash Kumar. Myosuite-a contact-rich simulation suite for musculoskeletal motor control. arXiv preprint arXiv:2205.13600, 2022.
Jeongseok Lee, Michael X. Grey, Sehoon Ha, Tobias Kunz, Sumit Jain, Yuting Ye, Siddhartha S. Srinivasa, Mike Stilman, and C Karen Liu. Dart: Dynamic animation and robotics toolkit. The Journal of Open Source Software, 3(22):500, 2018b.
Thomas Geijtenbeck. The hyfydy simulation software. 2021.
Seungmoon Song, Lukasz Kidzińssii Xue Bin Peng, Carmichael Ong, Jennifer Hicks, Sergey Levine, Christopher G Atkeson, and Scott L Delp. Deep reinforcement learning for modeling human locomotion control in neuromechanical simulation. Journal of neuroengineering and re- habilitation, 18:1-17, 2021.
Vittorio Caggiano, Guillaume Durandau, Huiyi Wang. Chun Kwang Tan, Pierre Schumacher, Huawei Wang, Alberto Silvio Chiappa, Alessandro Marin Vargas, Alexander Mathis, Jungdam Won, et al. Myochallenge 2023: Towards human-level dexterity and agility. 2024.
Adam D Sylvester. Steven G Lautzenheiser, and Patricia Ann Kramer. A review of musculoskeletal modelling of human locomotion. Interface Focus, 1(5))20200060, 2021.
Ajay Seth, Jennifer L Hicks, Thomas Uchida, Ayman Habib, Christopher L Dembia, James J Dunne, Carmichael F Ong, Matthew S DeMers, Apoorva Rajagopal, Matthew Millard, et al. OpenSim: Simulating musculoskeletal dynamics and neuromuscular control to study human and animal movement, PloS computational biology, 14(7), 2018.
James P Charles, Ornella Cappellari, and John Hutchinson. A dynamic simulation of museu- loskeletal function in the mouse hindlimb during trotting locomotion. Frontiers in Bioengineering and Biotechnology, 6:61, 2018.
Shravan Tata Ramalingasetty, Simon M. Danner, Jonathan Arreguit, Sergey N. Markin, Dimitri Rodarie, Claudia Kathe, Gregoire Courtine, llya A. Rybak, and Auke Jan Ijspeert. A Whole- Body Musculoskeletal Model of the Mouse. IEEE Access, 9:163861- 2021. ISSN 2169. ieteeeiiee.coo org/
3536. doi: 10. D0.1199///CESSS221...3332 document/ 993
URL
Jesse Gilmer, Susan K Coltman, Geraldine Cuenu, John R Hutchinson, Daniel Huber, Abigail L Person, and Mazen Al Borno. A novel biomechanical model of the proximal mouse forelimb predicts muscle activity in optimal control simulations of reaching movements. Journal of Neu- rophysiology, (264)):2666122)) 2025.
Travis Wolf,f, Steffen Schneider, Paul Soubiran, Adrian Roggenbach, and Mackenzie Weygandt Mathis. Neuro-musculoskcle modeling reveals muscle-level neural dynamics of adaptive learn- ing in sensorimotor cortex. bioRxiv, pages 2024-09, 2024.
Naomichi Ogihara, Haruyuki Makishima, Shinya Aoi, Yasuhiro Sugimoto, Kazuo Tsuchiya, and Masato Nakatsukasa. Development of an anatomically based whole-body musculoskeletal model of the japanese macaque (macaca fuscata). American Journal of Physical Anthropology: The Official Publication of the American Association of Physical Anthropologists, 139(3):323-335 2009.
12

---

Published as a conference paper at ICLR 2026
Sherwin S Chan and Daniel W Moran. Computational model of primate arm: from hand position to joint angles, joint torques and muscle forces. Journal of neural engineering, 3(4):327, 2006.
Pasha A van Bijlert, Thomas Geijtenbeek, Ineke H Smit, Anne $ Schulp, and Karl T Bates. Muscle- driven predictive physics simulations of quadrupedal locomotion in the horse. Integrative and Comparative Biology, 64(3):694-714, 2024.
Jeffery W Rankin, Jonas Rubenson, and John R Hutchinson. Inferring muscle functional roles of the ostrich pelvic limb during walking and running using computer optimization. Journal of the Royal Society Interface, (1)18800200033 2016.
Vittorio La Barbera, Fabio Pardo, Yuval Tassa, Monica Daley, Christopher Richards, Petar Kor- mushev, and John Hutchinson. Ostrichrl: A musculoskeletal ostrich simulation to study bio- mechanical locomotion. arXiv preprint arXiv:2/ 2021.
Mengdi Zhao, Ning Wang, Xinrui Jiang, Xiaoyang Ma, Haixin Ma, Gan He, Kai Du, Lei Ma, and Tiejun Huang. An integrative data-driven model simulating c. elegans brain, body and environ- ment interactions. Nature Computational Science, 4(12):97-9990, 2024.
Shihui Guo, Juncong Lin, Toni Wöhrl, and Minghong Liao. Insects With Data-driven Optimization. Scientific reports, 8(1):1-11, 2018.
Lisoo-Muuuloo-leeettt Model for
Jonathan Arreguit, Shravan Tata Ramalingasetty, and Auke ljspeert. Farms: Framework for animal and robot modeling and simulation. bioRxiv, 2023.
Emilio Bizzi and Vincent CK Cheung. The neural origin of muscle synergies. Frontiers in compu- tational neuroscience, 7:51, 2013.
Lena H Ting and Lucas McKay. Neuromechanics of muscle synergies for posture and movement. Current opinion in neurobiology, 1tt. 17(6):622-628, 2007.
Akira Saito, Aya Tomita, Ryosuke Ando, Kohei Watanabe, and Hiroshi Akima. Muscle synergies are consistent across level and uphill treadmill running. Scientific reports, 8(1):5979, 2018.
Matthew C Tresch, Vincent CK Cheung, and Andrea d' Avella. Matrix factorization algorithms for the identification of muscle synergies: evaluation on simulated and experimental data sets. Journal of neurophysiology. 95(4):2199-2212 2006.
Simon Sponberg. Thomas Daniel, and Adrienne L Fairhall. Dual dimensionality reduction re- veals independent encoding of motor features in muscle synergy for insect flight control. PLoS computational biology, 1 (4)xe0044168 0041688 2015.
Mazen Al Borno, Jennifer L Hicks, and Scott L Delp. The effects of motor modularity on per- formance, learning and generalizability upper-extremity reaching: a computational analysis. Journal of the Royal Society Interface, 17(1177:20200011,200
Cameron Berg, Vittorio Caggiano, and Vikash Kumar. Sar: Generalization of physiological agility and dexterity via synergistic action representation. Autonomous Robots, 48(8):28, 2024.
Salil Bidaye. Till Bockemühl, and Ansgar Büschges. Six-legged walking in insects: how CPGs, peripheral feedback, and descending signals generate coordinated and adaptive motor rhythms. Journal of Neurophysiology, 119(2):45944) 2018. ISSN 0022-3077, 1522-1598. doi: 10.1152/ nn.00658..011..
Sasha N Zill, Chris J Dallmann, Ansgar Bueschges, Sumaiya Chaudhry, and Josef Schmitz. Force dynamics and synergist muscle activation in stick insects: the effects of using joint torques as mechanical stimuli. Journal of neurophysiology, 120(4):1807-122) 2018.
Durafshan Sakeena Syed, Primoz Ravbar, and Julie H Simpson. Inhibitory circuits control leg movements during drosophila grooming. Elife, 14:RP106446, 2026.
Moritz Haustein, Alexander Blanke, Till Bockemühl, and Ansgar Büschges. A leg model based on anatomical landmarks to study 3d joint kinematics of walking in drosophila melanogaster. Frontiers in Bioengineering and Biotechnology, 12: 1357598, 2024.
13

---

Published as a conference paper at ICLR 2026
Cédric Soler, Malgorzata Daczewska, Jean Philippe Da Ponte, Bernard Dastugue, and Krzysztof Jagla. Coordinated development of muscles and tendons of the Drosophila leg. Development, 131 (24):6041-60) 16511, 2004.
Douglas M Swank. Mechanical analysis of drosophila indirect flight and jump muscles. Methods, 56(1):69-7) 77, 2012.
Jan M Ache and Thomas Matheson. Passive joint forces are tuned to limb use insects and drive movements without motor activity. Current Biology, 23(15):1418-144 2013.
Aaron T Kuan, Jasper Phelps, Logan A Thomas, Tri M Nguyen, Julie Han, Chiao-Lin Chen, An- thony W Azevedo, John C Tuthill, Jan Funke, Peter Cloetens, et al. Dense neuronal reconstruction through X-ray holographic nano-tomography. Nature neuroscience, 2020.
Anthony W Azevedo, Evyn S Dickinson, Pralaksha Gurung, Lalanti Venkatasuuramaniaan, Richard Mann, and John C Tuthill. A size principle for recruitment of Drosophila leg motor neurons. eLife, 9:e56754, 2020.
Archibald Vivian Hill. The heat of shortening and the dynamic constants of muscle. Proceedings of the Royal Society of London. Series B-B B-Biological Sciences, (3684)))136-11 195, 1938.
Matthew Millard, Thomas Uchida, Ajay Seth, and Scott L Delp. Flexing computational muscle: modeling and simulation of musculotendon dynamics. Journal of biomechanical engineering, 135(2):021005, 2013.
Catherine C Eldred, Dimitre R Simeonov, Ryan A Koppes, Chaoxing Yang, David Corr, and Douglas M Swank. The mechanical properties of drosophila jump musele expressing wild-type and embryonic myosin isoforms. Biophysical journal, 98(7):1218-1226, 2010.
Alexander Mathis, Pranav Mamidanna, Kevin M. Cury, Taiga Abe, Venkatesh N. Murthy, Macken- zie Weygandt Mathis, and Matthias Bethge. DeepLabCut: markerless pose estimation of user- defined body parts with deep learning. Nature Neuroscience, 2119911211-1289 2018. ISSN doi: 10.108//41199--08--2222 02118------..
1097-6256, 1726.
Pierre Karashchuk, Katie L. Rupp, Evyn S. Dickinson, Sarah Walling-Bell, Elischa Sanders, Eiman Azim, Bingni W. Brunton, and John C. Tuthill. Anipose: A toolkit for robust markerless 3D pose estimation. Cell Reports, 36(13):10973, 2021. ISSN 22111247.
doi: 10.1016/j.cerrp.2021.
109730.
Pembe Gizem Özdil, Sibo Wang- Chen,, Chuanfang Ning, Auke Ijspeert, and Pavan Ramdya. Se- qikpy: a python package for inverse kinematics insects. Journal of Open Source Software, 11 (117):8557, 2026.
Nuttapong Chentanez, Matthias Müller, Miles Macklin, Viktor Makoviychuk, and Stefan Jeschke. Physics-based motion capture imitation with deep reinforcement learning. In Proceedings of the 11th ACM SIGGRAPH Conference on Motion, Interaction and Games, pages 1-10, 2018.
Xue Bin Peng, Pieter Abbeel, Sergey Levine, and Michiel van de Panne. Deepmimic: example- guided deep reinforcement learning of physics-based character skills. ACM Transactions on Graphics, 37(4):1-14, July 2018. ISSN 1557-7368. doi: 10.11457119551732001311 URL
htttp://dxx doi http///ddoo..ooo/1../oo/oo 1eei1111111991 3201311
Josh Merel, Yuval Tassa, Dhruva TB, Sriram Srinivasan, Jay Lemmon, Ziyu Wang, Greg Wayne, and Nicolas Heess. Learning human behaviors from motion capture by adversarial imitation. arXiv preprint
2017.
Xue Bin Peng. Erwin Coumans, Tingnan Zhang, Tsang- Wei Lee, Jie Tan, and Sergey Levine. Learn- ing agile robotic locomotion skills by imitating animals. arXiv preprint mxXiv:2004.00780 2020.
Leonard Hasenclever, Fabio Pardo, Raia Hadsell, Nicolas Heess, and Josh Merel. CoMic: Com-
plementary task learning amp; mimicry for reusable skills. In Hal Daumé III and Aarti Singh, editors. Proceedings of the 37th International Conference Machine Learning. volume 119 of Proceedings of Machine Learning Research, pages 4105-4115. PMLR, 13-18 Jul 2020. URL https://proceed) ngs htwppngwww......////.ep.pp..e.ee www.sp/sseeoo.......... 19/hasench www.seeeneeeeee00mmm eeer220 html
14

---

Published as a conference paper at ICLR 2026
Emanuel Todorov, Tom Erez, and Yuval Tassa. MuJoCo: A physics engine for model-based control. In 2012 JEEE/RSJ International Conference on Intelligett Robots and Systems, pages 0026-5033, 2012. doi: 10.1 20T.:006...0....6660000 ISSN: 2153-0866.
Saran Tunyasuvunakool, Alistair Muldal, Yotam Doron, Siqi Liu, Steven Bohez, Josh Merel, Tom Erez, Timothy Lillicrap, Nicolas Heess, and Yuval Tassa. dm_control: Software and tasks for continuous control. Software Impacts. 6:100022, 2020.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms, 2017.
Mohammad Fazle Rabbi, Claudio Pizzolato, David G Lloyd, Chris P Carty, Daniel Devaprakash, and Laura E Diamond. Non-negative matrix factorisation is the most appropriate method for extraction of muscle synergies in walking and running. Scientific reports, 10(1 10(1):8266, 2020.
Iris Wechsler, Alexander Wolf, Julian Shanbhag, Sigrid Leyendecker, Bjoern M. Eskofier, Anne D. Koelewijn, Sandro Wartzack, and Jörg Michling. Bridging the sim2real gap. investigating de- viations between experimental motion measurements and musculoskeletal simulation results- systematic review. Frontiers in Bioengineering and Biotechnology, 12, June 2024. ISSN 2296- URL
4185. doi: 10.3389/bioe:2224.13338
2024 34
Pierre Schumacher, Daniel Häufle, Dieter Büchler, Syn Schmitt, and Georg Martius. Dep-rl: Em- bodied exploration for reinforcement learning in overactuated and musculoskeletal systems. arXiv preprint (tti::22000004444 2022.
Johan M Melis, Igor Siwanowicz, and Michael Dickinson. Machine learning reveals the control mechanics of an insect wing hinge. Nature, pages 1-9, 2024.
15

---

Published as a conference paper at ICLR 2026
A SUPPLEMENTARY MATERIAL
A.1 1 MUSCLE RECONSTRUCTION AND MODELING OF THE MIDDLE AND HIND LEGS
We concentrated our efforts on developing fully functional front-leg musele model for two main reasons: (i) we have access to a rich kinematic dataset spanning diverse behaviors such as grooming and locomotion, and (ii) multiple complementary datasets exist that validate joint rotation centers and degrees of freedom (DoF's).
Nevertheless, we also annotated muscle fibers in the midlegs FFiuure STJA) and hindlegs FFi ure S2AA) using our custom X-ray dataset. In total, modeled seven per midleg (Figure SIB) and eight MTUs per hindleg (Figure S2B). Because only a single dataset was available for these legs, ability examine muscle attachment points across joint configura- tions or to cross- cross-validate the reconstructions was limited. For this reason, we restricted our work to anatomical reconstruction rather than optimizing the models to reproduce motor behaviors.
units (MTUs)
Anatomical dataset - middle leg
B
OpenSim model
Thorax
Coka
Col
Femur
extensor
latter
Tibia Rlccr
anterior posterior
Figure S1: Middle leg musele reconstructions. (A) Muscles of the thorax, coxa, and femur were segmented from high-resolution X-ray scan and visualized within a 3D mesh of the leg Blender. Distinct colors denote anatomically grouped muscles. (B) Corresponding muscle-tendon units im- plemented in OpenSim preserve anatomical attachment points and fiber routing. Color coding the same as in panel A and reflects functionally grouped muscles.
Future datasets capturing the mid- and hindlegs high resolution will enable more detailed biome- chanical modeling and muscle reconstructions. Once such data become available, our framework can be readily extended to achieve muscle-driven control of six legs.
A.2 REFINING THE BIOMECHANICAL MODEL
fundamental challenge in muscle modeling accurately grounding muscle attachment points and joint movements in anatomical data. To better align our model with biological reality, we replaced NeuroMechFly's foreleg meshes with those derived from X-ray scans (Figure S3A),, where muscles were reconstructed. This adjustment was motivated by two key factors. First, using the same leg mesh as the dataset ensured a one-to-one mapping between the muscles in the dataset and our model. Second, identified major discrepancy in the fully flexed resting posture of the original model's leg compared to real fly anatomy. Specifically, of the front leg forms bridge between the coxa and femur, positioning them side by side rather than stacked vertically when fully flexed (Figure S3B). As a result, when fully extended, the foreleg adopts parenthesis- -iie shape rather than forming straight line (Figure S3A).
the experimental data, the trochanter segment
With this improved biomechanical model, we next investigated the joint rotational axes and centers that could more accurately replicate real leg movements. To determine these parameters, exam-
16

---

Published as a conference paper at ICLR 2026
Anatomical dataset hind leg
B
OpenSim model
Thorak
Tergutrachanter
Cola
tbb
oicehanerr
Ferur
reductor
Tibia extensor Tiba flevar
anterfor postorior
Figure S2: Hind leg muscle reconstructions. (A) Muscles of the thorax, coxa, and femur were segmented from high-resolution X-ray scan and visualized within a 3D mesh of the leg Blender. Distinct colors denote anatomically grouped muscles. (B) Corresponding muscle-tendon units im- plemented in OpenSim preserve anatomical attachment points and fiber routing. Color coding the same as in panel A and reflects functionally grouped muscles.
ined muscle attachment points and joint condyles (Haustein et al. 2024). Our analysis suggested that the coxa-trochanter joint may, fact, possess three Dol's, in contrast to the originally assumed two DoF's (Lobato-Rios et al. 2022).
To test this hypothesis, we used SeqlKPy (Ozdil al., 2026) to design a kinematic chain with three DoFs at the coxa-trochanter joint. The revised joint configuration was equally effective track- ing the leg trajectory compared to the original two-DoF model Figure S3C). However, notably, the Dhree-DoF configuration reduced the reliance thorax-coxa joint rotations during antennal groom- ing, decreasing the range of motion from -- 55% to a more constrained interval of [-30", 7 FFigure S3p), preventing unnatural rotations of the thorax-cox. joint.
A.3 HILL-TYPE MUSCLE MODEL
We chose to use Hill-type muscle model because it offers a good balance between biological real- ism and computational efficiency. Hill-type muscle models are widely adopted in the biomechanics and neuromechanies communities due to their versatility and biological plausibility (Caillet et al.) 2022]. By contrast, Ekeberg-type muscle models are computationally very efficient yet have limited biological correspondence (Ekeberg et al. 2004). Compared with simpler torque-driven spring systems, Hill-type models explicitly represent the key components of a muscle-tendon unit namel,namely, contractile, series elastic, and parallel elastic elements. This structure allows us to capture essential nonlinear properties of biological muscles, including force-velocity and force- length relationships, which are critical for simulating realistic motor behavior.
mass-
We adopted a Hill-type model based on (Millard et al. 2013) and (Geyer et al. 2003). consisting of Contractile Element (CE) for active force generation, Parallel Elasticity (PE) for passive stiffness, and Series Elasticity (SE) representing the tendons. The Buffer Elasticity (BE) was omitted due to its negligible contribution muscle dynamics (Geyer and Herr 2010).
The total muscle force is given by:
FMT (FCE + FPE Fdampex) cos FSE
(S1)
where FCE; FPE, and Paamper are the active, passive, and damping forces, respectively. The active force is computed as:
FoE = ((t))=m..(((c)))fffee
(S2)
where at) is the activation state, Fmax the maximum isometric force, and filce) and fo (vCE) the force-length and force-velocity relationships, respectively. The passive force Fpg is only active during musele elongation, while the damping force depends contractile element velocity.
17

---

Published as a conference paper at ICLR 2026
A
B Extended
Flexed
C
MSE between FK and 3D pose
Original model
Updated model
MSE (mm))
0.5-
Locomation
DOF CTr
DDF CTr
MSE (mem)
Groaming
0.22
TrasfrerAAr
oóka
ferhur Leg segments
Distribution oF leg joint angles
Locomatin
Grooming
Angle (teg)
100-
100
DOF CTr DOF CCr
Replace front Ing meshes
the THG plos nar
yoe oB sloe
maate rall
the and
plsh
cai
The
Th
mh
Degree of freedom
Degres of freedom
Figure S3: Enhancements in the biomechanical model of NeuroMechFly, (A) The forelegs of NeuroMechFly were updated by replacing the original meshes with an anatomically detailed muscle- based dataset. Unlike the previous model, where the fully extended leg was nearly straight, the up- dated model exhibits a natural parenthesis-like curvature, consistent with the biological data (mid- dle). (B) The trochanter's role in leg posture. The trochanter bridges the coxa and femur, positioning them side by side rather than in a linear alignment. In the previous model (green), this structural feature was simplified, whereas the updated model (red) better captures the fly's natural joint config- uration. (C) Mean squared error (MSE) between measured 3D poses and forward kinematics (FK) reconstructed from inverse kinematics, comparing 2-DoF and 3-DoF coxa- toxh-troc joint configu- rations during locomotion and grooming. Both kinematic configurations perform equally well. (D) Distribution of left foreleg joint angles during locomotion and grooming for different degrees of freedom, showing the effect of anatomical refinements and DoF addition the joint angle range.
ThC roll and CTr roll (in bold) show a visible decrement in range in the 3-DoF model.
For compatibility across simulation engines, we set the pennation angle to zero and scaled Faax ac- cordingly. Assuming rigid tendon, the model state variables reduce the muscle fiber length ICE, ensuring C2 C²-continuity. The complete model is defined by physiological parameters (c.g., Fiax, Umax Ot, Tact, Tdeact) and anatomical parameters (e.g., Topt: black, muscle attachment points, and muscle paths), detailed in Table 1.
We modeled each functional muscle group as one MTU. Unlike human muscles, many fly muscles attach directly to the inner cuticle, often without tendons, and fibers within group can vary con- siderably. To model each group, we selected representative fibers using the following criteria: (i) If the muscle attaches via tendon, used the tendon's 's location. If attachment is via multiple fibers, we selected the fiber closest to the group's 's center of mass tasscclypcalll also the median- fiber. (ii) For groups with widely spread attachment points, subdivided them into smaller, more homogeneous clusters and selected one representative fiber per cluster.
A.4 MUSCLE MODELING IN OPENSIM
Muscles were defined as forceset objects in OpenSim, serving as force generators. The Millard 2013 muscle model (Millard et al. (213)) was used, with parameters categorized into three types (Table :): (i) open parameters requiring optimization, (ii) fixed parameters set by model choice, and (iii) default parameters left unchanged.
Most anatomical and physiological parameters were open parameters, extracted or estimated through data-driven methods described in the methods section of this paper. Assuming rigid tendons, tendon compliance was ignored, and pennation angles were set to zero, meaning MTU length changes were solely due to muscle fiber length changes.
Control and activation parameters were adjusted for greater flexibility, with a minimum activation of 0.01 %, while max control and detailed F-I. and F-V curve parameters were left their default
18

---

Published as a conference paper at ICLR 2026
Table 1: A collection of model parameters used in the muscle model. Letters A and P stand for anatomical and physiological parameters, respectively. Parameter
Type Description
Optimal fiber length
The fiber length at which actin-myn mrtinimyosin interactions are maximal, i..., when maximum force can be produced.
Tendon slack length
A
The length beyond which muscle's 's tendons begin resist- ing stretch and producing force.
Pennation angles
A
The angle between fascicle's orientation and the tendon axis.
Muscle cross-section area
The cross-scction area of muscle fibers. A
Muscle attachment points
The points to which a muscle-tendon unit connects at its fiber start (origin) and tendon end (insertion). Optionally an additional attachment point can be defined for more complex muscle paths
Muscle paths
A
The path that muscle-tendon unit travels along from its origin its insertion.
Maximum isometric force
P
The maximum isometric force generated by the Contrac- tile Element (CE) at its optimal length lagt-
Maximum contraction velocity
P
The maximum velocity which the Contractile Element (CE) can contract.
Activation time constants
A time constant determining the transfer speed from neu- ral signal to muscle activation.
Deactivation time constants
A time constant determining the transfer speed from neu- ral signal to muscle deactivation.
Muscle damping factors
The coefficient for the muscle damping force as defined in Millard's 's muscle equation.
values. not explicitly defined, these curves followed empirical formulations Millard et al. 2013). Due to the lack of measured Drosophila musele curves, default eurves in OpenSim were assumed to approximate real physiological behavior.
A.5 MUSCLE PARAMETER OPTIMIZATION USING NSGA-II IN OPENSIM
To optimize muscle parameters, used NSGA-II, an elitist genetic algorithm well-suited for multi- objective optimization problems (Deb et al. 2002), implemented in Python using the geatpy pack- age.
Each muscle-tendon unit (MTU) was optimized in a 6-dimensional parameter space (or 9- dimensional when additional via point included in the muscle path), with separate objec- tive metrics defined for each active degree of freedom (DoF). These objectives aimed to minimize both the mean squared error and the reverse correlation between the ground-truth and simulated mo- tion. To reduce overfitting of muscle parameters, we ran the SO-FD pipeline for both locomotion and grooming behaviors (Figure S4). The total objective score was computed by summing the two scores for each DoF. NSGA-II hyperparameters were empirically tuned (Table 3). and parameter search ranges were iteratively refined based on optimization performance. The distribution of the resulting muscle parameter values is shown in Figure $5
Specifically, the following parameters were optimized:
Maximum isometric force was computed as the product of fixed base tension (from prior experimental work), a scaling factor (optimized between 0.3-3), and the physiological cross-sectional area (PCSA) calculated from CT scans.
Maximum contraction velocity was defined as a base value (estimated from femur-tibia motion videos under X-ray) scaled by factor between 0.4 and 2.4.
19

---

Published as a conference paper at ICLR 2026
Table 2: Millard 2013 muscle model parameters categorized by type and optimization.
Parameter
Value Type
Parameter Type
Optimal fiber length
Anatomical
Open
Tendon slack length
Anatomical
Open
Geometry path
Anatomical
Open
Max isometric force
Physiological
Open
Max contraction velocity Activation time constant Deactivation time constant Ignore tendon compliance Pennation angle at optimal
Physiological
Open
Physiological
Fixed
Physiological
Fixed
Physiological
Fixed
Anatomical
Fixed
Maximum pennation angle
Anatomical
Fixed
Min activation
Physiological
Fixed
Min control
Physiological
Default
Max control
Physiological
Default
Fiber damping
Physiological
Default
Active force-length curve
Physiological
Default
Force-velocity curve
Physiological
Default
Fiber force-length curve
Physiological
Default
Tendon force-length curve
Physiological
Default
Optimal fiber length and tendon slack length were based on ratios observed in the CT data, scaled by factor between 0.8 and 1.2, and capped at maximum of 95% of the total length.
Muscle paths were allowed to vary within a cube 5-10pm around the annotated insertion points.
Table 3: NSGA-II parameters used in optimization.
Muscles
Generation
Population number
Mutation
Cross-over
Thorax
200
120
0.7
0.5
Coxa
200
40
0.7
0.5
Femur
200
300
0.5
0.3
We applied a curriculum learning strategy to each joint using front leg kinematics during groom- ing and locomotion. The warm-up stage (5-10 generations) used conservative hyperparameters to encourage rapid convergence, followed by fine-tuning stage (5-10 generations) that employed more exploratory search settings. Final optimized muscle parameters were validated in the SO-FD pipeline, and the best-performing set was mirrored to the right leg, completing the musculoskeletal model of the front legs.
A.6 RECONSTRUCTION OF MUSCLE ACTIVITY PATTERNS USING REDUCED SYNERGY SETS
To what extent can the recovered muscle synergies serve effective control signals? To address this question, we reconstructed muscle activation patterns using varying numbers synergies and used these reconstructions to drive all foreleg muscles in our model. Although one two synergies captured more than 85% of the variance in the original muscle activity data (Figure 4C), the resulting joint kinematics deviated substantially from the ground truth (Figure A.6AAB). In contrast, recon- structions based on the top three synergies produced joint trajectories that qualitatively matched the measured kinematics Figure A.6C). Interestingly, grooming kinematics recovered more aceu-
20

---

Published as a conference paper at ICLR 2026
A Ground truth (dashed) and optimized (solid) joint angles during locomotion
Thorax-Coxa joint angles
Coxa-Trochanter joint angles
Femur-Tibia joint angles
Joint angle (degres)
roll
pitch
pitch
100
yau
yaw
100
pitch
50
Time (s)
Time (5)
Time (s)
B Ground fruth (dashed) and optimized (solid) joint angles during grooming
Thorax-Coxi joint angles
Coxa-Trochand Trochhnhte joint angles
Femur-Tibia joint angles
Joint angle (degree)
95
pitch
yaw
yay
90
pitch
85
pitch
80
0.0
0.1
0.2
0.3
0.4
0.0
0.1
0.2
0.3
0.4
0.0
0.1
0.2
0.3
0.4
Time (s)
Time
Time
Figure S4: Joint kinematics across all degrees of freedom in reference and simulated data. Joint angle trajectories from (A) locomotion and (B) grooming behaviors are used as reference inputs for optimizing unknown muscle parameters. The MSE and correlation between the reference and resulting trajectories are used as objectives. The thick solid line represents the reference trajectory, the thin solid line shows the trajectory of the best- persorerfoniing individual from the optimization, and the shaded region indicates the standard deviation across the top 10 individuals.
rately with fewer synergies compared to locomotion (Figure A.6D), suggesting that grooming may rely more synergistic and potentially lower-dimensional control algorithm.
A.7 IMITATION LEARNING USING PPO IN MuJoCo
We trained multilayer perceptron (MLP) policies with Proximal Policy Optimization (PPO) (Schul- man et al., 2017) for 15 x 10t steps control frequency of 500 Hz, while running the physics engine at 10,000 Hz to ensure stability. The hyperparameters used for training are listed in Table 4
Initially, our motion capture dataset included only joint angles and velocities. To enrich this dataset, replayed the joint kinematics using point-torque model and recorded all observable physical quantities, including body positions and velocities in Cartesian space. This expanded dataset was then used as the reference trajectory in our imitation learning experiments.
At each timestep, the agent received an observation vector comprising joint angles, 3D positions of selected body parts (i.e., tibia-tarsus and claw), muscle states (i.e., length, velocity, activation. and force), and the remaining time in the clip, as described in (La Barbera et al.) (02T). The policy output consisted of continuous muscle input values in the range [0, 1] for each muscle.
The reward function was designed to encourage accurate tracking of the reference motion, both in joint space and Cartesian space. We initially tested the reward function and training setup point- torque model. Upon achieving successful performance in this simpler setting, we transitioned to the more complex musculoskeletal model. All parameter values were selected through hyperparameter search.
A.8 GROUND LOCOMOTION USING HYBRID MUSCLE- AND PD-CONTROL.
We implemented a hybrid locomotion setup in which the left foreleg (LF) was driven by muscle ac- tivations and all remaining legs were controlled via PD-based position tracking. Fifteen LF muscles received varying activations derived from the trained policy (time step upsampled from 0.002s to 0.0001s). For the other five legs, desired joint angles were obtained from experimental kinemat-
21

---

Published as a conference paper at ICLR 2026
Vax Cartraction Veles Thonee-Dzze
Max bumiiii Furce Cace-Ticcharrer
Mast hoceatiic Furce hemariitee
70
35
20
20
13
10
ThorasCCona
Hasr Thonae
Rie Renurilbbe
60
60
30
20
T3c
750.7
Frrk
Sar
Spr
1811
57
7:
Trls
TVJ
71.0
Masile
Mudi
Pawc
Hax bometticc Force Tho ne Cosa
Nax Contraction velacity Cowa: Tochhrner
Nax Connrcction Velodly Fenu-TTbla
50
40
contrettion
20
Figure S5: Distribution of optimized muscle parameters. Final values for maximum contraction velocity (top), optimal fiber length (middle), and maximum isometric force (bottom) after optimiza- tion. Each dot represents one of the top 10 individuals selected from a total population of 200. Muscles are grouped by segment (thorax, coxa, femur) from left to right.
Table 4: Key hyperparameters used for imitation learning with PPO. The same values were applied to both the actor and critic networks.
Hyperparameter
Value
Network Architecture
[512, 512, 256]
Activation Function
ReLU
Optimizer
Adam x 10-5
Learning Rate
Batch Size
64
Rollout Length (Mstsps)
2048
Epochs per Update
10
ics synchronized with the trained and tracked with PD controller (nominal gains: K₂ 800 and Ka = 5, with reduced gains).
Ground-reaction forces were extracted each time step by summing the magnitudes of contact forces in the tarsal collision geometries for each leg. The resulting per-leg force traces were smoothed via moving average filter with window size of 0.01 and third-order Savitzky-Golay filter with window size of 0.03 s (Figure S8).
22

---

Published as a conference paper at ICLR 2026
Reconsiructed LF joint angles and muscle activations with varying synergy numbers
A
100
synarg
ground
Farli pitch
CTt roll
Top Pp Pre Spr Sn
Thoracic muscles
Coxal muscles
Site The
0.0075
Femoral muscles
W
Joitt angles (deg)
0-
The
-100
CTT
pisch
Muscle activation (AU)
0.5
0.0050
CTr pitch
0.0
0.0
0.0026
100
1.0
1.0
0.0075
0-
0.5
0.5
0.0050
1100
0.0
0.0
0.0025
B
0.0
0.2
0.4
0.0
0.2
0.4
0.0
0.2
0.4
0.0
02
0A
synergiss
100
Join: angles (deg)
0.5
0.010
-100
Muacle octivaatio (AU)
(AU)
0.005
0.g 1.0
0.0
100
1.0
0.015
0,010
0.5
-100
0.005
0.0
0.2
0.4
0.0
02
0.4
0.0
02
0.4
symergies
100
1.0
0
Jort angles (deg)
0.5
0.5
0.010
-100
Musele sotteation (AU)
0.9
0.015
-100
0.005
Time (5)
Time (s)
Time (5)
Time (5)
MRSE vs. synergies
lacomotion
Grooming
MRSE (deg)
7,5
5.0
2.5
2
10
Number of synergies
Figure S6: Reconstructed left foreleg (LF) joint kinematics and muscle activations using vary- ing numbers of muscle synergies. (A-C) Reconstructed left foreleg joint angle trajectories (first column) and muscle activation dynamics for thoracic (second column), coxal (third column), and femoral (fourth column) muscles using (A) n=1, (B) n=2, and (C) n=3 synergies. Reconstructed joint angles are shown alongside ground-truth kinematies (dashed lines) for comparison.
(D) Mean root-square error between reconstructed and ground- joint angles as a function of the number of synergies for grooming (red) and locomotion (black). Increasing the number of synergies im- proves reconstruction accuracy and yields more realistic muscle activation profiles across all muscle groups
23

---

Published as a conference paper at ICLR 2026
A
Muscle activation dynamics with different joint passive properties
Muscle synergies
Thores muscles
Coxa muscles
Ternur muscles
Armalure only (seed 3)
Tpp
Ar only
first syn.
Sym.
0.50
syn.
0.5
0.0
0.0
0.00
Armatur damping
1.0
Am damping
0.50
Mesdle activation (AU)
0.5
0.25
0.0
Activation (AU)
0.00
Armture dammpnn safiness (seed
1.0
1.0
1.0
damping
Am
0.50
0.5
0.5
0.25
0.0
0.0
0.00
1.0
Armature softness (seed
1.0
1.0
Am stiffress
0.50
0.5
0.5
0.25
0.0
0.0
0.00
0.4
0.0
Time (8)
Time (6)
Figure S7: Muscle activation dynamics across passive joint conditions. (A) Simulated activation patterns of thorax (left), coxa (middle), and femur (right) muscles in PPO agents trained with varying passive properties: armature only (top), armature + damping (second row), armature damping stiffness (third row), and armature + stiffnnes (bottom). Each panel shows muscle activations from the best pest-performing seed for that condition. (B) Corresponding time courses of the first three extracted muscle synergies (black, gray, green), computed from the activation patterns shown in panel A.
Ground reaction lorces during locomotion (smoolhed)
LF leg (muscle-dee driven)
leg (position control)
20
Contact (uN)
IM lng (position contral)
RM Ing (position control)
(poeition control)
RH leg (position control)
20
M //
Figure S8: Ground reaction forces during contact-enabled locomotion. Smoothed ground reac- tion forces measured at each leg during locomotion with eody-environment contacts enabled. The left foreleg (LF) is driven by the muscle activations produced by the trained policy (armature & stiff- ness & damping), while the remaining five legs (RF, LM, RM, LH, RH) controlled via position controllers. Peaks the force traces correspond to stance phases. Plotted values represent the norm of the ground reaction forces across the X, Y, and Z axes.
24

---

Published as a conference paper at ICLR 2026
REFERENCES
Moritz Haustein, Alexander Blanke, Till Bockemühl, and Ansgar Büschges. A leg model based on anatomical landmarks study 3d joint kinematies of walking in drosophila melanogaster. Frontiers in Bioengineering and Biotechnology, 12:1357598, 2024.
Victor Lobato-Rios, Shravan Tata Ramalingasetty, Pembe Gizem Özdil, Jonathan Arreguit, Auke Jan Ijspeert, and Pavan Ramdya. NeuroMechhFyy, neuromechanical model of adult Drosophila melanogaster. Nature Methods, (9(5):620-221) May 2022. ISSN 1548-7105. doi: 10. 10.1038/
341592-022-01466-77
Pembe Gizem Özdil, Sibo Wang-Chen, Chuanfang Ning, Auke ljspeert, and Pavan Ramdya. Se- qikpy: python package for inverse kinematics in insects. Journal of Open Source Software, 11 (117):8557, 2026.
Arnault H Caillet, Andrew TM Phillips, Christopher Carty, Dario Farina, and Luca Modenese. Hill- type computational models of muscle-tendon actuators: systematic review. bioRxiv, pages 2022-10, 2022.
Örjan Ekeberg, Marcus Blümel, and Ansgar Büschges. Dynamic simulation of insect walking. Arthropod Structure & Development, 53(3):28773000 July 2004. ISSN 1467-8039. doi: 10.1016/ aasd.2000.05.002
Matthew Millard, Thomas Uchida, Ajay Seth, and Scott L Delp. Flexing computational musele: modeling and simulation of musculotendon dynamics. Journal of biomechanical engineering, 135(2):021055, 2013.
Hartmut Geyer, Andre Seyfarth, and Reinhard Blickhan. Positive force feedback in bouncing gaits? Proceedings of the Royal Society of London. Series B: Biological Sciences, 270(1529):2173- 2183, 2003.
Hartmut Geyer and Hugh Herr. A muscle-reflex model that encodes principles of legged mechanics produces human walking dynamics and muscle activities. IEEE Transactions on neural systems and rehabilitation engineering, 18(3):263-233, 2010.
Kalyanmoy Deb, Amrit Pratap, Sameer Agarwal, and TAMT Meyarivan. A fast and elitist mul- tiobjective genetic algorithm: NSGA-II. IEEE transactions on evolutionary computation, 6(2): 182-197, 2002.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms, 2017.
Vittorio La Barbera, Fabio Pardo, Yuval Tassa, Monica Daley, Christopher Richards, Petar Kor- mushev, and John Hutchinson. Ostrichrl: A musculoskeletal ostrich simulation study bio- mechanical locomotion. arXiv preprint 12.066,,, 2021.
25


Reviews:
[{"review_id": "ridRXILvNx", "reviewer": "Reviewer_eZKz", "summary": "The authors of this manuscript developed a pipeline to estimate the properties of leg muscles for simulation directly from X-ray scans. They then applied them to imitation learning experiments to make predictions about muscle synergies employed across different behaviors, and investigate the influence of passive joint properties on learning.", "questions": "See weaknesses above.", "limitations": "", "rating": 4, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "The muscles in musculoskeletal modeling are a much-needed part of understanding the neural control of movement. This has been sorely lacking in biomechanical simulations of Drosophila, but this paper aims to address that gap. \n\n1. The details of their optimization-based approach to estimating muscle parameters is interesting, since experimentally estimating these properties is challenging. \n\n2. While the results about muscle synergies being different across behaviors are not surprising, the investigation of passive joint properties effect on learning is a clever utilization of MuJoCo joint parameters to address a scientific question about the advantage of using a combination of passive mechanics and active control.", "weaknesses": "1. The result that distinct synergies are employed across behaviors (walking vs. grooming) aligns with well-known concepts. While this confirms the model’s biological plausibility, it does not yield surprising scientific insight.\n\n2. Environmental contact forces and interactions are excluded, restricting the ecological validity of locomotion simulations.\n\n3. Although the optimization framework is solid, the lack of direct experimental validation (e.g., comparison with EMG) limits confidence in the accuracy of the predicted activations and synergies.\n\n4. The topic is very niche.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "65Rvr2WzPM", "reviewer": "Reviewer_TPoP", "summary": "This paper presents a 3D musculoskeletal model of drosophila legs. They propose a data-driven approach to building these models and unknown muscle parameters are estimated by an optimization approach, quite similar to system identification techniques. Once these detailed muscle models have been built, the authors present results on muscle activation patterns, muscle synergies and the effect of passive joint properties like damping, stiffness on muscle activates using Reinforcement Learning technique to mimic recorded drosophila leg movements for two distinct tasks - locomotion and grooming.", "questions": "For most muscles in figure S6, the learned activations seem to be either 0 or 1 across all passive joint properties. Can the authors comment on the plausibility of this in a real musculoskeletal system?\n\nTypically for reward functions in reinforcement learning for locomotion or any in general imitation of a recorded trajectory - there is a term that penalizes effort. For example, sometimes this can be minimizing joint torques, accelerations, muscle activations, etc.. I'm curious if this was considered during experiments? \n\nIm also interested in the authors thoughts about the relationship between muscle synergies and passive joint properties, would it make sense to experiment how the synergies changes as joint properties change?\n\nComment - Typically exploration in reinforcement learning is challenging, especially when the action space is muscle activation. There has been some work in addressing this - https://openreview.net/forum?id=C-xa_D3oTj6 . The idea is not to naively explore but to identify some state dependent exploration that helps learning efficiency. This could be a useful tool for next set of experiments using reinforcement learning.", "limitations": "", "rating": 8, "confidence": 5, "soundness": 4, "presentation": 4, "contribution": 4, "strengths": "The paper is very well written, structured and easy to read. The level of detail, extensive experiments and the thoroughness of the evaluation presented in this paper needs to be appreciated. The problem statement is well motivated and its relation to existing research clearly presented. \n\nThe visualizations used in the paper, both of the muscles as well as quantitative results, are great and are really helpful for a reader to understand the text better. \n \nThe results presented in the paper are very insightful and come from well thought out experiments. The discussions about muscle synergies and effect of passive joint properties will definitely inspire future research.", "weaknesses": "While the results are promising, I found that certain details make the descriptions in the paper confusing. For example, All through section 3.2 and 3.3, one of the tasks being described are locomotion and most readers will have a mental image of a drosophila walking. But, in the limitations and future work section, it’s mentioned that body-body and body-environment contact forces are ignored - does this mean that the trajectory following was done without any contact between the leg and a surface? Adding to the confusion - In the appendix - the authors mention “We concentrated our efforts on developing a fully functional front-leg muscle model for two main reasons”. Does this mean that only the front two leg motion were simulated in the experiments for locomotion? Clearly describing the exact task would be very helpful to the reader.\n\nSome details about imitation learning would be a great addition to the paper - what was the dimensionality of the state and action space?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "vXu5h4uEMP", "reviewer": "Reviewer_E3vf", "summary": "This paper discusses the addition of muscles to the NeuroMechFly drosophila body model. 15 muscle-tendon units were added to each of the forelegs, based on micro-CT imaging. The authors used Hill-type muscle models, and tuned the parameters to reconstruct captured tethered walking and grooming data. They then used imitation learning to learn policies to perform walking and grooming behavior. They also analyzed muscle synergies and examined the effect of passive forces on the policy learning process.", "questions": "1. What exactly are the inputs to the static optimization procedure used to fit muscle parameters? Model structure + instantaneous joint positions, velocities, and accelerations? And what is the loss function?\n2. Why does panel 3c use arbitrary units? Either degrees or (unitless) joint range fractions would be easier to interpret.\n3. The plot labels in panel 3d might be a little confusing to some readers. I think I eventually figured out the shorthand, but it took me a minute.\n4. On line 381, what is meant by \"systematic evaluation\"? Do the curves plotted correspond to the best models after discovered via a grid search, in which case shouldn't the red-orange family be expected to have an advantage, since there's a larger space to explore?\n5. Where did the reference angles for the joints come from? Would it be worth attempting to discover better values for these?\n6. In terms of reproducibility, it looks like the tracked keypoint locations are included in the supplementary material, which should be helpful to readers interested in replicating the authors' results. Are the behavior videos and/or the imaging data available as well, or will they be made available?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 4, "contribution": 2, "strengths": "1. The paper contributes a new component to a whole-body model of the fruit fly: anatomically realistic leg muscles.\n2. The authors integrate anatomical imaging data, behavior data, muscle and joint dynamics modeling, and imitation learning in an interesting way. Their pipeline seems like a reasonable starting point that others can learn from, especially with respect to selecting which muscles parameters to optimize and the actual process of optimizing them.\n3. The paper is well-written and the results are presented clearly.", "weaknesses": "1. The model the authors present only has muscles in parts of the front two legs, and the work doesn't deal with ground contact or external forces, which could make it difficult to directly apply when modeling many behaviors.\n2. It's a little hard to tell without frame-by-frame comparisons, but it seems like the reconstruction quality presented in panel 3c might not be that high, at least for walking data.\n3. I'm not sure what to make of the muscle synergy analysis. If a meaningful set of synergies was really discovered, I would expect to see a knee in panel 4c, but it doesn't seem like there is one. The explained variance numbers are a little hard to interpret as well; it might be more interesting to know how the fit quality would degrade using 1-, 2-, or 3-dimensional control vectors (with learned per-muscle weights) instead of controlling each muscle independently.\n4. The motivating claim on line 451, \"Placing a model of the musculoskeletal system—an additional layer of processing—between the policy network’s output and physical actions stabilizes the control task by making the action space better formed and more error-tolerant\", does not seem to be substantiated. To support this claim, I think the authors would need to compare policy learning in models with and without muscles and per-joint passive forces.\n5. Unless I missed it, there isn't a direct comparison to the original version of the NeuroMechFly model the authors are extending. This would probably help contextualize the behavior fitting results.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "0IbgKvtyXd", "reviewer": "Reviewer_Lmjv", "summary": "This paper constructs a foreleg musculoskeletal systems of fly based on anatomical data and optimization. The authors model 15 muscle-tendon units of each leg based on two public and one custom anatomical dataset, and optimize the muscle parameters to align with fly joint movement on OpenSim. They also convert the OpenSim model to the Mujoco platform, and augment the model stability by adding passive biomechanical forces. Model analysis demonstrate the qualitative accuracy of the fly musculoskeletal model in OpenSim, and the converted Mujoco model with passive forces is capable of imitating fly motion data.", "questions": "1. In figure 3c and Figure 4d, what does (au) means in the y axis label?\n\n2. In figure 4a, it would be better to show the reference joint trajectory compared against the joint movement generated by OpenSim static optimization.\n\n3. How to determine the parameters of passive forces in Mujoco?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The proposed model is the first musculoskeletal model of the fly, which requires substantial effort for the anatomical data. The model provides a platform for better biomechanics and neuroscience research.\n\n2. The whole model building pipeline is detailed, which might help the musculoskeletal modeling of other animals.\n\n3. The paper is clear and well written.", "weaknesses": "1. This model only has foreleg muscles and ignores all the contacts, which cannot achieve common behaviors such as locomotion and manipulation.\n\n2. The whole model building, optimization and analysis is conducted in OpenSim, but the musculoskeletal control is conducted over Mujoco. The Mujoco model has passive biomechanical forces where the OpenSim model does not have. It is not clear whether the muscle accuracy and synergies result in Opensim can be transfered to a different platform.\n\n3. In figure 3c, the RMSE of coxa-trochanter is large with low correlation. Video results on the tracking performances over both OpenSim and Mujoco might better help assessing the model building fidelity.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)