Balanced Destruction-Reconstruction Dynamics for Memory-Replay Class Incremental Learning

Yuhang Zhou, Jiangchao Yao, Feng Hong, Ya Zhang, Yanfeng Wang

TL;DR

Memory-replay is the go-to strategy for Class Incremental Learning (CIL), but it suffers from a "destruction-reconstruction" cycle where old knowledge is nearly wiped out before being partially recovered. This paper introduces the Balanced Destruction-Reconstruction (BDR) module, a lightweight plug-and-play component that stabilizes this cycle by dynamically balancing gradients between new and old classes, significantly reducing forgetting.

What Problem Does This Paper Address?

In Class Incremental Learning (CIL), a model must learn new tasks (classes) sequentially without forgetting what it learned previously—a challenge known as catastrophic forgetting. The most effective approach is "memory-replay," where a tiny buffer of old samples is replayed alongside new data.

However, the authors identify a hidden flaw: the destruction-reconstruction dynamic. At the start of a new learning phase, the model's gradients are dominated by the massive influx of new data, causing the "destruction" of old knowledge (a massive spike in distillation loss). The model then spends the rest of the phase trying to "reconstruct" that knowledge from the few samples in the buffer. If the initial destruction is too severe, the reconstruction is never perfect. The authors argue that if we can prevent this "peak destruction," we can achieve much better final performance.

Methods

The authors propose the BDR module, which manipulates the model's output logits to balance the gradient contributions of different classes. It consists of two main parts:

  1. Constant Rebalancing (CR): This addresses the quantity imbalance. Since new classes have thousands of samples and old classes only have a handful in the buffer, the gradients are naturally biased. CR applies a logit offset based on the class distribution to suppress the dominant gradients of new classes.
  2. Dynamic Compensation (DC): This addresses the training status imbalance. At the start of a phase, the model is already "optimal" for old classes but "non-optimal" for new ones. The authors use intra-class variance as a proxy for training status. Classes with high variance (usually new ones) need more gradient updates, while those with low variance (old ones) need protection.
  3. Momentum Update: To prevent noise from mini-batches, the class means and variances are updated using a momentum mechanism, ensuring the logit adjustments stay stable throughout the training process.

By adjusting these logits, the model leverages the softmax saturation effect: as a logit increases, its corresponding gradient contribution decreases, allowing the model to "throttle" the learning of new classes to protect the old ones.

Datasets

The researchers evaluated BDR across three standard CIL benchmarks:

  • CIFAR-100: 100 classes of small images.
  • ImageNet-Subset: A 100-class subset of the massive ImageNet dataset.
  • ImageNet: The full 1,000-class benchmark, used to test large-scale scalability.

They tested various protocols, including starting from scratch ($B=0$) or starting with a large initial task ($B=50$ or $B=500$).

Key Insights and Ideas

  • The Gradient Balance Theorem: The authors provide a theoretical proof (Theorem 1) showing that the "maximal destruction" of old knowledge is mathematically bounded by the imbalance of gradient contributions. Balancing these gradients directly lowers the ceiling of how much the model can forget.
  • Variance as a Signal: Using intra-class variance to track "learning status" is a clever way to handle the discrepancy between old and new classes without needing complex metadata.
  • Plug-and-Play Simplicity: BDR doesn't change the model architecture or add significant parameters. It simply modifies the loss calculation, making it compatible with almost any existing memory-replay method (like DER, UCIR, or DyTox).

Key Results

  • Universal Improvement: BDR improved the performance of every baseline method it was added to. For example, it boosted the average accuracy of the DER method by up to 2% on CIFAR-100.
  • Small Buffer Excellence: BDR is most effective when the memory buffer is extremely small. When saving only 5 samples per class ($R=5$), BDR provided a massive 6.5% to 9% accuracy gain over vanilla methods.
  • Lower Loss Peaks: Visualization of the distillation loss showed that BDR successfully lowered the "peak" of the destruction phase and led to a lower final convergence loss, confirming their theoretical hypothesis.
  • Better Feature Separation: t-SNE visualizations showed that with BDR, old class clusters remained much more distinct and representative of their original state compared to standard training.

Limitations and Future Work

  • Hyperparameter Sensitivity: The module introduces a few hyperparameters ($m, m', \beta$) that control the balance between constant and dynamic rebalancing. While the authors provide default values that work well, optimal performance might require some tuning per dataset.
  • Pre-trained Models: The current study focuses on training from scratch or from a supervised starting point. The authors suggest that exploring how these dynamics work with large-scale pre-trained models (like CLIP or ViT) is a promising future direction, as these models have different forgetting characteristics.
  • Computational Overhead: While lightweight, calculating running variances and means for 1,000 classes (in full ImageNet) adds a small amount of computational bookkeeping during training.

Summary updated

BibTeX
@article{zhou2024balanced,
  author = {Yuhang Zhou and Jiangchao Yao and Feng Hong and Ya Zhang and Yanfeng Wang},
  title = {{Balanced Destruction-Reconstruction Dynamics for Memory-Replay Class Incremental Learning}},
  journal = {IEEE Trans. Image Process.},
  year = {2024},
  doi = {10.1109/tip.2024.3451932},
}
Figure