Data-derived agents reveal dynamical reservoirs in mouse cortex for adaptive behavior
Animals generate behaviors that are robust to perturbations yet adaptable to changing conditions. How neural population dynamics support this balance between robustness and flexibility remains unclear. We address this question in goal-directed navigation by combining large-scale calcium imaging from mouse cortex with a data-derived modeling framework. We trained agents to navigate in a simulative environment while recapitulating mouse neural and behavioral data trial-by-trial. Data-derived agents discovered novel dynamics of chaotic attractors, characterized by intrinsically variable trajectories confined within overall goal-specific attracting landscapes. These dynamics support reliable goal achievement while maintaining a structured distribution of navigational trajectories. Circuit-level analyses and perturbations reveal mechanisms that stabilize chaos and enhance behavioral adaptability in the data-derived agents. Thus, through our new modeling approach that emphasizes closed-loop interactions between behavior and neural dynamics, we reveal chaos as a functional principle for flexible behavior.