Manuscript Offprint

arXiv:2610.34833

Streaming Recurrent Memory

Mohamed Elsayed, Minh Pham, A. Rupam Mahmood

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Natural intelligence learns from a continuous stream of sensorimotor experience: data can arrive at high bandwidth, and behavior adapts to feedback as soon as it arrives, even when it is delayed. In contrast, most modern deep learning systems rely on stored datasets, replay buffers, and retained contexts through which credit is later assigned. At high data rates, storing and revisiting past experience can be impractical under tight memory and computational constraints. This paper studies recurrent memory under a streaming learning constraint: the learner learns from experience as soon as it arrives without storing raw experience. We ask whether a streaming learner can maintain a state that remains useful for future prediction and control from delayed feedback. We introduce Streaming Recurrent Memory (SRM), a recurrent memory designed for the streaming setting which preserves information that may matter later while remaining trainable with one-step backpropagation through time (BPTT). SRM provides a streaming-compatible recurrence that is designed to recall past information by content or time, track elapsed steps, and compose transformations whose outcome depends on the order in which inputs are observed. Across controlled memory tasks and streaming applications, SRM learns effectively with one-step BPTT, outperforming recurrent baselines in associative recall and online language modeling while achieving near-perfect success in associative T-Maze with delayed rewards. These results suggest that fixing how inputs are stored in the recurrent state, while learning how that state is read out, enables effective streaming learning without long-range backpropagation.

1 Introduction

Many natural data sources are streams: text, audio, video, and sensorimotor experience unfold continuously, with temporal structure spanning arbitrarily long intervals. Modern sequence learners, particularly Transformers (Vaswani et al. 2017), are instead typically trained on shuffled collections of stored segments. This strategy exploits parallel hardware and underlies state-of-the-art results across language and vision (Brown et al. 2020, Hoffmann et al. 2022, Touvron et al. 2023), but does not preserve the original data stream. A natural alternative is to learn directly from the stream itself: experience arrives once, in order, and the learner must learn without relying on stored history. This setting is not only close to how natural agents learn from continuous, non-repeatable experience, but also matches the constraints faced by many deployed systems, including real-time control and robotics (Vasan et al. 2024, Verma et al. 2023), never-ending video prediction (Carreira et al. 2024, Qian et al. 2024, Han et al. 2025), continual learning (Yoo et al. 2024),

Figure

Figure 1: The streaming learner. The input and feedback arrive sequentially, and the learner updates based on each sample as it arrives without storing. Feedback yty_t may be instructive, such as labels or targets in supervised learning, or evaluative, such as rewards in reinforcement learning, and often arrives delayed. The output oto_t can be a prediction or an action. The learning algorithm updates the parameterized recurrent dynamics function fθf_\theta and the parameterized output function gϕg_\phi.

and adaptive interaction (Dai et al. 2025). We study this setting using recurrent learners, which process one input at a time while maintaining a state that carries information from past inputs into future computations and is used to produce predictions or actions. Figure 1 illustrates the streaming setting studied in this paper: inputs and feedback arrive sequentially, where the learner updates its recurrent state, which carries information from the past, and learns using the provided feedback and its current input.

Learning directly from a stream requires more than compressing a long history into a non-growing state (Hochreiter & Schmidhuber 1997). At each moment, the learner does not yet know which parts of the past will matter: it may later need to recall an observation, retrieve a value associated with a key, estimate elapsed time, reset a learned context, track a state progression, or assign delayed feedback to the state that produced it (Sutton 1988, Schmidhuber 1992, Graves et al. 2014, Weston et al. 2015, Sukhbaatar et al. 2015, Schlag et al. 2021, Merrill et al. 2024). For example, a robot navigating a room may need to remember where it saw an object, bind that object to a location, track its pose, reset context when entering a new room, and credit earlier decisions for later success or failure (Parisotto & Salakhutdinov 2017). Thus, the recurrent state must both preserve useful structure from the past and make that structure usable by later learning signals. Both requirements must be satisfied for effective learning; a memory whose update is easy to learn may not preserve the information needed later, while a memory that preserves information may still be useless if delayed feedback cannot shape how it is used. The streaming setting, therefore, places a stronger constraint on recurrent architectures as their states must not only be expressive enough to store the right structure, but also be learnable from feedback observed in the stream, even when delayed.

Modern recurrent and state-space networks are a natural starting point because they maintain a non-growing state that can be updated step by step (e.g., Orvieto et al. 2023, Gu & Dao 2024, De et al. 2024). However, streaming learning restricts how a recurrent state update can be learned. In offline sequence learning, the learner can learn how information is written into the recurrent state through gradients propagated across a retained window using backpropagation through time (BPTT). If information written at one time is useful later, the later feedback can shape the earlier writing mechanism to incorporate that information. Streaming learning rules out this retained window. Real-Time Recurrent Learning (RTRL; Williams & Zipser 1989) can recover these gradients online, but it must store and update the sensitivity of the state to every parameter, which is tractable only for restricted recurrences, and in practice, it is only approximate when recurrent layers are stacked (Zucchet et al. 2023), defeating its goal of computing exact gradients. In this work, we study streaming learning with BPTT truncated to one step instead. Under one-step BPTT, the current feedback can train how to use the current state, but it cannot directly correct the specific past update that produced that state. As a result, architectures whose useful memory depends on a learned writing mechanism face a credit-assignment bottleneck. This setting, therefore, calls for a different design principle: the state should include as much information as possible, while learning should act mainly on how that state is read.

We introduce Streaming Recurrent Memory (SRM), a recurrent unit built around this principle. SRM constructs memory with a fixed writing mechanism that stores each input in a structured content-time address space instead of learning what to write from later feedback, a gradient path absent in one-step BPTT. The learner is focused on how to read from the memory, where gradients are available immediately: the state preserves information as the stream arrives, while the learner learns how to address and use that state for prediction or control. We evaluate SRM through capability probes, credit-assignment diagnostics, controlled memory tasks, and streaming applications, including next-byte language modeling and streaming deep reinforcement learning. Overall, this paper makes three contributions: we identify why streaming learning with one-step BPTT favors a memory whose writing mechanism does not depend on delayed credit, we introduce a content-time associative memory with a separate tracking channel for order-sensitive computation, and we show that this design learns memory-dependent behavior under one-step BPTT across controlled tasks, reinforcement learning, and language modeling.

References (100)

Couldn't load all references. Reload the page to try again.