Manuscript Offprint
arXiv:2610.34833Streaming Recurrent Memory
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 1: The streaming learner. The input and feedback arrive sequentially, and the learner updates based on each sample as it arrives without storing. Feedback 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 can be a prediction or an action. The learning algorithm updates the parameterized recurrent dynamics function and the parameterized output function .
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.
2.1 Backpropagation Through Time (BPTT)
Note that to obtain , we must account for both the direct and indirect effects of changing on , since influences directly and also through every earlier state. Since we can unroll the function , we write the gradient as
We need to keep unrolling further because again affects through two pathways. Let us define , , and . We can write the recursive relationship as follows:
(under the assumption that is independent of W)
(2)
This relationship is utilized in BPTT by efficiently calculating the summation backward without forming or storing . Calculating this requires storing all previous inputs and states . In other words, we need to backpropagate the gradient in time, starting from the current time step and going all the way back to the first time step. The computational and memory cost, therefore, grows linearly with the sequence length, since each update must traverse the entire history.
We can simplify the intensive computation needed by BPTT if we truncate the backpropagation process by going back in time up to time step , where . This creates the Truncated-Backpropagation Through Time (T-BPTT) gradient (Williams & Peng 1990):
T-BPTT reduces the cost of full BPTT by retaining only the most recent inputs and states. Its approximation, however, removes all credit-assignment paths that extend more than T steps into the past, which can make learning myopic. It also requires a finite buffer of past experience, and is therefore not streaming unless T = 1. We refer to this limiting case as one-step BPTT. Although one-step BPTT propagates gradient credit only one step backward, it can still learn dependencies over longer horizons indirectly, because the recurrent state evolves online and may preserve information from earlier observations. Algorithm 1 in Appendix A gives the one-step BPTT pseudocode.
2.2 Real-time Recurrent Learning (RTRL)
Instead of relying on the rolled-out equation (Eq. 2 or Eq. 3), we can instead compute , known also as the sensitivity matrix, incrementally using its recursive relationship. This process is known as Real-Time Recurrent Learning (RTRL) (Williams & Zipser 1989) given by
The quantities and depend only on the current input and state, so they can be computed without BPTT; only must be stored to update incrementally. Unlike T-BPTT, RTRL computes the exact gradient without approximation, provided the parameters are held fixed. In general, storing and updating is computationally expensive and scales poorly with the number of units and parameters, but RTRL becomes practical mainly when the recurrence has an exploitable structure, such as diagonal or sparse dynamics. These savings, however, hold only for a single recurrent layer. When stacked, the input to an upper layer depends on the parameters and past states of the layers below it, so exact sensitivities must also track these cross-layer dependencies and lose their elementwise structure. BPTT does not suffer from this limitation since it never stores . In practice, RTRL is applied within each layer, treating the output of the layer below as a fixed input, which makes the gradient approximate for the multi-layer networks case (Zucchet et al. 2023). Algorithm 2 in Appendix B gives the RTRL pseudocode.
2.3 State Construction
The recurrent update determines both what enters the state and how existing content is transformed. We focus on recurrences that are linear in the state, the class used by modern linear recurrent and state-space models (Gu et al. 2022, Orvieto et al. 2023, Gu & Dao 2024, De et al. 2024). Linearity in the state separates these two roles explicitly and makes stability a property of the transition alone. Any such recurrence can be written as
We call the write: it maps the current input to the new content added to the state. We call the transition: it maps the current input to the matrix that transforms the content already in the state. Both may carry learnable parameters, and we here make no further assumption on either.
Input-independent transition. When the transition is a fixed matrix, for every input , unrolling Eq. 5 from gives . Each write is therefore transformed according to its age. This supports retention, decay, oscillation, and fixed delays, but the current input cannot change how existing memory is transformed.
Modern linear recurrent and state-space layers exploit this structure directly. For example, LRU and S5 parameterize the fixed transition as a diagonal matrix with complex entries (Orvieto et al. 2023, Smith et al. 2023): the magnitude of each entry sets how quickly the corresponding state coordinate decays, and its phase sets how fast it oscillates. The resulting traces distinguish when an input occurred, but their subsequent evolution is independent of which inputs arrive later.
Input-dependent transition. When the transition depends on the current input, unrolling Eq. 5 gives . Now, each write is transformed by the ordered product of all past transitions. A common choice restricts the transition to be diagonal for every input, with (or ). This choice provides useful input-dependent retention and forgetting, but any two such transitions commute: . Consequently, exchanging two diagonal transitions does not change how they transform content already in the state. To make that transformation depend on order, the transition family must contain a non-commuting pair, . Such transitions support computations in which inputs act as ordered operations on memory, including finite-state, permutation, and group tracking (Merrill et al. 2024).
Input-dependent diagonal transitions are used by selective state-space and gated linear-recurrent models to control retention from the current input (Gu & Dao 2024, De et al. 2024, Katsch 2023, Qin et al.
2024). Replacing them with unrestricted dense matrices would permit non-commutativity but would give up the elementwise update and the simple stability constraint that motivates diagonal recurrences: stability would instead depend on controlling the global spectral properties of the transition matrix, while repeated unconstrained matrix products can produce vanishing or exploding dynamics (Pascanu et al. 2013, Miller & Hardt 2019, Zucchet & Orvieto 2024).
Householder transitions. A structured transition that does not commute, yet stays cheap and stable, is the generalized Householder transformation (Householder 1958, Grazzi et al. 2025), with . It leaves the part of the state orthogonal to the axis unchanged and scales the part along it by . For it never expands the state, and at it is a norm-preserving reflection. Two transitions whose axes are neither parallel nor orthogonal do not commute, so the state depends on the order of the inputs. For example, with , choosing swaps coordinates and . By choosing according to each successive swap, a one-hot state can track an object through an arbitrary sequence of swaps. With , this is the transition of DeltaNet (Schlag et al. 2021, Yang et al. 2024b); extending to lets linear RNNs track parity and permutations (Grazzi et al. 2025, Siems et al. 2025).
3 Streaming Recurrent Memory
We want a recurrent memory that can be trained with one-step BPTT and still compose inputs in an order-sensitive way. We design it around four desiderata. (D1) Reliable credit-free write: as one-step BPTT feedback cannot reach how earlier inputs were written, each input should enter the state in a form that can be retrieved later, without requiring the writing mechanism to be learned. (D2) Cheap computation: the recurrence should be structured such that its parameters can be learned cheaply. (D3) Order sensitivity: part of the state should evolve under input-dependent transitions that do not commute. (D4) Stability: repeated transitions should stay bounded by construction.
SRM specializes Eq. 5 into two states, a matrix memory with key width and value width , and a tracking vector :
The memory decays each row by the retention and stores the value under the unit-norm key , with , where is a fixed oscillatory clock. These key and value projections incorporate causal 1D convolutions with a kernel size of two. The memory is read with the query . The tracking vector is reflected along the axis with strength . The maps , and are fixed random semi-orthogonal projections, so the only learned parameters are the query maps , the retention , and the strength . Neither state enters the other's update, and is passed to the output function . In practice, SRM uses read heads with separate query maps and concatenates their reads, so its output has width .
3.1 Fixed content-time write
Under one-step BPTT, is treated as a constant, so feedback at time t has no gradient path to a write made at any earlier step. A learned write would therefore be trained only by the feedback available when it writes, which cannot indicate what a later step will need. SRM therefore fixes the write and learns the read, partly achieving D1. The key combines content, the current and previous input, with time, a clock whose rotors cycle at geometrically spaced frequencies (see Appendix C for more details), so a stored value can later be found by what preceded it or by when it occurred. The value carries both current and previous inputs, so a retrieval returns the pair. The fixed maps are semi-orthogonal, which keeps distinct inputs at distinct addresses, and the key is normalized, so every write has the same magnitude.
Key-value outer products are the classical linear associative memory (Willshaw et al. 1969, Anderson 1972, Kohonen 1972), revisited as fast weights (Schmidhuber 1992, Ba et al. 2016, Schlag et al. 2021) and linear attention (Katharopoulos et al. 2020). Fixing the input maps and learning only a readout is the idea of reservoir computing (Jaeger 2001, Maass et al. 2002), which SRM applies to the write alone. Keys that see the previous input are related to short convolutions in linear-recurrent layers (Fu et al. 2023, Kimi Team 2025) and to previous-token heads in Transformers (Olsson et al. 2022), and the clock follows sinusoidal and rotary position encodings (Vaswani et al. 2017, Su et al. 2024).
3.2 Learned associative read
For a memory , the read returns the values whose keys match the query, plus interference from other keys that is small when keys are nearly orthogonal. The query has a content part and a time part, matching the key, so retrieval can select by content, by time, or both. We initialize as a semi-orthogonal map scaled by and at zero, so time addressing is learned. Because the query acts only on the current memory, its one-step BPTT gradient is exact (D1).
This is the read of linear attention and fast weights (Katharopoulos et al. 2020, Schlag et al. 2021) and of gated linear-attention and state-space models (Sun et al. 2023, Yang et al. 2024a, Dao & Gu 2024, Beck et al. 2024), whose capacity limits are well studied (Arora et al. 2024a;b, Okpekpe & Orvieto 2025). Delta-rule models reduce interference by learning to erase before writing (Schlag et al. 2021, Yang et al. 2024b; 2025). SRM relies on nearly orthogonal fixed keys instead, because learning what to erase would need gradient from later feedback.
3.3 Diagonal decaying retention
The retention should control how long memory persists without moving what is stored. Row of the memory is scaled by , so every step is contractive (D4) and exact RTRL sensitivities are elementwise and thus cheap to compute (D2). Unrolling gives : a stored key keeps its coordinates up to a decay, so the query that matched it when it was written still matches it later. A transition that rotated or mixed key coordinates would move stored addresses in ways a query cannot undo (see Section 4.5). At initialization, and with drawn from the LRU ring distribution (Orvieto et al. 2023), so the memory starts as leaky integrators over a range of time scales. Under one-step BPTT, the retention and the tracking strength are the only learned parameters whose gradient is used: they receive credit for their effect on the current step, but not for how their earlier values shaped the state being read.
Input-dependent diagonal gates, descending from LSTM and GRU gating (Hochreiter & Schmidhuber 1997, Cho et al. 2014), control retention in selective state-space, gated linear-recurrent, and gated linear-attention models (Gu & Dao 2024, De et al. 2024, Katsch 2023, Qin et al. 2024, Yang et al. 2024a, Feng et al. 2024); SRM's double-exponential parameterization follows LRU (Orvieto et al. 2023). Such transitions commute, which limits order-sensitive computation (Merrill et al. 2024).
3.4 Householder tracking channel
Because the retention commutes, the memory cannot follow a state that evolves under non-commuting operations, such as which cup hides an object after a sequence of swaps. The tracking vector does this with the Householder transition (D3), which never expands because (D4). The axis map is fixed at a random semi-orthogonal initialization. The strength is initialized such that ( , ).
DeltaNet and its gated variants (Schlag et al. 2021, Yang et al. 2024b; 2025, Kimi Team 2025) apply this transformation to the memory itself, with the written key as axis. SRM applies it to a separate small state with a fixed axis map, so tracking never moves the addresses of the associative memory.
4 Experiments
We first use a diagnostic task suite evaluate the units at initialization, the reliability of one-step BPTT gradients, and streaming learning performance. We then test SRM on Multi-Query Associative Recall (Arora et al. 2024a), streaming byte-level language modeling on TinyStories (Eldan & Li 2023), and control from delayed reward in an associative T-Maze, and finally ablate its components.
We choose four recurrent baselines for their varying differences from SRM. Linear RTU (Elelimy et al. 2024) uses an input-independent complex-diagonal state transition. eLSTM (Irie et al. 2024) uses input-dependent gates and its recurrence is nonlinear in the state. GLA (Yang et al. 2024a), like SRM, is a linear attention unit with input-dependent diagonal gating, providing a streamlined architectural baseline. KDA (Kimi Team 2025) applies a generalized Householder update directly to the memory channel and shares SRM's use of a 1D convolution. All learners operate under the streaming setting, that is, without replay, batches, or retained context. Performance is evaluated online: accuracy, success rate, or loss is measured on each sample before the learner updates on it. We present the key results here and give the full details in Appendix D.
4.1 Diagnostics
We introduce a task suite (Table 1 and Appendix D.3) developed to evaluate SRM along the design desiderata. The suite comprises ten tasks, each involving a different type of information, to provide a holistic evaluation of the ability to store and retain incoming information (D1). The suite covers tasks that test the capabilities to recall information by content or time, as well as to track counts, orders, and states. Two of the tasks (Orient and Shell) concern tracking non-commuting operations (D3).
| Task | Target at query time |
|---|---|
| Presence | Whether a queried symbol appeared in the sequence. |
| Successor | The symbol that appeared right after the queried symbol. |
| Predecessor | The symbol that appeared right before the queried symbol. |
| Count | The number of occurrences of the queried symbol. |
| Order | Whether the first queried symbol appeared before the second in the presentation. |
| Position | The symbol presented at a queried position. |
| Parity | Addition modulo 2—tracking under the symmetric group . |
| Orient | Composition of rotations and reflections—tracking under the dihedral group . |
| Shell | Composition of cup permutations—tracking under the symmetric group . |
| Mod3 | Addition modulo 3—accumulation in the cyclic group . |
Table 1: The task suite. Each task tests how well a unit encodes and retains one kind of information. Each sequence consists of 5 to 8 task-dependent input symbols, followed by a sequence of waiting symbols. At the end of the sequence, the learner is prompted to give an answer, at which point feedback is provided.
4.1.1 Memory Capabilities without Learning
We evaluate how well each unit can encode and retain information before any learning happens (D1). We unfold the units through a fixed set of examples, then continue the unfolding through a waiting period to test how well information is retained. We record the recurrent states after 0, 100, 200, and 500 of these waiting timesteps. At each checkpoint, we fit a fresh ridge probe on the states to predict the target (Figure 2); details in Appendix D.4.
SRM can encode and retain information well in most tasks. The previous-input projections, and , enable SRM to encode Successor and Predecessor well. The clock term, , is essential in Position. The probe falls short in Orient, and fails in Shell and Mod3 across all units, suggesting that the information is not present at initialization. Overall, compared to baseline units, SRM exhibits a greater capacity to store and retain information at initialization.

