Abstract
In real-world instance segmentation, data distributions are typically long-tailed, causing standard models to be dominated by frequent "head" classes at the expense of rare "tail" categories. We present Seesaw Loss, a dynamic and distribution-agnostic loss function that re-balances gradients to mitigate excessive penalties on rare classes while compensating for potential misclassifications. Evaluated on the LVIS v1 dataset, Seesaw Loss significantly improves performance for rare categories, boosting $AP_r$ from 0.8% to 18.1% in a standard Mask R-CNN framework. Our method achieves state-of-the-art results without the need for complex multi-stage training.
Introduction
Machine learning models often struggle with long-tailed datasets where a few categories possess an overwhelming number of instances compared to hundreds of rare classes. In instance segmentation, this imbalance leads to head classes acting as "bullies," providing excessive negative signals for tail classes during training. Consequently, classifiers become biased toward frequent categories, often misclassifying rare objects as background or common classes.
Methods
Seesaw Loss addresses the long-tail challenge by dynamically adjusting gradients through two complementary factors:
- Mitigation Factor ($M_{ij}$): This factor reduces the negative gradient (penalty) that a frequent class $i$ imposes on a rare class $j$. By calculating the ratio of cumulative training instances, the penalty is scaled down for tail classes, allowing them to learn representative features more effectively.
- Compensation Factor ($C_{ij}$): To prevent over-prediction of tail classes, this factor monitors instances where a tail class is incorrectly predicted with higher probability than the ground truth. In such cases, the penalty is increased to maintain classifier discipline.
Additionally, the framework employs Normalized Linear Activation (NLA) to reduce scale variance in classifier weights and an Objectness Branch to decouple the detection of objects from their specific categorization, preventing the accidental reduction of penalties for background regions.
Results
Our experiments on the LVIS v1 dataset demonstrate that Seesaw Loss provides substantial improvements, particularly for rare classes. As shown in the performance comparison, Seesaw Loss outperforms existing specialized methods such as Equalization Loss (EQL) and Balanced Group Softmax (BAGS).
When integrated with Cascade Mask R-CNN and Repeat Factor Sampling (RFS), Seesaw Loss achieves a state-of-the-art 30.1% AP. Furthermore, its effectiveness on ImageNet-LT demonstrates its versatility across different recognition tasks, improving top-1 accuracy by 6% over standard Cross-Entropy loss.
Conclusion
Seesaw Loss offers a simple yet powerful end-to-end solution for long-tailed instance segmentation. By balancing mitigation and compensation in an online, distribution-agnostic manner, it overcomes the limitations of traditional cross-entropy loss. Future research may focus on automated hyperparameter tuning and enhancing mask quality for rare objects with limited visual data.
Summary updated