Constant Memory Training for Recurrent Networks

23 concepts18 papers

Training recurrent neural networks (RNNs) typically requires a massive amount of memory. The standard algorithm, Backpropagation Through Time (BPTT), works by "unrolling" the network across every time step in a sequence. To calculate how a weight should change, the system must store every intermediate hidden state to pass the error signal backward. This creates a linear memory bottleneck: the longer the sequence, the more memory you need.

A growing body of research seeks to break this linear dependency, enabling constant memory training. By shifting the computational burden from storage to clever mathematical reformulations, these methods allow models to learn from sequences of infinite length on hardware with limited memory.

The Shift to Forward Mode

The most direct way to achieve constant memory is to stop going backward. Instead of waiting for the end of a sequence to propagate errors, we can propagate the "influence" of parameters forward as the data arrives.

This is the core intuition behind Real-Time Recurrent Learning (RTRL). As Irie notes, RTRL eliminates the need to store hidden state activations for every time step, which can reduce memory requirements by nearly 90% for long sequences. However, standard RTRL is computationally expensive because it requires tracking how every weight affects every neuron. To make this practical, Kag et al. proposed Forward Propagation Through Time (FPTT), which updates parameters at every time step using dynamic regularization, bypassing the vanishing gradient problems common in BPTT. Similarly, Malinowski et al. developed a "skip-sideways" approach for video, using forward-propagating pseudo-gradients to enable real-time learning without storing activation histories.

Learning at Equilibrium

Another powerful strategy for constant memory involves treating the recurrent network as a dynamical system seeking a steady state. If a network's hidden states eventually settle into an equilibrium (or "attractor"), we don't need to track the path it took to get there.

By applying the Implicit Function Theorem, researchers can calculate gradients directly at this equilibrium point. Liao et al. revived this idea with Neumann-RBP, providing a stable gradient approximation that requires only constant memory regardless of the number of iterations. This approach has been extended to various domains:

  • Computer Vision: Linsley et al. used implicit gradients to scale recurrent vision models, allowing them to simulate deep processing dynamics without linear memory growth.
  • Image Restoration: Xiao et al. introduced LETNet, which treats color restoration as a root-finding problem, achieving high performance with a tiny memory footprint.
  • Reasoning: Fein-Ashley et al. proposed Attractor Models that refine token representations toward a fixed point, allowing the model to scale internal computation without increasing memory usage.

Online Learning in Spiking Networks

Spiking Neural Networks (SNNs), which mimic the energy-efficient pulses of biological brains, are natural candidates for constant-memory training. Because SNNs are inherently temporal, BPTT is particularly punishing for them.

Barber argued early on that we should derive optimal learning rules from the deterministic physics of the neurons themselves, enabling online updates. Modern approaches like Spatial Learning Through Time (SLTT), proposed by Meng et al., achieve this by discarding negligible temporal gradients. By focusing on "instantaneous" updates, the authors slashed GPU memory usage by 70% on ImageNet.

Other researchers have looked to biological mechanisms like eligibility traces. Yin et al. and Jiang et al. demonstrated that by using recursive state variables to propagate gradients forward, SNNs can achieve state-of-the-art accuracy on edge devices with $O(1)$ memory scaling.

Efficiency through Sparsity and States

When exact forward-mode gradients are too heavy, approximation provides a path forward. Menick introduced SnAp, which makes RTRL practical by strategically sparsifying the Jacobian matrix. This allows the model to learn long-term dependencies by accumulating an "influence matrix" without the overhead of full history storage.

Alternatively, the recurrent problem can be reframed entirely. Ardakani et al. showed that by building networks from Finite-State Machines (FSMs), one can calculate gradients for the current state transition only. This hardware-centric view treats gradients as register updates, eliminating the need to unroll sequences and reducing memory requirements by a factor of the sequence length. Even more radical "forward-only" methods, such as the subspace optimization proposed by Qin et al., eliminate feedback wiring entirely, facilitating on-chip learning for neuromorphic hardware.

Key Foundational Work

Learning in Spiking Neural Assemblies (2002) — contributed 1 concept elements to this direction.
Implicitly-Defined Neural Networks for Sequence Labeling (2017) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_constant_memory_recurrent_training_2dc07bba,
  title = {constant-memory recurrent training},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/constant-memory-recurrent-training/rdr_2dc07bbaca114937ba8b8009d8f377e9},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_constant_memory_recurrent_training_2dc07bba_v1,
  title = {constant-memory recurrent training},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/constant-memory-recurrent-training/rdr_2dc07bbaca114937ba8b8009d8f377e9/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}

See something wrong? Report a mistake