Figure 2: Accuracy of ridge-probe over recurrent states unfolded to delay checkpoints, without training. Lines connect points from each of the 10 random initializations. Dotted lines indicate chance-level accuracy.
4.1.2 Reliability of one-step BPTT in learning SRM parameters
We compare the reliability of learning with one-step BPTT relative to full BPTT. At time T, the latter computes the gradients for each parameter by accounting for the contributions of all steps in the past: . On the other hand, one-step BPTT only uses the most recent step and omits the contributions from all earlier steps: . Learning with one-step BPTT becomes myopic unless the omitted is captured by . We can measure the direction alignment between and , for a parameter, with cosine similarity, and denote this alignment score as . Negative indicates that one-step BPTT degrades the parameters beyond one-step memory. The learning becomes unreliable if misalignment occurs frequently. We study how this alignment varies across tasks and changes as the loss evolves, for SRM.
For each task, we train the readout parameters to allow the loss to evolve in a controlled manner. While we keep all non-readout parameters fixed throughout this procedure, we differentiate the loss with respect to selected parameters to obtain their alignment scores. We compute for the key projection matrix (which denotes the concatenation of , , and ), the value projection matrix (concatenation of and ), and the gate's parameters , . We additionally track and , two bias terms for the key and the value that are functionally fixed at 0 by SRM. Figure 3 shows a representative subset of results. We also compute the squared negative alignment, , and average it over all training steps and runs. Full details are in Appendix D.5.
Write params. —K —b_K —V —b_V Gate params. —W_λ —b_λ
Cosine Similarity of One-Step Gradients vs. Earlier-Steps Gradients ↑
Mean Squared Negative Alignment ↓

Figure 3: (Left) Alignment score (-1 to 1; higher is better) throughout readout training, for all of 10 SRM initializations. (Right) Squared negative alignment (0 to 1; lower is better), averaged over all steps and runs.
The results indicate that the learning of the gate parameters is, at the very least, innocuous. Across all tasks and readout conditions, rarely ever falls below 0. stays consistently high, indicating that the retention strength is well learnable with one-step BPTT. For the write parameters, and remain near 0 throughout but occasionally become negative. Even though and are typically positive in Mod3, they exhibit high run-to-run variance in all tasks. In many runs, they suffer from negative alignment, sometimes severely, and do not improve with the condition of the readout. Overall, the results suggest that learning the write parameters with one-step BPTT is not a reliable process.
4.1.3 Memory Capabilities with Streaming Learning
We examine whether the observed nascent memory capabilities at initialization translate to realized capabilities, under one-step BPTT training (solid lines in Figure 4). On every task where untrained SRM has high probe accuracy relative to the other units, SRM trained under one-step BPTT also obtains an online accuracy higher than other units. This pattern is clear in all of the first seven tasks. In Orient, Shell and Mod3, where the ridge probe struggles, SRM performs well with training nevertheless. Overall, no unit outperforms SRM, across every task, when trained under one-step BPTT.

