UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Open-source real-time feedback system for shaping cortical and behavioral motor dynamics in mice reveal altered cortical networks and behavior with closed-loop training Gupta, Kumar Pankaj

Abstract

Understanding how the brain learns and adapts to behavioral demands requires precise experimental control and computational frameworks capable of revealing large-scale neural dynamics. This thesis presents two complementary approaches: (1) the development of a closed-loop experimental platform for real-time neurofeedback and movement feedback in mice, and (2) a biologically constrained recurrent neural network (RNN) framework to model cortical interactions during learning tasks. First, I developed an open-source system, Closed-Loop-Py (CLoPy), enabling closed-loop neurofeedback (CLNF) and closed-loop movement feedback (CLMF) with low-latency auditory feedback (~63–67 ms). In CLNF experiments, dorsal cortical activity was monitored using widefield GCaMP6s calcium imaging, allowing mice to learn to modulate specific cortical regions of interest (ROIs) to obtain rewards. Both sensory and motor cortices supported learning, with animals adapting to changing task rules over training days (Repeated Measures ANOVA p = 8.3 × 10⁻¹⁰). In CLMF experiments, auditory feedback was based on limb movement, and mice rapidly improved performance compared to controls (RM ANOVA p = 9.6 × 10⁻⁷). Learning was accompanied by reduced task latency and focal cortical activity, suggesting greater behavioral and neural efficiency. These results establish CLoPy as a flexible and accessible platform for studying brain-behavior coupling through real-time feedback. Building on this foundation, I developed CorNet RNN, a modular, biologically inspired computational model for exploring how cortical networks coordinate behavior. Using simulated multi-region datasets, the model accurately recovered hidden inter-regional inputs. When trained on the Allen Institute’s Visual Behavior 2P (VB2P) calcium imaging dataset, CorNet RNN reproduced empirically observed temporal dynamics and connectivity patterns. The network employed correlation-based weight initialization reflecting biological connectivity and was trained with GPU-accelerated backpropagation to match recorded activity. Applying CorNet RNN to in-house CLMF datasets revealed that task engagement reshaped both intra- and inter-regional neural interactions, reflecting adaptive cortical reorganization. Together, these experimental and computational advances demonstrate how closed-loop paradigms, when integrated with biologically constrained neural modeling, can elucidate the principles of learning and cortical coordination. This framework lays the groundwork for future studies linking mesoscale dynamics, neural computation, and behavior in health and disease.

Item Citations and Data

Rights

Attribution-NonCommercial-NoDerivatives 4.0 International