Fractional Correspondence Framework in Detection Transformer

Masoumeh Zareapoor, Pourya Shamsolmoali, Huiyu Zhou, Yue Lu, Salvador García

TL;DR

This paper introduces the Regularized Transport Plan (RTP), a flexible matching framework for Detection Transformers (DETR) that replaces rigid one-to-one matching with soft, fractional assignments. By leveraging optimal transport theory and the differentiable Sinkhorn algorithm, RTP-DETR significantly accelerates training convergence and boosts detection accuracy—achieving an absolute gain of +1.7% mAP over DINO-DETR in just 12 epochs.

What Problem Does This Paper Address?

The Detection Transformer (DETR) revolutionized object detection by eliminating hand-crafted components like anchor boxes and non-maximum suppression (NMS). Central to its success is the Hungarian algorithm, which enforces a strict one-to-one matching between predicted bounding boxes and ground-truth objects during training.

However, this rigid binary assignment (either a perfect match or background) is a double-edged sword. It struggles to handle real-world complexities such as varying object densities, highly overlapping objects, or very small objects. Furthermore, this discrete matching strategy introduces optimization instability early in training, leading to notoriously slow convergence rates that require lengthy training schedules to overcome.

Methods

To inject flexibility into the matching process, the authors propose the Regularized Transport Plan (RTP), which re-frames bipartite matching as an Optimal Transport (OT) problem.

Instead of forcing a hard binary choice, RTP computes a continuous transport plan ($\Gamma$) where each element represents a fractional "degree of match" between a prediction and a ground truth. The core components of the method include:

  • KL-Divergence Relaxation: Standard OT strictly enforces mass conservation, which can lead to "over-splitting" (spreading matching weights too thin). The authors introduce Kullback-Leibler (KL) divergence penalties to relax these marginal constraints, making the framework robust to noisy assignments and discrepancies between the number of predictions and actual objects.
  • Entropic Regularization: By adding an entropy penalty to the optimization objective, the transport plan becomes smoother, allowing a single prediction to contribute fractionally to multiple ground truths (and vice versa).
  • Differentiable Sinkhorn Algorithm: Entropic regularization allows the model to solve the matching problem using the Sinkhorn algorithm. Unlike the Hungarian algorithm ($O(n^3)$ complexity), the Sinkhorn algorithm scales as $O(nm)$ per iteration and is highly parallelizable on GPUs.
  • Adaptive Parameter Scaling: Because scene complexity varies dynamically, the authors use an adaptive function to scale the entropy parameter based on the number of predictions ($\epsilon = \epsilon_0 / \log M$), preventing excessive regularization when the prediction count is high.
Comparison of matching strategies: Hungarian algorithm vs. Exact Optimal Transport vs. the proposed Regularized Transport Plan (RTP).

Datasets

The framework was trained and evaluated on two standard computer vision benchmarks:

  • MS-COCO (val2017): Consisting of over 118k training images and 5k validation images.
  • PASCAL-VOC: Fine-tuned on VOC trainval07+12 (~16.5k images) and evaluated on the test2007 set.

Key Insights and Ideas

  • Soft Prior over Hard Decisions: Forcing a network to choose exactly one bounding box when multiple overlapping predictions are equally valid creates conflicting gradients. Fractional matching stabilizes the learning signal by distributing probability mass across reasonable alternatives.
  • Algorithmic Speedups via Parallelization: While the Hungarian algorithm acts as a computational bottleneck on large-scale tasks, parallelizing the Sinkhorn algorithm on GPUs yields a ~40% speedup in the matching computation step during training.
  • Complementary to Existing Architectures: RTP is not a standalone model but a plug-and-play matching framework. It consistently improves performance when integrated into other advanced DETR variants like Deformable-DETR, Group-DETR, and DINO-DETR.

Key Results

RTP-DETR demonstrates superior accuracy and significantly faster convergence compared to traditional DETR variants:

  • Performance Boost: When using a ResNet-50 backbone on MS-COCO with a short 12-epoch schedule, RTP-DETR achieves 50.4% mAP, outperforming Deform-DETR by +3.8% and the state-of-the-art DINO-DETR baseline by +1.7%.
  • High-Threshold Accuracy: Notable improvements were observed in $AP_{75}$, demonstrating that soft matching helps the model output highly precise localizations.
  • Inference Efficiency: Despite the continuous optimization, RTP-DETR maintains a highly competitive inference speed of 23 FPS (compared to DINO-DETR's 25 FPS), proving that the accuracy gains incur negligible computational overhead.
Learning curves showing that RTP-DETR converges faster and achieves higher AP with fewer epochs compared to other DETR variants.

Limitations and Future Work

While the adaptive entropy scaling mitigates some hyperparameter sensitivity, the model still relies on manual tuning for the KL-divergence penalty weights ($\kappa_1, \kappa_2$) to balance precision and recall.

As a next step, the authors plan to extend this regularized optimal transport framework to zero-shot object detection. This direction will focus on developing transferable transport plans capable of generalizing across novel, unseen object categories and domains without requiring retraining.

Summary updated

BibTeX
@inproceedings{zareapoor2024fractional,
  author = {Masoumeh Zareapoor and Pourya Shamsolmoali and Huiyu Zhou and Yue Lu and Salvador García},
  title = {{Fractional Correspondence Framework in Detection Transformer}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3681613},
}
Figure