Layerwise Proximal Replay: A Proximal Point Method for Online Continual Learning

Jason Yoo, Yunpeng Liu, Frank Wood, Geoff Pleiss · OpenReview

Abstract

In online continual learning, a neural network incrementally learns from a non-i.i.d. data stream. Nearly all online continual learning methods employ experience replay to simultaneously prevent catastrophic forgetting and underfitting on past data. Our work demonstrates a limitation of this approach: networks trained with experience replay tend to have unstable optimization trajectories, impeding their overall accuracy. Surprisingly, these instabilities persist even when the replay buffer stores all previous training examples, suggesting that this issue is orthogonal to catastrophic forgetting. We minimize these instabilities through a simple modification of the optimization geometry. Our solution, Layerwise Proximal Replay (LPR), balances learning from new and replay data while only allowing for gradual changes in the hidden activation of past data. We demonstrate that LPR consistently improves replay-based online continual learning methods across multiple problem settings, regardless of the amount of available replay memory.

The Challenge: Optimization Instability in Continual Learning

In Online Continual Learning (OCL), models must learn from a continuous stream of data without repeated access to past examples. The standard solution, Experience Replay (ER), maintains a small buffer of old data to mix with new incoming data. However, this approach suffers from a hidden flaw: optimization instability.

When a model processes a small batch of new data, the resulting gradient update can be excessively "loud," causing abrupt changes in how the model perceives old data. This leads to a "sawtooth" performance pattern where the model constantly learns and unlearns, hindering final accuracy. Crucially, this instability persists even with unlimited memory, indicating that the problem is not just forgetting, but a fundamental inefficiency in standard optimization for streaming data.

Methodology: Layerwise Proximal Replay (LPR)

To address this, we introduce Layerwise Proximal Replay (LPR), an optimization-level plugin that stabilizes training by replacing standard SGD with a proximal point framework.

LPR modifies the optimization geometry by penalizing changes in the hidden activations (internal representations) of data in the replay buffer, rather than just raw weights. Mathematically, this results in a layer-wise preconditioner matrix $P_\ell$. The model update becomes: $$\Theta_{j+1} = \Theta_j - \eta P_\ell^{-1} \nabla L$$ This $P_\ell^{-1}$ acts as a "soft projection," allowing the model to learn quickly in directions that do not disrupt past representations while dampening updates that would cause instability.

Figure 1: LPR acts as a soft projection by modifying the gradient norm. The ratio of the LPR gradient norm to the standard gradient norm shows how the method dampens disruptive updates for both replay and new data to maintain stability.

Experimental Results

LPR was evaluated on major OCL benchmarks, including Split-CIFAR100, Split-TinyImageNet, and Online CLEAR. It was tested as a booster for several state-of-the-art replay methods such as ER, DER, EMA, and LODE.

Key Insights

  • Stability Beyond Memory: LPR improves performance even with an "unlimited" replay buffer, proving that stability is a distinct bottleneck from memory capacity.
  • Reduced Representation Drift: By quantifying "drift"—how much internal features of an image change over time—we found that LPR significantly smooths the path to convergence.
  • Consistent Accuracy Gains: LPR improved final accuracy across every baseline and buffer size. For example, on Split-CIFAR100, adding LPR to standard ER boosted accuracy from 22.6% to 26.3% (1k buffer) and from 35.4% to 42.4% (unlimited memory).
Figure 2: LPR significantly reduces total representation drift and the variation of accuracy over time, leading to higher and more stable test accuracy compared to standard ER baselines.

Conclusion

Layerwise Proximal Replay demonstrates that the primary bottleneck in online continual learning is often the instability of the optimization process itself. By ensuring gradual changes in internal representations, LPR provides a robust, effective, and easily integrated solution for improving the performance of replay-based methods across diverse streaming scenarios.

Summary updated

BibTeX
@inproceedings{yoo2024layerwise,
  author = {Jason Yoo and Yunpeng Liu and Frank Wood and Geoff Pleiss},
  title = {{Layerwise Proximal Replay: A Proximal Point Method for Online Continual Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Lg8nw3ltvX},
}
Figure