Abstract
Online continual learning (OCL) aims to train neural networks from a continuous data stream in a single pass. While rehearsal-based methods are effective, they suffer from a prediction bias towards current classes, leading to catastrophic forgetting. This paper introduces Unbias Experience Replay (UER), a straightforward heuristic that addresses this bias by decomposing dot-product logits into angle and norm factors. We find that bias primarily affects the angle factor, while the norm factor helps retain historical knowledge. By learning new samples using only the angle factor and replaying previous samples using both, UER balances new and old knowledge efficiently. Extensive experiments demonstrate that UER achieves state-of-the-art performance across multiple benchmarks with minimal computational overhead.
Introduction: The Challenge of Prediction Bias
In Online Continual Learning (OCL), models must adapt to a non-stationary data stream where each sample is seen only once. The primary hurdle is Catastrophic Forgetting (CF), where new information overwrites previously learned knowledge. Rehearsal methods, which store and replay a small subset of old data, are the standard defense. However, they introduce a significant data imbalance: the model encounters far more "current" samples than "replayed" ones.
This imbalance leads to a prediction bias. The model's weights for current classes grow disproportionately, causing it to favor new classes during inference. Existing solutions often involve complex post-processing or additional training phases that are difficult to scale in real-time online settings. The authors of UER propose a more straightforward way to balance this competition.
Methodology: Decomposing the Logit
The core of UER is the decomposition of the standard dot-product logit ($w_i \cdot h + b_i$) into two distinct components:
- The Angle Factor (Cosine Logit): Captures the directional similarity between the feature vector and class weights.
- The Norm Factor: Represents the magnitude (length) of the class weight vector.
The UER Strategy
UER employs a heuristic approach to balance the "gradient tug-of-war" between new and old classes:
- Learning Phase (New Data): The model is trained on current samples using only the angle factor (cosine logits). This allows the model to quickly learn the "shape" of new classes without letting their weight magnitudes explode and overwhelm the old classes.
- Replaying Phase (Old Data): When replaying samples from the memory buffer, the model uses the full dot-product logit. This leverages the norm factor to "boost" the scores of historical classes, effectively correcting the bias.
- Inference: At test time, the full dot-product logit is used to ensure balanced, unbiased predictions across all learned classes.
Experimental Results
The researchers evaluated UER on three standard "Split" benchmarks: Split CIFAR-10, Split CIFAR-100, and Split MiniImageNet, using various memory buffer sizes (from 100 to 5000 samples).
Key Findings
- Superior Performance: UER consistently outperformed strong baselines like ER-ACE, DER++, and LUCIR. For instance, on Split CIFAR-100 with a 5000-sample buffer, UER achieved 29.6% accuracy, a 2.6% improvement over the strong ER-ACE baseline.
- Efficiency: UER maintains a computational complexity of 1.0 relative to standard Experience Replay (ER), making it significantly more efficient than methods requiring multiple training passes or complex optimization.
- Versatility: The UER logic is "plug-and-play." Integrating it into other OCL methods like MIR or ASER resulted in significant performance boosts, demonstrating its general applicability across different rehearsal strategies.
Discussion and Future Work
UER demonstrates that the norm factor, often discarded in cosine-similarity-based methods, is vital for memory retention in continual learning. By using it strategically during replay, UER provides a simple yet effective mechanism for bias correction.
However, some limitations remain. The method's advantage is less pronounced with extremely small memory buffers, where the norm factor may not stabilize. Additionally, while the trade-off parameter $\alpha$ is generally effective at 0.5, future work could explore automated tuning of this parameter. Investigating UER's performance in domain-incremental settings also remains a promising avenue for research.
Code available at: https://github.com/FelixHuiweiLin/UER
Summary updated