Rank-DETR for High Quality Object Detection
Authors: Yifan Pu
Weicong Liang
Yiduo Hao
Yuhui Yuan
Yukang Yang
Chao Zhang
Han Hu
Gao Huang
Venue: NeurIPS 2023 poster (2023)
Keywords: Object Detection

Abstract: Modern detection transformers (DETRs) use a set of object queries to predict a list of bounding boxes, sort them by their classification confidence scores, and select the top-ranked predictions as the final detection results for the given input image. A highly performant object detector requires accurate ranking for the bounding box predictions. For DETR-based detectors, the top-ranked bounding boxes suffer from less accurate localization quality due to the misalignment between classification scores and localization accuracy, thus impeding the construction of high-quality detectors. In this work, we introduce a simple and highly performant DETR-based object detector by proposing a series of rank-oriented designs, combinedly called Rank-DETR. Our key contributions include: (i) a rank-oriented architecture design that can prompt positive predictions and suppress the negative ones to ensure lower false positive rates, as well as (ii) a rank-oriented loss function and matching cost design that prioritizes predictions of more accurate localization accuracy during ranking to boost the AP under high IoU thresholds. We apply our method to improve the recent SOTA methods (e.g., H-DETR and DINO-DETR) and report strong COCO object detection results when using different backbones such as ResNet-$50$, Swin-T, and Swin-L, demonstrating the effectiveness of our approach. Code is available at \url{https://github.com/LeapLabTHU/Rank-DETR}.

Rank-DETR for High Quality Object Detection
Yifan Pul Weicong Liang Yiduo Hao
Yuhui Yuan"
Yukang Yang'
Chao Zhang² Han Hu
Gao Huang 1ea
Tsinghua University *Peking University 'University of Cambridge
*Microsoft Research Asia puyf23@mails. tsinghua. edu. cn, liangwei cong@stu pku. edu, cn, yh4630cam ac uk, yuhui www.emccoooofff com. gaohuangetsinghus edu.
Abstract
Modern detection transformers (DETRs) use set of object queries to predict list bounding boxes, sort them by their classification confidence scores, and select the top-ranked predictions as the final detection results for the given input image. A highly performant object detector requires accurate ranking for the bounding box predictions. For DETR-based detectors, the top-ranked bounding boxes suffer from less accurate localization quality due the misalignment between classification scores and localization accuracy, thus impeding the construction of high-quality detectors. this work, we introduce a simple and highly performant DETR-based object detector by proposing series of rank-oriented designs, combinedly called Rank-DETR. Our key contributions include: (i) rank-oriented architecture design that can prompt positive predictions and suppress the negative ones to ensure lower false positive rates, as well as (ii) a rainetore loss function and matching cost design that prioritizes predictions of more accurate localization accuracy during ranking to boost the AP under high IoU thresholds. We apply our method to improve the recent SOTA methods (e.g., H-DETR and DINO-DETR) and report strong COCO object detection results when using different backbones such as ResNet-50, Swin-T, and Swin-L, demonstrating the effectiveness of our approach. Code is available at httth:tt//// /ett::/gitttttt htt.uubbcco/Leeplaaattt///aa.aa
Introduction
The landscape of modern object detection systems has undergone significant transformation since the pioneering work DEtection TRansformer (DETR) 3. Since DETR yielded impressive results in object detection, numerous subsequent research works such as Deformable-DErT [78). DINO (75).
and H-DETR (30) have further advanced this field. Moreover, these DETR-based approaches have been successfully extended to address various core visual recognition tasks, including instance / panoptic segmentation
38 61 69
7 35
70,, pose estimation (57 36 [6), and multi-object
tracking [ 47 (88) The notable progress in these areas can be credited to ongoing advancements in
enhancing the DETR-bar based framework for improved object detection performance.
Considerable endeavors have been dedicated to advancing the performance of DETR- methods from various perspectives. These efforts include refining transformer encoder and decoder architec-
tures 48 74 78
12
78
40
43 as well as redesigning of query formulations (63 34 (5)..
While substantial research has been dedicated to developing accurate ranking mechanisms for dense one-stage object detectors like FCOS [59] or ATSS [77), few studies have specifically investigated this aspect for modern object detectors based on DETR. However, ranking mechanisms vital in enhancing the average precision performance, particularly under high IoU thresholds.
'Equal contribution. Interns Microsoft Research Asia. t Corresponding authors.
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

This study's primary focus revolves around constructing high-quality object detector using DETR that exhibits strong performance at relatively high IoU thresholds. We acknowledge the criticality of establishing an accurate ranking order for bounding box predictions in constructing these detectors. To achieve this, we introduce two rank-orienter designs that effectively leverage the benefits of precise ranking information. First, we propose a rank-adaptive classification head and a query rank layer after each Transformer decoder layer. Rank-adaptive classification head adjusts the classification scores using rank-aware learnable logit bias vectors, while the query rank layer fuses additional ranking embeddings into the object queries. Second, we propose two rank-oriented optimization techniques: a loss function modification and matching cost design. These functions facilitate the ranking procedure of the model and prioritize more accurate bounding box predictions with higher IoU scores when compared to the ground truth. In summary, rank-oriented designs consistently enhance object detection performance, particularly the AP scores under high IoU thresholds
To validate the efficacy of our approach, we conducted comprehensive experiments, showcasing consistent performance improvements across recent strong DETR- -hased methods such as H-DETR and DINO-DETR. For example, based on H-DETR, our method demonstrates notable increase in AP7s of +2.1% (52.9% vs. 55.0%) and +2.7% (55.1% vs. 57.8%) when utilizing ResNet-50 and Swin-T backbones, respectively. It is worth highlighting that our approach achieves competitive performance, reaching an 50.2% AP in the I x training schedule on the COCO val dataset. These results serve as compelling evidence for the effectivvness and reliability of our proposed methodology.
2 Related Work
DETR for Object Detection. Since the groundbreaking introduction of transformers in 2D object
detection by the pioneering work DETR [3), numerous subsequent studies [T] 7 63 46) have developed diverse and advanced extensions based on DETR. This is primarily due to DETR's s ability to eliminate the need for hand-designed components such as non-maximum suppression (NMS). One of the first foundational developments, Deformable-DE.Te 778. introduced a multi-scale scheme, which selectively attends to small set of key sampling
deformable celf/cross--atentiinn points in reference bounding box. This approach yielded improved performance compared to DETR, particularly for small objects. Furthermore, DAB-DETR [44] and DN-DETR (34] demonstrated that novel query formulation could also enhance performance. The subsequent work, DINO-DETR 775 achieved state-of-the fi-theean art results in object detection tasks, showcasing the advantages of DETR design by addressing the inefficiency caused by the one-to-one matching scheme. In contrast to these works, our focus lies in the design of the rank-oriented mechanism for DETR. We propose rank-oriee -orentedd architecture designs and rank-oriented matching cost and loss function designs to construct highly performant DETR-based object detector with competitive AP75 results.
Ranking for Object Detection. There exists lot of effort to study how to improve the ranking for object detection tasks. For example, IoU-Net [3I) constructed an additional IoU predictor and an IoU-guided NMS scheme that considers both classification scores and localization scores during inference. Generalized focal loss [37 proposed quality focal loss to act as joint representation of the IoU score and classification score. VarifocalNet (76) introduced an loU-aware classification score to achieve a more accurate ranking of candidate detection results. TOOD 10 defined a high-order combination of the classification score and the IoU score as the anchor alignment metric to encourage the object detector to focus on high-quality anchors dynamically. In addition, ranking-bass -baed loss functions [53 4 49 50 [ are designed to encourage the detector to rank the predicted bounding boxes according to their quality and penalizes incorrect rankings. The very recent con-current work Stable-DINO 45 and Align-DETR [[] also applied the idea of LoU-aware classification score to improve the loss and matching design for DINO-DETR [75]. In contrast to the aforementioned endeavors, we further introduce a query rank scheme aimed to reduce false positive rates.
Dynamic Neural Networks. In contrast to static models, which have fixed computational graphs and parameters at the inference stage, dynamic neural networks [15] 65 can adapt their struc- tures or parameters to different inputs, leading to notable advantages in terms of performance,
adaptiveness [68] [3]. computational efficiency [72] 73, 67 60]. and representational power [52]
Dynamic networks are typically categorized into three types: sample-wise [27 66
18
14 51
spatial-wise 62 28
19
17 16], and temporal-wise 20 64 In this work, we introduce novel
query-wise dynamic approach, which dynamically integrates ranking information into the object queries based on their box quality ranking, endowing object queries with better representation ability.

---

3 Approach
Above all, we revisit the overall pipeline of the modern DETR-based methods 30 75 in Section 3.1
The detailed design of the proposed method, including the rank-oriented architecture design and optimization design, is subsequently illustrated in Section and and Section 3.3 Eventually, we discuss the connections and differences between our approach and related works in Section 3.4
3.1
Preliminary
Pipeline. Detection Transformers (DETRs) process input image I by first passing it through backbone network and a Transformer encoder to obtain a sequence of enhanced pixel embeddings X' = (x1, X2, XN). The enhanced pixel embeddings, along with default set of object query em- beddings Q = (qf- Φ. . ). are then fed into the Transformer decoder. After each Transformer decoder layer, task-specific prediction heads applied to the updated object query embeddings to generate a set of classification predictions P = [pi, P2. ... P') and bounding box predictions
B' = (bj. b/, ... }, respectively, where E {1, 2. ... L denotes the layer index of the Trans- former decoder. Finally, DETR performs one-to-one bipartite matching between the predictions and the ground trutthhtrhhhhuu bounding boxes and labels G = {gi 82. ... gm } by associating each ground truth with the prediction that has the minimal matching cost and applying the corresponding supervision.
To update the object query 2 after each Transformer decoder layer, typically, DE- TRs form a total of L subsets, i.e., fQ', Q²,..., 2 for L Transformer decoder layers. For both the initial object query Q" and the updated ones after each layer, each Q¹ is formed by adding two parts: content queries 인 { L.22.... Inn and position queries Q { : 4p.2. -p.n)- The content queries capture semantic category information, while the position queries encode prior positional information such as the distribution of bounding box centers and sizes.
Object Query.
Ranking in DETR. Rank-oriented design plays a crucial role modern object detectors, par- ticularly in achieving superior average precision (AP) scores under high Intersection over Union (IoU) thresholds. The success of state-of-the-arr detectors, such as H-DETR and DINO-DETR, relies on using simple rank-oriented designs, specifically two-stage scheme and mixed query selection. These detectors generate the initial positional query 2p by ranking the dense coarse bounding box predictions output by the Transformer encoder feature maps and selecting the top ~300 confident ones. During evaluation, they gather n x K bounding box predictions based on the object query embedding Q produced by the final Transformer decoder layer (each query within Q generates K predictions associated with each category), sort them by their classification confidence scores in descending order, and only return the top 100 most confident predictions.
In this work, we focus on further extracting the benefits brought by the ranking-oriented designs and introduces a set of improved designs to push the envelope of high-quality object detection performance. The subsequent discussion provides further elaboration on these details.
3.2 Rank-oriented Architecture Design: ensure lower FP and FN
While the original rank-oriented design only incorporates rank information into the initial positional query 2p. propose enhanced approach that leverages the benefits of sorting throughout the entire Transformer decoder process. Specifically, we introduce a lank-adaptive classification head after each Transformer decoder layer, and a query rank layer before each of the last L- Transformer decoder layers. This novel design is intended to boost the detection of true positives while suppressing false positives and correcting false negatives, leading lower false positive rates and false negative rates. Figure Iillustrates the detailed pipeline of our rank -oienteieeted architecture designs.
Rank-adaptive Classification Head. We modify the original classification head by adding set of learnable logit bias vectors S (s/, sh.... ... s ",,, to the classification scores T = (t/,, th.... ... thh]
(before Sigmoid((-) function) associated with each object query independently. The classification predictions of the I-th decoder layer P' = {pp, p/, .hh) can be formulated as:
p (t)
t! - 1==MPPa(q)))
(1)
where Ø' = 1qi. ... dhh represents the output embedding after the 1-th Transformer decoder layer. The hidden dimensions of both tę and s are the number of categories, i.c., K. The overall
3

---

Roul-ndapsivv Cla. Hoad
MLP
Trazaformer Dacoder Layer
Signodd
Querry Tank Loger
Sor
(a) Rank-oriented Arch.
(b) Rank-adaptive Cls. Head
(c) Query Rank Layer
Figure 1: Illustrating rank-oriented architecture design. (a) The rank-oriented architecture consists a query rank layer before each of the last L - Transformer decoder layer and a rank-adaptive classification head after each Transformer decoder layer. (b) The rank adaptive classification head learns to adjust the classification scores accordingly. (c) The query rank layer exploits the latest ranking information to recreate the content queries and position queries used as the input to the following Transformer decoder layer.
pipeline is shown in Figure bb). It is noteworthy that we can directly incorporate a set of learnable embedding, denoted as St, into the classification scores T', This is practicable because the associated Q' has already been sorted in the query rank layer. as explained below.
Query Rank Layer. We further introduce query rank layer before each of the last L --1 Transformer decoder layers to regenerate the sorted positional query and content query accordingly.
First, we explain how to construct the rank-aware content query:
C MLP fuse " Φ Sort
(2)
where we first sort the output of 1)-th Transformer decoder layer Q in descending order of pt-1 MI.Pa (!-1)). Since each element in pi-1 is a K-dimensional vector, we use the maximum value over K categories (classification confidence) as the ranking basis. The operation symbol (ort(A; B) sorts elements within based on the decreasing order of the elements in B. Then, we concatenate (l)) the sorted object content queries ạ/ -1-1 with a set of randomly initialized content query Cf the feature dimension, where E {2. L). This set of content query C' is optimized in end-to-end manner. Subsequently,
fuse them back to the original dimension using a fully connected layer (MLP fose). In other words, for each Transformer decoder layer, we maintain set of rank-aware static content embeddings shared across different samples. These embeddings effectively model and utilize the distribution of the most frequent semantic information (26]
Next, we present the mathematical formulations for computing the rank-aware positional query. To align the order of the positional queries with the ranked content query, we either sort or recreate the positional queries, depending the initialization method of positional queries for different DETR-based detectors. For H-DETR, which inherits Deformable DETR and uses the same positional query for all L Transformer decoder layers, simply sort the positional query of the previous layer:
e So ;
For DINO-DETR, which generates new positional queries from the bounding box predictions in each Transformer decoder layer, we sort the bounding box predictions of each object query and recreate the positional query embedding from the sorted boxes:
S -P(B'") B'-L Sort(B'-1 ( p)
where B1 and p represent the bounding box predictions and classification predictions based on the output of (1 - 1)-th Transformer decoder layer, i.e., Q'-1, PE(.) contains a sine position positional query embedding encoding function and a small multilayer perceptron to recreate
e In other words, each element of O is estimated by q PE In Figure c), illustrate the positional query update process for H-DETR (Equation (3)) and omit that process for DINO-DETR (Equation
because we primarily conducted experiments on H-DETR.
Finally, we transmit the regenerated rank-aware positional query embedding and content query embedding to the subsequent Transformer decoder layer.

---

CBBT evarr ClassGoriio iin Head
yg (3) Low
DETR
Tinow masshing our furctiion
DEAR
Higb-arke manciin cast fractien
Bex Regreixoa Hend
Sox sugeentinn Hend
(lo0() Jam, 4.5 Iom
(a) The original Matching Cost and Loss
(b) Rank-oriented Matching Cost and Loss
Figure 2: Illustrating the rank-oriented matching and loss design. (a) The original DETR and its variants use a classification head and bounding box regression head to perform predictions. The matching cost function is linear combination of the classification scores and bounding box overlap scores. (b) The rank-oriented matching cost and loss scheme uses GloU-aware classification head and high-order matching cost function prioritize predictions of more accurate localization accuracy.
Analysis. The key motivations behind these two rank-orienna architecture designs adjusting the classification scores of the object queries according to their ranking order information. Within each Transformer decoder layer, we incorporate two sets of learnable representations: the logit bias vectors S' and the content query vectors C By leveraging these two rank-aware representations, we have empirically demonstrated the capability of our approach effectively address false positives (oLRPpp: 24.5% -25.1.4..999 1%) and mitigate false negatives (Pl.RPrx: 39.5% 5%--%%%%.-- +3..6%). For more comprehensive understanding of our findings, please refer to the experiment section.
3.3 Rank-oriented Matching Cost and Loss: boost the AP under high IoU thresholds
The conventional DETR and its derivatives specify the Hungarian matching cost function Cunggrrin and the training loss function L using the identical manner, shown below:
- Glo b) + X2l b) + (gFL((())),
(5)
where we use b. P (or b, c) to represent the predicted (or ground-truth) bounding box and classification score respectively. corresponds to the ground-truth semantic category of b. In addition, we use the notation F-.(.) to represent the semantic classification focal loss [41. We propose to enhance the rank-oriented design by introducing the GloU-aware classification head (supervised by the proposed GloU-aware classification loss) and the high-order matching cost function scheme as follows.
GloU-aware Classification Loss. Instead of applying the binary target to supervise the classification head, we propose to use the normalized GIoU scores supervise the classification prediction:
FL GloU (p(c) = -lt - pl [t (pg( + (1 - t) log(1 - p(c)),,
where we let (GIoU(b, b) 1)/2, and we denote the GloU-aware classification loss FI. GloU (-)- To incorporate both semantic classification and localization accuracy, we modify the original clas- sification head to a GloU-aware classification head supervised by the above loss function. When t= 1, FT. GloU (.) simplifies to the original focal loss, denoted as FT.(.). Furthermore, we compare our results with the varifocal loss (66.. and we provide its mathematical formulation below:
VFL(p(c) = - log(p(c) + (1 t) log(1 1 - p[c)).
High-order Matching Cost. contrast to utilizing the Hungarian algorithm with a matching cost defined as the weighted sum of classification cost, & loss, and GloU loss, propose employing
high-order matching cost function that captures a more intricate combination of the classification score and the IoU scores:
(8) where IoU represents the intersection over union scores between the predicted bounding box and the ground truth one. We adopt larger value of a (e.g., >2) to prioritize the importance of localization accuracy, thereby promoting more accurate bounding box predictions and downgrading the inaccurate ones. is worth noting that we use a high-order matching cost from the middle training stage, as most predictions exhibit poor localization quality during the early training stage.
Hungurian
p[c] Io
Analysis. The orientrie loss function and matching cost are designed to enhance object detection performance at high IoU thresholds. The GloU-aware classification loss facilitates the ranking
5

---

procedure by endowing the classification score with GloU-awareness, resulting in more accurate ranking in the query ranking layer. Meanwhile, the high-order matching cost selects the queries with both high classification confidence and superior IoU scores positive samples, effectively suppressing challenging negative predictions with high classification scores but low localization loU scores. This is achieved by magnifying the advantage of more accurate localization score using 7 where y is the ratio accurate localization score to less accurate score. Empirical results show significant boosts in AP7s with GloU-aware classification loss (52.9% -...1)))-...1) or high-order matching cost design (52.9% +5.0%)) Detailed comparisons are provided the experiment section.
3.4 Discussion
The concept of GloU-aware classification loss has been explored in several prior works [31 37 76 I0
predating the era of DETR. These works aimed to address the discrepancy between classification scores and localization accuracy. In line with recent concurrent research [ 45], our method shares the same insight in designing rank-oriented matching cost and loss functions. However, our approach distinguishes itself by emphasizing the ranking aspect and introducing an additional rank-oriented architecture design, which includes the rank-adaptive classification head and query rank layer. Furthermore, our empirical results demonstrate the complementarity between the rank-oriented architecture design and the rank-oriented matching cost and loss design.
4 Experiment
4.1
Experiment Setting
We perform object detection experiments using the COCO object detection benchmark [42 with detrex (54] toolbox. Our model is trained on the train set and evaluated on the val set. We adhere the same experimental setup the original papers for H-DETR (3) and DINO-DETR 775
4.2 Main Results
Comparison with competing methods. Table compares Rank-DETR with other nigh--peffrmmig DETR-basce methods on the COCO object detection val dataset. The evaluation demonstrates that Rank-DETR achieves remarkable results, attaining an AP score of 50.2% with only 12 training epochs. This performance surpasses H-DETR (30] by +1.5% and outperforms the recent state-of- the-
art method DINO-DETR (75) by +1.2% AP. Notably, observe significant improvements in AP7s. highlighting the advantage of our approach at higher loU thresholds.
Method
Bacxbone
#query
#epoche
AP
AP50
AP 75
APs
AP M
APy. y.
Deformable-DETR 77
R50
300
50
46.9
65.6
51.0
29.6
50.1
61.6
DN-DETR e4
R50
300
12
43.4
61.9
47.2
24.8
46.8
59.4
DINO-DETR 75
R50
900
12
49.0
66.6
53.5
32.0
52.3
63.0
H-DETR 330
300
12
48.7
66.4
52.9
31.2
51.5
63.5
Rank-DETR
R50
300
12
50.2
67.7
55.0
34.1
53.6
64.0
Table 1: Comparison with previous highly performant DETR- based detectors on COCO va12017 with R50.
presents detailed comparison of our proposed approach with the The experimental evaluation demonstrates consistent enhancements in object detection performance across various backbone networks and training schedules. For example, under the 12 epochs training schedule, our method achieves superior AP scores of 50.2%. 52.7%, and 57.3% with ResNet-50, Swin-Tiny, and Swin-Large backbone networks, respectively. These results surpass the baseline methods by +1.5%, +2.1%, and +1.4%, respectively. Extending the training schedule to 36 epochs consistently improves the AP scores, resulting in +1.2% for ResNet-50, +1.5% for Swin-Time Tiny, and +1.1% for Swin-Large. The AP improvement in performance is more significant under high IoU thresholds, which outperform the baseline by +2.1%. +2.7%, and +1.9% AP7s with ResNet-50, Swin-Timg Tiny, and Swin-Large, respectively. These findings validate our proposed mechanism's consistent and substantial performance improvements across diverse settings and with different backbone networks, especially under high IoU thresholds. We also validate our performance gain by providing the PR curves under different IoU thresholds in Figure 3a
Improving H-DETR 30 Table
highly competitive H-DETR 30

---

Method
Backbone
#epochs
AP
AP50
APro
APs
AP
AP4.
1-Deformable-DETS
R50
12
48.7
66.4
52.9
31.2
51.5
63.5
Durs
R50
12
50.2
67.7
55.0
34.1
53.6
64.0
H- Deformable-DDER
Swin-T
12
50.6
68.9
55.1
33.4
53.7
65.9
Dure
Swin-T
12
52.7
70.6
57.8
35.3
56.8
67.5
H- De-eeformable-DDTR
Swin-L
12
65.9
75.2
61.0
39.1
59.9
72.2
Durs
Swin-L
57.3
75.9
62.9
40.8
61.3
73.2
D--Dformmabee-DETR
68.3
54.4
52.7
65.3
Ours
51.2
68.9
56.2
34.5
54.9
64.9
Ht-Deformable-DDETT.
Swin-T
53.2
71.5
58.2
35.9
56.4
68.2
Durs
Swin-T
36
54.7
72.5
60.0
37.7
58.5
69.5
H- H-Deformable-Dae
Swin-L
36
57.1
76.2
62.5
39.7
61.4
73.4
Oura
Swin-L
36
58.2
76.7
63.9
42.4
62.2
73.6
Table 2: Improving object detection results hased H-DETR.
Method
Backbone
#epochs
AP
APso
AP7s
APs
AP
AP,.
DINO-DETR
R50
12
49.0
66.6
53.5
32.0
52.3
63.0
Ours
R50
12
50.4
67.9
55.2
33.6
53.8
64.2
DINO-DETR
Swin-L
12
56.8
75.4
62.3
41.1
60.6
73.5
Swin-L
12
57.6
76.0
61.4
73.8
Table 3: Improving object detection results based on DINO-DETR.
Improving DINO-DETR 775. Table 3 shows the results of applying our approach to improve the DINO-DETR 755 Notably, our method demonstrates an increase of + +1.4% with the ResNer-50 backbone and +0.8% with the Swin-Largge backbone. Under the higher IoU setting, method further obtains +1.8% AP75 improvement with ResNet-50 and +1.1% with Swin-Large. These results provide evidence for the generalization ability of our approach across different DETR-based models.
4.3 Ablation Study and Analysis
We conduct a systematic analysis to assess each proposed component's influence within method. We followed a step-by-sted approach, progressively adding modules on top of the baseline (Table [a), incorporating each module into the baseline (Table[4). and subsequently removing each module from our method (Table 4c). This procedure allowed us to understand the contribution of each individual component the final performance. Furthermore, comprehensively assess the functionality of each component. We mark the best-performing numbers with colored regions in each table along each column.
conducted statistical and qualitative analyses
Effect of Adding Each Component Progressively. We choose H-DETR with ResNet-50 backbone as our baseline method. By progressively adding the proposed mechanisms on top of the baseline model, it is observed that the performance is steadily increasing, and the best performance is achieved by using all the proposed components (Table 4a). It is also observed that the lowest false negative rate RPL) is achieved when only using the rank-oriented architecture designs.
Rank-adaptive Classification Head (RCH). Tables 4b and 4c demonstrate that rank-adaptive classification head can slightly improve the AP (+0.2% when adding RCH to the H-DETR base- line, comparing row1 and row2 in Table 4b +0.4% when adding RCH complete our methods, comparing row1 and row2 in Table 4cp. Furthermore, RCH improves AP75 more than AP.
Query Ranking Layer (QRL). The proposed QRL mechanism effectively integrates ranking information into the DETR architecture, compensating for the absence of sequential handling of queries attention layers. The detector's performance is also consistently improved by utilizing QRL (+0.3% when adding QRL to the H-DETR baseline; +0.7% to complete our method). We further compute the cumulative probability distribution of classification scores of positive and negative queries. QRL yields enhanced classification confidence for matched positive queries (Figure 3b).

---

QRL
OCL
AP
APao
AP
AP3
APM
AP2
ARu
ARyo
AR.os
AR.
ARW
ARc.
OLRP
oLRP Lec
oL
oLRPps
18.7
66.1
52.9
51.5
63.5
97.2
63.4
19.7
72.5
65.9
61.0
13.3
39.5
48.9
66.9
63.3
31.2
62.4
63.7
37.5
64.4
63.5
75.5
87.1
61.2
13.3
30.2
49.3
67.3
53.7
32.4
52.2
63.4
37.8
65.0
71.7
54.6
75.7
88.4
60.8
13.3
24.1
38.6
V
19.8
67.5
51.3
33.3
53.4
63.7
37.9
65.1
71.8
51.8
76.1
87.8
60.7
13.0
23.5
39.3
V
50.2
67.7
55.0
34.1
53.6
64.0
38.1
61.9
71.6
56.5
75.8
86.4
60.4
12.9
22.4
39.3
(a) Effect of gradually adding modules on the baseline.
QRL
OCL
AP
AP1o
AP
A
APM
AP2
AR1
AR3o
AR.os
ARg
ABar
ARg,
cLRP
oLRPLsc
oL8PP
olilPss
66.4
52.9
31.2
51.5
63.5
37.2
63.4
49.7
72.5
65.9
61.0
13.3
53.3
31.2
52.4
63.7
37.5
61.4
53.5
75.5
87.1
61.2
13.3
49.0
67.2
53.2
32.3
51.9
63.5
37.9
64.8
71.5
85.1
75.6
87.5
61.1
13.4
23.8
30.2
K
V
19.4
67.0
54.1
32.0
52.8
64.0
37.9
61.9
71.7
55.4
75.7
88.5
60.7
12.9
22.5
39.8
X
X
X
49.3
67.3
54.0
31.8
52.4
63.4
37.7
64.4
71.1
53.7
74.9
85.8
61.1
13.2
23.8
39.2
(b) Effect of incorporating cach module on the baseline.
QRL
AP
APto
APms
A
APx
AP
AB1
ARso
AR.os
ARg
ARaz
ARg,
olRPL.c
oLBPpp
o1.8Ps
/
67.7
55.0
34.1
53.6
64.0
38.1
64.9
56.5
75.8
86.4
60.4
12.9
V
67.3
33.5
38.1
61.9
55.9
75.3
86.6
60.5
12.9
V
49.5
67.4
64.2
33.1
52.
63.5
38.0
64.7
55.8
75.4
85.9
60.9
12.9
X
49.5
67.6
54.1
32.4
52.6
64.3
37.9
64.3
71.0
54.4
75.1
85.4
60.8
13.4
23.7
38.7
/
/
49.8
67.5
54.3
33.3
53.4
63.7
37.9
65.1
71.8
54.8
76.1
87.8
00.7
13.0
23.5
30.3
(c) Effect of removing each module in our method.
Table 4: Ablation experiments based on H-DETR + R50. RCH: rank-adaptive classification head. QRL: query
rank layer. GCL: GloU-aware classification loss. HMC: high-order matching cost.
Classification losa target
AP
APso
APrs
APs
AP
AP,,
AR;
AR10
AR
ARs
ARM
AR;
oL.P
oLRP,
oLRPs,
oLRPss
JoU[b, bj
50.1
67.6
54.7
32.6
33.4
64.5
38.2
61.9
71.5
35.5
75.4
86.4
60.4
12.9
22.5
39.4
== 1oU(6 bj²
30.0
67.3
64.7
34.0
33.6
64.8
38.1
66.2
71.7
56.7
75.5
85.8
60.6
12.9
22.9
39.6
= JoU(G,bb) bj"
19.5
66.0
54.0
32.5
53.3
61.1
37.8
61.2
70.9
53.8
75.3
86.1
61.0
12.3
23.1
11.0
== [GloUU(b. b) 1)/2
49.9
67.9
54.3
32.8
53.2
61.3
37.9
619
71.6
55.8
75.5
86.1
60.6
13.2
23.3
38.7
1 [GloUtb, b) 1)/21*
50:2
67.7
65.0
34.1
53.6
64.0
38.1
64.9
71.6
56.3
76.8
86.4
60.4
12.9
22.4
39.3
: (GloU(b, b) 1)/2("
50.1
67.4
54.9
33.3
53.5
64.3
08.1
64.9
71.5
56.3
75.3
85.5
60.4
12.9
22.9
39.3
(a) Effect of the GloU-aware classification loss target formulation.
Matching coat.
APso
APps
AP
AP.
AP;
AR.
ARuo
ARtw
AR.
AR.
oLRP
ot.RP...
oTRRP,,
a1.RPys
Plc
Iou'
48.3
67.9
51.8
31.4
51.3
62.3
37.8
62.9
67.7
52.8
70.9
62.6
60.4
13.5
22.8
38.4
Plc
Iou"
49.5
32.5
52.4
38.1
63.9
54.5
73.3
60.2
23.1
Tou
50.0
68.1
54.2
32.9
53.2
64.4
37.9
64.7
70.9
55.3
74.9
85.9
60.4
12.9
22.9
39.1
P|c
Toul
50.2
67.7
55.0
34.1
53.6
64.0
38.1
64.9
71.6
56.5
76.8
86.4
60.4
12.9
22.4
31.3
plc] Lou
50.0
67.1
54.9
32.4
53.5
64.5
38.1
65.0
71.8
55.1
75.9
86.5
60.7
12.8
23.4
39.4
Plc]
Tog"
50.0
66.6
54.9
33.9
53.3
64.5
38.0
65.4
72.5
56.3
76.5
87.7
61.0
12.8
23.0
40.3
Plc]
46.6
65.9
49.9
31.0
49.9
50.9
37.2
60.3
653.4
47.9
66.9
77.5
60.6
13.8
22.9
38.2
iic] (300
47.8
07.12
51.0
31.6
50.8
61.8
337.6
61.3
63.9
50.8
68.6
80.4
60.4
13.5
22.55
38.2
Plc] (30041
48.0
67.6
51.3
31.1
51.3
62.2
37.6
61.8
65.8
50.2
69.3
79.8
59.9
13.4
21.9
37.9
Plc]
49.1
68.2
53.0
32.2
52.1
63.5
37.7
63.9
69.2
55.0
72.2
83.6
60.1
13.3
22.9
37.7
p(c]
19.1
68.5
53.0
32.6
52.7
63.7
38.2
63.9
69.1
51.0
72.7
83.8
60.0
13.2
21.6
38.4
Plc]
49.8
03.4
32.9
53.4
63.9
38:22
64.8
70.6
55.3
74.8
85.5
60.1
13.1
23.7
ild
49.9
07.9
54.2
31.6
53.0
64.6
38.1
64.5
70.5
55.0
74.5
85.7
60.3
13.0
23.0
38.7
Plc
(30041
50.0
67.8
33.9
37.9
65.0
71.2
55.5
75.2
60.4
23.8
Plc]
49.8
67.3
33.3
63.7
38.1
65.1
71.7
56.4
75.7
60.5
12.9
23.9
(b) Effecc of the matching cost formulation.
Table 5: The influence of classification loss target and matching cost function choice.
while the classification confidence for unmatched queries is effectively suppressed (Figure 3cb, thereby ranking true predictions higher than potential false predictions. This phenomenon is further apparent from the oLRP FP results showcased in Table which is reduced from 24.5% to 23.8% by using QRL, reducing the false positive rates. These results are in accordance with our design intent.
GloU-aware Classification Loss (GCL). Table also shows the effectiveness of the proposed
GloU-aware classification loss, which gains 0.7% mAP over the vanilla baseline by comparing row1 and row4 in Table 4b and 0.7% mAP increase by comparing row1 and row4 in Table 4c We
8

---

14
6012
Recrion
32
0.00
ClartTicat Score
Dasiftation Score
Figure 3: (a) Comparing the PR-curves between baseline and our method under different IoU thresholds. (b) Density distribution of the classification scores the matched queries with without QRL. (c) Density distribution of classification scores on the unmatched queries with or without QRL.
(a) Layer #1
(b) Layer #2
(c) Layer #3
(d) Layer #4
(e) Layer #S
(1) Layer #6
Figure 4: Cumulative distribution of the IoU scores on the unmatched queries with or without HMC.
also ablate the formulation of the learning target t in Eq. (6) in Table 5a The results show that the performance of adopting IoU (and its exponent) as the optimization target is inferior use (GloU 1 because GIoU can better model the relationship of two non-overlapped boxes. We use GloU < 1 and 0 < (GIoU 1)/2 s 1.
(GIoU + 1) rather than GloU because
High-order Matching Cost (HMC). We also show how the high-order matching cost affects the overall performance in Table The HMC can also significantly improve the overall performance of the object detector (+0.6% when comparing row1 and row5 in Table 4b +0.4% when comparing rowl and row5 in Ac). We further ablate the formulation of the matching cost. As illustrated in Table high-order exponent IoU can consistently improve the performance and achieve peak when the power is 4. Using a high-order exponent can suppress the importance of the predicted boxes with low IoU. We can also observe the same trend from Table 5b when replacing IoU with (GloU+1)/2, but the latter practice has a slightly inferior performance.
HMC Suppresses the Overlap between Negative Query and Ground Truth. Figure illussrates the cumulative probability distribution of the loU of unmatched queries. The IoU of each unmatched query is defined the largest IoU between it and all ground truth boxes. As shown in Figure 4 the adoption HMC can decrease the loU between unmatched queries and all the ground truth bounding boxes, effectively pushing the negative queries away from the ground truth boxes. Furthermore, this phenomenon is increasingly remarkable in the latter Transformer decoder layers.
Comparison with Varifocal loss. In order to assess the effectiveness of the proposed GloU-aware classification loss (GCL, Eq. (6)), compare it with varifocal loss (VFL) (76) due to their similar mathematical formulations. Following VFL (76), we utilize the training target To simplify the comparison and focus the impact of GCL, conduct the evaluation without HMC (row3 in Table 4ap. Our method, leveraging the GCL, achieves a mAP of 49.8% (row4 in Table 4ap. whereas VFL achieves only 49.5% mAP. The primary distinctions between GCL and VFL lie in the optimization target. By employing the normalized GloU as the training target, our approach better models the distance between two noe-overlapping boxes, leading improved performance. In addition, VFL removes scaling factors on positive samples, as they are rare compared to negatives in CNN-based detectors. However, for DETR-base --ssed detectors, where positive examples relatively more abundant, we empirically show that retaining scaling factor can enhance performance.
IoU in Eq. (7).
Me Method
Backbone
Parame (M)
FLOPa (G)
Training Cost (min)
Testing FPS (ing/s)
DETE
R50
47.56
280.30
69.8
19.2
48.7
Oura
R50
49.10
280.60
71.8
19.0
50.2
Table 6: Computational efficiency analysis for our method.

---

Layer #1
Layer #2
Layer #3
Layer #4
Layer #5
Layer #6
0.34
score: 0.43
score: 0.44
score: 0.42
ScOTE: 0.43
score: 0.41
Score: 0.48
score: 0.42
score: 0.33
score: 0.31
score: 0.35
Score: 0.36
Score: 0.31
score: 0.35
score: 0.47
score: 0.49
score: 0.46
score: 0.44
0.13
score: 0.05
score: 0.12
0.06
0.02
score: 0.02
Figure 5: Illustration of positive boxes and negative box of H-DETR (row1) and Rank-DEr DEER (row2). The green, red and yellow boxes (scores) refer the positive, negative, and ground truth boxes (scores), respectively.
Computational Efficiency. In Table 6 we provide comprehensive data on the number of parameters, computational complexity measured in FLOPs, training time per epoch, inference frames per second (FPS), and Average Precision performance, for both the H-DETR baseline and our approach. These assessments were conducted on RTX 3090 GPUs, allowing us to evaluate testing and training efficiency. The results unequivocally highlight a substantial enhancement in detection performance achieved by our proposed method, with only a slight increase in FLOPs and inference latency. Considering the effecttivnness and efficiency, our method has the potential be adapted into 3D object
detection 55 29, semantic segmentation [39 33
tasks, or other applications (23 24
25 21 22
Qualitative Analysis. Figure visualizes the predicted bounding boxes and their classification confidence scores of both the matched positive queries and the unmatched hard negative queries, respectively. We find that, compared to the baseline method (row1), the proposed approach (row2) effectively promotes the classification scores of positive samples, while that of hard negative queries rapidly suppressed, progressing layer by layer. These qualitative results further illustrate how the proposed approach achieves high performance by decreasing the false positive rate.
Conclusion
This paper presents series of simple yet effective rank-oriented designs to boost the performance of modern object detectors and result the development high-quality object detector named Rank- DETR. The core insight behind the effectiveness lies in establishing more precise ranking order of predictions, thereby ensuring robust performance under high loU thresholds. By incorporating accurate ranking order information into the network architecture and optimization procedure, our approach demonstrates improved performance under high IoU thresholds within the DETR framework. While there remains ample scope explore leveraging rank-oriente designs, we hope that our initial work serves as an inspiration for future efforts in building high-quality object detectors.
Acknowledgement
This work is supported by National Key R&D Program of China under Grant 2022ZD01 14900 and 2018AA 61671027. We also appreciate Ding Jia, Yichao Shen, Haodi He and Yutong Lin for their insightful discussions, as well as the generous donation of computing resources by High-Flyer Al.
National Nature Science Foundation of China under Grant 62071013 and
10

---

References
[1] Zhi Cai, Songtao Liu, Guodong Wang, Zheng Ge, Xiangyu Zhang. and Di Huang. Align-DETR Improving DETR with simple loU-aware BCE loss. arXiv:2304.07527, 2023.
[2] Xipeng Cao, Peng Yuan, Bailan Feng, Kun Niu, and Yao Zhao. CF-DETR: Coarse-to-fine transformers for end-to-end object detection. AAAI, 2022.
[3] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020.
[4] Kean Chen, Weiyao Lin, Jianguo Li, John See, Ji Wang, and Junni Zou. AP-loss for accurate one-stage object detection. IEEE TPAMI, 2020.
[5] Xin Chen, Bin Yan, Jiawen Zhu, Dong Wang. Xiaoyun Yang, and Huchuan Lu. Transformer tracking. In CVPR, 2021.
[6] Bowen Cheng, Ishan Misra, Alexander G Schwing, Alexander Kirillov, and Rohit Girdhar. Masked-attention mask transformer for universal image segmentation. In CVPR, 2022.
[7] Xiyang Dai, Yinpeng Chen, Jianwei Yang. Pengchuan Zhang, Lu Yuan, and Lei Zhang. Dynamic DETR: End-to-end object detection with dynamic attention. In ICCV, 2021.
[8] Bin Dong, Fangao Zeng, Tiancai Wang, Xiangyu Zhang, and Yichen Wei. SOLQ: Segmenting objects by learning queries. In NeurlPS, 2021.
[9] Yuxin Fang, Shusheng Yang, Xinggang Wang, Yu Li, Chen Fang, Ying Shan, Bin Feng, and Wenyu Liu. Instances queries. In ICCV, 2021.
[10] Chengjian Feng, Yujie Zhong, Yu Gao, Matthew R Scott, and Weilin Huang. TOOD: Task- aligned one-stage object detection. ICCV, 2021.
[11] Peng Gao, Minghang Zheng. Xiaogang Wang, Jifeng Dai, and Hongsheng Li. Fast convergence of detr with spatially modulated co co-attention. In ICCV, 2021.
[12] Ziteng Gao, Limin Wang, Bing Han, and Sheng Guo. Adamixer: A fast-converging query-based object detector. CVPR, 2022.
[13] Jiayi Guo, Chaofei Wang. You Wu, Eric Zhang, Kai Wang, Xingqian Xu, Humphrey Shi, Gao Huang, and Shiji Song. Zero-shot generative model adaptation via image- seege---pcffic prompt learning. In CVPR, 2023.
[14] Yizeng Han, Dongehen Han, Zeyu Liu, Yulin Wang. Xuran Pan, Yifan Pu, Chao Deng, Junlan Feng, Shiji Song, and Gao Huang. Dynamic perceiver for efficient visual recognition. In ICCV, 2023.
[15] Yizeng Han, Gao Huang, Shiji Song, Le Yang, Honghui Wang, and Yulin Wang. Dynamic neural networks: A survey. TPAMI, 2021.
[16] Yizeng Han, Gao Huang, Shiji Song. Le Yang, Yitian Zhang, and Haojun Jiang. Spatially adaptive feature refinement for efficient inference. IEEE TIP, 2021.
[17] Yizeng Han, Zeyu Liu, Zhihang Yuan, Yifan Pu, Chaofei Wang, Shiji Song, and Gao Huang. Latency-aware unified dynamic networks for efficient image recognition. arXiv:2308. 15949, 2023.
[18] Yizeng Han, Yifan Pu, Zihang Lai, Chaofei Wang, Shiji Song, Junfen Cao, Wenhui Huang, Chao Deng, and Gao Huang. Learning to weight samples for dynamic early-exiting networks. ECCV, 2022.
[19] Yizeng Han, Zhihang Yuan, Yifan Pu, Chenhao Xue, Shiji Song, Guangyu Sun, and Gao Huang. Latency-aware spatial-wise dynamic networks. In NeurIPS, 2022.
[20] Christian Hansen, Casper Hansen, Stephen Alstrup, Jakob Grue Simonsen, and Christina Lioma. Neural speed reading with structural-jump-lstte In ICLR, 2019.
[21] Chunming He, Kai Li, Guoxia Xu, Jiangpeng Yan, Longxiang Tang, Yulun Zhang, Xiu Li, and Yaowei Wang. Hqg-net: Unpaired medical image enhancement with high-quality guidance. arXiv:2307.0788 2023.
[22] Chunming He, Kai Li, Guoxia Xu, Yulun Zhang, Runze Hu, Zhenhua Guo, and Xiu Li. Degradation-resistaan unfolding network for heterogeneous image fusion. In ICCV, 2023.
11

---

[23] Chumming He, Kai Li, Yachao Zhang, Longxiang Tang, Yulun Zhang, Zhenhua Guo, and Xiu Li. Camouflaged object detection with feature decomposition and edge reconstruction. In CVPR, 2023.
[24] Chunming He, Kai Li, Yachao Zhang, Guoxia Xu, Longxiang Tang, Yulun Zhang, Zhenhua Guo, and Xiu Li. weakll-supervvsed concealed object segmentation with sam-based pseudo labeling and multi-scale feature grouping. A305v:2305. / 1003, 2023.
[25] Chunming He, Kai Li, Yachao Zhang, Yulum Zhang, Zhenhua Guo, Xiu Li, Martin Danelljan, and Fisher Yu. Strategic preys make acute predators: Enhancing camouflaged object detectors by generating camouflaged objects. arXiv:2308 03666, 2023.
[26] Haodi He, Yuhui Yuan, Xiangyu Yue, and Han Hu. RankSeg: Adaptive pixel classification with image category ranking for segmentation. In ECCV, 2022.
[27] Gao Huang, Danlu Chen, Tianhong Li, Felix Wu, Laurens Van Der Maaten, and Kilian Q Weinherger. Multi-scale dense networks for resource efficient image classification. In ICLR, 2018.
[28] Gao Huang, Yulin Wang, Kangchen Lv, Haojun Jiang, Wenhui Huang, Pengfei Qi, and Shiji Song. Glance and focus networks for dynamic visual recognition. IEEE TPAMI, 2022.
[29] Rui Huang, Xuran Pan, Henry Zheng, Haojun Jiang. Zhifeng Xie, Shiji Song, and Gao Huang. Joint representation learning for text and 3d point cloud. arXiv:2301.07584 2023.
[30] Ding Jia, Yuhui Yuan, Haodi Hc, Xiaopei Wu, Haojun Yu, Weihong Lin, Lei Sun, Chao Zhang, and Han Hu. DETRS with hybrid matching. In CVPR, 2023.
[31] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yuning Jiang. Acquisition of localiza- tion confidence for accurate object detection. In ECCV, 2018.
[32] Fehmi Kahraman, Kemal Oksuz, Sinan Kalkan, and Emre Akbas. Correlation loss: Enforcing correlation between classification and localization. In AAAI, 2023.
[33] Xin Lai, Yuhui Yuan, Ruihang Chu, Yukang Chen, Han Hu, and Jiaya Jia. Mask-attention-free transformer for 3d instance segmentation. In ICCV, 2023.
[34] Feng Li, Hao Zhang, Shilong Liu, Jian Guo, Lionel M Ni, and Lei Zhang. DN-DETR: Accelerate detr training by introducing query denoising. In CVPR, 2022.
[35] Feng Li, Hao Zhang, Shilong Liu, Lei Zhang, Lionel M Ni. Heung- Yeung Shum, et al. Mask DINO: Towards unified cansformer-based framework for object detection and segmentation. In CVPR, 2023.
[36] Ke Li, Shijie Wang, Xiang Zhang, Yifan Xu, Weijian Xu, and Zhuowen Tu. Pose recognition with cascade transformers. In CVPR, 2021.
[37] Xiang Li, Wenhai Wang, Lijun Wu, Shuo Chen, Xiaolin Hu, Jun Li, Jinhui Tang, and Jian Yang. Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection. In NeurlPS, 2020.
[38] Zhiqi Li, Wenhai Wang, Enze Xie, Zhiding Yu, Anima Anandkumar, Jose M Alvarez, Ping Luo, and Tong Lu. Panoptic segformer: Delving deeper into panoptic segmentation with transformers. In CVPR, 2022.
[39] Zhanhao Liang and Yuhui Yuan. Mask frozen-detr: High quality instance segmentation with one gpu. arXiv preprint arXiv:2308.033: 03747, 2023.
[40] Matthieu Lin, Chuming Li, Xingyuan Bu, Ming Sun, Chen Lin, Junjie Yan, Wanli Ouyang, and Zhidong Deng. DETR for crowd pedestrian detection. arXiv:2012.06785, 2020.
[41] Tsung- Yi Lin, Priya Goyal, Ross Girshick, Kaiming Hc, and Piotr Dollár. Focal loss for dense object detection. In ICCV, 2017.
[42] Tsung- Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C. Lawrence Zitnick. Microsoft COCO: Common Objects in Context, In ECCV, 2014.
[43] Yutong Lin, Yuhui Yuan, Zheng Zhang, Chen Li, Nanning Zheng, and Han Hu, Detr does not need multi-scale or locality design. In ICCV, 2023.
[44] Shilong Liu, Feng Li, Hao Zhang, Xiao Yang, Xianbiao Qi, Hang Su, Jun Zhu, and Lei Zhang. DAB-DETR: Dynamic anchor boxes are better queries for DETR. In ICLR, 2022.
12

---

[45] Shilong Liu, Tianhe Ren, Jiayu Chen, Zhaoyang Zeng, Hao Zhang, Feng Li, Hongyang Li, Jun Huang, Hang Su, Jun Zhu, et al. Detection transformer with stable matching. (rXY:22304004422. 2023.
[46] Yan Ma, Weicong Liang. Yiduo Hao, Bohan Chen, Xiangyu Yue, Chao Zhang, and Yuhui Yuan. Revisiting detr pre-training for object detection. arXiv:2308.0/ 03300, 2023.
[47] Tim Meinhardt, Alexander Kirillov, Laura Leal-Taixe, and Christoph Feichtenhofer. Track- former: Multi-object tracking with transformers. In CVPR, 2022.
[48] Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, and Jingdong Wang. Conditional DETR for fast training convergence. In ICCV, 2021.
[49] Kemal Oksuz, Baris Can Cam, Emre Akbas, and Sinan Kalkan. A ranking-based based, balanced loss function unifying classification and localisation in object detection. In NeurlPS, 2020.
[50] Kemal Oksuz, Baris Can Cam, Emre Akbas, and Sinan Kalkan. Rank & sort loss for object detection and instance segmentation. In ICCV, 2021.
[51] Yifan Pu, Yizeng Han, Yulin Wang, Junlan Feng, Chao Deng, and Gao Huang. Fine- line-grained recognition with learnable semantic data augmentation. arXiv:2309.00333 2023.
[52] Yifan Pu, Yiru Wang, Zhuofan Xia, Yizeng Han, Yulin Wang, Weihao Gan, Zidong Wang, Shiji Song, and Gao Huang. Adaptive rotated convolution for rotated object detection. In ICCV, 2023.
[53] Qi Qian, Lei Chen, Hao Li, and Rong Jin. DR loss: Improving object detection by distributional ranking. In CVPR, 2020.
[54] Tianhe Ren, Shilong Liu, Feng Li, Hao Zhang, Ailing Zeng, Jic Yang, Xingyu Liao. Ding Jia. Hongyang Li, He Cao, et al. detrex: Benchmarking detection transformers. arXiv:2306.07265, 2023.
[55] Yichao Shen, Zigang Geng, Yuhui Yuan, Yutong Lin, Ze Liu, Chunyu Wang, Han Hu, Nanning Zheng, and Baining Guo. V-detr: Detr with vertex relative position encoding for 3d object detection. Stt1:2308.044099 2023.
[56] Dahu Shi, Xing Wei, Liangqi Li, Ye Ren, and Wenming Tan. End-to-end multi-person pose estimation with transformers. In CVPR, 2022.
[57] Lucas Stoffi, Maxime Vidal, and Alexander Mathis. End-to-end trainable multi-instance pose estimation with transformers. arXiv:2103.1211 12115, 2021.
[58] Peize Sun, Jinkun Cao, Yi Jiang, Rufeng Zhang, Enze Xie, Zehuan Yuan, Changhu Wang, and Ping Luo. Transtrack: Multiple object tracking with transformer. arXiv:2012.1 11122022.11466 15400, 2020.
[59] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Feos: Fully convolutional one-stage object detection. ICCV, 2019.
[60] Chaofei Wang, Qisen Yang, Rui Huang, Shiji Song, and Gao Huang. Efficient knowledge distillation from model checkpoints. In NewrIPS, 2022.
[61] Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chiel Chen. Max-dceplab: End-to-end panoptic segmentation with mask transformers. In CVPR, 2021.
[62] Shenzhi Wang, Liwei Wu, Lei Cui, and Yujun Shen. Glancing at the patch: Anomaly localization with global and local feature comparison. In CVPR, 2021.
[63] Yingming Wang, Xiangyu Zhang, Tong Yang, and Jian Sun. Anchor DETR: Query design for transformer-based detector. In AAAI, 2022.
[64] Yulin Wang, Zhaoxi Chen, Haojun Jiang, Shiji Song, Yizeng Han, and Gao Huang. Adaptive focus for efficient video recognition. In ICCV, 2021.
[65] Yulin Wang, Yizeng Han, Chaofei Wang, Shiji Song, Qi Tian, and Gao Huang. Computation efficient deep learning for computer vision: A survey. arXiv:2308, 13998, 2023.
[66] Yulin Wang, Rui Huang, Shiji Song. Zeyi Huang, and Gao Huang. Not all images are worth 16x16 words: Dynamic transformers for efficient image recognition. In NeurIPS, 2021.
[67] Qisen Yang, Shenzhi Wang, Matthieu Gaetan Lin, Shiji Song, and Gao Huang. Boosting offline reinforcement learning with action preference query. In ICML, 2023.
13

---

[68] Qisen Yang, Shenzhi Wang, Qihang Zhang, Gao Huang, and Shiji Song. Hundreds guide millions: Adaptive offline reinforcement learning with expert guidance. IEEE TNNLS, 2023.
[69] Qihang Yu, Huiyu Wang, Dahun Kim, Siyuan Qiao, Maxwell Collins, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. CMT-DeepLabs Clustering mask transformers for panoptic segmentation. In CVPR, 2022.
[70] Xiaodong Yu, Dahu Shi, Xing Wei, Ye Ren, Tingqun Ye, and Wenming Tan. SOIT: Segmenting objects with instance-aware transformers. AAAI, 2022.
[71] Yuhui Yuan, Xilin Chen, and Jingdong Wang. Object-contextual representations for semantic segmentation. In ECCV, 2020.
[72] Yang Yue, Bingyi Kang, Xiao Ma, Gao Huang, Shiji Song, and Shuicheng Yan. Offline prioritized experience replay. arXiv:2306.054122 2023.
[73] Yang Yue, Bingyi Kang, Zhongwen Xu, Gao Huang, and Shuicheng Yan. Value-consistent representation learning for data-efficient reinforcement learning. In AAAI, 2023.
[74] Gongjie Zhang, Zhipeng Luo, Yingchen Yu, Kaiwen Cui, and Shijian Lu. Accelerating DETR convergence via semantic-aligned matching. In CVPR, 2022.
[75] Hao Zhang, Feng Li, Shilong Liu, Lei Zhang, Hang Su, Jun Zhu, Lionel M Ni, and Heung- Yeung Shum. DINO: DETR with improved denoising anchor boxes for end-to-end object detection. In ICLR, 2023.
[76] Haoyang Zhang, Ying Wang, Feras Dayoub, and Niko Sunderhauf. VarifocalNet: An iou-aware dense object detector. In CVPR, 2021.
[77] Shifeng Zhang, Cheng Chi, Yongqiang Yao, Zhen Lei, and Stan Z Li. Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection. In CVPR, 2020.
[78] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable DETR: Deformable transformers for end-to-end object detection. In ICLR, 2021.
14


Reviews:
[{"review_id": "mVXle5YNOO", "reviewer": "Reviewer_m522", "summary": "This paper proposes Rank-DETR for image object detection. The key contributions of Rank-DETR include (1) a rank-oriented architecture design, which comprises a rank-adaptive classification head and query rank layer to ensure lower FP and FN in predictions; (2) a rank-oriented loss and matching design, which introduces GIoU-aware classification loss and high-order matching cost to boost the AP under high IoU thresholds. Experiments on COCO demonstrate each component can contribute to the overall performance and align the design expedition, and RANK-DETR outperforms the current SOTA detector DINO.", "questions": "Please refer to the weakness section.", "limitations": "N/A", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "1. The paper is well written, neatly written, clean, and easy to follow.\n2. The motivation of the paper is clear, 1. Rank-oriented Architecture Design: ensure lower FP and FN 2. Rank-oriented Matching Cost and Loss: boost the AP under high IoU thresholds. Experiments demonstrate the proposed component can align well with the design intent.\n3. The experiments are very solid, it compares two SOTA query-based detectors H-DETR and DINO, and outperform them. The ablation study thoroughly analyzes each component's effect and performance contribution to demonstrate its effectiveness.", "weaknesses": "1. Some module designs are not very novel. (1) Rank-adaptive Classification Head learns a class-aware and input-independent logits vector to model the class distribution and calibrate each query's score predictions. Such technique is well used in other fields like long-tailed classification/detection, and few-shot classification/detection. (2) GIoU-aware Classification Loss is very similar to Veri-Focal-Loss, except the modulating factor of positive classification loss is $t - \\hat{p}[l]$ instead of $t$, and such a minor modification leads to a slight performance boost, $~0.3mAP$. \n\n2. The Query Rank Layer design decouples content and positional query. The content query is constructed from MLP mapping of the fusing of a static query $C_l$ and output of the last decoder layer $O_l$. The positional query is constructed from PE encoding of ranked predicted boxes. This is a new design of query initialization, it will be interesting to compare it with other query initialization methods in DETR, Deformable-DETR, and DINO, but I can't find such comparisons.\n\n3. There is no analysis or comparison of parameter FLOPs and computation cost (training & testing speed).", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "## To Reviewer m522\n\nWe thank the reviewer for the careful reviews and constructive suggestions. We answer the questions as follows.\n\n---\n\n> **\"Some module designs are not very novel. (1) Rank-adaptive Classification Head learns a class-aware and input-independent logits vector to model the class distribution and calibrate each query's score predictions. Such technique is well used in other fields like long-tailed classification/detection, and few-shot classification/detection. (2) GIoU-aware Classification Loss is very similar to Veri-Focal-Loss, except the modulating factor of positive classification loss is $t-\\hat{\\mathbf{p}}[l]$ instead of $t$, and such a minor modification leads to a slight performance boost, $0.3$ mAP.\"**\n\nA: Great point!  We acknowledge the similarity of the mentioned module designs to previous techniques. However, our simple designs already showcase significant potential in exploring rank-oriented concepts for DETR-based object detectors. We hope that our efforts can inspire more advanced rank-oriented designs. Last, we welcome any further valuable suggestions to continue improving these module designs. Your insights are greatly appreciated!\n\n---\n\n> **\"The Query Rank Layer design decouples content and positional query. The content query is constructed from MLP mapping of the fusing of a static query $C_l$ and output of the last decoder layer $O_l$. The positional query is constructed from PE encoding of ranked predicted boxes. This is a new design of query initialization, it will be interesting to compare it with other query initialization methods in DETR, Deformable-DETR, and DINO, but I can't find such comparisons.\"**\n\nA: Great point! We follow your suggestion to compre the Query Rank Layer method with the query initialization methods of DETR, Deformable-DETR, and DINO as follows:\n\n| Method          | Content Query |  Positional Query |\n|-----------------|----------|-------|\n| DETR            | iterative refine | shared across layers, learnable queries |\n| Deformable-DETR | iterative refine | shared across layers, introduced with bounding box |\n| DINO            | iterative refine | regenerated at each layer from bounding box |\n| Ours            | iterative refine + sorted embedding | regenerated at each layer from bounding box |\n\nWe also ablate the proposed QRL (query initialization methods) in Deformable-DETR and DINO in 1x schedule. DETR results is not provided because it need long epoch to converge.\n\n| Method          | Backbone |  QRL  | mAP |\n|-----------------|----------|-------|-----|\n| Deformable-DETR | R50      |  ❎  | 43.4 |\n| Deformable-DETR | R50      |  ✅  | 45.0 |\n| DINO            | R50      |  ❎  | 48.7 |\n| DINO            | R50      |  ✅  | 49.3 |\n\nAccording to the above comparison results, we can see the Query Rank Layer consistently outperforms other query initialization methods.\n\n---\n\n> **\"There is no analysis or comparison of parameter FLOPs and computation cost (training & testing speed).\"**\n\nA: Great point! We follow your suggestion to provide the comparison of parameter FLOPs and computation cost (training & testing speed) as follows:\n\n| Method      | Backbone | Params(M) | FLOPs(G) | Training Cost (min) | Testing FPS (img/s) | mAP  |\n|-------------|----------|-----------|----------|---------------------|---------------------|------|\n| H-DETR      | R50      | 47.56     | 280.30    |   69.8 min  | 19.2 | 48.7 |\n| Rank-H-DETR | R50      | 49.10     | 280.60    |   71.8 min  | 19.0 | 50.0 |\n\n\nWe conducted testing and training cost evaluations utilizing the RTX 3090 GPU. The outcomes reveal a noteworthy enhancement in detection performance through our proposed method, with a marginal increase in FLOPs and inference latency.\n"}, {"review_id": "aUywiCIjtD", "reviewer": "Reviewer_JDo7", "summary": "This paper proposes a DETR training method named Rank DETR that integrates multiple (four) rank-oriented designs, i.e., rank-adaptive classification head (RCH), query ranking layer (QRL), GIoU-aware classification loss (GCL), and high-order matching cost (HMC). Among these four components, the former two (RCH and QRL) are relatively novel, while the latter two (GCL and HMC) are close to already-existing IoU-based loss function and matching criterion (e.g., as in Stable DINO). Experimental results show that the proposed Rank DETR improves multiple DETR baselines. However, some recent methods (e.g., Stable DINO) with fewer components achieve comparable or even higher results. ", "questions": "- Eqn. 2 is confusing. What does Sort(A, B) perform? Sorting B and duplicate the sorting results onto A?\n- In Eqn. 2, positional embedding is irrelevant to the rank of a predicted results, but determined by the coordinates. Since the ranking (sorting) does not change the coordinates, how does the ranking impact the positional embedding? If there is no impact, why do you enforce ranking in Eqn. 2?", "limitations": "The authors have  discussed the limitations.", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "- Two (out of four) major components, i.e., rank-adaptive classification head (RCH), query ranking layer (QRL) are novel.\n- Ablation experiments show that most components  bring considerable improvement (the improvement from RCH is relatively trivial) and integrating them brings further improvement.\n", "weaknesses": "- Two (out of four) major components, i.e.,  GIoU-aware classification loss (GCL), and high-order matching cost (HMC), share close insight, motivation and mechanism with recent methods, e.g., Stable DINO and Aligned DETR (though the detailed implementation is different). Moreover, the improvement brought by these two components is smaller than the similar ones in the competing methods. \n- More importantly, though the proposed Rank DETR adds two more components (RCH and QRL) based on IoU-related loss and matching (GCL and HMC), the overall results of Rank DETR is still lower than the recent methods that only has IoU-related loss (and matching), i.e., Stable DINO. For example, with DINO baseline, the proposed Rank DETR achieves 49.6 AP (12 epochs), while Stable DINO achieves 50.4 AP (12 epochs).\n- The definition of ranking in DETR is not clear enough. What criterion is the ranking based on? The IoU or the predicted confidence. This should be clearly pointed out at the very beginning. \n- The relation between the proposed method and IoU-related methods is not clear enough. Section 2 should explain their differences against IoU-related methods, as well as connections, in more details. \n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "## To Reviewer JDo7\n\nWe thank the reviewer for the careful reviews and constructive suggestions. We answer the questions as follows.\n\n> **\"Two (out of four) major components ...\"**\n\nA: \n👉 First, we summarize their mathematical formulations as follows:\n\n|   method  | classification loss modification  | matching cost modification |\n| :-------------  | :------------------:  |  :-------------:  |\n| Stable-DINO | change the classification target for positive query to: $\\mathrm{IoU}^2$ | modulate the classification prediction with GIoU scores: $\\mathrm{p}\\times(\\frac{\\mathrm{GIoU}+1}{2})^{0.5}$ |\n| Align-DETR  | change the classification target for positive query to:$\\mathrm{p}^{0.25}\\times\\mathrm{IoU}^{0.75}$ | no change |\n| Rank DETR   | change the classification target for positive query to: $\\frac{\\mathrm{GIoU}+1}{2}$ |  replace the original one with $\\mathrm{p} \\cdot {\\text{IoU}}^{4}$ |\n\nAccording to the above formulations, we can see that the key difference is at the modification to the original matching cost, which consists of classification cost, $\\ell_1$ loss, and GIoU loss. \n\n👉 Second, we agree that the improvement brought by these two components seem smaller than the similar ones in the competing methods when using the DINO-DETR as the baseline. We attempt to explain the possible reasons in the general response.\n\n---\n\n> **\"More importantly, though the ...\"**\n\nA: Great point! \n\n👉 First, we want to clarify that **the mentioned the 50.4 AP (12 epochs) of Stable-DINO relies on using another two techniques including: (i) NMS and (ii) Memory fusion**, where the results are summarized in Table 6 of Stable-DINO paper and these two techniques bring additional +0.4 AP gains. Therefore, **the actual improvement brought by the IoU-related loss (and matching) in Stable-DINO is 1.0 AP gain**. \n\n👉 Second, we have provided more comparison results in the general response. Align-DETR and Stable-DINO seem to use an improved DINO-DETR baseline with AP=49.4 (vs. ours: AP=48.7). \n\n---\n\n> **\"The definition of ranking in DETR ...\"**\n\nA: Thanks for pointing out this issue and we address your concerns as follows:\n\n👉 **Ranking definition**: ranking in DETR represents **the ranking order of the object query (and the associated bounding box predictions)**. The ranking order of object query is impoxrtant because the final predictions of modern DETR methods (H-DETR, DINO-DETR) are generated by sorting the bounding box predictions based on the classification confidence scores in descending order by default.\n\n👉 **Criterion of ranking**: the modern DETR methods (H-DETR, DINO-DETR) choose the default classification scores (agnostic to the localization precision) as the ranking criterion. In this work, we choose the **GIoU-aware classification scores** (predicted by the classification head) as the ranking criterion. These GIoU-aware classification scores of the positive samples are supervised by its normalized GIoU scores ($(\\mathrm{GIoU}(\\hat{\\mathbf{b}}, \\mathbf{b}) + 1)/2$) with the matched ground-truth box.\n\n---\n\n> **\"The relation between the proposed ...\"**\n\nA: Thanks for your valuable suggestions! We would like to include the following discussion in the final revision following your comments. We address your concerns on the connections and differences between our method and the IoU-related methods as follows:\n\n👉 Connections: the most significant connection exists between the IoU-related methods and our work, alongside Stable-DINO and Align-DETR. A pivotal similarity lies in our shared objective, which centers around **addressing the mis-alignment between classification scores and localization accuracy.**\n\n👉 Differences: \n\n- **Designed for different detectors**: the previous IoU-related methods focus on improving the ranking scheme for conventional object detectors such as FPN, Cascade R-CNN, FCOS, and ATSS. Our work focuses on improving the ranking design for modern DETR-based object detecters considering H-DETR/DINO-DETR already achieves stronger results.\n\n- **DETR-oriented innovations**: our innovation lies in the domain of DETR-specific designs, specifically our pioneering rank-oriented architecture for DETR methods. These elements are ingeniously crafted to cater to the intricate task of investigating the ranking order of object queries within DETR-based object detectors.\n\n---\n\n> **\"Eqn. 2 is confusing...\"**\n\nA: Thanks for pointing out this issue! Sort(A, B) means sorting the elements within A according to the decreasing order of the elements within B. In the Eqn. 2, we use $\\operatorname{Sort}({\\mathcal{B}}^{l}, \\mathcal{P}^{l})$ to represent sorting the order of bounding box predictions $\\mathcal{B}^{l}$ according to the decreasing order of their corresponding classification scores $\\mathcal{P}^{l}$.\n\nWe implement the Sort() function with the combination of two functions including torch.argsort() and torch.gather(). First, we use torch.argsort() to get the indices of the sorted probability predictions $\\mathcal{P}^{l}$ and torch.argsort() is not differentiable. Second, we use torch.gather() to gather the values of $\\mathcal{B}^{l}$ according to the output of torch.argsort().\n\n\n---\n\n> **\"In Eqn. 2, positional embedding ...\"**\n\nA:  (i) Yes, positional embedding is determined by the coordinates (bounding box predictions). (ii) The ranking of the positional embedding essentially places the bounding box predictions associated with higher GIoU-aware classification scores in the top-ranked positions. (iii) The reason for enforcing ranking in Eqn. 2 is to **keep the order of the positional embedding aligned with the order of the ranked content query** (shown in Eqn. 3) as we need to send the combination of rank-aware positional query embedding and content query embedding into the subsequent Transformer decoder layers."}, {"review_id": "NQ0sj7lCxA", "reviewer": "Reviewer_vAjC", "summary": "In this paper, the authors study the problem of object detection. To be specific, they introduce rank-awareness into transformer-based detectors both at the architecture-level and the loss/cost-level. \n\nAfter the rebuttal:\n\nThe authors have addressed my concerns about the comparison with other ranking-based solutions. Therefore, I recommend the paper to be accepted.", "questions": "Please see above.", "limitations": "None.", "rating": 7, "confidence": 5, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. Ranking is an important problem in object detection.\n\n2. The paper introduces and incorporates many interesting ways of integrating ranking into transformer-based detectors.\n\n3. Strong results compared to existing methods.", "weaknesses": "1. The paper is missing citations and comparison to significant ranking-based object detectors. To name a few, AP Loss, aLRP Loss, Rank & Sort Loss, Correlation Loss.\n\n2. \"Rank-adaptive Classification Head\" => What does it have to do with ranking? This module just adds a learnable bias to classification scores, which do not depend on negatives or positives or localization qualities.\n\n3. Some aspects require clarifications:\n\n3.1. Eq 2: How does updating the positional encodings based on the sorted boxes disrupt positional information of the boxes?\n\n3.2. Eq 2 & 3: Do you not need Sort() to be differentiable to pass gradients through?\n\n3.3. \"High-order Matching Cost\" => Why high-order? What is high and what is order in this context?\n\n4. Improvement over Varifocal loss (0.3% mAP) is insignificant. It is not clear what was missing in existing ranking-based loss functions.\n\n5. Presumably there was not sufficient time to compare against [1, 21]. If you have performed a comparison in the meantime, can you please share the results?\n\n6. It is a pity that there are no results on the LVIS dataset.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "## To Reviewer vAjC\n---\n\n> **Missing citations and comparison to significant ranking-based object detectors.**\n\nA: Thanks for sharing so many valuable ranking-based object detectors which surely will help us to improve our work! We would like include the missing citations and the following comparisons in the revision.\n\n👉 First, we discuss their mathmatical formulation differences as follows:\n\n- AP Loss: $L_{AP} = \\frac{1}{|P|} \\sum_{i\\in P} \\sum_{j\\in N}L_{ij}$, where the AP loss aims to address the extreme foreground background class imbalance issue.\n\n- aLRP Loss: $L^{aLRP}=\\frac{1}{|P|}\\sum_{i\\in P}\\ell^{\\mathrm{LRP}}(i)$, where the aLRP loss is the  first ranking based loss function for both classification and localisation tasks.\n\n- Rank and Sort Loss: $L_{RS} := \\frac{1}{|P|} \\sum_{i\\in \\mathcal{P}} (\\ell_{\\mathrm{RS}}(i) - \\ell_{\\mathrm{RS}}^*(i))$, where the Rank and Sort Loss aims to rank each positive above all negatives as well as to sort positives among themselves with respect to their localisation qualities.\n\n- Correlation Loss: $L_{corr} =1 − \\rho(IoU,s)$, where the Correlation Loss is a simple plug-in loss function to improve correlation of classification and localization tasks.\n\nAccording to the above formulations, we can see that AP Loss, aLRP Loss, and Rank Sort Loss mainly constrain the classification and localization predictions between pair-wise samples (positive sample pairs or positive-negative sample pairs), using error-driven update. However, our loss function use plain backpropagation to align each classification score with its target, but not between each pair of classification scores. In addition, correlation loss is a plug-in component used together with the classification loss, while our loss function replaces the original classification loss.\n\n\n👉 Second, we also attempt to integrate these methods with the H-DETR method and report the initial comparison results as follows:\n\n| method |  mAP | AP50 |  AP75|\n| ---- | --- | ---- | ----- |\n| H-DETR (reproduced baseline) | 48.2 |  66.4 | 52.9 |\n| H-DETR + Correlation Loss | 48.9 (+0.7) |  65.7 | 53.3 |\n| H-DETR + Ours |  49.2 (+1.0) | 66.9 | 53.7 |\n\nAlso, other methods (AP, aLRP, RankSort) result in slight mAP degradations, and our method significantly outperforms these ranking losses based on H-DETR. This results from the choice of the **matching strategy** between the detectors used in these papers and DETR. We would like to include above discussions in the final revision and welcome any further suggestions.\n\n\n---\n> **Ranking in RCH.**\n\nA: The input $\\mathbf{o}^l_i$ for Equation $\\mathbf{t}^l_i=\\operatorname{MLP}(\\mathbf{o}^l_i)$ is \ncomputed based on the sorted content query $\\overline{\\mathcal{Q}}_c^{l-1}$ and sorted position query $\\overline{\\mathcal{Q}}_p^{l-1}$ from the previous decoder layer.\nTherefore, each element of the learnable bias corresponds to a specific ranking position according to the descending order of the classification scores predicted by the previous decoder layer.\n\n\n---\n> **clarifications**\n\nA: \n\n👉 Eq 2: How does updating the positional encodings based on the sorted boxes disrupt positional information of the boxes?\n\nWe update the positional encodings based on the sorted boxes in order to **keep the order of the positional embedding aligned with the order of the ranked content query** as we need to send the combination of rank-aware positional query embedding and content query embedding into the subsequent Transformer decoder layers.\n\n👉 Eq 2 & 3: Do you not need Sort() to be differentiable to pass gradients through?\n\nYes, we implement the Sort() function in Eq 2 & 3 with the combination of two functions including torch.argsort() and torch.gather(). First, we use torch.argsort() to get the indices of the sorted probability predictions $\\mathcal{P}^{l}$ and torch.argsort() is not differentiable. Second, we use torch.gather() to gather the values of $\\mathcal{B}^{l}$ and $\\mathcal{O}^{l}$ according to the output of torch.argsort(). The operation torch.gather() is differentiable to pass gradients through. \n\n👉 \"High-order Matching Cost\" => Why high-order? What is high and what is order in this context?\n\n(i) The reason for using a high-order combination of the class scores and the IoU is:\n\n- **non-linear relationships**: using high-order combinations allows us to capture non-linear relationships between the classification scores and the IoU scores, leading to better model performance and a more accurate representation of the underlying patterns in the data.\n\n- **better representation of interaction effects**: high-order combinations can capture interaction effects between two variables more effectively than linear combinations. We can use different power terms for them to control the effect of each variable more flexibly.\n\n(ii) In this work, we use high-order to refer to non-linear combinations of the classification scores and the IoU scores, i.e., $\\hat{\\mathbf{p}}[l] \\cdot {\\text{IoU}}^{\\alpha}$, as shown in Equation (7).\n\n---\n> **Varifocal loss**\n\nA: Varifocal loss **removes the scaling factors on positive examples**. According to original paper, the reason for such a design is because **positive examples are extremely rare compared with negatives and we should keep their precious learning signals**. However, this assumption is not true for DETR-based detectors, where **the ratio of positive examples is relatively much larger** (e.g., 30-50 positive samples vs. 250-270 negative samples given 300 queries). Therefore, we empirically show that applying a scaling factor ($-|t-\\hat{\\mathbf{p}}[l]|^\\gamma$) to positive samples can help improve the performance. \n\n---\n> **Comparison with Aligh-DETR, Stable-DINO**\n\nA: Please refer to the general response.\n\n---\n> **For LVIS dataset**\n\nA: We provide the results on LVIS based on Detic with Deformable-DETR + R50 (https://github.com/HDETR/H-Detic-LVIS) trained for 24 epochs:\n\n| method     | mAP |\n| -| - |\n| Detic      | 30.9 |\n| Rank Detic  | 34.1 |"}, {"review_id": "Icb584GVjr", "reviewer": "Reviewer_kDha", "summary": "This paper focuses on the ranking problem in object detection. Inspired by the misalignment between class and location scores in DTER models, the paper proposes to redesign the model architecture and the loss to modulate the rank information. Experiments show that , the proposed method can build upon the current strong DETR detectors such as DINO and H-DETR to further boost the performance by a notable margin (>1 mAP). The experiments also suggest the complementarity between the ranking model architecture and the ranking loss design.", "questions": "- The title is too broad and has little meaning. I recommend to change a name including the technical contribution.\n- The addition of the RCH module even hurts the performance, especially for AP_L, it degrades 0.6 points. Please explain this phenomenon.\n- The learnable logit bias vectors S and the randomly initialized content query C are confusing to me. Are they tricks or can the author give an explanation (or illustrations with figures) for their practical functions? I think further ablations on the two learnable bias are required.\n- The result for DINO, R50, 12epochs in Table 1 is different from that in Table 3. Please check.\n", "limitations": "The current solution is somewhat straightforward, and the topic can be deep investigated.", "rating": 5, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "+ The paper tackles an important problem in DETRs for object detection: the misalignment of the class scores and the localization scores.\n+ The paper is well written and easy to follow. The paper has provided informative statistical plots. For example, the density distribution for QRL and HWC, and the illustration of box scores with and without the proposed ranking mechanism.\n+ The experiments are solid and sound. The paper uses detailed ablation studies to justify the design choices of the proposed components. The method seems effective according to the experimental results, i.e., around +1% AP metric for DINO and H-DETR.\n", "weaknesses": "- The whole process seems a little engineering. E.g., the addition of learnable bias.\n- The main boost originates from the GIoU-aware loss, which has been investigated in Varifocal loss, Align-DETR and Stable-DETR (I am aware that the latter two are not formally published). This somehow hurts the novelty of the paper. A thorough discussion/comparison is expected.\n- The method seems complicated and includes many steps. For example the rank-driven model design seems not to invite as much performance gains as expected.\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "## To Reviewer kDha\n\nThanks for your detailed comments. The mentioned questions are addressed as follows.\n\n---\n\n> **The whole process seems a little engineering. E.g., the addition of learnable bias.**\n\nA: We appreciate your feedback and are grateful for the opportunity to address your concern regarding our work is engineering. We agree some of the proposed designs essentially require engineering techniques and they are important to build high quality object detectors. We also would like to further simply the engineering design in the short future.\n\n---\n\n> **The main boost originates from the GIoU-aware loss, which has been investigated in Varifocal loss, Align-DETR and Stable-DETR (I am aware that the latter two are not formally published). This somehow hurts the novelty of the paper. A thorough discussion/comparison is expected.**\n\nA: Great point! First, we want to clarify that the other proposed components also bring significant improvements. For example, according to Table 4(a), RCH improves AP from 48.2 to 48.4 (+0.2), QRL improves AP from 48.4 to 49.1 (+0.7), GCL (GIoU-aware loss) improves AP from 49.1 to 49.6 (+0.5), and HMC improves AP from 49.6 to 50.0 (+0.4). Therefore, we can see that the proposed GIoU-aware loss contributes less than 30% of the overall gains. A thorough discussion/comparison with Align-DETR and Stable-DINO is provided in the general response.\n\n---\n\n> **The method seems complicated and includes many steps. For example the rank-driven model design seems not to invite as much performance gains as expected.**\n\nA: First, we want to clarify that the proposed method is easy to implement. RCH and QRL can be implemented with fewer than 100 lines of code, while GCL is a simple modification of Focal Loss that changes the hard label into a soft GIoU target. HMC is a simplified version of an existing matching cost design, which reduces the conventional weighted sum of three costs to just one term.\n\nSecond, although we propose four components, it is a comprehensive design that introduces ranking into DETRs. It includes both architectural design and optimization modifications.\n\nThird, the proposed components all facilitate better ranking. RCH and QRL embed ranking information in the network architecture. GCL and HMC make the ranking metric (classification score) IoU/GIoU aware and further improve the quality of ranking.\n\n---\n\n> **The title is too broad and has little meaning. I recommend to change a name including the technical contribution.**\n\nA: Good point! We appreciate your valuable suggestions on including the technical contribution in the title. The technical contribution of this work lies in introducing rank-oriented architecture designs and rank-oriented optimization designs (training loss and matching cost). Therefore, we propose a possible candidate: “Rank-DETR: Improving DETR with Rank-Oriented Architecture and Loss Designs”. We would appreciate any further valuable comments you may have.\n\n---\n\n> **The addition of the RCH module even hurts the performance, especially for AP_L, it degrades 0.6 points. Please explain this phenomenon.**\n\nA: In our observation, large objects tend to have a high classification score in DETRs, while the small ones do not. The proposed RCH tends to enhance the classification score of small objects. As a result, the average precision (AP) for small objects is improved, while AP_L is affected negatively. Overall, RCH still increases the overall performance in terms of the mean average precision (mAP) metric.\n\n---\n\n> **The learnable logit bias vectors S and the randomly initialized content query C are confusing to me. Are they tricks or can the author give an explanation (or illustrations with figures) for their practical functions? I think further ablations on the two learnable bias are required.**\n\nA: The function of rank-aware static content query C has been analyzed in Fig. 3(b) and (c). Fig. 3(b) shows that by embedding C in the sorted content queries O, the classification scores of positive queries (matched in the Hungarian matching process) are enhanced. Fig. 3(c) illustrates that the score of negative queries (unmatched ones) is suppressed. Therefore, QRL ensures lower false positives (FP) and false negatives (FN).\nWe further visualize the learnable logit bias vectors S for each decoder layer in the **attached PDF in the general response** (Fig. 6 and Fig. 7). For each decoder layer, the logit bias is a tensor with a shape of [num\\_queries, num\\_classes]. We use the index of queries (which has been sorted) as the x-axis and the processed value of logits (mean for Fig. 6, max for Fig. 7) for the y-axis. It can be observed that the learned logit bias further enhances the higher-ranked logits and suppresses the lower-ranked ones.\n\n---\n\n> **The result for DINO, R50, 12epochs in Table 1 is different from that in Table 3. Please check.**\n\nA: Good point! The results in Table 1 are the numbers reported in the original paper. The results in Table 3 were reproduced by our server for a fair comparison. Our reproduced performance of DINO-DETR is slightly worse than the reported numbers in the original paper. We appreciate your suggestion and would like to explicitly state that the numbers in Table 3 were reproduced by us based on your valuable comments."}]

Author rebuttal:
## To AC and All Reviewers

We thank all the reviewers for their careful reviews and constructive suggestions. These constructive feedbacks has significantly contributed to the improvement of our paper. We are glad to find the initial ratings of three reviewers (Reviewer m522, Reviewer kDha, and Reviewer vAjC) are positive.

Above all, we attempt to address the major concern on the differences and comparison with Stable-DINO and Align-DETR, from the following aspects:

> **Stable-DINO and Align-DETR are con-current works**

We would like to highlight that Stable-DINO was made available on arXiv on **10th April 2023**, while Align-DETR became accessible on **15th April 2023**. It is important to note that both of these works were not formally published at the time of this submission on **11th May 2023**. We have duly mentioned this aspect in the related work section of our paper, where we discuss the relevance and relationship of our approach to these contemporaneous works.

> **Different motivation and insight**

The motivation of Stable-DINO is to **address the unstable matching problem across different decoder layers** and the motivation of Align-DETR is to **address the misalignment between classification score and localization precision**. We acknowledge the motivation of our rank-oriented loss and matching design is close to the Align-DETR.

Different from both of them, the motivation of our rank-oriented architecture design is to **prompt positive predictions and suppress the negative ones to ensure lower false positive rates**.

> **Stable-DINO and Align-DETR introduced additional technical improvements**

(1) Stable-DINO further improves DINO-DETR with other designs. According to Table 6 in Stable-DINO paper, **first, applying NMS during evaluation brings +0.2 gains (49.0->49.2). Second, The combination of dense memory fusion and NMS brings +0.4 gains (49.0->49.4). Third, The combination of position-supervised loss and position-modulated matching cost brings the other +1.0 gains (49.4->50.4)**. According to Figure 7 in Stable-DINO paper, we notice that the memory fusion method, which concatenates the 24x (4 scales x 6 encoder layers) multi-scale encoder feature maps with the 4x multi-scale backbone feature maps followed by linear projection and normalization, will bring additional computation overhead during both training and evaluation, e.g., during evaluation, the GFLOPs increases from 289.90 G to 300.12 G.

(2) Align-DETR further improves DINO-DETR with **a mixed matching strategy** (introduce more positive samples) and **a prime sample weighting scheme** (down-weight the loss for low-quality positive samples). According to Table 5 and Table 8 in Align-DETR paper, these two techniques bring 0.2 gains (50->50.2).

Different from both of them, we have proposed to improve the DETR-based methods from a novel aspect, i.e., rank-oriented architecture design, which brings +0.9 gains over the baseline. We further clarify a possible misunderstanding of Reviewer kDha (**the main boost originates from the GIoU-aware loss**). We summarize some key results (from Table 4 in the main paper) in the following Table for reference. Accordingly, we can see that the proposed rank-oriented architecture design boosts the baseline from 48.2 to 49.1 while rank-oriented matching and loss design boosts the baseline from 48.2 to 49.5, respectively.

|  Rank-oriented architecture design (RCH + QRL)   | Rank-oriented loss and matching design (GCL + HMC) | mAP  | AP50  | AP75  |
| --- | --- | ---- |---- | ---- |
| ❎ | ❎ | 48.2 | 66.4 | 52.6 |
| ✅ | ❎ | 49.1 | 67.2 | 53.5 |
| ❎ | ✅ | 49.5 | 67.3 | 54.0 |
| ✅ | ✅ | 50.0 | 67.5 | 54.7 |

> **Concern about the smaller improvements than Stable-DINO and Align-DETR**

- First, we would like to highlight that Stable-DINO and Align-DETR **have tuned the hyperparameters and conducted all ablation experiments based on DINO-DETR**. For the experiments based on DINO-DETR, our goal is to **verify the generalization ability** and we simply **use the same hyperparameters as the experiments based on H-DETR without any tuning**. An interesting observation is that **our Rank-DETR (AP=50.0) significantly outperforms Stable-H-DETR (AP=49.2) when using the H-DETR as baseline**, where we notice that the H-DETR baseline of Stable-H-DETR is even stronger than our baseline: 48.6 vs. 48.2.

|   method  | mAP  | AP50  | AP75  |
| -------------  | ---- |---- | ---- |
| H-DETR (Stable-DINO reproduce) | 48.6 | - | - |
| Stable-H-DETR | 49.2 | - | - |
| H-DETR (our reproduce) | 48.2 |  66.4 | 52.9 |
| Rank H-DETR   | 50.0 |  67.5 | 54.7 |

- Second, to address the concerns on results over DINO-DETR, we report the detailed comparison results to Stable-DINO by using the additional special tricks as follows:

|   method   | NMS & Memory fusion | mAP  | AP50  | AP75  |
| ------------- | --- | ---- |---- | ---- |
| DINO-DETR (our reproduced baseline)  | ❎  | 48.7 | 66.1 | 52.9 |
| Rank DINO-DETR    |  ❎  | 49.6 | 67.0 | 54.7 |
| Rank DINO-DETR    |  ✅  | 50.4 | 67.9 | 55.3 |

Besides, we also attempt to leverage these techniques to improve our Rank H-DETR and we further achieve even stronger results than Stable-DINO, i.e., AP=$50.8$.

- Last, we also would like to point out another possible reason, Align-DETR (https://github.com/FelixCaae/AlignDETR) chooses the DINO baseline reproduced based on the detrex codebase (https://github.com/IDEA-Research/detrex/tree/main/projects/dino). According to their README, we find that the reproduced DINO-DETR baseline already achieves 49.4 in detrex implementation. We would like to reimplement our method on the detrex codebase if it is necessary.

👉 In conclusion, we earnestly hope that our work won't be rejected solely based on lacking direct competitive comparisons with concurrent endeavors. We firmly believe that our contribution can **offer new insights to the community on how to better exploit the ranking information for DETR-based object detectors**.

Meta-review: The paper proposes Rank-DETR, a DETR-based object detector incorporating rank-oriented designs at both architecture and loss levels. The rank-adaptive classification head and query rank layer introduce rank awareness into the architecture. The GIoU-aware classification loss and high-order matching cost integrate ranking into the loss and matching. Experiments demonstrate consistent improvements over baselines, aligning with design motivations. The reviewers rate the paper positively overall. ACs concur and recommend acceptance, considering the technically solid contribution despite limited direct comparison to very recent concurrent works addressing similar ideas.
Decision: Accept (poster)