The Challenge of Decoding Behavior
A central quest in systems neuroscience is mapping the relationship between neural activity and behavior. Historically, researchers have simplified "behavior" into low-dimensional variables like running speed or reaction time. While video provides a much richer data source, it is notoriously difficult to analyze and map directly to brain states.
Current automated methods usually fall into two camps:
- Supervised Tracking: Tools like DeepLabCut track specific body parts (e.g., a paw or snout). However, these require manual labeling and might miss subtle but important features like facial expressions or grooming nuances.
- Linear Compression: Methods like Principal Component Analysis (PCA) or Singular Value Decomposition (SVD) can reduce video dimensions, but they are inefficient for the nonlinear nature of video, often requiring hundreds of dimensions to achieve decent reconstruction.
To capture the full "richness" of behavior in an unsupervised, low-dimensional, and biologically meaningful way, researchers introduced BehaveNet—a probabilistic framework designed to link high-dimensional behavioral videos directly back to brain activity.
The BehaveNet Architecture
BehaveNet combines three distinct modeling stages into a single, cohesive pipeline:
- Compression (Convolutional Autoencoder - CAE): The framework uses a CAE to perform nonlinear dimensionality reduction. It squeezes high-resolution video frames into a continuous, low-dimensional latent space (typically around 10–20 dimensions).
- Segmentation (Autoregressive Hidden Markov Model - ARHMM): To make sense of these continuous latents, the ARHMM identifies discrete "behavioral syllables"—regimes of movement defined by specific dynamics (e.g., "stillness," "rearing," or "grooming"). This turns a messy stream of numbers into a sequence of identifiable states.
- Bayesian Decoding: The framework's "killer feature." The authors train feedforward neural networks to map neural activity (calcium imaging or electrophysiology) to the CAE latents and ARHMM states. By combining these predictions with the ARHMM as a probabilistic "prior," they can perform Bayesian inference to reconstruct the most likely behavioral video sequence from brain signals alone.
Validating the Model
The authors validated BehaveNet on three distinct datasets involving head-fixed mice:
- Widefield Calcium Imaging (WFCI): Neural activity across the entire dorsal cortex while the mouse performed a visual decision-making task, recorded with two cameras (side and bottom views).
- Neuropixels (NP): High-density electrophysiological recordings from eight probes across multiple brain regions during spontaneous behavior.
- Neuropixels-zoom (NP-zoom): A cropped version of the NP video focusing specifically on fine-grained facial movements.
Key Insights and Results
Nonlinear Compression is Superior
The CAE consistently outperformed linear methods (SVD/PCA). It achieved better video reconstruction with just 8–16 dimensions than SVD did with over 200. This suggests that the "manifold" of animal behavior is highly nonlinear.
Behavior is Syllabic
The ARHMM successfully segmented behavior into states that were consistent across trials. For example, in the task-based dataset, specific "syllables" were locked to the timing of the stimulus or the mouse grabbing a lever.
Reconstructing Pixels from Neurons
Perhaps the most striking insight is that neural activity contains enough information to reconstruct actual video frames. By using a generative model as a backbone, the decoder doesn't just predict a label; it predicts a visual representation of what the animal was doing.
- Decoding Accuracy: The Bayesian decoder showed massive improvements over baseline models. For the WFCI dataset, it improved latent trace prediction by 77% over the mean-value baseline.
- State Prediction: Discrete behavioral states were decoded with high accuracy (e.g., 67% for the NP-zoom dataset vs. a 37% baseline).
- Generative Power: The model can "dream" new behavioral sequences. By sampling from the ARHMM and passing the results through the CAE decoder, the authors generated synthetic videos that qualitatively resemble real mouse behavior, transitioning naturally between states like sitting still and moving.
Limitations and Future Work
While powerful, BehaveNet has a few hurdles to clear:
- Entanglement: Because the compression is unsupervised, the latent dimensions are "entangled." One dimension might represent a mix of paw movement and head tilt, making it hard to isolate specific body parts for traditional kinematic analysis.
- Sequential Training: Currently, the CAE, ARHMM, and decoders are trained separately. An end-to-end training approach could lead to even better performance.
- Interpretability: While the "syllables" are mathematically distinct, they don't always map perfectly to human-defined labels like "grooming." Future work could involve hybrid models that incorporate some labeled data to make the states more interpretable.
Reference: Batty, E., Whiteway, M. R., et al. (2019). BehaveNet: nonlinear embedding and Bayesian neural decoding of behavioral videos. 33rd Conference on Neural Information Processing Systems (NeurIPS 2019).
Summary updated