Balanced Softmax Cross-Entropy for Incremental Learning

Quentin Jodelet, Xin Liu, Tsuyoshi Murata

TL;DR

This paper tackles "catastrophic forgetting" in incremental learning by treating it as a dynamic long-tailed recognition problem. By replacing the standard Softmax loss with a Balanced Softmax Cross-Entropy, the authors significantly reduce model bias toward new classes and eliminate the need for costly extra finetuning steps, achieving state-of-the-art results in both memory-based and exemplar-free settings.

What Problem Does This Paper Address?

Deep neural networks are notoriously bad at learning sequentially. When you teach a model new classes (e.g., "Dogs" then "Cars"), it tends to "forget" the old ones—a phenomenon called catastrophic forgetting.

To fight this, researchers often use a small "replay memory" to store a few examples of old classes. However, this creates a massive data imbalance: the training set might have 1,000 images of a new "Car" but only 20 stored images of an old "Dog." Naturally, the model becomes heavily biased toward the new, over-represented classes. Existing solutions usually involve complex multi-stage training or "balanced finetuning" steps that are computationally expensive and hard to tune.

Methods

The authors propose a surprisingly elegant solution: change the loss function.

  1. Balanced Softmax Cross-Entropy (BalancedS-CE): Borrowing from long-tailed visual recognition research, they modify the Softmax function to account for the number of samples per class ($n_i$). By adjusting the logits during training, the model is mathematically "encouraged" to give equal importance to classes regardless of how many samples are present in the current batch.
  2. Meta-Learning Extension: They introduce a meta-learning algorithm that jointly learns a weighting coefficient ($\alpha$) during training. This allows the model to dynamically find the best balance between "plasticity" (learning new things) and "stability" (keeping old knowledge).
  3. Relaxed Balanced Softmax: For the "exemplar-free" setting (where zero old images can be stored due to privacy or memory constraints), the standard balanced softmax fails because the sample count for old classes is zero. The authors introduce a "Relaxed" version that uses a tiny constant ($\epsilon$) to represent old classes, allowing the model to remain aware of them even without seeing them.

Datasets

The authors evaluated their approach on three standard computer vision benchmarks:

  • CIFAR100: 100 classes of low-resolution images.
  • ImageNet-Subset: A 100-class subset of the massive ImageNet dataset.
  • ImageNet (ILSVRC 2012): The full 1,000-class benchmark.

They tested various incremental "steps" (learning 5, 10, or 25 classes at a time) to see how the model holds up over long sequences of learning.

Key Insights and Ideas

  • Incremental Learning is Long-Tailed Learning: The most profound insight is that the "bias" problem in incremental learning is functionally identical to the "long-tail" problem in static datasets. By bridging these two sub-fields, the authors found a solution that is much simpler than previous CIL-specific hacks.
  • Simplicity is Efficiency: Most state-of-the-art methods (like LUCIR or BiC) require a separate "balanced finetuning" phase after each incremental step. BalancedS-CE achieves better results during the main training phase, reducing the total computational footprint.
  • The "Relaxed" Constant: In the no-memory setting, simply giving old classes a "placeholder" weight ($\epsilon$) prevents the model from completely collapsing its prediction space for those classes, providing a surprisingly effective baseline for privacy-sensitive applications.

Key Results

  • Massive Gains on Baselines: On CIFAR100 (5 steps), adding BalancedS-CE to a simple baseline improved average incremental accuracy from 43.80% to 62.22%.
  • Boosting SOTA: When combined with PODNet (a current top-tier method), BalancedS-CE pushed ImageNet performance to 69.67% (5 steps), outperforming the original PODNet and other complex competitors like DDE.
  • Exemplar-Free Success: In the "no-memory" setting, their Relaxed BalancedS-CE combined with PODNet achieved 68.50% on ImageNet (5 steps), which is remarkably close to—and sometimes better than—older methods that did use memory.

Limitations and Future Work

  • Meta-Learning Overhead: While the Meta-BalancedS-CE version provides the highest accuracy, it requires calculating second-order gradients, which significantly increases memory usage during training. This might make it impractical for edge devices or very large models.
  • Hyperparameter Sensitivity: The "Relaxed" version relies on the $\epsilon$ parameter. While the authors suggest a default of 0.2% of the samples per class, the optimal value can vary depending on the dataset and the number of incremental steps.
  • Future Directions: The authors suggest exploring how to automatically tune these coefficients without a validation set, which would further simplify the pipeline for real-world "in the wild" learning.

Summary updated

BibTeX
@article{jodelet2022balanced,
  author = {Quentin Jodelet and Xin Liu and Tsuyoshi Murata},
  title = {{Balanced Softmax Cross-Entropy for Incremental Learning}},
  journal = {Comput. Vis. Image Underst.},
  year = {2022},
  doi = {10.1016/j.cviu.2022.103582},
}
Figure