Figure 4: Training accuracy on the task suite under one-step BPTT (solid lines) and RTRL (dashed lines), averaged over 10 runs. Shading shows standard deviation for one-step BPTT. Dotted lines indicate chance.
We also report RTRL results (dashed lines in Figure 4). With one recurrent layer, RTRL updates are exact, and serve as an approximate upper bound performance on unit's performance given its capacity. Compared to baseline units, SRM under one-step BPTT closely matches its RTRL performance, across all tasks, suggesting that its design is particularly effective for one-step BPTT, which also better satisfies (D2) than RTRL (Appendix E). From here on, we focus on one-step BPTT.
4.2 Streaming Learning on Multi-Query Associative Recall
We evaluate SRM on the Multi-Query Associative Recall (MQAR) task (Arora et al. 2024a), where the learner must recall multiple values associated with their corresponding keys. The demand to store multiple independent bindings simultaneously challenges associative memory with increased interference among bindings. Table 2 (and Figure 9a) reports the late-training accuracy on MQAR at three model dimensions across two task settings. Across tested model capacities, SRM outperforms all baselines, including KDA, which also uses causal 1D convolutions effective for this task. These results show that SRM's gains extend beyond the task suite to established benchmarks for context-aware retention and associative binding.
4.3 Streaming Byte-Level Language Modeling
Next, we train language models one byte at a time on the TinyStories training set (Eldan & Li 2023). The learner reads the stories in dataset order with batch size one and resets its recurrent state at every story boundary. At each byte, it predicts the next byte, incurs the cross-entropy loss, and makes one update before the next byte arrives. Each model creates an embedding for it, passes it through four stacked residual blocks of recurrent units (see Appendix D.9), and then predicts the next byte with a linear head. All models are trained with one-step BPTT for 100M bytes, about 5% of the roughly 2B-byte corpus (see Figure 9).
Table 2(b) reports the online loss after 10M and 20M bytes, and Figure 9(b) in the Appendix shows the full learning curves. Among the baselines, RTU reaches the lowest online loss, followed by KDA and eLSTM, while GLA remains the highest throughout. SRM has the lowest online loss of all units from the first few
| Unit | MQAR accuracy (%) ↑ | TinyStories loss ↓ | ||||||
|---|---|---|---|---|---|---|---|---|
| Sequence length 64 | Sequence length 128 | Bytes seen | ||||||
| Small | Medium | Large | Small | Medium | Large | 10M | 20M | |
| GLA | 11.1 | 17.6 | 23.3 | 1.3 | 8.3 | 11.3 | ||
| KDA | 5.6 | 20.1 | 92.4 | 2.7 | 5.2 | 62.3 | ||
| RTU | 0.8 | 0.8 | 14.0 | 0.9 | 0.7 | 2.3 | ||
| eLSTM | 7.3 | 13.8 | 22.6 | 2.3 | 1.8 | 9.6 | ||
| SRM | 22.5 | 77.3 | 99.1 | 12.4 | 51.6 | 96.9 | ||
Table 2: MQAR: accuracy over the final 10% of training sequences at three FLOPs-matched model dimensions (Table 5), averaged over 10 runs. TinyStories: online next-byte loss averaged over the 1M bytes preceding the 10M- and 20M-byte marks, reported as mean ± standard deviation over three independent runs; all language models have around 13M parameters. Best value per column is shown in bold.
million bytes onward and reaches around 0.82, below RTU, which achieves about 0.89. At this point, SRM can already produce locally coherent TinyStories-like text: its samples follow the typical story structure and are mostly grammatical within a sentence, although characters, pronouns, and events are not kept consistent across sentences (see Appendix D.9.3 for a generation sample). We also found that, in this regime, the optimizer matters as much as the unit: with RMSprop (Tieleman & Hinton 2012), the online loss can stop improving after a few million bytes and then drifts upward, whereas StreamingOptimizer (Elsayed et al. 2026) keeps decreasing (see Appendix D.9.1). Furthermore, we study performance scaling with parameter count in Appendix D.9.2, showing it scales under streaming learning.
4.4 Memory-Dependent Control with Streaming Reinforcement Learning
Finally, we ask whether SRM's binding and retrieval survive when the only feedback is a delayed scalar reward. In an associative variant of the T-Maze (Bakker 2001), the agent observes K key-value pairs one token at a time, each value being left or right, waits through a delay, and is then shown one of the keys at a junction; turning toward that key's value gives a reward of +1 and the other turn -1. With K = 1 this is the standard memory T-Maze, and with K > 1 the agent must bind each value to its key, a reinforcement-learning counterpart of Successor. We used the Stream-AC algorithm (Elsayed et al. 2026) that updates at every step. We compare SRM against RTU (Elelimy et al. 2024) and report the average online success rate and the final success rate over ten independent runs (see Appendix D.8 for more details).

Figure 5: Associative T-Maze with K key-value pairs. Left four panels: online success rate during training averaged over 10 runs with shaded area representing one standard error. Dotted line is chance. Rightmost panel shows online success over the final 10% of episodes (dots are individual seeds).
Figure 5 shows that both units solve K = 1, but they have different performance once values must be bound to keys: SRM's final online success stays above 0.99 for K = 2, 4, and 8, whereas RTU plateaus at 0.84, 0.67, and 0.63. We attribute the gap to the write rather than to credit assignment. SRM's key includes the previous input, so each value is already stored under an address that identifies its key, and the reward only has to train the read.
4.5 Ablation studies
The ablation results in Figure 6 (Left) suggest that different tasks rely on different components of SRM, which together form a strong overall architecture. The previous-input projections ( and ) are essential in Predecessor (and also Successor). The clock is essential in Position, and also handy in Shell and Mod3. The tracking channel is necessary for SRM to perform non-commutative tracking reliably.

Figure 6: (Left) Ablation of SRM's components: tracking channel, clock, and previous-input projections. Results show the average and standard deviation of 10 runs. (Right) SRM's recall accuracy degrades when the write weights (K and V) and their bias terms are made learnable, across various input alphabet sizes.
We study the role of freezing write parameters in SRM through a synthetic recall task in Figure 6 (Right). Training sequences are constructed using symbols randomly sampled from a discrete alphabet. The learner must recall the first-seen symbol at the end of the sequence. Enlarging the alphabet while keeping the model capacity fixed creates a bottleneck in the model's ability to write distinct symbol representations into its recurrent state. The overlapping representation of distinct input symbols consequently leads to greater interference from other keys during retrieval.
Since learning write parameters with one-step BPTT is unreliable, SRM freezes them at a semi-orthogonal initialization. Compared with variants whose write weights (K and V) and bias terms are learnable, frozen-write SRM achieves the highest recall accuracy and remains robust as the alphabet grows up to 512. We also overlay the learning curves of SRM variants with learnable write parameters in Figure 6 (Left) to showcase the role of freezing write parameters beyond the recall task.
Next, we investigate the design of SRM's tracking channel. SRM applies its Householder transition to a separate vector rather than to the memory . We test this choice by merging the two states in two ways, with all parameters frozen at initialization so that the results reflect what the state update preserves rather than what training allows (Figure 7; details in Appendix D.12).
Reflecting the memory moves stored keys. Applying the reflection to the memory as well, with a constant strength , gives , as in delta-rule models (Yang et al. 2025, Kimi Team 2025). This update moves every stored key with each later input, so the query that matched it at write time no longer does. The measured overlap with the written position decreases with the number of subsequent inputs (Figure 7a). With , retrieval after 32 and 64 inputs falls to 0.6 and 0.3, against 0.95 and 0.9 for SRM (Figure 7b).
Conversely, writing into the tracking vector corrupts it. In a five-cup shell game where each swap of cups and reflects along with , is exactly the one-hot position of the ball, and a linear probe is perfect at every length. We then add a write to this update, , where is the input under a fixed random map , normalized to unit length, and sets the size of the write relative to the unit-norm . This lowers accuracy after 32 swaps to 0.6 for and 0.3 for (Figure 7c). The memory alone is near chance after six swaps, because its diagonal transitions commute. SRM's random-axis tracking vector is also near chance after 6 swaps, so its gains on state tracking (Figure 4) come from training.
5 Related Work
Streaming learning. Most deep learning methods assume access to the entire dataset, whereas real-world applications rely on a continuous stream of experience. A few supervised methods operate directly under
(a) Stored Address

