NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Exploring the Promise and Limits of Real-Time Recurrent Learning

Kazuki Irie, Anand Gopalakrishnan, Jürgen Schmidhuber

Real-Time Recurrent Learning (RTRL) is a long-overlooked alternative to Backpropagation Through Time (BPTT). Recent research demonstrates that RTRL can be highly effective for training agents in complex 3D environments. By utilizing specific "element-wise" Recurrent Neural Network (RNN) architectures, researchers have made RTRL computationally tractable. This breakthrough allows agents to learn from infinite-length sequences and outperform standard baselines on challenging memory tasks using significantly less data.

The Memory Bottleneck in Sequence Learning

In deep learning, BPTT is the dominant algorithm for training RNNs. However, BPTT has a major structural flaw: it requires storing every single activation state for every time step in a sequence. For long sequences, this consumes massive amounts of memory. To cope, practitioners typically use Truncated BPTT (TBPTT), which cuts off the gradient after a fixed number of steps. Unfortunately, this truncation means the model literally cannot learn dependencies that span longer than the truncation window.

RTRL offers a principled alternative. It computes gradients in a forward fashion, meaning it does not need to store past activations and can account for dependencies of any length. The catch is its computational cost. For a standard RNN, RTRL is computationally ruinous, with a time complexity of $O(N^4)$ and space complexity of $O(N^3)$ relative to the number of hidden units $N$. The core question is whether a middle ground exists where RTRL becomes practical for modern, large-scale reinforcement learning.

Making RTRL Tractable

To bridge the gap between theory and practice, the authors introduce two key components:

  1. Element-wise LSTM (eLSTM): Instead of using fully connected recurrence—where every neuron communicates with every other neuron at the next time step—the authors employ element-wise recurrence. In this architecture, each hidden unit only depends on its own previous state. This mathematical sparsity collapses the complexity of RTRL from $O(N^4)$ down to $O(N^2)$, making it as efficient as a standard forward pass.
  2. Real-Time Recurrent Actor-Critic (R2AC): This tractable RTRL is integrated into an actor-critic reinforcement learning framework based on the IMPALA architecture. This allows the agent to update its policy online without losing the ability to assign credit to actions taken hundreds or thousands of steps ago.

Experiments and Key Results

The approach was tested on several challenging benchmarks, including DMLab-30 (specifically 3D navigation and memory tasks like rooms_watermaze and rooms_select_nonmatching_object), ProcGen's Chaser environment, and five classic Atari-2600 games.

A major insight from these experiments is that untruncated gradients matter significantly for long-horizon tasks. In the DMLab watermaze task, an agent must remember a goal location for roughly 1,000 steps. TBPTT usually truncates at 100 steps, effectively blinding the agent to the long-term reward signal. RTRL provides the untruncated gradient needed to bridge this gap.

Performance comparison across different environments and update frequencies

The results highlight several distinct advantages of the RTRL-based system:

  • Superior Sample Efficiency: On DMLab memory tasks, the RTRL-based system trained on just 1.2 billion frames was competitive with or outperformed state-of-the-art baselines (like R2D2) that were trained on 10 billion frames.
  • Strong Task Performance: In the rooms_watermaze task, RTRL achieved a score of 54.8 compared to TBPTT’s 45.6 (at an update frequency $M=100$).
  • Robustness to Update Frequency: RTRL proved much more robust to the choice of update frequency ($M$). Even when updates were frequent (small $M$), RTRL maintained high performance, whereas TBPTT's performance collapsed because its truncation window became too small to capture meaningful dependencies.

Limitations and Future Directions

Despite its promise, RTRL in its current form has notable limitations. The most critical bottleneck is the multi-layer case. While a single layer of element-wise recurrence is tractable, stacking two layers brings back the $O(N^4)$ complexity because the interaction between layers creates a fully connected dependency over time.

Furthermore, the authors still had to train the convolutional vision stems of the network using TBPTT, as applying RTRL to the feedforward parameters of a vision backbone remains computationally intractable. Finally, modern GPUs are optimized for the parallel-across-time nature of BPTT. RTRL is inherently sequential, making it harder to fully saturate modern hardware without specialized kernels.

Moving forward, hybrid BPTT-RTRL approaches may offer the best path for training deep, multi-layer architectures, combining the memory efficiency and infinite-horizon capabilities of RTRL with the parallel processing strengths of BPTT.

Summary updated

BibTeX
@inproceedings{irie2024exploring,
  author = {Kazuki Irie and Anand Gopalakrishnan and Jürgen Schmidhuber},
  title = {{Exploring the Promise and Limits of Real-Time Recurrent Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=V2cBKtdC3a},
}
Figure