Streaming Reinforcement Learning under Partial Observability with Real-Time Recurrent Learning

Noah Farr, Aryaman Reddi, Carlo D'Eramo, Jan PetersarXiv 2026

TL;DR

This paper introduces a method for deep reinforcement learning in partially observable environments that operates in a "streaming" fashion—learning from one sample at a time without a replay buffer. By utilizing Recurrent Trace Units (RTUs) and efficient Real-Time Recurrent Learning (RTRL), the authors enable agents to maintain long-term memory and solve complex tasks with linear computational complexity, bridging a major gap in online learning.

What Problem Does This Paper Address?

Most modern deep reinforcement learning (RL) relies on "batching" and "replay buffers." Agents store thousands of past experiences and revisit them to stabilize learning. While effective, this is biologically implausible and impractical for resource-constrained "streaming" scenarios like on-device learning or real-time robotics where memory is limited.

The challenge arises when an environment is partially observable (i.e., the agent needs memory to understand the current state). Standard recurrent neural networks (RNNs) like LSTMs or GRUs typically use Backpropagation Through Time (BPTT), which requires storing past data. In a true streaming setting (batch size 1, no buffer), BPTT collapses to a single-step lookback, which is insufficient for memory-heavy tasks. The alternative, Real-Time Recurrent Learning (RTRL), updates gradients forward in time without storing history, but for standard RNNs, its computational cost scales quartically ($O(n^4)$) with the hidden layer size, making it prohibitively slow.

Methods

The authors solve the computational bottleneck of RTRL by using Recurrent Trace Units (RTUs).

  • Diagonal Recurrence: RTUs use a diagonal, complex-valued recurrent architecture. Because each hidden unit only connects to itself, the complex gradient calculations of RTRL simplify from a massive matrix operation to a linear one ($O(n)$).
  • Integration with Streaming RL: They integrate these RTU layers into existing streaming algorithms like Stream AC($\lambda$) and QRC($\lambda$). These algorithms use "eligibility traces" to propagate credit across time steps without re-processing old data.
  • Taylor-Trace Correction: A unique problem in streaming is "staleness." Since weights are updated every single step, the gradient traces maintained by RTRL are calculated using slightly older weights. The authors introduce a first-order Taylor expansion to correct this bias, improving stability when the agent needs to remember information over long horizons.
Computational efficiency of RTUs compared to standard RNNs
Figure 1a: RTUs maintain near-constant per-step wall-clock time as hidden width grows, while GRU and LSTM costs explode.

Datasets

The method was evaluated on four distinct benchmarks:

  1. MemoryChain: A diagnostic task requiring the agent to remember a single bit of information from the very first step and recall it at the end of a long chain.
  2. POPGym: A suite of five discrete control tasks specifically designed to test long-term memory (e.g., Autoencode, Concentration).
  3. Masked MuJoCo: Continuous control tasks (Ant, HalfCheetah, Hopper, Walker2d) where either positions or velocities are hidden, forcing the agent to infer them from movement history.
  4. KMemoryChain: A specialized variant of MemoryChain used to quantitatively measure and bound the "staleness" of gradients.

Key Insights and Ideas

  • Architecture is the Key to Efficiency: The paper demonstrates that the choice of RNN architecture isn't just about representation power; it's about gradient tractability. Diagonal recurrence is the "secret sauce" that makes exact RTRL feasible for deep learning.
  • RTRL vs. TBPTT(1): The experiments show that simply adding an RNN isn't enough. If you use one-step truncated BPTT (the only version possible in streaming without a buffer), the agent fails even simple memory tasks. You need the forward-mode gradients of RTRL to bridge long time gaps.
  • Closing the Gap: While batched methods (like PPO) still generally perform better, this work shows that streaming methods can now solve the same types of memory-dependent tasks, recovering a substantial fraction of batched performance.

Key Results

  • Memory Horizon: On the MemoryChain task, the RTU-RTRL approach sustained performance up to chain lengths of 64, whereas all baselines using one-step truncation collapsed after just 16 steps.
  • POPGym Success: The streaming approach was competitive with batched PPO, with two streaming variants jointly solving all five memory tasks without ever storing a trajectory.
  • Continuous Control: In masked MuJoCo environments, the streaming agent successfully learned to move despite missing sensory data, though it trailed batched PPO by modest margins in some tasks like Ant and Hopper.
Performance on MemoryChain
Figure 1b: RTU-RTRL (purple) maintains high returns over much longer chains than TBPTT(1) baselines.

Limitations and Future Work

  • Single-Layer Constraint: The current implementation uses a single RTU layer. Extending exact, linear-time RTRL to multi-layer recurrent networks remains an open challenge because the gradients between layers become coupled.
  • Performance Gap: In high-dimensional continuous control (MuJoCo), there is still a performance gap between streaming and batched methods. The authors suggest that while streaming is feasible, batched updates are still more sample-efficient when resources allow.
  • Representation Richness: Diagonal recurrence is efficient but potentially less expressive than fully connected RNNs. Future work might explore if this simplicity limits performance on tasks requiring extremely complex internal representations.

Summary updated

BibTeX
@misc{farr2026streaming,
  author = {Noah Farr and Aryaman Reddi and Carlo D'Eramo and Jan Peters},
  title = {{Streaming Reinforcement Learning under Partial Observability with Real-Time Recurrent Learning}},
  year = {2026},
  eprint = {2605.24709},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.24709},
}
Figure