(b) Key-Value Retrieval
(c) Shell Game, 5 Cups
Figure 7: Merging the tracking channel and the memory, with SRM at initialization. (a) Fraction of a stored key left at its written position after number of inputs. (b) Key-value retrieval accuracy; the dotted line is chance. (c) Linear-probe accuracy for the ball position in a five-cup shell game.
the streaming setting (Hayes et al. 2019, Saran et al. 2023, Hayes & Kanan 2022), and related efforts have adapted reinforcement learning (Elsayed et al. 2026, Vasan et al. 2024), language modeling (Goyal et al. 2009), and video prediction (Carreira et al. 2024, Qian et al. 2024, Han et al. 2025) to the same regime. These works establish that streaming learning is feasible, but they largely consider fully observable settings where memory is not needed. Memory under streaming learning is what we study here.
Recurrent and state-space sequence models. Linear recurrent and state-space models have re-emerged as efficient alternatives to attention, trading quadratic context for a bounded recurrent state (Orvieto et al. 2023, Gu & Dao 2024, De et al. 2024, Beck et al. 2024). Much of their efficiency comes from diagonal or complex-diagonal transitions and parallel-scan training (Katharopoulos et al. 2020, Sun et al. 2023, Katsch 2023, Qin et al. 2024, Feng et al. 2024). The same diagonal structure makes their transitions commute, which limits order-sensitive computation (Merrill et al. 2024), and these models are usually trained by backpropagation through time over windows with state resets at segment boundaries (Dai et al. 2019, Hutchins et al. 2022). SRM departs on both axes: it keeps a commuting diagonal retention for its associative memory but adds a separate non-commuting tracking channel, and it is designed to be trained in a streaming manner without resetting or storing contexts.
Online credit assignment. Real-time recurrent learning (RTRL) (Williams & Zipser 1989) computes exact gradients forward in time without storing the stream. Its cost has led to many approximations (e.g., Tallec & Ollivier 2018, Zucchet et al. 2023, Elelimy et al. 2024). SRM is designed for the streaming setting. Its write has no parameters and its tracking channel uses a fixed axis map. Exact RTRL is cheap for both components of SRM: the retention sensitivity is elementwise across memory rows, and the tracking-strength sensitivity has only entries.
6 Limitations and Conclusion
SRM's fixed write bounds its capacity: stored values are separated only by near-orthogonal fixed keys, so interference grows with the number of items held, and SRM cannot learn what to erase. The tracking channel learns only its strength, so what it can track depends on the input representation. Our experiments are small in scale: diagnostic tasks with short sequences, a simple reinforcement-learning task, and small language models by current standards. We did not explore larger language models because of the compute cost of streaming learning: updating after every byte at batch size one limits parallelism across steps and makes it harder to exploit GPUs' parallel processing capabilities. Hardware optimized for low-batch autoregressive decoding may help address this constraint, provided it also efficiently supports gradient updates.
We studied recurrent memory under streaming learning, with one-step BPTT, where a useful memory must keep past information retrievable while the feedback at each step can only shape how that state is used. Because this feedback cannot reach past writes, SRM fixes its content-time write and learns only how to read, and it places order-sensitive computation in a separate Householder tracking channel so that tracking never disturbs stored addresses. Across diagnostics, controlled tasks, and reinforcement learning, SRM learns memory-dependent behavior under one-step BPTT that the baselines often do not: it retains information that baselines lose, and in the associative T-Maze it binds and retrieves key-value pairs from delayed reward. It also reaches the lowest online loss among all units as a streaming byte-level language model. These results suggest that when credit cannot be carried back through time, how the state is written matters as much as how it is learned.
References
James A. Anderson. A simple neural network generating an interactive memory. Mathematical Biosciences, 14:197–220, 1972.
Simran Arora, Sabri Eyuboglu, Aman Timalsina, Isys Johnson, Michael Poli, James Zou, Atri Rudra, and Christopher Re. Zoology: Measuring and improving recall in efficient language models. In The Twelfth International Conference on Learning Representations, 2024a. URL https://openreview.net/forum?id=LY3ukUANko.
Simran Arora, Sabri Eyuboglu, Michael Zhang, Aman Timalsina, Silas Alberti, James Zou, Atri Rudra, and Christopher Re. Simple linear attention language models balance the recall-throughput tradeoff. In ICLR 2024 Workshop on Mathematical and Empirical Understanding of Foundation Models, 2024b. URL https://openreview.net/forum?id=qRlcoPhEoD.
Jimmy Ba, Geoffrey E. Hinton, Volodymyr Mnih, Joel Z. Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Advances in Neural Information Processing Systems, 2016.
Bram Bakker. Reinforcement learning with long short-term memory. In Advances in Neural Information Processing Systems, volume 14, 2001.
Maximilian Beck, Korbinian Pöppel, Markus Spanring, Andreas Auer, Oleksandra Prudnikova, Michael Kopp, Günter Klambauer, Johannes Brandstetter, and Sepp Hochreiter. xlstm: Extended long short-term memory. Advances in Neural Information Processing Systems, 37:107547–107603, 2024.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.
João Carreira, Michael King, Viorica Patraucean, Dilara Gokay, Catalin Ionescu, Yi Yang, Daniel Zoran, Joseph Heyward, Carl Doersch, Yusuf Aytar, et al. Learning from one continuous video stream. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 28751–28761, 2024.
Kyunghyun Cho, Bart van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pp. 1724–1734, 2014.
Xiangxiang Dai, Yuejin Xie, Maoli Liu, Xuchuang Wang, Zhuohua Li, Huanyu Wang, and John Lui. Multi-agent conversational online learning for adaptive llm response identification. arXiv preprint arXiv:2501.01849, 2025.
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, pp. 2978–2988, 2019.
Tri Dao and Albert Gu. Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality. In Forty-first International Conference on Machine Learning, 2024. URL https://openreview.net/forum?id=ztn8FCR1td.
Soham De, Samuel L Smith, Anushan Fernando, Aleksandar Botev, George Cristian-Muraru, Albert Gu, Ruba Haroun, Leonard Berrada, Yutian Chen, Srivatsan Srinivasan, et al. Griffin: Mixing gated linear recurrences with local attention for efficient language models. arXiv preprint arXiv:2402.19427, 2024.
Ronen Eldan and Yuanzhi Li. Tinystories: How small can language models be and still speak coherent english? arXiv preprint arXiv:2305.07759, 2023.
Esraa Elelimy, Adam White, Michael Bowling, and Martha White. Real-time recurrent learning using trace units in reinforcement learning. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=4UvMOnZMam.
Mohamed Elsayed, Elena Sorina Lupu, Gautham Vasan, and A Rupam Mahmood. Streaming deep reinforcement learning finally works. arXiv preprint arXiv:2410.14606, 2026.
Leo Feng, Frederick Tung, Mohamed Osama Ahmed, Yoshua Bengio, and Hossein Hajimirsadegh. Were rnns all we needed? arXiv preprint arXiv:2410.01201, 2024.
Daniel Y. Fu, Tri Dao, Khaled K. Saab, Armin W. Thomas, Atri Rudra, and Christopher Ré. Hungry hungry hippos: Towards language modeling with state space models. In International Conference on Learning Representations, 2023.
Amit Goyal, Hal Daumé III, and Suresh Venkatasubramanian. Streaming for large scale nlp: Language modeling. In Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pp. 512–520, 2009.
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
Riccardo Grazzi, Julien Siems, Arber Zela, Jörg Franke, Frank Hutter, et al. Unlocking state-tracking in linear rnns through negative eigenvalues. In International Conference on Learning Representations, volume 2025, pp. 36565–36597, 2025.
Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=tEYskw1VY2.
Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations, 2022.
Tengda Han, Dilara Gokay, Joseph Heyward, Chuhan Zhang, Daniel Zoran, Viorica Pătrăucean, João Carreira, Dima Damen, and Andrew Zisserman. Learning from streaming video with orthogonal gradients. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13651–13660, 2025.
Tyler L Hayes and Christopher Kanan. Online continual learning for embedded devices. In Conference on Lifelong Learning Agents, pp. 744–766. PMLR, 2022.
Tyler L Hayes, Nathan D Cahill, and Christopher Kanan. Memory efficient experience replay for streaming learning. In 2019 International Conference on Robotics and Automation (ICRA), pp. 9769–9776. IEEE, 2019.
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556, 2022.
Alston S. Householder. Unitary triangularization of a nonsymmetric matrix. Journal of the ACM, 5(4): 339–342, 1958.
DeLesley Hutchins, Imanol Schlag, Yuhuai Wu, Ethan Dyer, and Behnam Neyshabur. Block-recurrent transformers. Advances in neural information processing systems, 35:33248–33261, 2022.
Kazuki Irie, Anand Gopalakrishnan, and Jürgen Schmidhuber. Exploring the promise and limits of real-time recurrent learning. In The Twelfth International Conference on Learning Representations, 2024.
Herbert Jaeger. The “echo state” approach to analysing and training recurrent neural networks. Technical Report GMD Report 148, German National Research Center for Information Technology, 2001.
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International conference on machine learning, pp. 5156–5165. PMLR, 2020.
Tobias Katsch. Gateloop: Fully data-controlled linear recurrence for sequence modeling. arXiv preprint arXiv:2311.01927, 2023.
Kimi Team. Kimi Linear: An expressive, efficient attention architecture. arXiv preprint arXiv:2510.26692, 2025.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.
Teuvo Kohonen. Correlation matrix memories. IEEE Transactions on Computers, C-21(4):353–359, 1972.
Wolfgang Maass, Thomas Natschläger, and Henry Markram. Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural Computation, 14(11):2531–2560, 2002.
William Merrill, Jackson Petty, and Ashish Sabharwal. The illusion of state in state-space models. In International Conference on Machine Learning, pp. 35492–35506. PMLR, 2024.
John Miller and Moritz Hardt. Stable recurrent models. In International Conference on Learning Representations, 2019.
Destiny Okpekpe and Antonio Orvieto. Revisiting associative recall in modern recurrent models. arXiv preprint arXiv:2508.19029, 2025.
Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. In-context learning and induction heads. arXiv preprint arXiv:2209.11895, 2022.
Antonio Orvieto, Samuel L Smith, Albert Gu, Anushan Fernando, Caglar Gulcehre, Razvan Pascanu, and Soham De. Resurrecting recurrent neural networks for long sequences. In International Conference on Machine Learning, pp. 26670–26698. PMLR, 2023.
Emilio Parisotto and Ruslan Salakhutdinov. Neural map: Structured memory for deep reinforcement learning. arXiv preprint arXiv:1702.08360, 2017.
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In International conference on machine learning, pp. 1310–1318. Pmlr, 2013.
Rui Qian, Xiaoyi Dong, Pan Zhang, Yuhang Zang, Shuangrui Ding, Dahua Lin, and Jiaqi Wang. Streaming long video understanding with large language models. Advances in Neural Information Processing Systems, 37:119336–119360, 2024.
Zhen Qin, Songlin Yang, Weixuan Sun, Xuyang Shen, Dong Li, Weigao Sun, and Yiran Zhong. HGRN2: Gated linear RNNs with state expansion. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=y6SqbJfCSk.
Akanksha Saran, Safoora Yousefi, Akshay Krishnamurthy, John Langford, and Jordan T Ash. Streaming active learning with deep neural networks. In International Conference on Machine Learning, pp. 30005–30021. PMLR, 2023.
Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight programmers. In International conference on machine learning, pp. 9355–9366. PMLR, 2021.
Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992.
Julien Siems, Timur Carstensen, Arber Zela, Frank Hutter, Massimiliano Pontil, and Riccardo Grazzi. DeltaProduct: Improving state-tracking in linear RNNs via Householder products. In Advances in Neural Information Processing Systems, volume 38, 2025.
Jimmy T.H. Smith, Andrew Warrington, and Scott Linderman. Simplified state space layers for sequence modeling. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=Ai8Hw3AXqks.
Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024.
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. Advances in neural information processing systems, 28, 2015.
Yutao Sun, Li Dong, Shaohan Huang, Shuming Ma, Yuqing Xia, Jilong Xue, Jianyong Wang, and Furu Wei. Retentive network: A successor to transformer for large language models. arXiv preprint arXiv:2307.08621, 2023.
Richard S Sutton. Learning to predict by the methods of temporal differences. Machine learning, 3(1):9–44, 1988.
Corentin Tallec and Yann Ollivier. Unbiased online recurrent optimization. In International Conference on Learning Representations, 2018.
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5—RMSprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 2012.
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023.
Gautham Vasan, Mohamed Elsayed, Alireza Azimi, Jiamin He, Fahim Shariar, Colin Bellinger, Martha White, and A. Rupam Mahmood. Deep policy gradient methods without batch updates, target networks, or replay buffers. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 845–891. Curran Associates, Inc., 2024. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/019ef89617d539b15ed610ce8d1b76e1-Paper-Conference.pdf.
Ashish Vaswani, Noam M. Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Neural Information Processing Systems, 2017. URL https://api.semanticscholar.org/CorpusID:13756489.
Vandi Verma, Mark W Maimone, Daniel M Gaines, Raymond Francis, Tara A Estlin, Stephen R Kuhn, Gregg R Rabideau, Steve A Chien, Michael M McHenry, Evan J Graser, et al. Autonomous robotics is driving perseverance rover's progress on mars. Science Robotics, 8(80):eadi3099, 2023.
Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In International Conference on Learning Representations, 2015.
Ronald J. Williams and Jing Peng. An efficient gradient-based algorithm for on-line training of recurrent network trajectories. Neural Computation, 2(4):490–501, 1990. doi: 10.1162/neco.1990.2.4.490.
Ronald J. Williams and David Zipser. A learning algorithm for continually running fully recurrent neural networks. Neural Computation, 1(2):270–280, 1989. doi: 10.1162/neco.1989.1.2.270.
David J. Willshaw, O. Peter Buneman, and H. Christopher Longuet-Higgins. Non-holographic associative memory. Nature, 222:960–962, 1969.
Songlin Yang, Bailin Wang, Yikang Shen, Rameswar Panda, and Yoon Kim. Gated linear attention transformers with hardware-efficient training. In International Conference on Machine Learning, 2024a.
Songlin Yang, Bailin Wang, Yu Zhang, Yikang Shen, and Yoon Kim. Parallelizing linear transformers with the delta rule over sequence length. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024b. URL https://openreview.net/forum?id=y8Rm4VNRPH.
Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving Mamba2 with delta rule. In International Conference on Learning Representations, 2025.
Jason Yoo, Yingchen He, Saeid Naderiparizi, Dylan Green, Gido M van de Ven, Geoff Pleiss, and Frank Wood. Lifelong learning of video diffusion models from a single video stream. arXiv preprint arXiv:2406.04814, 2024.
Nicolas Zucchet and Antonio Orvieto. Recurrent neural networks: vanishing and exploding gradients are not the end of the story. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=46Jr4sgTWa.
Nicolas Zucchet, Robert Meier, Simon Schug, Asier Mujika, and Joao Sacramento. Online learning of long-range dependencies. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=Wa1GGPqjUn.
A The One-step BPTT Algorithm
Algorithm 1 The One-step BPTT Algorithm
1: Require: Recurrent function with parameters 2: Require: Output function with parameters 3: Require: Data stream , step size 4: Initialize: , hidden state 5: for do 6: , 7: 8: if reset then 9: 10: Forward pass 11: 12: Compute 13: , Gradient for 14: 15: , Gradient for 16: , Parameter update for 17: , Parameter update for
B The RTRL Algorithm
Algorithm 2 The Real-time Recurrent Learning Algorithm
1: Require: Recurrent function with parameters 2: Require: Output function with parameters 3: Require: Data stream , step size 4: Initialize: , hidden state 5: Initialize: Sensitivity matrix 6: for do 7: 8: 9: if reset then 10: 11: Forward pass 12: Update sensitivity: , 13: 14: Compute 15: , Gradient for 16: , Gradient for 17: , Parameter update for 18: , Parameter update for
C The SRM Oscillatory Clock
SRM uses a parameter-free oscillatory clock to make time available to its associative memory. Let contain two-dimensional rotors with frequencies . Each rotor follows the fixed rotation
The complete update is block diagonal,
At the beginning of a stream, every rotor starts at phase zero with norm , . Consequently,
The scale matters because the clock and the content terms are added in the same address space: with unit rotors, the clock would enter the key at norm while the content terms enter at , so time would dominate content in every write address. Normalizing the clock to unit norm puts the two terms on a comparable scale. The clock is reset with the recurrent state at stream boundaries. It has no trainable parameters, is independent of the input, and preserves each rotor's norm. We choose periods geometrically from 2 to a maximum period :
Short periods distinguish nearby steps, while longer periods provide a coarser signal over a longer horizon. The band is a resolution choice rather than a horizon choice, and it should not simply be made as large as possible: a rotor whose period greatly exceeds the horizon being resolved barely rotates, so it contributes an almost constant offset to every write address and drives distinct addresses toward collinearity, which degrades retrieval. Because the periods are geometrically spaced and mutually incommensurate, a short band already separates timesteps far beyond . We use and rotors throughout. The clock enters both sides of associative retrieval. A write at step s and a read at step t use the addresses
with . Here, , , and are fixed projections, whereas and are learned. The clock, therefore, supplies a time address from initialization; learning determines how the query combines that signal with the content terms when retrieving a stored value.
The rotation geometry also makes relative offsets available. For each rotor,
The distinction is clearest for a single rotor, for which we drop the scale to reduce clutter. A fixed query using the initial clock phase gives
which identifies the write by its absolute position s relative to the stream reset. In contrast, a query using the current clock phase gives
which identifies the write by its separation from the current read. Thus, is an absolute time reference, whereas the moving is a relative time reference. The learned query maps can use either comparison or combine them with content.
D Experimental Details
D.1 Baselines
The task suite (Figures 2 and 4) compares SRM with GLA (Yang et al. 2024a), KDA (Kimi Team 2025), and RTU (Elelimy et al. 2024). The associative T-Maze compares SRM with RTU, and the language-modeling experiment compares SRM with GLA, KDA, RTU, and eLSTM (Irie et al. 2024).
The original designs of GLA and KDA use a low-rank parameterization of some weights. In our experiments, we parameterize all weights with full-rank to isolate away any effects and implications of the low-rank parameterization choice, as SRM uses full-rank parameterization everywhere. For KDA, we use a convolution kernel size of two rather than the original four, matching that of SRM. We initialize every units (including SRM, as discussed in Section 3.3) with the memory-preserving initialization strategy for the input-dependent gates—weights initialized to 0, and bias initialized to the LRU ring distribution.
In every experiment, we match the size of the baseline units to SRM by FLOPs per timestep. Nonlinear operations are included in this computation, using a consistent FLOPs convention.
D.2 Diagnostics
Throughout the experiments in section 4.1, we keep the architecture minimal to minimize confounding expressivity augmented by non-recurrent layers. This design allows us to isolate the capabilities that are provided by the recurrent unit itself. We use a frozen input projection (initialized orthogonally) of width 32, followed by a layer of the investigated recurrent unit, followed by a parameter-free RMSNorm layer (necessary for stable gradient flow), followed by a two-layer MLP classifier with a hidden dimension of 32 and GELU activation.
Table 3 specifies the state size of SRM and baseline units used in this architecture. FLOPs matching includes the cost of the recurrent unit's forward pass and one-step truncated-BPTT backward pass, but excludes the cost of external input projection, classifier, optimizer updates, and RTRL trace maintenance. BPTT and RTRL variants use identical model size.
Table 3: Size of the recurrent unit of SRM and baselines used throughout the diagnostics experiments. SRM uses 8 rotors for the clock and 8 tracking dimensions of the tracking channel.
| Unit | Input width | State width | Read heads | tracking dimension |
|---|---|---|---|---|
| SRM | 32 | 32 | 2 | 8 |
| GLA | 32 | 42 | 2 | – |
| KDA | 32 | 20 | 2 | – |
| RTU | 32 | 60 | – | – |
| eLSTM | 32 | 45 | – | – |
D.3 Task Suite
We probe the memory capabilities of each recurrent unit using a suite of ten synthetic tasks. Each task specifies a presentation alphabet , a distribution over presentation sequences, and a target to predict. The presentation length is sampled uniformly from . An example has the form
where marks the end of the presentation and the are optional task queries. Supervision occurs at when and at the final query otherwise.
The tasks are defined as follows:
Presence The presentation contains distinct symbols. Given , predict whether appeared.
Successor The presentation contains distinct symbols. Given a presented symbol other than the final symbol, predict the symbol immediately following it.
Predecessor The presentation contains distinct symbols. Given a presented symbol other than the initial symbol, predict the symbol immediately preceding it.
Count Given , predict how many times appeared. The target count is sampled from , and no symbol appears more than three times.
Order The presentation contains distinct symbols. Given two presented symbols and , predict whether appeared before .
Position The presentation contains distinct symbols from . Let refer to the position from the presentation. Given , predict the symbol presented at position .
Parity Symbols are sampled independently from . Predict .
Orient Let rT denote a quarter (clockwise) rotation and rF a reflection (along the axis perpendicular to the heading). Beginning at the heading , apply the presented rotations and reflections and predict the final heading in .
Shell Let , , and denote swaps of the corresponding pairs of cups. Beginning with the object under cup , apply the presented swaps and predict its final cup in .
Mod3 Symbols are sampled independently from . Predict .
| Task | Chance | Examples | ||
|---|---|---|---|---|
| Sequence | Target | |||
| Presence | 16 | 0.594 | ||
| Successor | 8 | 0.190 | ||
| Predecessor | 8 | 0.190 | ||
| Count | 4 | 0.250 | ||
| Order | 8 | 0.500 | ||
| Position | 8 | 0.159 | ||
| Parity | 2 | 0.500 | ||
| Orient | 2 | 0.250 | ||
| Shell | 3 | 0.333 | ||
| Mod3 | 3 | 0.333 | ||
Table 4: The synthetic task suite. denotes the presentation alphabet size. Chance is the expected accuracy of a task-appropriate guesser, with variable presentation length accounted for.
D.4 Memory Capabilities without Learning
For each task, we construct a fixed bank of 480 distinct examples, with 120 examples at each presentation length . The examples are generated according to the task distributions described in Appendix D.3. All units and initialization seeds are evaluated on the same bank for each task. For Parity and Orient, the 480 examples exhaust the complete presentation space.
To measure retention, we insert repetitions of a waiting symbol between the presentation and the end-of-presentation symbol. Thus, an example at delay has the form
We supply a dataset of 480 examples, one for each of . The recurrent state is reset before every example, and the same set of 480 examples unfolds the recurrent state. All recurrent roll-outs are performed in double precision. After the final symbol, the recurrent state is flattened into a probe feature vector. We denote its size to be . Stacking these vectors produces, for each delay, a feature matrix
For Parity and Orient, the 480 presentations comprise the complete population for lengths . We therefore fit and evaluate the ridge probe on the complete population using the fixed regularization parameter . Because the number of presentations differs across lengths, we weight them accordingly to ensure each length contributes equally to the final accuracy. The final score measures linear decodability over the complete finite population, rather than out-of-sample generalization.
For tasks other than Parity and Orient, to ensure out-of-sample generalization, we evaluate linear ridge probes using length-stratified nested four-fold cross-validation. In detail, both the outer and inner folds are stratified by presentation length. For each outer fold, we hold out 25% of the examples for testing. We then perform four-fold inner cross-validation with the remaining 75%, for each candidate value of the ridge regularization parameter
We select the value with the highest mean score across the four inner validation folds.
With the selected , the probe is refitted on the complete outer training set and evaluated on the held-out outer test fold. Features are standardized using statistics computed only from this corresponding training set; the intercept is not regularized. Each example receives exactly one out-of-fold prediction. For each outer validation fold, the accuracy is computed separately at each presentation length and then averaged equally across the four lengths. We report the mean accuracy across the four outer validation folds.
We repeat the experiment for 10 different instantiations of each recurrent unit. We use model capacity as specified in Table 3. We instantiate every unit using each specific initialization scheme designed for long retention. That includes the ring initialization, with and . At the same time, we control for the expressivity of the unit by avoiding initializing weights to 0 (weights at 0 would potentially sterilize some capabilities), ensuring the experiment would accurately find a unit's nascent capabilities.
D.5 Reliability of one-step BPTT in learning SRM parameters
We introduce the alignment score in Section 4.1.2 as a measurement of one-step BPTT gradient reliability, relative to Full BPTT. We explain it more here. Under full BPTT, when a loss occurs at timestep , the error is propagated backward to produce a distinct gradient contribution at each timestep, for each learnable parameter. Since the parameter is reused across time, it receives the same update based on accumulated gradients. Full BPTT computes the gradients for a particular parameter by taking the aggregate of the gradients accumulated over time: .
One-step BPTT retains only the gradients contribution at the most recent step , thereby omitting all the gradient contributions of earlier steps, whose sum we denote by
While an optimizer can scale the size of a gradient update, it cannot recover the direction of the gradients that the gradient estimator omits. Thus, learning any dependency longer than one step is only reliable if the gradient estimator can reliably produce gradients that are aligned with directionally. We measure this alignment, for a particular parameter, with the Frobenius cosine similarity, and denote the score as :
where denotes the Frobenius inner product and denotes the Frobenius norm. A positive value is a promising sign that one-step BPTT may perform credit assignment for this parameter beyond one timestep. A negative value indicates that this gradient will move the parameter against learning longer-than-one-step memory. Frequent negative alignment would suggest that learning with one-step BPTT is harmful and unreliable.
We examine how behaves with respect to the task structure and the condition of the query and readout, in Experiment 4.1.2, by training the readout and query parameters while keeping everything else frozen. Given an initialization of SRM, this protocol allows the loss to evolve in a controlled manner, while keeping the score comparable throughout training. The alignment score is obtained for selected parameters of SRM by autograd and cosine similarity computation. We report the score for selected parameters throughout this training procedure for selected tasks in Figure 3, and for the whole suite, here in Figure 8, for 10 initializations of SRM.
Cosine Similarity of One-Step Gradients vs. Earlier-Steps Gradients

