Second-order forward-mode optimization of recurrent neural networks for neuroscience
Youjing Yu, Rui Xia, Qingxi Ma, Máté Lengyel, Guillaume Hennequin
Abstract
Training recurrent neural networks (RNNs) to perform neuroscience tasks can be challenging. Unlike in machine learning where any architectural modification of an RNN (e.g. GRU or LSTM) is acceptable if it facilitates training, the RNN models trained as models of brain dynamics are subject to plausibility constraints that fundamentally exclude the usual machine learning hacks. The “vanilla” RNNs commonly used in computational neuroscience find themselves plagued by ill-conditioned loss surfaces that complicate training and significantly hinder our capacity to investigate the brain dynamics underlying complex tasks. Moreover, some tasks may require very long time horizons which backpropagation cannot handle given typical GPU memory limits. Here, we develop SOFO, a second-order optimizer that efficiently navigates loss surfaces whilst not requiring backpropagation. By relying instead on easily parallelized batched forward-mode differentiation, SOFO enjoys constant memory cost in time. Moreover, unlike most second-order optimizers which involve inherently sequential operations, SOFO’s effective use of GPU parallelism yields a per-iteration wallclock time essentially on par with first-order gradient-based optimizers. We show vastly superior performance compared to Adam on a number of RNN tasks, including a difficult double-reaching motor task and the learning of an adaptive Kalman filter algorithm trained over a long horizon.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 268ef87a-6067-43e4-af3d-fcf85cd66056Cited by top-tier papers2
- RNNs perform task computations by dynamically warping neural representationsArthur Pellegrino, Angus ChadwickNeurIPS 2025 · 5 citations
- Global curvature for second-order optimization of neural networksAlberto BernacchiaICML 2025
Builds on11
- MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer et al.NeurIPS 2021 · 3,862 citations
- On the difficulty of learning chaotic dynamics with RNNsJonas M. Mikhaeil, Zahra Monfared, Daniel DurstewitzNeurIPS 2022 · 109 citations
- Stochastic Subspace Cubic Newton MethodFilip Hanzely, Nikita Doikov, Yurii E. Nesterov, Peter RichtárikICML 2020 · 62 citations
- Inferring Latent Dynamics Underlying Neural Population Activity via Neural Differential EquationsTimothy Doyeon Kim, Thomas Zhihao Luo, Jonathan W. Pillow, Carlos D. BrodyICML 2021 · 62 citations
- Targeted Neural Dynamical ModelingCole L. Hurwitz, Akash Srivastava, Kai Xu, Justin Jude et al.NeurIPS 2021 · 55 citations
Related papers
- Training biologically plausible recurrent neural networks on cognitive tasks with long-term dependenciesWayne Soo, Vishwa Goudar, Xiao-Jing WangNeurIPS 2023 · 16 citations
- Second-Order Neural ODE OptimizerGuan-Horng Liu, Tianrong Chen, Evangelos A. TheodorouNeurIPS 2021 · 20 citations
- Understanding and Improving Optimization in Predictive Coding NetworksNicholas Alonso, Jeffrey L. Krichmar, Emre NeftciAAAI 2024 · 12 citations
- Gradient Flossing: Improving Gradient Descent through Dynamic Control of JacobiansRainer EngelkenNeurIPS 2023 · 14 citations
- Understanding and improving Shampoo and SOAP via Kullback-Leibler MinimizationWu Lin, Scott C. Lowe, Felix Dangel, Runa Eschenhagen et al.ICLR 2026 · 15 citations
