Learning to Learn without Forgetting by Maximizing Transfer and Minimizing Interference

Matthew Riemer, Ignacio Cases, Robert Ajemian, Miao Liu, Irina Rish, Yuhai Tu, Gerald Tesauro

Overview

Meta-Experience Replay (MER) is a novel algorithm that treats continual learning as a meta-learning problem. By enforcing gradient alignment across current and past experiences, MER learns a weight-sharing scheme that maximizes positive transfer to future tasks while minimizing interference with old ones. This approach significantly outperforms existing baselines in both supervised and reinforcement learning settings.

The Challenge of Catastrophic Forgetting

Standard neural networks suffer from catastrophic forgetting: when trained on a sequence of tasks, they tend to overwrite the knowledge of earlier tasks to accommodate new data. This occurs because deep learning typically assumes data is independent and identically distributed (i.i.d.). However, real-world "lifelong learning" is inherently non-stationary—the data distribution changes over time.

Existing solutions often focus too narrowly on the "stability-plasticity dilemma," which attempts to balance the preservation of old knowledge with the ability to learn new things. The authors argue that we should instead view the problem through a temporally symmetric lens: we need to maximize transfer (where learning one thing helps another) and minimize interference (where learning one thing hurts another) in both the forward and backward directions of time.

Methods: Meta-Experience Replay (MER)

The paper introduces Meta-Experience Replay (MER), which combines two powerful machine learning concepts:

  1. Experience Replay (ER): Maintaining a small buffer of past experiences using reservoir sampling and interleaving them with current training data to approximate a stationary distribution.
  2. Optimization-based Meta-Learning: Specifically, adapting Reptile, a highly efficient first-order meta-learning algorithm.
Transfer-Interference Trade-off and Gradient Alignment

The "Aha!" Mechanism: Gradient Alignment

The core innovation of MER is optimizing for a set of parameters where the gradients of different examples point in the same direction.

  • Transfer: If gradients are aligned (positive dot product), updating the model for one example improves performance on the others.
  • Interference: If gradients conflict (negative dot product), updating for one hurts the others.

MER implements this by performing multiple "inner loop" updates on a batch of current and buffered examples. It then applies a "meta-update" that moves the model weights toward a version that satisfies these multiple constraints simultaneously. This effectively regularizes the learning process to find "flatter" or more generalizable regions of the weight space.

Key Insights

  • Symmetry Matters: Most algorithms only try to protect the past. MER recognizes that how we learn now affects our ability to learn in the future. By aligning gradients, the model prepares itself for future learning.
  • Task-Agnosticism: Unlike many competitors (like EWC or GEM), MER does not require explicit "task labels" or boundaries. It discovers the underlying structure of the data stream naturally through gradient similarity.
  • Efficiency via First-Order Approximation: By using Reptile's logic, MER avoids the "Hessian-heavy" second-order derivatives required by other meta-learning methods (like MAML), making it computationally feasible for deeper networks.
  • The Buffer is a Tool, Not Just a Crutch: While standard Experience Replay uses the buffer merely as a source of data, MER uses it to calculate the meta-objective, extracting significantly more "intelligence" from a small amount of stored data.

Experimental Results

The authors evaluated MER across several challenging benchmarks, including MNIST Rotations & Permutations, a highly non-stationary 100-task permutation set, and the massive Omniglot dataset (1,623 characters from 50 alphabets).

  • Superior Retention: On MNIST benchmarks, MER consistently achieved higher Retained Accuracy (RA) than GEM, EWC, and standard Experience Replay.
  • Robustness to Small Memory: MER's performance gap over other algorithms actually grew as the memory buffer size decreased. Even with only 200 examples stored for 20 tasks, it maintained high performance.
  • Omniglot Breakthrough: In the highly non-stationary Omniglot setting, MER nearly quadrupled the performance of baseline techniques.
Performance of DQN vs. DQN-MER on Catcher and Flappy Bird
  • Reinforcement Learning Success: MER was also tested on non-stationary versions of the arcade games Catcher and Flappy Bird, where game physics change over time. DQN-MER (the RL variant) showed strong forward transfer. For example, after learning a difficult version of the game, the agent became highly proficient at easier, earlier versions it had seen before, whereas standard agents forgot how to play them.

Limitations and Future Work

While highly effective, MER does have limitations. Computational Cost remains a factor; though more efficient than second-order methods, MER still requires multiple gradient computations per step for its inner loops, making it slower than standard SGD. Additionally, Scaling to High-Res Images is an ongoing challenge, as experiments primarily focused on MNIST and Omniglot-scale images. Scaling the gradient alignment objective to very large convolutional neural networks (CNNs) will require further research. Finally, the authors suggest that integrating MER with "Mixture of Experts" architectures could further amplify the model's ability to manage weight sharing and mitigate interference.

Summary updated

BibTeX
@inproceedings{riemer2019learning,
  author = {Matthew Riemer and Ignacio Cases and Robert Ajemian and Miao Liu and Irina Rish and Yuhai Tu and Gerald Tesauro},
  title = {{Learning to Learn without Forgetting by Maximizing Transfer and Minimizing Interference}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=1b1zPG7bzy},
}
Figure