Write params. — K — — V — Gate params. — —
Mean Squared Negative Alignment

Figure 8: (Top) Alignment score for parameters of SRM over the training horizon of the readout, across the task suite, with all of non-readout parameters fixed throughout this training. Results are smoothed with a 5000-point centered rolling average. (Bottom) Squared negative alignment, averaged over training steps and runs. This value ranges from 0 to 1, with higher values indicating that local updates oppose the gradient contributions from earlier steps.
We note that this measurement is more meaningful for our purpose than the cosine similarity between and . The reason is that contains the contribution of the one-step gradients, in unknown amount, inflating the directional alignment between them. This inflated score would be misleading for analyzing how well one-step BPTT can perform credit assignment beyond one step.
The squared negative alignment is obtained with . It penalizes negative alignment quadratically while treating zero or positive alignment as neutral. This metric is deliberately risk-sensitive, emphasizing severe negative alignment that could lead to detrimental optimization updates, while remaining tolerant of small deviations below zero. We obtain the value of the mean squared negative alignment by taking the average across all training steps and runs.
D.6 Memory Capabilities with Streaming Learning
In this experiment, we use the ring initialization for all units, with and . We use the StreamingOptimizer (Elsayed et al. 2026) with . We perform an iterative search for hyperparameters of StreamingOptimizer in this experiment. We search over , at the learning rate of , and find that is the best across the task suite and recurrent units.
For each combination of units and tasks, we sweep over 3 seeds to choose the better learning rate between and . With the chosen learning rate, we report results over 10 different seeds. This process is done separately for BPTT and RTRL.
For each training run, we aggregate per-sequence accuracy using non-overlapping bins of 100 sequences. We then average the binned accuracies across 10 independent runs and apply a 50-point moving average to obtain the learning curves in Figure 4.
D.7 Streaming Learning on MQAR
In our experiment, we reduce the alphabet size of standard MQAR configuration (Arora et al. 2024a) from 8,192 to 256. This is necessary to allow any streaming learner we test to produce meaningful results. We also reserve a symbol, instead of using random non-query symbols, for waiting timesteps. The two settings of MQAR we report in Table 2 and Figure 9(a)—64 and 128 sequence length—use 4 and 8 training pairs respectively, matching the standard setup. We use an architecture of 2 blocks (Figure 10), followed by a final RMSNorm and a non-linear, GeLU activated classifier readout.
We set the model dimension of the baseline units to approximately match three SRM capacity levels in FLOPs per timestep, as listed in Table 5. The model dimension values specify the width of all of the following layers: input projection, recurrent state, and the hidden layer of the classifier readout.
For SRM, the number of clock rotors and the dimensions of the tracking channel are both scaled to the model dimension. Matching FLOPS includes counting all model layers in one forward pass, one-step truncated-BPTT backward pass, and one optimizer update, including estimated nonlinear-operation costs. The same configurations are used for both variants of the task.
Table 5: FLOPs-matched model dimensions for SRM and baselines, for MQAR.
| Model dimension | |||
|---|---|---|---|
| Model | Small | Medium | Large |
| SRM | 32 | 64 | 128 |
| GLA | 40 | 76 | 156 |
| KDA | 36 | 72 | 144 |
| RTU | 42 | 90 | 184 |
| eLSTM | 37 | 77 | 157 |
In MQAR, a loss occurs at every query timestep, which can appear multiple times within a training sequence. We accumulate gradients at each query timestep and update parameters once at the end of the sequence, keeping parameters fixed within each sequence.
We use the StreamingOptimizer with . This value is chosen from a grid search over , at the learning rate of , on the MQAR variant with 64 sequence length, for all units at the specified small model-dimension variant. With , we sweep over 3 runs to find the best learning rate in , for each combination of unit and size, on the MQAR variant of 64 length. Then, we train each unit over 50,000 sequences at each task setting, and report the results in Table 2 and Figure 9(a) as the average accuracy of the final 10% training sequences, averaged over 10 independent runs.
Figure 9 plots the full results summarized in Table 2: the MQAR accuracies across model dimensions and the complete TinyStories online-loss curves of Section 4.3.

