Rebalancing Using Estimated Class Distribution for Imbalanced Semi-supervised Learning Under Class Distribution Mismatch

Taemin Park, Hyuck Lee, Heeyoung KimECCV 2024

Abstract

Despite significant advancements in class-imbalanced semi-supervised learning (CISSL), many existing algorithms explicitly or implicitly assume that the class distribution of unlabeled data matches that of labeled data. However, when this assumption fails in practice, the classification performance of such algorithms may degrade due to incorrectly assigned weight to each class during training. We propose a novel CISSL algorithm called Rebalancing Using Estimated Class Distribution (RECD). RECD estimates the unknown class distribution of unlabeled data through Monte Carlo approximation, leveraging predicted class probabilities for unlabeled samples, and subsequently rebalances the classifier based on the estimated class distribution. Additionally, we propose an extension of feature clusters compression in the context of CISSL to mitigate feature map imbalance by densifying minority class clusters. Experimental results on four benchmark datasets demonstrate that RECD achieves state-of-the-art classification performance in CISSL.

Introduction

In modern machine learning, datasets are frequently "long-tailed," where a few majority classes dominate while many minority classes have very few samples. Semi-supervised learning (SSL) aims to leverage a small amount of labeled data alongside a large pool of unlabeled data. However, most SSL algorithms struggle under imbalance, and existing Class-Imbalanced SSL (CISSL) methods often rely on the assumption that labeled and unlabeled data share the same class distribution.

The Problem: Distribution Mismatch

A critical challenge arises when there is a Distribution Mismatch. In real-world scenarios, the class proportions in the unlabeled pool are often unknown and may differ significantly from the labeled set. If an algorithm assumes they match, it may over-correct, leading to poor generalization on minority or majority classes depending on the direction of the mismatch.

Figure 1: Visualization of class distribution mismatch where labeled data follows a long-tailed distribution while unlabeled data is uniformly distributed.

Methodology: The RECD Algorithm

To address this, we propose RECD (Rebalancing Using Estimated Class Distribution). RECD is a modular framework that can be integrated into existing SSL pipelines like FixMatch or ReMixMatch. It consists of two primary innovations:

  1. Distribution Estimation via Monte Carlo Approximation: Since the true labels of unlabeled data are unknown, RECD treats the model’s average predictions as a proxy for the unlabeled distribution. To maintain computational efficiency, it utilizes an Exponential Moving Average (EMA) of minibatch predictions to dynamically estimate the class distribution throughout training.
  2. Adaptively Adjusted Feature Multiplier (AAFM): Beyond rebalancing the final classification layer, RECD addresses bias in the internal feature map. Minority classes often form sparse clusters that overlap with majority classes. AAFM adaptively scales these features to "densify" minority clusters, making them more linearly separable. This scaling is guided by the estimated distribution and model confidence to ensure training stability.

Experimental Results

We evaluated RECD on several long-tailed benchmarks, including CIFAR-10-LT, CIFAR-100-LT, STL-10-LT, and Small-ImageNet-127. RECD consistently outperformed state-of-the-art CISSL algorithms such as ABC, CoSSL, and DARP.

Figure 2: The proposed RECD algorithm effectively aligns the predicted class distribution with the target distribution, correcting the imbalances seen in baseline methods.

Key findings include:

  • Superior Accuracy: On CIFAR-10-LT, RECD achieved a balanced accuracy of 88.1%.
  • Robustness to Mismatch: In scenarios with severe distribution mismatch (e.g., imbalanced labeled data vs. balanced unlabeled data), RECD maintained high performance while baseline methods saw significant degradation.
  • Improved Feature Boundaries: Visualization of confusion matrices and feature spaces confirmed that RECD reduces the misclassification of minority samples into majority classes by creating more distinct class boundaries.

Conclusion

RECD provides a robust solution for imbalanced semi-supervised learning by explicitly accounting for distribution mismatch. By combining dynamic distribution estimation with adaptive feature densification, it achieves state-of-the-art results across diverse benchmarks. Future work will explore the robustness of these estimations in scenarios with extremely scarce unlabeled data or open-set conditions where unlabeled data contains novel classes.

Summary updated

BibTeX
@inproceedings{park2024rebalancing,
  author = {Taemin Park and Hyuck Lee and Heeyoung Kim},
  title = {{Rebalancing Using Estimated Class Distribution for Imbalanced Semi-supervised Learning Under Class Distribution Mismatch}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  url = {https://openreview.net/forum?id=CHRNrdU67W},
}
Figure