Long-Tailed Recognition via Weight Balancing

Shaden Alshammari, Yu-Xiong Wang, Deva Ramanan, Shu Kong
3/27/2022
223 citations
cs.CV

Official code: ShadeAlsha/LTR-weight-balancing (129 stars, Jupyter Notebook, MIT, PyTorch, last commit 2024-11-30).

Abstract

In the real open world, data tends to follow long-tailed class distributions, motivating the well-studied long-tailed recognition (LTR) problem. Naive training produces models that are biased toward common classes in terms of higher accuracy.

Show full abstract

The key to addressing LTR is to balance various aspects including data distribution, training losses, and gradients in learning. We explore an orthogonal direction, weight balancing, motivated by the empirical observation that the naively trained classifier has "artificially" larger weights in norm for common classes (because there exists abundant data to train them, unlike the rare classes). We investigate three techniques to balance weights, L2-normalization, weight decay, and MaxNorm. We first point out that L2-normalization "perfectly" balances per-class weights to be unit norm, but such a hard constraint might prevent classes from learning better classifiers. In contrast, weight decay penalizes larger weights more heavily and so learns small balanced weights; the MaxNorm constraint encourages growing small weights within a norm ball but caps all the weights by the radius. Our extensive study shows that both help learn balanced weights and greatly improve the LTR accuracy. Surprisingly, weight decay, although underexplored in LTR, significantly improves over prior work. Therefore, we adopt a two-stage training paradigm and propose a simple approach to LTR: (1) learning features using the cross-entropy loss by tuning weight decay, and (2) learning classifiers using class-balanced loss by tuning weight decay and MaxNorm. Our approach achieves the state-of-the-art accuracy on five standard benchmarks, serving as a future baseline for long-tailed recognition.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

CVPR 2022 - official implementation for "Long-Tailed Recognition via Weight Balancing" https://arxiv.org/abs/2203.14197

12911Jupyter Notebook, PythonMar 20, 20222 years agoMIT
deep-learninglong-tailed-recognitionpytorch

Similar Papers

Cite this paper

@article{alshammari2022longtailed,
  title  = {Long-Tailed Recognition via Weight Balancing},
  author = {Shaden Alshammari and Yu-Xiong Wang and Deva Ramanan and Shu Kong},
  year   = {2022},
  eprint = {2203.14197},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.14197}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.14197.svg)](https://codeofpaper.com/paper/2203.14197)

Discussion