Abstract
Modern object detection frameworks typically treat classification and localization as independent tasks, leading to a misalignment between a detector's confidence and its spatial accuracy. This paper introduces Correlation Loss, a novel, plug-in loss function designed to explicitly synchronize these two heads. By optimizing the correlation between classification scores and Intersection-over-Union (IoU) values, the proposed method ensures that the highest-scoring detections are also the most accurately localized. Experimental results on MS COCO and Cityscapes demonstrate significant performance gains across various architectures, including Sparse R-CNN, with negligible computational overhead.
1. Introduction
Object detection is fundamentally a multi-task learning problem consisting of two primary objectives: identifying the category of an object (classification) and determining its spatial coordinates (localization). While these tasks are inherently linked, standard detection pipelines often optimize them using separate loss functions. This independence frequently results in a lack of correlation: a detector may assign a high confidence score to a poorly localized bounding box, while a more accurate box receives a lower score.
This misalignment is particularly problematic during the post-processing stage, such as Non-Maximum Suppression (NMS). NMS relies on classification scores to rank and filter redundant detections. If the scores do not reflect localization quality, NMS may discard high-quality boxes in favor of low-quality ones that happen to have higher confidence. This paper proposes a direct solution: a Correlation Loss ($L_{corr}$) that forces the model to align its confidence with its accuracy.
2. The Alignment Problem
The authors identify two critical levels where correlation is essential:
- Image-level Correlation: Within a single image, the detector must rank duplicate boxes for the same object correctly so that NMS selects the best fit.
- Class-level Correlation: Across the entire dataset, the ranking of all detections for a specific class determines the Average Precision (AP). High-quality detections must consistently outrank low-quality ones to maximize the area under the precision-recall curve.
Previous attempts to solve this have relied on "auxiliary heads"—additional network components that predict IoU or localization quality. However, these add architectural complexity. Correlation Loss aims to achieve this alignment directly through the optimization objective without modifying the model's structure.
3. Proposed Method: Correlation Loss
The proposed $L_{corr}$ is defined as $1 - \rho(\hat{IoU}, \hat{s})$, where $\rho$ represents a correlation coefficient, $\hat{s}$ denotes classification scores, and $\hat{IoU}$ represents the actual overlap with ground truth. The authors explore two specific implementations:
- Concordance Loss: A strict variant that encourages the classification score to numerically match the IoU value.
- Spearman Loss: A more flexible variant that focuses on the rank of the scores rather than their absolute values. To make this compatible with gradient-based optimization, the authors employ a differentiable sorting technique.
Because $L_{corr}$ is a "plug-and-play" loss function, it is only utilized during the training phase. Consequently, the model's inference speed remains unchanged, making it a highly efficient upgrade for existing detectors.
4. Experimental Results
The effectiveness of Correlation Loss was evaluated on the MS COCO and Cityscapes datasets across a variety of detector types, including anchor-based (RetinaNet), anchor-free (FoveaBox), and instance segmentation models (YOLACT).
4.1 Performance Gains
The most notable improvements were observed in Sparse R-CNN, an NMS-free detector. Despite not relying on NMS, Sparse R-CNN achieved a 1.6 AP gain on COCO and a 1.8 AP gain on Cityscapes. This suggests that the benefit of correlation extends beyond NMS selection to the fundamental ranking logic used in AP calculations. The best-performing model reached 51.0 AP on the COCO test-dev benchmark, outperforming several more complex architectures.
4.2 Efficiency and Generalizability
One of the primary advantages of this method is its negligible overhead. Training time increased by a mere 0.01 seconds per iteration. Furthermore, the loss proved robust across different architectures, consistently improving performance regardless of whether the detector was anchor-based or anchor-free.
5. Discussion and Limitations
While Correlation Loss is highly effective, the authors note a "localization bottleneck." The loss functions by aligning scores with the quality of the boxes produced by the localization head. If the localization head is incapable of producing accurate boxes (e.g., due to poor training or architectural limits), forcing the classification head to align with these poor boxes will not improve performance and may even be counterproductive.
6. Conclusion
Correlation Loss offers a simple yet powerful method for improving object detection by synchronizing classification confidence with localization accuracy. By addressing the misalignment between these two tasks directly in the loss function, the authors achieve state-of-the-art results with virtually no added computational cost. Future work may extend this correlation-based approach to other multi-task domains, such as keypoint estimation and depth perception.
Summary updated