Experience Replay for Continual Learning

David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy P. Lillicrap, Greg Wayne

Experience Replay for Continual Learning

Introduction

In the field of Reinforcement Learning (RL), agents often struggle with the "stability-plasticity dilemma": the need to remain plastic enough to acquire new skills while staying stable enough to retain old ones. Standard deep learning architectures typically suffer from catastrophic forgetting, where training on a new task rapidly overwrites the neural weights associated with previous knowledge. While simultaneous training on all tasks provides a theoretical upper bound for performance, real-world applications like robotics require agents to learn from a sequential stream of data.

The Problem of Catastrophic Forgetting

Most existing solutions to forgetting involve "synaptic consolidation," which protects specific weights in the network. However, these methods are often mathematically complex and require explicit "task boundaries"—notifications of when one task ends and another begins. In messy, real-world environments, such boundaries are rarely available.

Comparison of training paradigms: Separate, Simultaneous, and Sequential. Sequential training exhibits significant catastrophic forgetting as the agent switches tasks.

As shown in the sequential training baseline, performance on individual tasks drops sharply when the agent transitions to a new objective, highlighting the severity of the forgetting problem.

The CLEAR Method

The authors propose CLEAR (Continual Learning with Experience And Replay), a task-agnostic approach that leverages three core components:

  1. Experience Replay: The agent maintains a buffer of past experiences using reservoir sampling. This ensures a uniform distribution of all past data without needing to know task identities. During training, the agent samples a 50-50 mix of new "on-policy" data and replayed "off-policy" data.
  2. Off-Policy Correction (V-Trace): Since replayed data originates from older versions of the agent, the V-Trace algorithm is used to mathematically adjust learning updates, accounting for the discrepancy between the historical policy and the current one.
  3. Behavioral Cloning: To prevent the agent's behavior on old tasks from drifting, CLEAR introduces a cloning loss. This penalizes the network if its current policy or value predictions deviate significantly from the historical versions stored in the replay buffer.

Key Insights and Results

A primary finding of the research is that experience replay, often used merely for data efficiency, is actually a potent defense against forgetting, mimicking "hippocampal replay" in biological systems. Furthermore, the simplicity of CLEAR allows it to outperform more complex architectural methods like "Progress & Compress" (P&C) and Elastic Weight Consolidation (EWC).

Performance of CLEAR compared to CLEAR without behavioral cloning. The cloning loss is essential for maintaining stability across tasks.

Experimental results on the DMLab benchmark show that CLEAR achieves performance nearly identical to simultaneous training. On the Atari 2600 suite, CLEAR consistently outperformed EWC and P&C. For instance, in the game Krull, CLEAR achieved a score of ~8845, significantly higher than P&C (~7025) and EWC (~5352).

Discussion and Future Work

CLEAR demonstrates that task-agnosticism is a significant advantage for streaming data scenarios. However, the method does face limitations, such as the memory overhead of maintaining a large replay buffer and potential interference in "adversarial" action spaces where task-specific actions conflict. Future research may explore hybrid models that combine CLEAR’s behavioral consistency with the architectural stability of synaptic consolidation methods.

Summary updated

BibTeX
@inproceedings{rolnick2019experience,
  author = {David Rolnick and Arun Ahuja and Jonathan Schwarz and Timothy P. Lillicrap and Greg Wayne},
  title = {{Experience Replay for Continual Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=IpEHp_wQlk},
}
Figure