(a) MQAR
(b) TinyStories
Figure 9: (a) MQAR: Average accuracy across three model dimensions, with dashed and solid lines denoting the shorter and longer task settings. (b) Online next-byte loss on TinyStories, over 100M training bytes. Each line is one of three independent runs. All models use networks that have around 13M parameters.
D.8 Associative T-Maze
The observation is a 12-dimensional one-hot vector with 8 key slots, 2 value slots (left, right), a blank slot, and a query flag; at the junction, the queried key's slot and the query flag are both set. Each episode draws K distinct keys uniformly from the 8 symbols, an independent uniform value for each key, and one of the K pairs uniformly as the query, so an episode lasts steps with D = 10. There are two actions. Actions before the junction are ignored, and the junction action ends the episode with reward +1 if it matches the queried value and -1 otherwise; all other rewards are 0.
The policy and value functions use separate networks with identical structure: a linear input projection with bias, one streaming block (Figure 10) with model width and state width , a final RMSNorm, and a linear head. SRM's tracking strength is trained with one-step BPTT, whose sensitivity is a matrix and cheap for ; the query maps and the retention receive the one-step gradient. RTU is also trained with one-step BPTT. Both units use the ring initialization with and . The memoryless baseline is the SRM agent with its recurrent state reset before every step. The final online success rates of SRM are 0.998, 0.996, and 0.997 for , 4, and 8; the learning curves in Figure 5 are averaged over blocks of 1,000 episodes.
Every step produces one update of each network from the TD error , with at the junction. Each parameter keeps an accumulating eligibility trace , reset at the end of each episode, and moves by , where is a running maximum of with decay 0.99995 and . The actor's gradient is that of plus the entropy bonus multiplied by . Table 6 lists the settings.
For each unit and each K, we run the four combinations of step-size pair and entropy coefficient in Table 6 with three seeds and choose the combination with the highest mean cumulative online return. We then run the chosen combination on ten new seeds, which are the ones reported in Figure 5. The memoryless baseline uses SRM's chosen combination. Because each episode's return is , the online success rate over any block of episodes is exactly , where is the mean return over the block.
| Setting | Value |
|---|---|
| Discount , trace decay | 0.99, 0.8 |
| Step sizes (critic head , recurrent networks ) | or |
| Actor head step size | |
| Entropy coefficient | 0.1 |
| Training episodes | 20,000 (30,000 for ) |
Table 6: Associative T-Maze settings. The step sizes and the entropy coefficient are selected per unit and per .
D.9 Streaming Language Modeling
The stream is the TinyStories training set (Eldan & Li 2023) read as raw bytes, so the vocabulary has 256 symbols. Stories are presented in dataset order, and the recurrent state is reset at each story boundary. Each model consists of a byte embedding, four blocks (Figure 10), and a linear output head. Every byte produces one StreamingOptimizer update with , , , and step size , from the gradient of the next-byte cross-entropy computed with one-step BPTT. The online loss is logged as the mean over consecutive windows of 1,000 bytes, each byte being scored before the update it produces. Each unit is run with three seeds for 100M bytes. Table 7 lists the widths.
| Unit | Model width | State width |
|---|---|---|
| RTU | 1024 | 1024 |
| eLSTM | 1024 | 512 |
| GLA | 768 | 512 |
| KDA | 768 | 512 |
| SRM | 768 | 512 |
Table 7: Widths of the four-layer streaming language models. All models have approximately the same number of parameters around 13M.

