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

Memory Efficient Experience Replay for Streaming Learning

Tyler L. Hayes, Nathan D. Cahill, Christopher Kanan

TL;DR

Deep Neural Networks (DNNs) typically suffer from catastrophic forgetting when learning continuously from non-iid data streams. This paper demonstrates that experience replay (rehearsal) can solve this problem, and introduces ExStream, a memory-efficient streaming clustering algorithm that maintains a compressed buffer of past examples. ExStream matches the performance of memory-heavy "full rehearsal" while using significantly less memory and compute, making it highly practical for resource-constrained agents like robots.

What Problem Does This Paper Address?

In the real world, agents like robots must learn on the fly from continuous streams of data. This paradigm, known as streaming learning, requires a model to learn from a single pass over data that is temporally correlated (non-iid)—for example, a robot seeing 50 frames of a dog, then 20 frames of a cat.

Conventional DNNs fail spectacularly in this setting due to catastrophic forgetting: the weights update to learn the new information, completely overwriting the representations needed for previously learned tasks. While an old technique called "rehearsal" (mixing old data with new data during training) prevents this, traditional full rehearsal requires storing every piece of data ever seen. This is a non-starter for long-term deployment on memory-constrained hardware. The authors tackle the challenge of making rehearsal memory-efficient without sacrificing its ability to prevent catastrophic forgetting.

Methods

The authors adapt rehearsal by maintaining a fixed-capacity memory buffer of "prototypes" for each class. When a new example arrives, it updates the buffer, and the DNN is then fine-tuned using the buffer's contents.

To manage these buffers efficiently, they compare simple replacement strategies (Reservoir Sampling, FIFO Queue) against streaming clustering algorithms (Online k-means, CluStream, HPStream).

Crucially, they introduce a novel partitioning-based algorithm called ExStream (Exemplar Streaming). ExStream works by storing clusters and point counts. When a class buffer reaches its memory limit and a new data point arrives, ExStream finds the two closest existing clusters in the buffer and merges them (weighted by their point counts). It then inserts the new data point into the newly freed slot.

Datasets

The authors evaluated the models using 2048-dimensional feature embeddings extracted from a pre-trained ResNet-50. They used three datasets:

  • iCub World 1.0: A robotics dataset with 10 classes of household objects, featuring temporally ordered video frames.
  • CORe50: A more realistic continuous object recognition dataset (10 classes) recorded across different sessions and backgrounds.
  • CUB-200-2011: A fine-grained bird classification dataset with 200 species, used specifically to test how well the algorithms scale to a large number of classes.

Key Insights and Ideas

  • Full rehearsal actually works for modern DNNs: The authors rigorously proved that simply storing and replaying all past data effectively eliminates catastrophic forgetting, setting a high ceiling for memory-limited approximations.
  • Merging is better than replacing: For realistic, temporally ordered (non-iid) data streams, clustering-based methods that merge representations vastly outperform simple replacement strategies like FIFO queues or reservoir sampling.
  • Keep new data pristine: ExStream's core trick—merging the two closest existing prototypes to make room for a new unmerged data point—is highly effective. It ensures the novelty of incoming data is captured immediately without being diluted.
  • Simplicity wins: ExStream requires half the memory of complex micro-cluster methods (like CluStream and HPStream) and requires zero hyperparameter tuning, making it incredibly practical for deployment.

Key Results

  • The authors introduced a normalized metric, $\Omega_b$, to compare streaming performance against an offline baseline, and $\mu_{total}$ to average performance across different buffer sizes.
  • ExStream was the top performer, achieving the highest overall $\mu_{total}$ score (0.909) across all datasets and orderings, beating Online k-means (0.890) and Reservoir Sampling (0.838).
  • On the hardest dataset (CUB-200 with 200 classes), ExStream significantly outperformed all other memory-limited methods, especially when buffer sizes were heavily restricted.
  • Simple FIFO queues worked surprisingly well for purely randomly shuffled (iid) data streams, but their performance collapsed in realistic, temporally ordered (non-iid) scenarios.

Limitations and Future Work

  • Scaling with Classes: The current approach uses a fixed buffer size per class. As the number of classes grows, the total memory requirement scales linearly. The authors suggest future work should explore a single, shared memory buffer with a fixed overall capacity, which could also help handle class-imbalanced datasets.
  • Compute Bottlenecks: Training the DNN on the entire buffer at every time step is computationally slow. A promising future direction is "smart prototype selection"—choosing only the most useful subset of the buffer to train on at any given time step to speed up learning.
  • Task Expansion: The authors note that this exemplar storage policy could be extended beyond classification to streaming regression tasks.

Summary updated

BibTeX
@inproceedings{hayes2019memory,
  author = {Tyler L. Hayes and Nathan D. Cahill and Christopher Kanan},
  title = {{Memory Efficient Experience Replay for Streaming Learning}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2019},
  doi = {10.1109/icra.2019.8793982},
}
Figure