Prototypical Classifier for Robust Class-Imbalanced Learning

Tong Wei, Jiang-Xin Shi, Yufeng Li, Min-Ling Zhang

TL;DR

This paper introduces a "Prototypical Classifier" that tackles the dual challenges of class imbalance and noisy labels in deep learning. By learning class prototypes in an embedding space, it produces balanced predictions, enabling robust noise detection and improved performance on imbalanced datasets.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are powerful, but their performance hinges on large, unbiased datasets. Real-world data often suffers from two major issues: class imbalance (some classes have far fewer examples than others, like rare species in an image dataset) and noisy labels (incorrect annotations). While existing methods often tackle these problems separately, this paper addresses the more realistic scenario where both biases are present simultaneously. Standard classifiers trained on imbalanced data tend to be biased towards "head" classes (those with many examples), leading to poor performance on "tail" classes (those with few examples). This bias also makes it difficult to reliably detect noisy labels, as tail classes with noisy labels often exhibit low confidence and high loss, mimicking genuinely rare classes.

Methods

The core innovation is the Prototypical Classifier. The idea is to learn an embedding space where examples of the same class cluster around a single "prototype." This prototype is simply the normalized mean of the embedded examples for that class. Classification is then done by finding the nearest class prototype in this embedding space.

Here's how it works:

  • Embedding Learning: A neural network learns a non-linear mapping from input data to an embedding space.
  • Prototype Calculation: For each class, the prototype is the average of its embedded examples, normalized.
  • Balanced Predictions: The Prototypical Classifier uses a softmax over the distances to these prototypes. Crucially, this approach inherently produces more balanced predictions across classes, even with imbalanced training data, unlike standard classifiers.
  • Noise Detection: This balanced prediction property is key. The authors leverage it to detect noisy labels by thresholding the confidence scores of the Prototypical Classifier on the original training labels. If a sample's predicted confidence for its assigned label is below a dynamic threshold, it's flagged as potentially noisy.
  • Sample Reweighting: Once noisy labels are identified, a reweighting strategy is applied. Samples with high confidence on their original labels receive higher weights, while those flagged as noisy receive lower weights. This is integrated into a contrastive learning framework to further improve representation learning.
  • Overall Objective: The training objective combines a standard cross-entropy loss (potentially with mixup for robustness), an unsupervised contrastive loss (to learn good representations independent of potentially noisy labels), and the Prototypical Classifier loss (for balanced predictions and noise detection).

Datasets

The authors evaluate their method on:

  • CIFAR-10-LT and CIFAR-100-LT: Standard image classification datasets with artificially introduced class imbalance and label noise.
  • WebVision: A real-world dataset known for its noisy and imbalanced nature, collected from Flickr and Google.

Key Insights and Ideas

  • Balanced Predictions as a Foundation: The most significant insight is that a classifier producing balanced predictions is a prerequisite for robustly handling both class imbalance and label noise simultaneously. Standard classifiers fail here due to their inherent bias.
  • Prototypical Classifier for Noise Detection: The Prototypical Classifier's ability to provide comparable confidence scores across classes, regardless of their frequency, makes it a natural tool for detecting noisy labels. This is a novel application of prototype-based learning.
  • Dynamic Thresholding: Simply using a fixed threshold for noise detection is insufficient. The authors propose a dynamic threshold that increases with training iterations, adapting to the network's growing confidence.
  • Contrastive Learning Synergy: Integrating unsupervised contrastive learning helps learn robust representations that are less affected by noisy labels, complementing the Prototypical Classifier's noise detection and reweighting mechanisms.

Key Results

  • Superior Performance: The Prototypical Classifier consistently outperforms state-of-the-art methods on CIFAR-10, CIFAR-100, and WebVision datasets, especially under high noise ratios and imbalance factors.
  • Significant Improvement: On CIFAR-10, the Prototypical Classifier improves test accuracy by an average of 9% compared to standard cross-entropy (CE).
  • Robustness: The method shows remarkable robustness, with performance degrading much less than other baselines when noise and imbalance increase.
  • Effective Noise Handling: Ablation studies confirm that both the dynamic thresholding for noise detection and the reweighting strategy are crucial for the method's success.

Limitations and Future Work

  • Ensemble Models: While the Prototypical Classifier often outperforms ensemble methods (like DivideMix and RoLT+), it's worth noting that some strong baselines do use ensembles.
  • Hyperparameter Tuning: The paper mentions that the choice of parameters for the dynamic threshold (e.g., $\gamma$ and $\tau_t$) is important, and performance can drop if the threshold grows too fast or too slow.
  • Future Directions: The authors suggest that the Prototypical Classifier's appealing properties could motivate solutions for other challenging learning scenarios, such as semi-supervised and self-supervised learning. They also believe it can be a foundation for tackling more complex problems with class-imbalanced training sets.

Summary updated

BibTeX
@inproceedings{wei2021prototypical,
  author = {Tong Wei and Jiang-Xin Shi and Yufeng Li and Min-Ling Zhang},
  title = {{Prototypical Classifier for Robust Class-Imbalanced Learning}},
  booktitle = {PAKDD},
  year = {2021},
  doi = {10.1007/978-3-031-05936-0\_4},
}
Figure