BWLM: A Balanced Weight Learning Mechanism for Long-Tailed Image Recognition

Baoyu Fan, Han Ma, Yue Liu, Xiaochen Yuan

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


With the growth of data in the real world, datasets often encounter the problem of long-tailed distribution of class sample sizes. In long-tailed image recognition, existing solutions usually adopt a class rebalancing strategy, such as reweighting based on the effective sample size of each class, which leans towards common classes in terms of higher accuracy. However, increasing the accuracy of rare classes while maintaining the accuracy of common classes is the key to solving the problem of long-tailed image recognition. This research explores a direction that balances the accuracy of both common and rare classes simultaneously. Firstly, a two-stage training is adopted, motivated by the use of transfer learning to balance features of common and rare classes. Secondly, a balanced weight function called Balanced Focal Softmax (BFS) loss is proposed, which combines balanced softmax loss focusing on common classes with balanced focal loss focusing on rare classes to achieve dual balance in long-tailed image recognition. Subsequently, a Balanced Weight Learning Mechanism (BWLM) to further utilize the feature of weight decay is proposed, where the weight decay as the weight balancing technique for the BFS loss tends to make the model learn smaller balanced weights by punishing the larger weights. Through extensive experiments on five long-tailed image datasets, it proves that transferring the weights from the first stage to the second stage can alleviate the bias of the naive models toward common classes. The proposed BWLM not only balances the weights of common and rare classes, but also greatly improves the accuracy of long-tailed image recognition and outperforms many state-of-the-art algorithms.

Original languageEnglish
Article number454
JournalApplied Sciences (Switzerland)
Issue number1
Publication statusPublished - Jan 2024


  • Balanced Weight Learning Mechanism
  • balanced weight
  • long-tailedimage recognition
  • reweighting loss
  • weight decay


Dive into the research topics of 'BWLM: A Balanced Weight Learning Mechanism for Long-Tailed Image Recognition'. Together they form a unique fingerprint.

Cite this