mlsanityData to 7 Oct 2026

Scaling Recurrent Neural Networks to a Billion Parameters with Zero-Order Optimization

arXiv 2505.17852 ↗First posted 23 May 2025cs.LG cs.AIcited by 4

Not on the map. Why?

Abstract (arXiv)

During inference, Recurrent Neural Networks (RNNs) scale constant in both FLOPs and GPU memory with increasing context length, as they compress all prior tokens into a fixed-size memory. In contrast, transformers scale linearly in FLOPs and, at best, linearly in memory during generation, since they must attend to all previous tokens explicitly. Despite this inference-time advantage, training large RNNs on long contexts remains impractical because standard optimization methods depend on Backpropagation Through Time (BPTT). BPTT requires retention of all intermediate activations during the forward pass, causing memory usage to scale linearly with both context length and model size. In this paper, we show that Zero-Order Optimization (ZOO) methods such as Random-vector Gradient Estimation (RGE) can successfully replace BPTT to train RNNs with convergence rates that match, or exceed BPTT by up to 19 fold, while using orders of magnitude less memory and cost, as the model remains in inference mode throughout training. We further demonstrate that Central-Difference RGE (CD-RGE) corresponds to optimizing a smoothed surrogate loss, inherently regularizing training and improving generalization. Our method matches or outperforms BPTT across three settings: (1) overfitting, (2) transduction, and (3) language modeling. Across all tasks, with sufficient perturbations, our models generalize as well as or better than those trained with BPTT, often in fewer steps. Despite the need for more forward passes per step, we can surpass BPTT wall-clock time per step using recent advancements such as FlashRNN and distributed inference.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 18 of its 29 references that are in the map. First posted on arXiv 23 May 2025.

Builds on

18 of 29 references.

References · 18

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  5. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
  6. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  7. 2020Efficient Transformers: A Surveycited by 784
  8. 2014Neural Turing Machinescited by 630
  9. 2013Optimal rates for zero-order convex optimization: the power of two function evaluationscited by 190
  10. 2016Decoupled Neural Interfaces using Synthetic Gradientscited by 135
  11. 2024Demystify Mamba in Vision: A Linear Attention Perspectivecited by 101
  12. 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 97
6 more
  1. 2021Unbiased Gradient Estimation in Unrolled Computation Graphs with Persistent Evolution Strategiescited by 52
  2. 2017Unbiased Online Recurrent Optimizationcited by 46
  3. 2024Simultaneous Computation and Memory Efficient Zeroth-Order Optimizer for Fine-Tuning Large Language Modelscited by 8
  4. 2024Koopman-informed recurrent neural networkscited by 8
  5. 2024Gradient-Free Training of Recurrent Neural Networks using Random Perturbationscited by 6
  6. 2024Guided-SPSA: Simultaneous Perturbation Stochastic Approximation assisted by the Parameter Shift Rulecited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 1.

4 papers.