Long-tailed Visual Recognition via Gaussian Clouded Logit Adjustment

Mengke Li, Yiu-ming Cheung, Yang Lu · DOI

Abstract

Long-tailed data is still a big challenge for deep neural networks, even though they have achieved great success on balanced data. We observe that vanilla training on long-tailed data with cross-entropy loss makes the instance-rich head classes severely squeeze the spatial distribution of the tail classes, which leads to difficulty in classifying tail class samples. Furthermore, the original cross-entropy loss can only propagate gradient short-lively because the gradient in softmax form rapidly approaches zero as the logit difference increases. This phenomenon is called softmax saturation. It is unfavorable for training on balanced data, but can be utilized to adjust the validity of the samples in long-tailed data, thereby solving the distorted embedding space of long-tailed problems. To this end, this paper proposes the Gaussian clouded logit adjustment by Gaussian perturbation of different class logits with varied amplitude. We define the amplitude of perturbation as cloud size and set relatively large cloud sizes to tail classes. The large cloud size can reduce the softmax saturation and thereby making tail class samples more active as well as enlarging the embedding space. To alleviate the bias in a classifier, we therefore propose the class-based effective number sampling strategy with classifier re-training. Extensive experiments on benchmark datasets validate the superior performance of the proposed method.

Introduction

In real-world computer vision applications, datasets rarely follow a uniform distribution. Instead, they typically exhibit a "long-tail" distribution where a small number of "head" classes contain the majority of samples, while many "tail" classes are represented by only a few examples. Standard deep learning models trained with Cross-Entropy (CE) loss tend to favor head classes, leading to poor performance on rare categories. This paper identifies two primary causes: a distorted embedding space where head classes "squeeze" tail representations, and "softmax saturation," where gradients vanish once the model achieves moderate confidence, preventing tail classes from gaining sufficient representational territory.

The Gaussian Clouded Logit (GCL) Method

To address these issues, we propose Gaussian Clouded Logit (GCL) adjustment. The core idea is to introduce class-specific Gaussian noise to the logits during training. We define the amplitude of this perturbation as the "cloud size."

Conceptual illustration of Gaussian Clouded Logit (GCL) adjustment, showing how clouded features help define better class boundaries for tail classes.

By assigning larger cloud sizes to tail classes and smaller (or zero) sizes to head classes, we strategically reduce softmax saturation for rare samples. This "shaking" of the logits keeps gradients active, forcing the model to expand the embedding space for tail classes and establish a larger margin against head classes.

The training follows a two-stage decoupling strategy:

  1. Representation Learning: The feature extractor is trained using GCL loss to create a balanced embedding space.
  2. Classifier Re-training: The classifier is fine-tuned using a Class-Based Effective Number (CBEN) sampling strategy to eliminate remaining bias toward frequent classes.

Experimental Results

The GCL method was evaluated on several benchmarks, including CIFAR-10/100-LT, ImageNet-LT, iNaturalist 2018, and Places-LT. GCL consistently achieved state-of-the-art results. For instance, on CIFAR-100-LT with an imbalance ratio of 200, GCL reached 44.88% accuracy, significantly outperforming previous methods like MisLAS (42.33%). On large-scale datasets like ImageNet-LT and iNaturalist 2018, GCL reached 54.88% and 72.01% top-1 accuracy, respectively.

Visualizing the Embedding Space

The impact of GCL is most evident in the visualization of the learned features. t-SNE plots demonstrate that GCL produces much more distinct and well-separated clusters for tail classes compared to standard CE training, which tends to bunch tail samples into overlapping regions.

t-SNE visualization comparing standard Cross-Entropy (CE) and the proposed GCL on training and test sets. GCL shows significantly better class separation.

Conclusion

Gaussian Clouded Logit adjustment offers a simple yet effective solution for long-tailed recognition. By leveraging Gaussian noise to combat softmax saturation and carve out space in the embedding manifold, GCL allows tail classes "room to breathe." Future work may explore the application of this clouded logit approach to other long-tailed tasks such as object detection and instance segmentation.

Source code is available at https://github.com/Keke921/GCLLoss.

Summary updated

BibTeX
@inproceedings{li2022long,
  author = {Mengke Li and Yiu-ming Cheung and Yang Lu},
  title = {{Long-tailed Visual Recognition via Gaussian Clouded Logit Adjustment}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.00680},
}
Figure