Margin Calibration for Long-Tailed Visual Recognition

Yidong Wang, Bowen Zhang, Wenxin Hou, Zhen Wu, Jindong Wang +1 more
12/14/2021
cs.CVcs.AIcs.LG

Official code: microsoft/robustlearn (511 stars, Python, MIT, last commit 2024-07-12).

Abstract

The long-tailed class distribution in visual recognition tasks poses great challenges for neural networks on how to handle the biased predictions between head and tail classes, i.e., the model tends to classify tail classes as head classes. While existing research focused on data resampling and loss function engineering, in this paper, we take a different perspective: the classification margins.

Show full abstract

We study the relationship between the margins and logits (classification scores) and empirically observe the biased margins and the biased logits are positively correlated. We propose MARC, a simple yet effective MARgin Calibration function to dynamically calibrate the biased margins for unbiased logits. We validate MARC through extensive experiments on common long-tailed benchmarks including CIFAR-LT, ImageNet-LT, Places-LT, and iNaturalist-LT. Experimental results demonstrate that our MARC achieves favorable results on these benchmarks. In addition, MARC is extremely easy to implement with just three lines of code. We hope this simple method will motivate people to rethink the biased margins and biased logits in long-tailed visual recognition.

View on arXivView PDF

Code Implementations(1)

MIT

Robust machine learning for responsible AI

51167Python, ShellOct 20, 20222 years agoMIT

Similar Papers

Cite this paper

@article{wang2021margin,
  title  = {Margin Calibration for Long-Tailed Visual Recognition},
  author = {Yidong Wang and Bowen Zhang and Wenxin Hou and Zhen Wu and Jindong Wang and Takahiro Shinozaki},
  year   = {2021},
  eprint = {2112.07225},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2112.07225}
}

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/2112.07225.svg)](https://codeofpaper.com/paper/2112.07225)

Discussion