Dual Compensation Residual Networks for Class Imbalanced Learning

Ruibing Hou, Hong Chang, Bingpeng Ma, Shiguang Shan, Xilin Chen

Abstract

Deep learning models often struggle with long-tailed data distributions where a few "head" classes dominate and many "tail" classes are underrepresented. Traditional re-balancing techniques frequently lead to tail overfitting and head underfitting. This paper introduces Dual Compensation Residual Networks (DCRNets), a framework designed to mitigate these issues through feature and logit compensation alongside a residual classifier. By leveraging head-class knowledge to compensate for tail-class feature drift, DCRNets achieve state-of-the-art performance across multiple benchmarks without increasing inference latency.

Introduction

In the world of deep learning, data is rarely distributed equally. Real-world datasets often follow a "long-tail" distribution: a few head classes have thousands of samples, while many tail classes have only a handful. Standard models tend to ignore the tail, while common re-balancing strategies—such as re-sampling or re-weighting—often overfit the tail and, surprisingly, underfit the head.

This paper introduces DCRNets, an architectural framework designed to solve this "damned if you do, damned if you don't" dilemma. By explicitly compensating for feature drift in tail classes and employing a residual classifier that preserves head-class performance, DCRNets fit both rare and common categories without sacrificing one for the other.

The Problem: Feature Drift and Head Underfitting

The authors identify two critical failures in existing long-tailed learning approaches:

  1. Tail Overfitting via Feature Drift: Because tail classes have so few samples, the model tends to "memorize" them. At test time, unseen tail samples often do not look like the training ones; instead, they "drift" in feature space toward similar, more common head classes (e.g., a rare "Chesapeake Bay Retriever" might drift toward a common "Golden Retriever").
  2. Head Underfitting: When a model is forced to focus on the tail via re-balancing, it often loses the nuance required to distinguish between head classes, leading to a drop in overall accuracy.

The DCRNet Framework

To address these challenges, the authors propose three novel components that can be integrated into existing architectures like ResNet:

Feature Compensation Module (FCM)

FCM addresses feature drift by identifying the "nearest" head classes for each tail class and estimating a "drift direction." It then shifts training features along these directions to better mimic where test features are likely to land. This allows the model to leverage the rich feature diversity of head classes to support the sparse representations of the tail.

Logit Compensation Module (LCM)

Since a single drift vector is rarely perfect, LCM adds stochasticity to the process. It translates the deterministic drift from FCM into a Gaussian distribution of potential features, effectively "filling in" the feature manifold for rare classes and improving generalization.

Residual Balanced Multi-Proxies Classifier (RBMC)

To prevent head-class performance from degrading, the authors utilize a dual-branch classifier. One branch learns from a "uniform" (unbalanced) distribution, which is ideal for head classes. The second branch learns a "residual" mapping to achieve balance. By combining them, the model uses high-quality head-class knowledge to support class-balanced predictions.

Experimental Results

The authors evaluated DCRNets on five standard long-tailed benchmarks, including ImageNet-LT, iNaturalist18, CIFAR-LT, and Places-LT.

  • ImageNet-LT: DCRNets achieved 53.2% top-1 accuracy (using a ResNet-50 backbone), outperforming popular decoupled baselines by nearly 6%.
  • iNaturalist18: The model reached 70.3% accuracy, a significant jump over previous methods struggling with the extreme imbalance of over 8,000 classes.
  • Efficiency: A key advantage of DCRNets is that the compensation modules are discarded during the inference phase. This means the model maintains the same speed as a standard ResNet when deployed.

Conclusion and Future Work

DCRNets provide a robust solution to the long-tail problem by treating class imbalance as a feature representation challenge rather than just a frequency issue. While the framework shows state-of-the-art results, the authors note that the strength of compensation requires tuning and relies on the existence of semantically similar head classes. Future work may extend this framework to other domains where data imbalance is a hurdle, such as Unsupervised Domain Adaptation and Person Re-Identification.

Summary updated

BibTeX
@article{hou2023dual,
  author = {Ruibing Hou and Hong Chang and Bingpeng Ma and Shiguang Shan and Xilin Chen},
  title = {{Dual Compensation Residual Networks for Class Imbalanced Learning}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  url = {https://openreview.net/forum?id=fBune5SP6a},
}
Figure