DropLoss for Long-Tail Instance Segmentation

Ting-I Hsieh, Esther Robb, Hwann-Tzong Chen, Jia-Bin Huang

Introduction

In real-world visual recognition, object categories typically follow a long-tailed distribution. A few "frequent" classes (e.g., person, car) have abundant training data, while a vast majority of "rare" classes (e.g., goose, sunflower) appear only a few times. Standard deep learning models, optimized for overall accuracy, naturally become biased toward frequent classes, often failing to recognize rare ones.

In instance segmentation, this problem is particularly severe. While previous theories suggested that rare classes are primarily suppressed by confusion with similar frequent classes, this research identifies a more fundamental culprit: the background.

The "Background Bully" Problem

The authors' analysis reveals that for rare categories, the majority of "discouraging gradients"—signals that penalize the model for a false positive—originate from background regions rather than other foreground objects. Because rare objects appear so infrequently, the cumulative signal from the background effectively "drowns out" the positive signals for rare classes.

Analysis of gradient percentages and prediction scores across categories. Rare categories (lower indices) suffer from a higher percentage of discouraging gradients from background regions.

As shown in the figure above, background regions contribute 50-70% of discouraging gradients for rare categories, compared to only 30-40% for frequent ones. This imbalance creates a massive hurdle for the model to learn rare class features effectively, as the model receives thousands of signals telling it "this is NOT a rare object" for every single positive example.

Methodology: From Reweighting to Stochastic Dropping

To address this, the authors first experimented with Background Equalization Loss (BEQL). BEQL uses a logarithmic scale to reduce the weight of background losses for rare classes. However, this approach introduced a rigid trade-off: increasing the accuracy of rare classes ($AP_r$) often came at a significant cost to frequent class accuracy ($AP_f$).

The trade-off between rare and frequent class accuracy in the BEQL method across different logarithm bases.

As illustrated in the AP vs. Logarithm Base plot, as the model attempts to boost rare class performance by adjusting the loss weight, the performance on frequent classes begins to degrade. This "hard trade-off" necessitates tedious hyperparameter tuning.

DropLoss: A Stochastic Solution

To overcome the limitations of fixed reweighting, the authors proposed DropLoss, a stochastic adaptive loss function. Instead of simply lowering the weight of background signals, DropLoss uses a Bernoulli distribution to decide whether to keep or drop the background loss for a specific category in a given training batch.

The dropping probability is dynamically calculated based on the occurrence ratio of classes within the current batch. If a rare class is not present in the current batch, the model is highly likely to "drop" the background loss for that class, preventing unnecessary suppression. If the class is present, the loss is kept to ensure the model learns to distinguish the object from the background. This stochasticity allows the network to explore the solution space for rare categories more effectively without the need for manual hyperparameter tuning.

Experimental Results

The method was evaluated on the LVIS (Large Vocabulary Instance Segmentation) dataset (v0.5 and v1.0), which contains over 1,200 categories.

Performance Gains

DropLoss consistently outperformed both the standard Binary Cross Entropy (BCE) baseline and the previous state-of-the-art, Equalization Loss (EQL):

  • Overall Accuracy: Using a Mask R-CNN with ResNet-50, DropLoss achieved 25.5% overall AP, surpassing EQL's 23.8%.
  • Rare Class Performance: On LVIS v0.5, DropLoss improved $AP_r$ to 13.2%, nearly tripling the baseline BCE (4.7%) and significantly beating EQL (8.5%).
  • Synergy: When combined with Repeat Factor Sampling (RFS), performance reached 26.4% AP.

Qualitative Impact

Visual results demonstrate that DropLoss enables the model to correctly identify "common" objects that standard models often dismiss as background due to over-suppression. By reducing the volume of negative signals from the background, the model maintains higher discriminative power for the entire vocabulary and achieves a better Pareto frontier—improving rare class accuracy with a much smaller "tax" on frequent class accuracy compared to previous methods.

Conclusion

DropLoss introduces a simple yet powerful stochastic mechanism to rebalance gradients in long-tailed instance segmentation. By identifying and mitigating the overwhelming suppression from background regions, it achieves superior performance across the entire class distribution. Future work may explore the application of this stochastic dropping mechanism to other domains characterized by extreme class imbalance, such as long-tailed image classification or natural language processing.

Summary updated

BibTeX
@inproceedings{hsieh2021droploss,
  author = {Ting-I Hsieh and Esther Robb and Hwann-Tzong Chen and Jia-Bin Huang},
  title = {{DropLoss for Long-Tail Instance Segmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i2.16246},
}
Figure