Abstract
Advances in optical and electrophysiological recording technologies have made it possible to record the dynamics of thousands of neurons, opening up new possibilities for interpreting and controlling large neural populations in behaving animals. A promising way to extract computational principles from these large datasets is to train data-constrained recurrent neural networks (dRNNs). Performing this training in real-time could open doors for research techniques and medical applications to model and control interventions at single-cell resolution and drive desired forms of animal behavior. However, existing training algorithms for dRNNs are inefficient and have limited scalability, making it a challenge to analyze large neural recordings even in offline scenarios. To address these issues, we introduce a training method termed Convex Optimization of Recurrent Neural Networks (CORNN). In studies of simulated recordings, CORNN attained training speeds ~100-fold faster than traditional optimization approaches while maintaining or enhancing modeling accuracy. We further validated CORNN on simulations with thousands of cells that performed simple computations such as those of a 3-bit flip-flop or the execution of a timed response. Finally, we showed that CORNN can robustly reproduce network dynamics and underlying attractor structures despite mismatches between generator and inference models, severe subsampling of observed neurons, or mismatches in neural time-scales. Overall, by training dRNNs with millions of parameters in subminute processing times on a standard computer, CORNN constitutes a first step towards real-time network reproduction constrained on large-scale neural recordings and a powerful computational tool for advancing the understanding of neural computation.
Introduction: The Real-Time Bottleneck in Neuroscience
Modern neuroscience has entered the era of "big data," where advanced optical and electrophysiological tools allow researchers to record the activity of thousands of neurons simultaneously. To transform this raw data into biological insight, researchers often employ data-constrained Recurrent Neural Networks (dRNNs). These models are trained to mimic recorded neural activity, effectively acting as a "digital twin" that reveals the underlying computational logic—or attractor structures—of the brain.
Despite their potential, dRNNs have been limited by a significant technical hurdle: training speed. Traditional methods like Backpropagation Through Time (BPTT) or FORCE are computationally intensive and scale poorly as the number of recorded neurons grows. This "training bottleneck" makes it impossible to use these models for real-time, closed-loop applications, such as brain-machine interfaces that must adapt to a subject's neural state on-the-fly.
The CORNN Framework: From Chaos to Convexity
The researchers developed CORNN (Convex Optimization of Recurrent Neural Networks) to bypass these limitations. By mathematically reframing the training process, CORNN transforms a difficult, non-convex optimization landscape into a convex one, ensuring a single global minimum and faster convergence.
Key technical innovations include:
- Teacher Forcing (Single-Step Prediction): By using the actual recorded data from the previous time step to predict the next, the model avoids the temporal complexities that slow down standard backpropagation.
- Convexification: Replacing standard $L_2$ loss functions with a weighted cross-entropy loss ensures the error landscape is "friendly" for optimization solvers, preventing the model from getting stuck in local minima.
- Hessian Alignment: This technique aligns the mathematical curvature of the problem with the neural activity's correlation matrix. Since this matrix depends on the data, it can be pre-computed and pre-inverted once at the start, enabling massive parallelization.
- ADMM Solver: The use of the Alternating Direction Method of Multipliers allows the model to incorporate biological constraints (e.g., preventing self-excitation) without sacrificing the speed of the core convex solver.
Benchmarking Performance and Scalability
To validate CORNN, the authors tested it against traditional solvers using complex simulated datasets, including chaotic networks and structured tasks like a 3-bit flip-flop.
The results were transformative. CORNN achieved training speeds roughly 100 times faster than industry standards like FORCE or BPTT. While traditional methods might take hours or even days to converge on large datasets, CORNN consistently reached high reconstruction accuracy in under a minute on standard hardware. This scalability allows for the training of models with millions of parameters in sub-minute processing times.
Key Insights and Future Directions
The primary takeaway is that speed is a feature. By reducing training time from days to seconds, dRNNs transition from an offline analysis tool to an online experimental technology. CORNN proved robust even under "non-ideal" conditions, such as when only 10% of a neural population was observed or when there were mismatches in the assumed neural time-scales.
While currently validated on high-fidelity simulations, the next step involves refining CORNN for the specific noise profiles of real biological data, such as calcium imaging. Nonetheless, by enabling the rapid reproduction of network dynamics, CORNN represents a major leap toward real-time, single-cell resolution brain interventions and a deeper understanding of neural computation.
Summary updated