Software · MusBioMaus

Musculoskeletal Biomechanical Maus

Merging neural control and musculoskeletal modeling to advance neuroscience: a model of the mouse arm, from the bones and muscles up to the spiking neural network that drives them.

The MusBioMaus model: a mouse skeleton with the arm muscles drawn as colored paths
Preprint · bioRxiv 2025 (v2)

Neuro-musculoskeletal modeling reveals muscle-level neural dynamics of adaptive learning in sensorimotor cortex

Travis DeWolf*, Steffen Schneider*, Paul Soubiran, Adrian Roggenbach, Paolo Muratore & Mackenzie Weygandt Mathis†

*co-first authors · †correspondence: mackenzie.mathis@epfl.ch

Cite this work
@article{DeWolf2025MusBioMaus,
  title   = {Neuro-musculoskeletal modeling reveals muscle-level neural dynamics of adaptive learning in sensorimotor cortex},
  author  = {DeWolf, Travis and Schneider, Steffen and Soubiran, Paul and Roggenbach, Adrian and Muratore, Paolo and Mathis, Mackenzie Weygandt},
  journal = {bioRxiv},
  year    = {2025},
  doi     = {10.1101/2024.09.11.612513}
}
How the code works

From a filmed reach to 50 muscles firing.

MusBioMaus turns 3D DeepLabCut keypoints into joint angles, then drives a MuJoCo arm with 50 muscles to reproduce the movement and reads out what its muscle spindles would sense. Scrub through a real run, then step through the pipeline that produced it.

Replay a real run

Mouse “Jaguar”, day 19, seconds 21–29, at half speed. Drag to rotate; click a muscle or hover the heat map to link them.

—21.00 s
Hand error —model vs. mouse, this frame
About this replay

Traces: hand x, y, z for the mouse (dashed) and the model (solid). Phase windows are those used in the demo notebook. Bones and muscle paths: MuJoCo, posed with the simulated joint angles; each muscle keeps its MuJoCo color, and activation sets its opacity and width. Data: the repository's demo output, downsampled from 5 kHz to 75 Hz; positions are lightly smoothed for display (Gaussian, 27–40 ms). Spindle rates are scaled per signal (Ia: ; II: Hz).

Start from 3D keypoints

The input is 3D DeepLabCut tracking of the mouse's right arm, lifted to 3D with our MouseArmTransformer or FMPose3D: keypoints on the shoulder, elbow, wrist, hand and all four digits, at 75 frames per second. The demo pulls a public session from Zenodo and cuts out an 8-second snippet.

In the replay: turn on “Mouse (DeepLabCut)” to see the real mouse's keypoints.

Demo.ipynbkey = {'mouse_name': 'Jaguar', 'day': 19, 'attempt': 2}
start_time = 21  # seconds
end_time = 29  # seconds

keypoints_url = 'https://zenodo.org/records/15517677/...'
Skeleton

Built from CT scans.

CT scans of the mouse in different postures, and the 23 bone segments of the arm. The bones below move with the simulated joint angles from the replay above; drag to rotate, or pull them apart.

Loading the bones…
CT scans1 / 9
Videos

We like the way you move.

Mimic the mouse

MusBioMaus re-enacting the main mouse behavior: reach, pull, and return the hand to base.

Fly-through of the Maus model

This model shows the results of the extensive MRI and CT scanning to locate all 50 arm muscle insertion points. We used these as the primary seeds for the model, then optimized with neural networks to find the final connection points (see Suppl. Figure 1 and Methods).

3D DeepLabCut for mouse arm tracking

The 3D-lifted DeepLabCut outputs, shown with the input video.

CEBRA on M1 and S1 neural data

Data from an adaptation session with CEBRA embeddings from S1 and M1. Top left: a 2D video with a DeepLabCut overlay. Bottom left: the joystick movements (top view). Middle: co-recorded M1 and S1 neurons for an example session, with the joystick and extracted hand coordinates below. Right: the S1 (top) and M1 (bottom) embeddings. The epoch is shown in the video title.

Contact

For questions, write to Mackenzie: mackenzie.mathis@epfl.ch.