[Paper Review] DR Loss: Improving Object Detection by Distributional Ranking
This paper proposes Distributional Ranking (DR) loss, a novel image-dependent loss function that improves one-stage object detection by converting classification into a ranking problem over foreground and background candidates. By pushing confidence score distributions toward the decision boundary and ranking their expectations, DR loss mitigates both inter-class and intra-class imbalance, boosting RetinaNet's mAP from 39.1% to 41.7% on COCO with ResNet-101, outperforming focal loss without architectural changes.
Most of object detection algorithms can be categorized into two classes: two-stage detectors and one-stage detectors. Recently, many efforts have been devoted to one-stage detectors for the simple yet effective architecture. Different from two-stage detectors, one-stage detectors aim to identify foreground objects from all candidates in a single stage. This architecture is efficient but can suffer from the imbalance issue with respect to two aspects: the inter-class imbalance between the number of candidates from foreground and background classes and the intra-class imbalance in the hardness of background candidates, where only a few candidates are hard to be identified. In this work, we propose a novel distributional ranking (DR) loss to handle the challenge. For each image, we convert the classification problem to a ranking problem, which considers pairs of candidates within the image, to address the inter-class imbalance problem. Then, we push the distributions of confidence scores for foreground and background towards the decision boundary. After that, we optimize the rank of the expectations of derived distributions in lieu of original pairs. Our method not only mitigates the intra-class imbalance issue in background candidates but also improves the efficiency for the ranking algorithm. By merely replacing the focal loss in RetinaNet with the developed DR loss and applying ResNet-101 as the backbone, mAP of the single-scale test on COCO can be improved from 39.1% to 41.7% without bells and whistles, which demonstrates the effectiveness of the proposed loss function. Code is available at \url{https://github.com/idstcv/DR_loss}.
Motivation & Objective
- To address the inter-class imbalance between foreground and background candidates in one-stage object detectors.
- To mitigate intra-class imbalance in background candidates, where only a few are hard to classify.
- To develop an image-dependent loss function that leverages global image-level information for better ranking of hard examples.
- To improve detection performance beyond focal loss by optimizing distributional expectations rather than individual examples.
- To achieve state-of-the-art results with minimal modifications, replacing only the classification loss in RetinaNet.
Proposed method
- Convert the object detection classification task into a pairwise ranking problem within each image, balancing positive and negative pairs.
- Re-weight examples to push the confidence score distributions of foreground and background toward the decision boundary.
- Derive new distributions from the original scores using constraints that emphasize hard examples.
- Rank the expectations of the derived foreground and background distributions instead of individual pairs, reducing computational complexity from O(n²) to O(1).
- Optimize the ranking margin between the expected confidence of foreground and background distributions to improve generalization.
- Apply the DR loss as a plug-in replacement for focal loss in RetinaNet, preserving all other components and training protocols.
Experimental results
Research questions
- RQ1Can a ranking-based loss function that operates on image-level distributions improve object detection beyond class-balanced sampling or focal loss?
- RQ2How does an image-dependent loss that considers the full distribution of confidence scores affect the handling of hard negative examples?
- RQ3To what extent can DR loss reduce intra-class imbalance in background candidates while maintaining or improving mAP?
- RQ4Does optimizing the expectation of derived distributions lead to better generalization than optimizing individual example losses?
- RQ5Can DR loss achieve state-of-the-art performance without architectural changes or additional data augmentation?
Key findings
- Replacing focal loss with DR loss in RetinaNet improves mAP on COCO from 39.1% to 41.7% using ResNet-101 as the backbone, with no bells and whistles.
- The expectation of the foreground confidence distribution under DR loss exceeds 0.5, while the background expectation drops below 0.1, indicating strong class separation.
- The distribution of negative anchors under DR loss is more balanced than under cross entropy or focal loss, showing improved handling of hard negatives.
- With ResNeXt-32x8d-101 and 1.5× training iterations, Dr. Retina achieves 43.1% mAP, demonstrating scalability and robustness.
- Multi-scale testing further improves performance to 44.7% mAP with ResNeXt-32x8d-101, showing compatibility with standard test-time augmentation.
- The empirical probability density plots confirm that DR loss significantly improves the foreground distribution and reduces overlap with background, validating its effectiveness in balancing class and hardness imbalances.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.