Addressing Imbalance for Class Incremental Learning in Medical Image Classification

Xuze Hao, Wenqian Ni, Xuhao Jiang, Weimin Tan, Bo Yan

TL;DR

This paper introduces two novel "plug-in" loss functions to solve the problem of catastrophic forgetting in medical image classification. By combining logit adjustment for classifier bias and a distribution-based margin loss for better feature separation, the authors significantly outperform existing state-of-the-art methods on highly imbalanced medical datasets.

What Problem Does This Paper Address?

In an ideal world, a medical AI would be trained on every possible disease at once. In reality, new diseases emerge, treatment protocols change, and data arrives in waves. This necessitates Class Incremental Learning (CIL)—the ability for a model to learn new classes over time without forgetting the old ones.

However, CIL faces a massive hurdle: catastrophic forgetting. When a model learns "Disease D," it often overwrites the weights that helped it identify "Diseases A, B, and C." This is exacerbated in the medical domain by a "double imbalance":

  1. Incremental Imbalance: The model has access to plenty of data for new classes but only a tiny "memory buffer" of samples for old ones.
  2. Inherent Dataset Imbalance: In the real world, some conditions (like certain skin cancers) are much rarer than others.

Current models often become heavily biased toward the newest or most frequent classes, leading to poor diagnostic accuracy for older or rarer conditions.

Methods

The authors propose a two-pronged strategy to tackle these imbalances at different stages of the neural network:

1. CIL-Balanced Classification Loss ($L_{cbc}$)

Standard classification losses (like Cross-Entropy) treat all classes equally. The authors replace this with a loss that uses logit adjustment.

  • How it works: It tweaks the output scores (logits) based on category frequency. It essentially "penalizes" the model more for missing rare or old classes and introduces a scale factor ($\alpha$) to balance the importance of old vs. new knowledge. This prevents the classifier from simply defaulting to the most "popular" class.

2. Distribution Margin Loss ($L_{dm}$)

Even if the classifier is balanced, the "embeddings" (the internal mathematical representations of images) can overlap, causing confusion.

  • The Innovation: While traditional margin losses try to push individual data points apart, this paper models each class as a Gaussian distribution in the feature space.
  • The Goal: It forces the model to push the entire distribution of a new class away from the distributions of old classes (inter-class separation) while simultaneously pulling samples of the same class closer together (intra-class compactness).

These two losses are designed as "plug-ins," meaning they can be added to existing CIL frameworks with minimal architectural changes.

Datasets

The researchers evaluated their approach on three distinct medical benchmarks:

  • CCH5000: 5,000 histological images of colorectal cancer (8 balanced classes).
  • HAM10000: Over 10,000 skin cancer images. This is highly imbalanced, with one class making up nearly 67% of the data.
  • EyePACS: A massive dataset for diabetic retinopathy (DR) classification. It is also highly imbalanced and categorized into five stages of disease severity.

Key Insights and Ideas

  • Modeling Distributions, Not Points: One of the "aha" moments is the shift from point-to-point margins to distribution-to-distribution margins. By modeling classes as Gaussians, the model accounts for the "spread" of a disease's features, which is more robust than looking at individual samples in a limited memory buffer.
  • The Power of Logit Scaling: The introduction of the $\alpha$ trade-off coefficient allows the model to be tuned specifically for the "forgetting vs. learning" balance of a specific dataset. For example, they found that a lower $\alpha$ (0.3) worked best for the complex EyePACS dataset, while a higher $\alpha$ (0.7) was better for CCH5000.
  • Synergy: The ablation studies show that while each loss helps, the combination is where the magic happens. $L_{cbc}$ fixes the "decision-making" bias, while $L_{dm}$ fixes the "visual understanding" (feature space) overlap.

Key Results

The proposed method consistently outperformed state-of-the-art (SOTA) models like LO2LN and DER:

  • HAM10000: On the 3-2 incremental setting (learning 3 classes, then 2, then 2), the model achieved 85.0% accuracy, a 3% jump over the previous SOTA, while reducing "forgetting" by nearly 5%.
  • EyePACS: Even on this notoriously difficult dataset, the method achieved the highest accuracy (82.8%) and the lowest forgetting rate (-0.5%, meaning it actually improved slightly on some old tasks as it learned new ones).
  • Qualitative Proof: t-SNE visualizations (plots that map high-dimensional data into 2D) clearly showed that their method produced much tighter, more distinct clusters for different diseases compared to standard approaches.

Limitations and Future Work

While the results are impressive, a few areas remain for exploration:

  • Hyper-parameter Sensitivity: The model relies on finding the optimal $\alpha$ and margin values. While the authors provide a sensitivity study, these values currently need to be tuned per dataset.
  • Memory Buffer Reliance: Like most rehearsal-based CIL methods, this still requires storing some patient data. In highly regulated medical environments, "data-free" incremental learning (learning without storing any old samples) is the next major frontier.
  • Scaling to More Steps: The experiments focused on 3 to 11 incremental steps. Testing how this holds up over dozens of incremental updates (simulating years of clinical use) would be a valuable next step.

Summary updated

BibTeX
@inproceedings{hao2024addressing,
  author = {Xuze Hao and Wenqian Ni and Xuhao Jiang and Weimin Tan and Bo Yan},
  title = {{Addressing Imbalance for Class Incremental Learning in Medical Image Classification}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3680719},
}
Figure