Decoding Mouse Behavior from neural activity in primary visual cortex


  • Ari Williams Indiana University School of Medicine
  • Maria Makin Purdue University Department of Biomedical Engineering



Background and Hypothesis: 

Brain-machine interfaces (BMIs) aim to restore motor control to patients. To develop effective BMIs, it is imperative that we build highly accurate models relating cortical neural activity with natural movements. Neurons in the visual cortex of the brain respond strongly to visual signals, but are also modulated by fluctuating internal states such as alertness, which closely correlates pupil size. We thus hypothesized that an animal’s pupil size can be decoded directly from the activity of a population of neurons in mouse primary visual cortex.  


Project Methods: 

We used an open-access dataset from the Allen Institute for Brain Science, which consisted of in-vivo 2 photon calcium imaging data of 128 neurons recorded from primary visual cortex of an awake mouse viewing a video screen. Video imaging was used to track the mouse’s pupil size.  


To relate neural activity with pupil size, we used linear regression, first smoothing the data with a Savitzky Gall filter. The model was fit on the first 80% of the data, and tested on the remaining 20%, using the computed coefficients to predict pupil size from neural activity. A Pearson correlation coefficient between the true and predicted data was computed. All analyses were performed in Python. 



We found that there was a strong linear relationship between neural activity and pupil size, as the correlation coefficient between the true and predicted data was 0.376. Therefore, we have shown quantitatively that pupil size can be modeled based on neuronal activity within the visual cortex with a high level of accuracy. 


Conclusion and Potential Impact: 

This experiment demonstrates the feasibility of linear regression for modeling neuronal behavior in the visual system, particularly related to pupil size. Results suggest opportunities for further experimental analysis of the relationship between neural activity and other physiological markers, such as running speed.