(a) Architecture

(b) Gated RNN
Figure 10: Architecture used throughout the paper. RN denotes RMSNorm. is the model dimension and is the state dimension. denotes a sigmoid nonlinearity.
In every streaming block, the gate and the output projection have Xavier-uniform weights, and the RMSNorm scales start at one. Recurrent units other than SRM use the initialization of their reference implementations. All units are trained with one-step BPTT: the recurrent state is carried from byte to byte, but the gradient of each update stops at the previous state.
SRM's recurrent parameters are the exception to the above: they follow the scheme given in Section 3. Specifically, , , , , , and are semi-orthogonal; each head's is semi-orthogonal scaled by while is zero; with from the ring draw; and the tracking strength starts at (, ) and is learned. We use , in the streaming language modeling experiments. The clock uses with rotors, the tracking channel has width , and SRM uses read heads with value width so that the read has the same width as the block's residual stream. In Figure 10, SRM's input width is the model dimension , and its state dimension is the number of memory rows.
D.9.1 Optimizer Choice
Figure 11 compares RMSprop (Tieleman & Hinton 2012) across second-moment decay rates with StreamingOptimizer (Elsayed et al. 2026), which is equivalent to Adamax (Kingma & Ba 2015) with , for RTU trained with one-step BPTT on 30M bytes. With RMSprop, the online loss falls to about 1.2 within the first few million bytes and then rises to about 1.35 by 30M bytes for every , whereas with StreamingOptimizer it keeps decreasing and ends near 0.88.

