[Paper Review] Rank & Sort Loss for Object Detection and Instance Segmentation
This paper proposes Rank & Sort (RS) Loss, a novel differentiable loss function for object detection and instance segmentation that ranks positive detections above negatives and sorts them by IoU quality. By introducing Identity Update to handle non-differentiable ranking and sorting, RS Loss enables end-to-end training without auxiliary heads or sampling heuristics, achieving state-of-the-art performance across diverse models on COCO and LVIS with only learning rate tuning.
We propose Rank & Sort (RS) Loss, a ranking-based loss function to train deep object detection and instance segmentation methods (i.e. visual detectors). RS Loss supervises the classifier, a sub-network of these methods, to rank each positive above all negatives as well as to sort positives among themselves with respect to (wrt.) their localisation qualities (e.g. Intersection-over-Union - IoU). To tackle the non-differentiable nature of ranking and sorting, we reformulate the incorporation of error-driven update with backpropagation as Identity Update, which enables us to model our novel sorting error among positives. With RS Loss, we significantly simplify training: (i) Thanks to our sorting objective, the positives are prioritized by the classifier without an additional auxiliary head (e.g. for centerness, IoU, mask-IoU), (ii) due to its ranking-based nature, RS Loss is robust to class imbalance, and thus, no sampling heuristic is required, and (iii) we address the multi-task nature of visual detectors using tuning-free task-balancing coefficients. Using RS Loss, we train seven diverse visual detectors only by tuning the learning rate, and show that it consistently outperforms baselines: e.g. our RS Loss improves (i) Faster R-CNN by similar to 3 box AP and aLRP Loss (ranking-based baseline) by similar to 2 box AP on COCO dataset, (ii) Mask R-CNN with repeat factor sampling (RFS) by 3.5 mask AP (similar to 7 AP for rare classes) on LVIS dataset; and also outperforms all counterparts.
Motivation & Objective
- To address the limitations of existing loss functions in handling extreme class imbalance and multi-task optimization in object detection and instance segmentation.
- To eliminate the need for auxiliary heads (e.g., for centerness or IoU prediction) by directly incorporating localization quality into the classification loss.
- To simplify training by removing hyperparameter tuning for task balancing and sampling heuristics.
- To develop a differentiable formulation for ranking and sorting operations that are inherently non-differentiable in deep learning.
Proposed method
- Proposes Rank & Sort (RS) Loss, a multi-objective loss that ranks all positive examples above negatives and sorts positives by their continuous IoU values.
- Introduces Identity Update, a reformulation of error-driven backpropagation that enables differentiable optimization of ranking and sorting operations.
- Uses a continuous IoU-based label for positives to define a sorting objective that prioritizes better-localized predictions.
- Employs a tuning-free task-balancing mechanism that automatically adjusts loss weights across tasks without hyperparameter tuning.
- Applies RS Loss to diverse architectures (Faster R-CNN, Mask R-CNN, YOLACT, SOLOv2, etc.) using only learning rate adjustment.
- Enables end-to-end training without auxiliary heads or sampling heuristics by embedding localization quality directly into the classification objective.
Experimental results
Research questions
- RQ1Can a single, unified loss function simultaneously rank positives above negatives and sort them by localization quality (IoU) in object detection and instance segmentation?
- RQ2How can non-differentiable ranking and sorting operations be effectively optimized via backpropagation in deep learning?
- RQ3Can RS Loss eliminate the need for auxiliary heads (e.g., for centerness or mask-IoU) while maintaining or improving performance?
- RQ4To what extent can RS Loss reduce hyperparameter tuning in multi-task detectors, especially in long-tailed and imbalanced datasets?
- RQ5Does RS Loss improve generalization and robustness to score thresholding in inference, particularly for rare categories?
Key findings
- RS Loss improves Faster R-CNN by 3.0 box AP and aLRP Loss by 2.0 box AP on COCO, achieving 39.6 box AP with no sampling or auxiliary heads.
- On the long-tailed LVIS dataset, RS Loss improves Mask R-CNN with repeat factor sampling by 3.5 mask AP (7.0 for rare classes), achieving 25.2 mask AP at 11.7 fps.
- RS Loss achieves state-of-the-art performance across seven diverse detectors (Faster R-CNN, Mask R-CNN, YOLACT, SOLOv2, etc.) using only learning rate tuning.
- The method is robust to extreme class imbalance: it trains successfully on COCO and LVIS with positive-to-negative instance ratios up to 1:10,470 without sampling.
- Models trained with RS Loss output higher confidence scores, requiring threshold adjustment for efficiency, but maintain strong performance across all score thresholds, especially for rare categories.
- Inference speed is slightly reduced (1.5× longer per iteration) due to quadratic complexity, but the performance gains outweigh the cost, especially on rare classes.
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.