Systems neuroscience is increasingly able to leverage new recording tools and statistical analyses to describe the coordinated activity of large neuronal populations, even entire brains. Combined with precise stimulation technologies, we could begin to dissect largescale circuits in vivo, constructing models that causally relate neural activity to behavior.
Perturbative testing of hypothesized brain-behavior links, however, requires statistically efficient methods for both estimating and intervening on population-level neural dynamics in real time. To build neural models online, we describe a new machine learning method that combines fast, stable dimensionality reduction with a soft tiling of the resulting neural manifold, allowing dynamics to be approximated as a probability flow between tiles. This method can be fit efficiently, scales to large populations, and outperforms existing methods when dynamics are noise-dominated or feature multi-modal transition probabilities. Using online modeling, we can also ‘close the loop’ by selecting optimal circuit interventions to create maps of causal influence within large networks. Our algorithm uses online convex optimization and adaptive stimulation selection to quickly infer the binary network connectivity, rendering the inference of networks of tens of thousands of neurons in vivo feasible in a single experiment. We additionally present a neural response optimization method with multi-output Gaussian processes that uses active stimulus selection to acquire data at locations where models are likeliest to be wrong given the data seen so far. These methods, which combine online neural modeling with adaptive intervention, open the door to automated, theory-driven circuit dissection at scale, providing a powerful new means of interrogating neural function.