Figure 11: Online next-byte loss of RTU trained with one-step BPTT under RMSprop with different and under StreamingOptimizer (equivalent to Adamax with ), over the first 30M bytes.
D.9.2 Architectures of the Scaling Sweep
Tables 8 and 9 list the SRM and RTU configurations of the scaling sweep. The configurations of the two units are matched in parameter count, so the per-layer recurrent state they carry differs. Figure 12 shows the resulting next-byte loss: SRM reaches a lower loss than RTU at every size, both at matched parameters and at matched training FLOPs.
| Params | Layers | Width | Rows | Memory | State / layer | Total state |
|---|---|---|---|---|---|---|
| 2.8M | 3 | 384 | 256 | 25,040 | 75K | |
| 6.8M | 4 | 512 | 384 | 49,744 | 199K | |
| 13.6M | 4 | 768 | 512 | 99,152 | 397K | |
| 36.0M | 6 | 1024 | 704 | 181,328 | 1.09M | |
| 71.5M | 8 | 1280 | 832 | 267,600 | 2.14M |
Table 8: SRM configurations of the scaling sweep. is the model width and is the number of memory rows.
(a) Loss vs. parameters

(b) Loss vs. compute

Figure 12: Next-byte loss of SRM and RTU across the scaling sweep, against (a) the number of parameters and (b) the training FLOPs. Error bars show the standard error of the mean. The configurations are listed in Tables 8 and 9.
| Params | Layers | Width M | State width S | State / layer | Total state |
|---|---|---|---|---|---|
| 2.6M | 3 | 512 | 512 | 512 | 1.5K |
| 6.9M | 4 | 736 | 736 | 736 | 2.9K |
| 13.1M | 4 | 1024 | 1024 | 1,024 | 4.1K |
| 36.4M | 6 | 1408 | 1408 | 1,408 | 8.4K |
| 72.6M | 8 | 1728 | 1728 | 1,728 | 13.8K |
Table 9: RTU configurations of the scaling sweep. The state of width is held as complex units.
D.9.3 Sample Story from Streaming SRM
The following story was generated byte by byte by the SRM language model of Section 4.3 after 100M training bytes, from the prompt “Once upon a time” with temperature 0.7 and top- sampling with . The text is reproduced verbatim, including its errors.
Once upon a time, there was a little girl named Lily. She loved to play outside with his friends. One day, the park saw a big rock in her hand. Lily was so happy and felt very sad.
Benny was happy and proud of herself for little girl.
But then, a cool of colorful things are friends and they all wanted to help. They liked to play with his friends. One day, Tim found a big rock and the room was always happy. But then she got to school, but she always remember how to make it fit a new park in the box. They were both very sour feel sad. The doctor said that it was okay. He thought it was so funny. She would make some wood and she was so happy and proud. The end.
D.10 Task Suite Ablation Study
No-tracking-channel ablates the tracking channel away, leaving SRM with just the memory channel . No-clock removes from the key projections and from the query projections. No-previous-input-projections remove from the key projections and from the value projections.
With components ablated away, we give back the capacity to components that are still present, by matching FLOPs per timestep to SRM. We use the same architecture, optimizer, hyperparameter values, initialization scheme, and learning rate tuning grid as in the task-suite streaming learning experiment described in Appendix D.6 and Appendix D.2.
D.11 Frozen Write Parameters Ablation Study
K denotes the concatenation of the projection weights , , and . V denotes the concatenation of the projection weights and .
We test variants of SRM: with K learnable, with V learnable, with K and V both learnable, and with K, V as well as their bias terms (that are functionally fixed at 0 by standard SRM) learnable. All variants use the same state size (no FLOPs matching here). We use the same architecture, optimizer, hyperparameter values, initialization scheme, and learning rate tuning grid as in the task-suite streaming learning experiment described in Appendix D.6 and Appendix D.2.
In the recall task, each sequence is 9 timesteps long, and the final query timestep shows a reserved query symbol. Symbols from the input alphabet are randomly sampled at every non-query timestep without replacement. At the final query-timestep, the learner is tasked with recalling the symbol appears at the first timestep of the sequence. A cross-entropy loss occurs at this final timestep. Figure 6 (Right) reports the evaluation accuracy at the end of training, on a held-out set of examples.
D.12 Tracking-Channel Separation
The analysis of the SRM's tracking channel in Section 4.5 uses the SRM implementation at initialization with input width , memory rows, one read head, and value width . We set , so that the retention is the identity and the memory neither decays nor grows. No parameter is learned. Results are averaged over three independent runs.
Each sequence contains 4 key-value pairs, with keys drawn without replacement and values drawn uniformly from two vocabularies of 8 random unit vectors, followed by inputs drawn uniformly from the unit sphere. The merged variant computes its axes as with a fixed random orthogonal , so the axes are isotropic, and uses a constant . For the last pair, whose key is written at step , the query is the written key , which is also its position after steps of SRM's identity retention. Address survival is , where is propagated alone through the same transitions. Retrieval reads from the full memory and chooses the most cosine-similar of the 8 candidate values. Each point uses 2,000 sequences.
In the shell game, there are cups and one token per transposition, each embedded as a random unit vector in ; the ball starts under the first cup and . For aligned axes, we set so that for the token that swaps cups and , and set . For random axes, is SRM's random semi-orthogonal projection and the strength keeps its default initial value, which is close to 1.9. The written variant adds with for a fixed random . The memory-only probe uses the flattened (1,024 features). Each probe is a ridge regression with bias onto the one-hot ball position, fit to standardized features of 6,000 sequences split 60/20/20 into training, validation, and test sets; the ridge coefficient is chosen from on the validation set, and the probe is refit on training and validation data and evaluated on the test set.
E SRM with RTRL
Cost Analysis. We instantiate the architecture and its parameters identically for one-step BPTT and RTRL and measure the FLOPs of one training timestep at batch size one. We do not count the warm-up timestep that initializes recurrent sensitivities and optimizer state. A synthetic gradient at the output logits drives backward computation. The measurement counts all model layers, RTRL sensitivity maintenance, and one StreamingOptimizer update. The cost of loss computation, gradient clipping, initialization, and data movement is excluded. We count a multiply-add as two FLOPs and assign fixed formula-based costs to nonlinear operations. Table 10 reports the resulting equivalent FLOPs per timestep for SRM training, for all models used in experiments.
Between the two streaming-learning modes, SRM with one-step BPTT matches our design principle of cheap computation requirement (D2) much better.
| Model | one-step BPTT | RTRL | Ratio |
|---|---|---|---|
| Task Suite Model | 113,796 | 201,543 | 1.771× |
| MQAR small | 629,715 | 720,729 | 1.145× |
| MQAR medium | 1,965,923 | 2,656,873 | 1.351× |
| MQAR large | 6,767,235 | 12,150,921 | 1.796× |
| Language | 259,341,436 | 1,773,230,984 | 6.837× |
Table 10: FLOPs per timestep for SRM training with one-step BPTT and RTRL. Costs include forward computation, backward computation, and one optimizer update.
Gradients Analysis. In an architecture with only one recurrent layer, RTRL gradient is exact. However, in a multi-layers architecture, RTRL implementations usually track only within-layer forward-mode sensitivities and neglect cross-layer sensitivity terms. Consequently, the computation of the gradients that flow through layers is an approximation. We quantify this discrepancy by measuring, at each layer, the cosine similarity between the gradients computed by RTRL and the exact gradients computed by full BPTT. All computations are performed in double precision. Figure 13 shows the result for an architecture of four SRM layers, each preceded by RMSNorm with a detached normalization scale. Detaching the normalization scale preserves its forward stabilizing effect while excluding gradients through the scale from the gradient alignment comparison.

Figure 13: RTRL gradients alignment against exact full BPTT gradients throughout training.
For the top layer (Layer 4), the gradients estimated by RTRL match those computed by full BPTT throughout training. However, the approximation deviation received by the next layer is already significant. The gradients that the bottommost layer (Layer 1) receives, as estimated by RTRL, only has a cosine similarity of around 0.2, to the gradients computed by full BPTT.