Class-Imbalanced Semi-Supervised Learning

Minsung Hyun, Jisoo Jeong, Nojun KwakarXiv 2020

Abstract

Semi-Supervised Learning (SSL) has achieved great success in overcoming the difficulties of labeling and making full use of unlabeled data. However, SSL has a limited assumption that the numbers of samples in different classes are balanced, and many SSL algorithms show lower performance for the datasets with the imbalanced class distribution. In this paper, we introduce a task of class-imbalanced semi-supervised learning (CISSL), which refers to semi-supervised learning with class-imbalanced data. In doing so, we consider class imbalance in both labeled and unlabeled sets. First, we analyze existing SSL methods in imbalanced environments and examine how the class imbalance affects SSL methods. Then we propose Suppressed Consistency Loss (SCL), a regularization method robust to class imbalance. Our method shows better performance than the conventional methods in the CISSL environment. In particular, the more severe the class imbalance and the smaller the size of the labeled data, the better our method performs.

Introduction

Semi-supervised learning (SSL) offers a powerful framework for leveraging small amounts of labeled data alongside large pools of unlabeled data. However, most research in this field assumes a balanced class distribution. In real-world scenarios, data is often "long-tailed," where a few majority classes dominate and many minority classes have very few samples. This paper formally introduces the Class-Imbalanced Semi-Supervised Learning (CISSL) task, where both labeled and unlabeled sets are imbalanced, and identifies a critical failure mode in standard SSL algorithms.

The Cluster Assumption Trap

Standard SSL techniques, such as the $\Pi$-model and Mean Teacher, rely on consistency regularization. This mechanism encourages the model to produce stable predictions under input perturbations, effectively smoothing the decision boundary in low-density regions—a principle known as the "cluster assumption."

In imbalanced settings, this assumption becomes a trap. Because minority classes are sparse, their high-density clusters can be mistaken for low-density empty space. Consequently, the consistency loss forces the decision boundary to cut directly through minority class clusters, effectively "erasing" rare classes to satisfy the smoothing requirement of the majority classes.

Standard SSL ($\Pi$-model) failing on the two-moons dataset. The decision boundary (orange/yellow) encroaches on the minority class cluster due to over-smoothing in sparse regions.

Suppressed Consistency Loss (SCL)

To mitigate this, we propose Suppressed Consistency Loss (SCL). The core idea is to selectively relax the consistency requirement for samples predicted to belong to minority classes. By "suppressing" the smoothing effect for rare classes, we allow the decision boundary to remain sharp around them, preventing encroachment by majority classes.

SCL applies a weighting function $g(N_c)$ to the consistency loss: $$L_{SCL}(X_i) = g(N_c) \cdot L_{con}(X_i)$$ where $N_c$ is the number of samples in the predicted class. The function $g(N_c)$ is designed to be small for minority classes and approach 1 for the majority class. This prevents the consistency regularization from over-powering the limited label information available for rare classes.

The proposed SCL method on the two-moons dataset. By suppressing consistency for minority predictions, the decision boundary correctly separates the clusters.

Experimental Results

We evaluated SCL across several benchmarks modified to simulate real-world imbalance.

Image Classification

On CIFAR-10 with an imbalance factor of 100 and 4,000 labels, the combination of Mean Teacher (MT) and SCL achieved a 22.62% error rate, compared to 29.06% for standard Mean Teacher and 36.71% for purely supervised learning. The performance gains of SCL become more pronounced as the imbalance becomes more severe and the amount of labeled data decreases.

Object Detection

To demonstrate generalizability, SCL was applied to the PASCAL VOC 2007/2012 object detection task using the SSD300 architecture. Adding SCL to a semi-supervised baseline (CSD) improved the mean Average Precision (mAP) from 71.7% to 72.6%, showing its effectiveness in complex vision tasks beyond simple classification.

Conclusion

Class imbalance is a fundamental challenge for semi-supervised learning. By identifying the "cluster assumption trap," we have shown that standard consistency regularization can be detrimental to minority class performance. Suppressed Consistency Loss (SCL) provides a simple yet effective remedy by adaptively modulating the smoothing effect based on class frequency, leading to more robust and equitable SSL models.

Summary updated

BibTeX
@misc{hyun2020class,
  author = {Minsung Hyun and Jisoo Jeong and Nojun Kwak},
  title = {{Class-Imbalanced Semi-Supervised Learning}},
  year = {2020},
  eprint = {2002.06815},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.06815},
}
Figure