Decoding mouse behavior to explain single-trial decisions and their relationship with neural activity

Yves Weissenberger, Andrew J. King, Johannes C DahmenbioRxiv 2019

Abstract

Models of behavior typically focus on sparse measurements of motor output over long timescales, limiting their ability to explain momentary decisions or neural activity. We developed data-driven models relating experimental variables to videos of behavior. Applied to mouse operant behavior, they revealed behavioral encoding of cognitive variables. Model-based decoding of videos yielded an accurate account of single-trial behavior in terms of the relationship between cognition, motor output and cortical activity.

Introduction

In neuroscience, behavior is frequently reduced to binary outcomes, such as whether a mouse licked a spout or chose a specific direction. While these metrics are easy to quantify, they overlook the rich, momentary postural changes and movements that occur during a task. This oversimplification creates a gap in our understanding of how complex neural activity relates to behavior. While high-resolution video can capture these nuances, relating raw pixels to internal cognitive variables like motivation or attention is challenging. This research introduces a framework to bridge this gap by creating a data-driven model that remains interpretable through experimental variables.

Methods: The Behavioral Autoencoder (BAE)

The researchers developed the Behavioral Autoencoder (BAE), a novel architecture designed to compress high-dimensional video into interpretable latent states.

The Behavioral Autoencoder (BAE) framework and experimental task.

The BAE builds upon a Variational Autoencoder (VAE) but introduces a critical innovation: a penalty term in the cost function. This term encourages the model to find a latent representation that is linearly predictable from known experimental variables, such as stimulus timing, rewards, and licks. This "relatability" constraint forces the model to align its compressed representation with the experimentalist's parameters.

The study utilized high-resolution video of head-fixed mice performing a sound-detection task, alongside two-photon calcium imaging of the primary auditory cortex (A1). By inverting the BAE, the researchers could perform "model-based decoding," using an animal's posture and movements preceding an action to predict its intent—specifically, whether a lick was stimulus-driven or spontaneous.

Key Insights and Results

Externalization of Cognition

A primary finding is that cognitive variables, such as motivation, are explicitly encoded in an animal's resting posture and subtle movements. Motivation is not just visible in the final outcome of a trial but is reflected in how the animal positions itself throughout the session.

Improving Behavioral Classification

Standard task definitions often misclassify "hits" (any lick within a window after a sound). The BAE can distinguish between true stimulus-driven licks and coincidental spontaneous licks. Neurally, these BAE-identified "false hits" resembled "misses," suggesting the model provides a more biologically accurate classification than traditional task rules.

Performance Metrics

  • Efficiency: A 10-dimensional BAE accounted for as much variance as a 30-dimensional linear PCA model, demonstrating the power of its non-linear approach.
  • Decoding Accuracy: The model-based decoder identified the "intent" behind lick bouts with a mean ROC-AUC of 0.78, significantly outperforming standard model-free methods.
  • Neural Correlation: Choice Probabilities were significantly higher (0.71 vs 0.67) when trials were classified using the BAE's decoded intent rather than standard task definitions.
  • Motor Decoupling: Despite the richness of the behavioral data, A1 population activity only predicted about 3% of the variance in the animal's movements, suggesting that the sensory cortex is not merely a mirror for motor output.

Discussion and Future Directions

The BAE's interpretability is currently dependent on the variables chosen for the penalty term. If a significant environmental factor is omitted, the model may miss relevant behavioral nuances. Additionally, while the head-fixed setup provided high-quality imaging, it constrained the range of natural behaviors. Future applications could extend this framework to free-moving animals using pose-estimation tools. The BAE represents a significant step toward "relatable" deep learning in neuroscience, allowing researchers to decode internal states from overt behavior on a single-trial basis.

Summary updated

BibTeX
@misc{weissenberger2019decoding,
  author = {Yves Weissenberger and Andrew J. King and Johannes C Dahmen},
  title = {{Decoding mouse behavior to explain single-trial decisions and their relationship with neural activity}},
  year = {2019},
  doi = {10.1101/567479},
  howpublished = {bioRxiv},
}
Figure