Learning interpretable control inputs and dynamics underlying animal locomotion

Thomas Soares Mullen, Marine Schimel, Guillaume Hennequin, Christian K. Machens, Michael Orger, Adrien Jouary

Introduction

A long-standing challenge in neuroscience is understanding how the brain’s "commands" translate into physical movement. Traditionally, researchers have used cluster analysis to segment behavior into discrete "motor primitives"—like labeling a video of a fish as "turning left" or "swimming forward." While useful, this categorical approach treats behavior as a series of static stamps rather than a continuous flow. It ignores subtle variations within a movement and fails to explain the underlying dynamical "engine" or the "steering wheel" of control inputs.

This paper reframes behavioral modeling as a system identification problem. By modeling animal behavior as a continuous, input-driven dynamical system, the researchers demonstrate that complex locomotor repertoires can be reconstructed using sparse control signals and low-dimensional latent dynamics. This provides a powerful new framework for linking brain activity to behavior.

Methods

To uncover the hidden control signals and dynamical rules governing an animal's motion, the authors utilize iLQR-VAE, a generative model that treats behavioral observations (like tail angles) as the output of a latent dynamical system.

Key technical components include:

  • iLQR-VAE: Unlike standard Variational Autoencoders (VAEs) that use simple encoders, this approach uses the iterative Linear Quadratic Regulator (iLQR)—a classic control algorithm—to infer the most likely inputs that produced a specific movement.
  • Sparse Priors: Assuming the brain doesn't constantly "micromanage" every muscle twitch, the model uses a Student-t prior to find sparse, burst-like control signals that trigger near-autonomous physical sequences.
  • Recurrent Neural Networks (RNNs): Linear Dynamical Systems (LDS) and Minimal Gated Unit (MGU) RNNs are used to capture latent transitions.
  • Balanced Model Reduction: To make high-dimensional RNNs understandable, the authors apply balanced truncation. This control theory technique prunes the model down to its most essential "controllable" and "observable" components, yielding a simplified, interpretable linear model.
The iLQR-VAE framework models zebrafish tail kinematics by inferring sparse motor command inputs that drive latent dynamics.

Datasets

The study validates the model across three distinct regimes:

  1. Synthetic Pendulums: A "ground truth" test involving two coupled pendulums driven by sparse forces to verify the recovery of known physical constants.
  2. Larval Zebrafish: A massive dataset of 30,800 tail-tracking time series, categorized into 11 known movement types (e.g., J-turns, escape starts).
  3. C. elegans: Tracking data from 90 trials where worms were subjected to aversive heat shocks, triggering a specific "escape sequence" (reverse crawl, $\Omega$-turn, forward crawl).

Key Insights and Results

The iLQR-VAE framework yielded several compelling insights into the nature of animal locomotion:

  • "Untangling" the Latent Space: In raw posture space, different movements often look messy and overlapping. The model’s latent space "untangles" these trajectories, making it much easier to classify movements accurately from a single snapshot of the latent state. A linear classifier trained on the MGU latent state significantly outperformed one trained on raw posture data.
  • Sparse Control is Sufficient: The model discovered that a single, low-dimensional "kick" (an impulse) at the start of a swim bout is often enough to generate an entire 200ms trajectory. This aligns with biological "ballistic" movements seen in nature.
  • High Fidelity and Stimulus Alignment: The models achieved reconstruction scores of $R^2 > 0.94$ across the zebrafish dataset. Furthermore, in the C. elegans experiments, the inferred control signals perfectly aligned with the timing of the external heat shock, proving the model can identify when an external stimulus occurred based purely on body kinematics.
  • Decomposing the "Engine": By reducing the zebrafish model from 120 dimensions to 18, the authors identified specific dynamical "modes." They found that turns are a complex superposition of oscillatory and non-oscillatory modes, whereas forward swims are almost purely oscillatory.
The model successfully untangles behavioral trajectories in the latent space (D), identifies sparse control impulses (B), and improves movement classification accuracy (C).

Limitations and Future Work

The authors acknowledge a current reliance on a two-step process: using a nonlinear model (MGU) for the best representation and a linear model (LDS) for the best interpretability. A major goal for future work is a unified framework that co-trains these or uses linearization to bridge the gap.

Additionally, while this approach works beautifully for organisms with relatively simple kinematics like fish and worms, extending it to limb-based locomotion (like mice or flies) will be significantly more complex due to higher degrees of freedom and frequent ground-truth interactions. Finally, exploring different priors for the control signals beyond temporal sparsity could reveal even more about how the brain structures its motor commands.

Summary updated

BibTeX
@inproceedings{mullen2024learning,
  author = {Thomas Soares Mullen and Marine Schimel and Guillaume Hennequin and Christian K. Machens and Michael Orger and Adrien Jouary},
  title = {{Learning interpretable control inputs and dynamics underlying animal locomotion}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=MFCjgEOLJT},
}
Figure