Feasible closed-loop stimulation for neural latent dynamics control
Modern neuroscience benefits from powerful computational and experimental methods for studying neural populations, including latent dynamics models that predict behavior with few dimensions. But despite their explanatory utility, latent factors are seldom targeted explicitly with experimental perturbations, leaving causal relationships to behavior and inferred dynamical landscapes untested. A promising solution is closed-loop, multi-channel optogenetic control, which, when paired with model predictions, could steer neural trajectories in real time--a feat impossible for traditional, hand-designed stimulation. However, because closed-loop latent control has not been demonstrated in vivo, the hardware and software requirements remain unclear--particularly the necessary stimulation dimensionality and how limited resources such as implant volume and bandwidth should be allocated between stimulation and recording capabilities. Preliminary experiments would thus help guide ongoing technological development. As large-scale exploration of these design spaces in vivo is prohibitively expensive, we conducted a high-throughput simulation survey using biophysically grounded spiking neural networks. We found that low-dimensional actuation is sufficient: in the reference configuration, ~20% of the stimulation channels achieved ~85% of peak control performance, far fewer than the number of neurons. Furthermore, allocating channels roughly equally between stimulation and recording optimized behavioral control, whereas pairing many electrodes with a single light source--the prevailing practice in experimental labs--performed poorly. Even without heavily optimizing modeling or control, we obtained >60% tracking error reduction and >90% evoked behavior accuracy on average for optimal channel counts. These results held across extensive parameter variations, suggesting that closed-loop latent control is feasible with accessible channel counts and establishing design principles for future tool development and in vivo experiments.