Abstract
Multi-label classification (MLC) is a fundamental task in computer vision where an image may be associated with multiple labels. A significant challenge in MLC is the extreme imbalance between positive and negative samples, often compounded by missing labels in large-scale datasets. We present Asymmetric Loss (ASL), a novel loss function designed to address these issues by decoupling the treatment of positive and negative samples. By utilizing asymmetric focusing and probability shifting, ASL aggressively down-weights easy negatives and discards likely mislabeled samples, preserving the signal from rare positive labels. ASL achieves state-of-the-art results on major benchmarks, including MS-COCO and Open Images, without increasing inference latency.
The Multi-Label Imbalance Problem
In real-world multi-label datasets, a typical image contains only a few positive labels out of hundreds or thousands of possibilities. This creates a severe positive-negative imbalance during training. Standard loss functions, such as Cross-Entropy (CE), generate a flood of gradients from the vast number of negative samples, which can overwhelm the sparse signal from positive samples.
Furthermore, large datasets are often noisy, containing missing labels. When a model is forced to treat a missing positive as a "hard negative," it can lead to overfitting on errors and degraded performance. While Focal Loss attempts to mitigate imbalance by down-weighting easy samples, its symmetric nature means that aggressive down-weighting of negatives also inadvertently dampens the signal from important positive samples.
Methods: Asymmetric Focusing and Probability Shifting
The proposed Asymmetric Loss (ASL) modifies the standard Cross-Entropy loss through two primary mechanisms:
1. Asymmetric Focusing
Unlike Focal Loss, which applies a single focusing hyperparameter $\gamma$ to both classes, ASL introduces two distinct parameters: $\gamma_+$ for positive samples and $\gamma_-$ for negative samples. By setting $\gamma_- > \gamma_+$, the model can aggressively suppress gradients from easy negatives while maintaining strong gradients for positive samples. Empirical results suggest that setting $\gamma_+ = 0$ (standard CE for positives) often yields the best performance.
2. Asymmetric Probability Shifting
To further handle the imbalance and potential mislabeling, ASL incorporates a probability margin $m$. For negative samples, the probability is shifted: $p_m = \max(p - m, 0)$. This implements a hard thresholding mechanism where the loss for negatives with predicted probability below $m$ is zeroed out completely.
As shown in Figure 3, this shifting not only discards easy negatives but also attenuates the gradients for "hard" negative samples (those with high $p$). In the context of noisy labels, these hard negatives are often actually missing positive labels. By reducing their influence, ASL prevents the model from overfitting to label noise.
Key Insights and Results
A critical observation in this work is the "Probability Gap"—the difference between the average predicted probability of positives versus negatives. A well-balanced model should maintain a clear gap. ASL's design naturally encourages this separation, whereas standard CE can lead to negatives having higher average probabilities than positives in extreme imbalance scenarios.
ASL was evaluated across several challenging benchmarks:
- MS-COCO: Achieved a state-of-the-art 86.6% mAP, a 2.8% improvement over previous best results.
- Open Images (v6): Demonstrated superior scaling on a massive dataset with over 5,000 classes.
- Downstream Tasks: Improved performance in object detection (FCOS) and fine-grained single-label classification.
Notably, ASL demonstrates that optimizing the loss function can be more effective than increasing architectural complexity (e.g., using Graph Neural Networks for label correlation). Since ASL is only used during training, it adds no computational overhead to the model during inference.
Conclusion
Asymmetric Loss provides a simple, efficient, and effective solution for the positive-negative imbalance and label noise inherent in multi-label classification. By decoupling the focusing of positives and negatives and introducing hard thresholding via probability shifting, ASL sets new performance standards across diverse vision tasks. Future work includes exploring per-class adaptive asymmetry to better handle long-tail distributions.
Summary updated