Streaming Recurrent Memory
Organizations: Department of Computing Science, University of Alberta · CIFAR Canada AI Chair, Amii
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.
Figures & tables
| 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. |
| MQAR accuracy (%) | TinyStories loss | |||||||
| Sequence length 64 | Sequence length 128 | Bytes seen | ||||||
| Unit | Small | Medium | Large | Small | Medium | Large | M | M |
| 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 | ||
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| 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 | – | – |
| Task | Chance | Examples | ||
| Sequence | Target | |||
| Presence | 16 | |||
| Successor | 8 | |||
| Predecessor | 8 | |||
| Count | 4 | |||
| Order | 8 | |||
| 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 |
| Setting | Value |
| Discount , trace decay | , |
| Step sizes (critic head , recurrent networks ) | or |
| Actor head step size | |
| Entropy coefficient | |
| Training episodes | ( for ) |
| Unit | Model width | State width |
| RTU | ||
| eLSTM | ||
| GLA | ||
| KDA | ||
| SRM |
| Params | Layers | Width | Rows | Memory | State / layer | Total state |
| M | K | |||||
| M | K | |||||
| M | K | |||||
| M | M | |||||
| M | M |
| Params | Layers | Width | State width | State / layer | Total state |
| M | K | ||||
| M | K | ||||
| M | K | ||||
| M | K | ||||
| M | K |
| Model | one-step BPTT | RTRL | Ratio |
| Task Suite Model | 113,796 | 201,543 | |
| MQAR small | 629,715 | 720,729 | |
| MQAR medium | 1,965,923 | 2,656,873 | |
| MQAR large | 6,767,235 | 12,150,921 | |
| Language | 259,341,436 | 1,773,230,984 |
Recurrent Neural Networks
Recurrent neural networks process sequences by updating a persistent hidden state, enabling temporal modeling, memory, and streaming computation.
See all 307 papers