CSPCL: Category Semantic Prior Contrastive Learning for Deformable DETR-Based Prohibited Item Detectors
Authors: Mingyuan Li
Tong Jia
Hao Wang
Bowen Ma
Luhui
Shiyi Guo
Da Cai
Dongyue Chen
Venue: NeurIPS 2025 poster ()
Keywords: object detection
X-ray inspection
detection transformer
Primary area: applications

Abstract: Prohibited item detection based on X-ray images is one of the most effective security inspection methods. However, the foreground-background feature coupling caused by the overlapping phenomenon specific to X-ray images makes general detectors designed for natural images perform poorly. To address this issue, we propose a Category Semantic Prior Contrastive Learning (CSPCL) mechanism, which aligns the class prototypes perceived by the classifier with the content queries to correct and supplement the missing semantic information responsible for classification, thereby enhancing the model sensitivity to foreground features. To achieve this alignment, we design a specific contrastive loss, CSP loss, which comprises the Intra-Class Truncated Attraction (ITA) loss and the Inter-Class Adaptive Repulsion (IAR) loss, and outperforms classic contrastive losses. Specifically, the ITA loss leverages class prototypes to attract intra-class content queries and preserves essential intra-class diversity via a gradient truncation function. The IAR loss employs class prototypes to adaptively repel inter-class content queries, with the repulsion strength scaled by prototype-prototype similarity, thereby improving inter-class discriminability, especially among similar categories. CSPCL is general and can be easily integrated into Deformable DETR-based models. Extensive experiments on the PIXray, OPIXray, PIDray, and CLCXray datasets demonstrate that CSPCL significantly enhances the performance of various state-of-the-art models without increasing inference complexity. The code is publicly available at https://github.com/Limingyuan001/CSPCL.

CSPCL: Category Semantic Prior Contrastive Learning for Deformable DETR-Based Prohibited Item Detectors
Mingyuan Li Tong Jia 1.2x Hao Wang' Bowen Ma²
Hui Lu- Shiyi Guo Da Cai Dongyue Chen
College of Information Science and Engineering, Northeastemn University, China
2 State Key Laboratory of Synthetical Automation for Process Industries, Northeastern University 5420277438qq com, j jiatong@ise, neu. edu. en, ddsywh@yeah net, 20102850stu neu, edu. cn, 1503881553386 com, guoshiyi@ise neu. edu. cn, 22103290stu neu, edu en, chendongyue@ise neu. onu.cn
Abstract
Prohibited item detection based on X-ray images is one of the most effective secu- feature coupling
rity inspection methods. However, the Breground-backgrrone caused by the overlapping phenomenon specific to X-ray images makes general detectors designed for natural images perform poorly. To address this issue, we propose a Category Semantic Prior Contrastive Learning (CSPCL) mechanism, which aligns the class prototypes perceived by the classifier with the content queries to correct and supplement the missing semantic information responsible for classifi- cation, thereby enhancing the model sensitivity to foreground features. To achieve design specific contrastive loss, CSP loss, which comprises the Intra-Class Truncated Attraction (ITA) loss and the Inter-Class Adaptive Repul- sion (IAR) loss, and outperforms classic contrastive losses. Specifically, the ITA loss leverages class prototypes to attract intra-class content queries and preserves essential intra-class diversity via gradient truncation function. The IAR loss employs class prototypes to adaptively repel inter-class content queries, with the repulsion strength scaled by prototype-prototype similarity, thereby improving inter-class discriminability. especially among similar categories. CSPCL is general and can be easily integrated into Deformable DETR-based models. Extensive experiments on the PIXray, OPIXray, PIDray, and CLCXray datasets demonstrate that CSPCL significantly enhances the performance of various state-of-the-ue models without increasing inference complexity. The code is publicly available at /ttts:://iitt thu.. com//LiningyuaanO///SPP0I
this alignment,
Introduction
Prohibited item detection based on X-ray images is important security inspection measure, widely used airports, postal services, government agencies, and border control areas. With development of computer vision technologies, researchers have started using techniques such as image classification, object detection, and semantic segmentation to assist security personnel in examining packages imaged by security screening machines for prohibited items, thereby reducing the potential risks caused by work fatigue. However, as shown in Figure T X-ray images differ from natural light images in that they exhibit unique overlapping phenomena, which cause coupling of foreground and background features. This leads to the detection results of general object detection models being easily affected by background noise.
Cooresponniig author.
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

There are two mainstream approaches for improving the anti-overlapping detection performance of detectors in response to the overlapping phenomenon in X-ray images. Methods based on attention mechanisms, including DAM [T, RIA 22, and FCAM 3 focus on foreground information either channel-wise or spatially. Methods based on label assignment, including IAA HSS [5], and LAreg 61. provide the model with more accurate candidate boxes during the training process, allowing it to concentrate on perceiving semantic information from overlapping foreground and background features. However, the aforementioned methods are all designed for CNN-based detectors and lack decoder structure to leverage the reliable prior knowledge provided by queries to perceive specific foreground features 77 & 91. Recently, researchers have found that clarifying the classification semantic information of content queries in Deformable DETR- based models can enhance the ability of the decoder perceive foreground features in X-ray images and improve the overlaaerlg detection ability [10 11]. AO-DETR [0] introduces the CSA label assignment strategy, which constrains content queries to detect specific categories of objects, but its portability is relatively limited. MMCL 11] proposes a plug-and-play contrastive learning mechanism that establishes sample pairs between content queries and categorizes them according to the number of classes. This method indiscriminately repels inter-class sample pairs while attracting intra-class sample pairs, thereby clarifying the semantic information of categories. However, it lacks category prior information, which may lead to content queries not aligning with the true distribution of feature manifold of categories.
As shown in Figure T the features of prohib- ited items such kmife, saw, and fireworks ex- hibit distinct differences, with varying degrees of differentiation between categories. Specif- ically, knife and saw have more similar color, texture, and contour information compared to knife and fireworks. Consequently, the represen- tations of knife and saw are closer together in feature space than those of knife and fireworks. Based on this observation, we propose a novel Category Semantic Prior Contrastive Learning mechanism (CSPCL), which utilizes classifier weights as specific category prototypes to pro- vide targeted correction and guidance to the con- tent queries responsible for each category in the decoder layers, ensuring that the content queries align with the inherent characteristic distribution of the respective prohibited items. To achieve this multi-class multi-sample alignment, we design contrastive loss, called the Category Semantic Prior (CSP) loss, which comprises the Intra-Class Truncated Attraction (ITA) loss and the Inter-Class Adaptive Repulsion (IAR) loss, and shows superior performance compared to classic contrastive losses 12 [3] Specifically, we employ the ITA loss to attract content queries of the same category toward their respective category prototypes, providing the queries with category semantic prior infor- mation. It provides a gradient truncation function that stops the attraction when the similarity between the prototypes and intra-class content queries exceeds certain threshold, thereby preventing the homogenization of intra-class content queries. Inversely, the IAR loss utilizes class prototypes to repel inter-class content queries, which has repulsion factor adaptively adjusting the repulsion strength based on the similarity between prototype pairs, thereby facilitating inter-class content queries to learn discriminative identifying features of similar categories, and obtain adequate separability.
Binwati
Figure 1: Feature manifold of saw (red), knife (blue), and fireworks (green). The squares and stars represent the feature representations of prohibited items and content queries, respectively.
The main contributions of our work are as follows:
We propose plug-and-play CSPCL mechanism that uses contrastive learning to align content queries with the intrinsic feature distribution of the same category of prohibited items perceived by the classifier, thereby enhancing the anti-overlapping detection capability of Deformable DETR- based models without increasing inference complexity.
We propose the CSP loss tailored for the multi-class multi-sample alignment task, which more effectively aligns class prototypes with content queries than classic contrastive losses.
The CSPCL mechanism demonstrates strong generalization across various Deformable DETR variants, such as RT-DETR [14), DINO (9), and AO-DETR [10,, improving detection

---

accuracy on two prohibited item datasets, including PIXray [5] and OPIXray []. Further- more, we validate CSPCL on the large-scale prohibited item detection datasets PIDray I and CI.Crra [6,
further advancing the state-of-the-art standards.
2 Related Work
DETR-like Detectors. DEttction TRansformer (DETR) pioneered the removal of the Non-Maximum Suppression (NMS) post-processing step, streamlining the pipeline of object detectors. However, it still has two major drawbacks: slow training convergence and the ambiguous meaning of queries M. To address the issue of slow convergence. Deformable DETR []6] introduces deformable attention, which only attends a small set of key sampling points around one selected reliable reference point, significantly improving the training convergence speed. Stale-DINO [17 uses the IoU score as ground truth to supervise the predicted classification scores of positive examples, thereby improving the stability of matching. Group-DET conducts one-to-one assignment within each group of object queries, resulting in one ground-truth object being assigned to multiple predictions. H-DETR [19] introduces an auxiliary one-to-many matching branch during training. Co-DETR (20) integrates multiple traditional one-to-many matching strategies. To clarify the meaning of queries, Conditional DETR (21) introduces 2D reference points in the query part as reliable spatial information hints. Anchor- DETR [22] and DAB-DETT [8] introduce 4D reference boxes to further provide potential position and size information of the objects. DN-DETR [23] proposes denoising training to help the network select high-quality queries, whose spatial positions are closer to the ground truth, to predict bounding boxes. DINO [9] further proposes contrastive denoising training, teaching the network how to reject queries that are far from the ground
[18] proposes a group-wise one-to- one-to-many assignment that
truth.
Contrastive Learning. The core idea contrastive learning is to train more discriminative feature representations by pulling together the representations of similar samples and pushing apart the representations of dissimilar samples. Overall, contrastive learning can be divided into unsupervised contrastive learning and supervised contrastive learning. Unsupervised contrastive learning methods can be further divided into sustance-wise contrastive learning and cluster- contrastive learning. The former is represented by methods such as InstDisc (24) and SimCLR (25). where, for any given instance, its data- aata-augmented version is treated as an intra-class sample, while other instances are considered as inter-class samples. Typically, the InfoNCE [13 loss is used for gradient updates. The latter, represented by methods such as CC (26) and TCL 27 uses pseudo-labels generated by clustering algorithms the basis and then employs supervised contrastive learning framework for training. Supervised contrastive learning methods have three paradigms of loss function. The first is based on the LMMN 28 which includes Triplet loss and N-pair loss. The second is based on the Softmax function, such as AM-Softmax (29). Circle loss (30] and SupCon loss [31. The third paradigm based on Cross-Entroop loss, including methods like EBM [32], C2AM [33], and MMCL [II]. As far as we know, the choice among these three paradigms often depends on the specific task and the reliability of the labels, with no definitive superiority among them. In this paper, we propose a targeted contrastive loss function, CSP loss, for the task of guiding content queries with category semantic priors.
Prohibited Item Detector. Since the introduction of the first large-scale pseudo-color X-ray pro- hibited item detection dataset by SIXray [34], research on prohibited item object detection in X-ray images has become increasingly diverse and manifold. Prohibited item detectors are typically based general object detectors and are improved to address the overlap phenomena in X-ray images (35] 36
38 39 40). SIXray introduced the CHR mechanism to iteratively strip away overlapping background information. OPIXray (2) proposed the DOAM module to perceive the material and edge information of foreground objects. GADet [4] and Xdet [5] proposed the IAA and HSS label assignment strategies to mitigate the binggroudd-bcckrrown
class imbalance issue caused by overlapping phenomena. FDTNet [41] and FAPID 42 transform features into the frequency domain and then use self-attention mechanisms or convolutions extract the texture and edge information of foreground objects. AO-DETR [10] proposed the first DETR-like model in the field of prohibited item detection, utilizing the CSA strategy to train category-specific content queries that are responsible for detecting specific types of contraband, thereby enhancing the ability to detect overlapping objects. However, the portability of CSA limited. MMCL. [I]] proposed a alug-and- play contrastive learning strategy that helps clarify the category-specific semantic information of
3

---

(o) Detection Architecture
Multi-Scale Features
[c]
M
Cls
Encoder
Decoder Layars
Layars
Rep
Query Selecton
Clauaftasiin Hard
[b] Desader
0%
Decoder Layer
Decodor Layer
Decoder Layer
Self attention
Deformable
Self attertion
attentiion
Daformable
Self attention
attention
Deformable
er Diemen ornal Cornection
R4
R'
R.
Learning
Head
M
ClsBRee&IOS
Figure Illustrating the pipeline of CSPCL plugged into one Deformable DETR DINO 19]. (a) The overall architecture of DINO. (b) The process of updating content queries in each layer of the decoder. (c) The CSPCL mechanism uses contrastive loss leverage classifier weights as class prototypes, thereby supplementing and refining the semantic information responsible for classification in the content queries of the decoder at layer I.
16 variant
content queries in Deformable DETR-based models. However, it lacks prior knowledge of the feature distribution for each category, and the indiscriminate repulsion of inter-class content queries will lead to the misalignment between the feature distributions of queries and objects within the same category. This paper presents improvements address this issue.
Proposed Method
3.1 Explore the significance of feature alignment between objects and content queries
In this part, we examine the role of content queries the decoder of Deformable DETR-based models and elucidate the importance of aligning object features with content queries. As shown in Figure 2 a), using DINO as representative model of the Deformable DETR series, given an input image. the backbone of the model first extracts multi-scale features, which then integrated through multiple layers of encoder layers to obtain global information, commonly referred to as the encoder memory M E R 77. which is passed to the decoder. In the decoder, as depicted in Figure (b)) the decoder first uses the M to predict a set of candidate results, including classification results Ce N and localization results R N where K is the number of categories in the dataset. Then, through the query selection mechanism, the top N Npred most reliable predictions R E Noruu x4 are filtered based on their classification confidence.
Overall, the decoder refines and updates the randomly initialized content queries Q through L layers of decoder layers, using the encoder memory M and spatial prior information R This iterative process yields more accurate classification and localization results. The decoder layer at the (-th layer D'. along with the corresponding prediction head, can be expressed by the following formulas:
(Q R !+| c(+1) = D' D'('., RR, M, R'+1 a + AR"
(1)
(AR'+) - H''.o(Q"';;0111
(2)
where / E {z x Z, < < L} is the decoder block index, and L. topically set to 6, denotes the total number of decoder blocks. The 9 o(.), o '-), and Ha,c denote learnable parameters, sigmoid, inverse sigmoid [16), and prediction heads of regression and classification [7]. respectively. Eq. (2) shows that content queries almost directly determine the prediction results at each layer the decoder. To analyze the update process of content queries more deeply, further decompose the decoder Eq. into self-attention mechanisms and deformable attention mechanisms for separate explanations.
The self-attention D', first performs element-wise addition to fuse the spatial information Q², which is obtained by positional embedding of reference boxes R 19,, with the content query Q resulting in

---

the query of self ceff-attention Q' and the key of self- self-attention K This establishes global mapping, and by extracting and aggregating features in V that have strong correlations with the spatial information, the output Qº is obtained. The 1-th self-attention layer can be denoted as follows:
Q = D' K. V):0)), Q K. = Q + O% V Q
(3)
where K and V are the key and value 43 respectively.
Deformable attention D' uses reference boxes R' to assist the deformable queries Q element- wise addition result of self-attention output Q and spatial embeddings O and extract feature
information from the encoder memory M to update the content queries Q The I-th deformable attention layer can be denoted as follows:
(4) From the above process, it can be seen that content queries Q! are continuously integrated with positional information from Qú through self-attention and deformable attention mechanisms. As the number of iterations in the decoder layer increases, the inherent category semantics in the original content query are gradually updated and replaced by the Q2 that contains location information such contours, edges, and shapes. This results in the loss of the content query's role in providing classification-relatee semantic information, such as color and texture. Therefore, if we can supplement and correct the category semanties in the content queries, we can enhance the model's sensitivity to the corresponding foreground object features.
Q = Qie = D. R' M,).), Q/ + O
3.2 Category semantic prior contrastive learning (CSPCL)
We propose the CSPCL mechanism, as illustrated in Figure 2c), which supplements and corrects the category semantic information of content queries by aligning them with the class prototypes perceived by the classifier weights. In the preprocessing stage, we group the content queries Q' E R.Pered XM from the /-th layer based on the number of categories K, resulting in K groups of category-specifer content queries Q',,A E RR where E {xr x E 7,0 < I S K}, and n is the quotient of the number of content queries Npred divided by the number of categories K. Next, the classifier weights W E RR K M are dimensionally expanded and adjusted to align with the dimensions of Q' resulting in prototypes P X In this way, the prototype. P& E RT*M which is responsible for category k; shares the same dimensions Q The prototypes Pk: and the content queries Q consist of n sample pairs for each category k. For this multi-class multi-sample alignment task, we specifically designed the CSP loss consisting of the Intra-Class Truncated Attraction (ITA) loss and the Inter-Class Adaptive Repulsion (IAR) loss. The IAR loss employs category prototypes to repel inter-class content queries, while the ITA loss attracts content queries towards the corresponding intra-class prototypes, thereby enhancing inter-class riserininabllit-eespeeee categories- preserving essential intra-class diversity. The formula for CSP loss is follows:
among similar
Lesr Q, K) a Q K) + (LIAR(P, QQ,
(5)
wherein a and 3 are hyperparameters used to balance two losses.
ITA loss. To attract category- speecffcc content queries to the feature manifold intra-class prohibited items, a simple and effective method is to compute the cross-entropy loss using the cosine similarity between category prototypes and intra-class content queries. However, even prohibited items of the same category still exhibit feature variations under different backgrounds and poses, meaning that intra-class content queries need to maintain a certain degree of variability to align with these differences, thereby improving the detection accuracy. Therefore, we specifically designed gradient truncation mechanism to ensure that content queries retain enough variance. The overall formula for the ITA loss is as follows:
1-%
1- 7-7550 7 $
LITA (P. Q K) Kn(n 1)
log (e((T(im(p) (f)p:.))))))))))))))))))))))). T(,,))= ((),))))T((.))))
x 0<<<1-> I,
-1 <<<<00 0
(6)
where sim(p q is the cosine similarity between the i-th prototype of the k-th class and j-th content query of the k-th class. T(x, 7) is the gradient truncation function. As shown in Figure 3
when the input value v, i.e. sim(p/; ))), exceeds the threshold - y, the returned ITA loss value is constant 7, and its derivative becomes 0. At this point, the prototype stops attracting the
5

---

intra-class content queries, allowing the content queries to retain the necessary variability and margin among queries. Therefore, by adjusting the value of y, we can control the variance (diversity) of similarities of intra-class content queries.
dertratt VoELAR 6
3.5
3.0
0.5
300
-10
02 smmty! ())
04
(5)
0.0
(SHITAbors
(00 Nottvv
F-01
Figure 3: (a) and (b) are the curves of the ITTA loss and its derivative, respectively. (c) and (d) are the 3D surface plots of our IAR loss with different The samples A and B have the same sim(p, i ") but sim (p, An P aa) of A smaller that of B. When r = 0.1, the IAR loss values of and B are almost the same, but when = 1, The loss value of A is much smaller than that of B.
IAR loss. Although the ITA attracts content queries toward the intra-class prototypes, some stubborn samples still drift away from the sample center, and may even appear in the feature manifold of other categories. A simple solution is to use the prototype to repel inter-class content queries indiseriminately. However, the differences between the prototypes of different categories vary naturally. As shown in Figure the feature manifolds of knife and saw have less margin than those of knife and firework, which means the former naturally more coupled than the latter, requiring stronger repulsion by the prototype to create enough margin for clarifying the semantic information of content queries for better detection performance [4 45 TO: TT. Therefore, propose the IAR loss as follows:
K
LIA 2. Q2K)= K(K - 1)n2
-1
[K1 * Ki) R(ki, ko)lo sim(p," in .9)"))
k==1
i=
j=1
= -e- 1- (1-sim(p))))) ,p,)))))
R R(k,, k2)
(8)
where 1[k * K2] E {0,1)) is an indicator function. equals 1 if h * k2. and 0 in the other case. Additionally, R(ki, k2) is the repulsion factor, used to adjust the strength of the repulsive effect exerted by the category prototype on content queries from different categories. The higher the similarity between the prototype of the kj category p. and the prototype of the k2-th category ,
the stronger the repulsion exerted by the prototype Eea² on the content query o 7 is the temperature coefficient, which controls the sensitivity of the IAR loss to inter-class prototype similarity. As shown in Figure 3 the larger the r, the more sensitive the IAR loss becomes differences between prototypes. This means that the prototype only repels content queries belonging to similar categories while minimizing the influence on content queries from unrelated categories, which helps align the features between prototypes and queries. When prototypes indiscriminately repel content queries from all categories. Therefore, inter-class content queries can learn discriminative identifying features for similar categories, through our IAR loss with a satisfied T.
0, R(1,, k2) becomes a constant, and the
3.3 Plug CSPCL into target decoder layers
The CSPCL mechanism can be inserted into the decoder of Deformable DETR-like models in alug-and-pley manner without increasing model complexity, as described in Algorithm [ Given the number of classes K in the dataset, the content queries Q.. localization results set Rt and classification results set C' of all decoder layers set L, the class prototypes P, and the set of target layers i where our CSPCL mechanism will be inserted. For each decoder layer the model's 's classification and localization detection results are matched with the ground truth through the Hungarian matching mechanism
Z to establish a one-to-one correspondence. Then, we compute the built-in loss BBAS of the model for the current layer based the matched prediction result and ground truth pairs.

---

Additionally, we determine whether the current layer belongs to the target layers set If it does, we use the content queries from the current layer Q prototypes P, and the number of categories K' to compute the CSP loss according to Eq. (5). This loss is then added to the model's ' inherent loss to update the current layer's loss value L Finally, we use the sum of the losses from each layer, denoted as L, to update both the model parameters and the content queries of all layers.
3.4 Effect of the CSPCL mechanism
To analyze the effectiveness of the CSPCL mech- anism for content queries, we visualize their SNE [46] dimensionality reduction distribution results with classifier weights. As shown in Fig- ure Ta) and Figure Ac), content queries of all categories of the original DINO are scattered and evenly distributed in the feature space, while also exhibiting significant differences from the category prototypes perceived by the classifier. This suggests that during the model training pro- cess, the content queries in the decoder fail to capture the semantic information responsible for classification, which is consistent with the conclusion drawn in Section 3.T In contrast, Figure bbb and Figure d) demonstrate that, under the CSPCL mechanism, intra-class con- tent queries cluster together while maintaining necessary distances, whereas inter-class content queries repel each other. Additionally, the tent queries the same category show a clear correlation with the category prototypes perceived by the model, i.e., the classifier weights. This indicates that method successfully aligns the content queries with the inherent feature distribution of contraband, thereby addressing the deficiency in Deformable DETR-like models.
Algorithm 1 Plug CSPCL into the Decoder.
Require:
Constant K; Set L. L. Qc P, R. C, G;
Ensure:
Initialize the total loss L to 0; for A decoder layer index E L do
[R., C₁ G. t (R' C² G); L LBASE (R., C. G:));
if E î. then
< L' + Losr Q K);
end if
C + C + C+; end for update model parameters and Q. to minimize L: return Qc:
1-SNE wio cls weight
t-SNE wio cls weight
t-SNE w/ cls weight
t-SNE w/ cls weight
kniff
Lighter
euttery
Hices
Scistors
Ranor badee
DINO
(b) DINO CSPCI
(c) DINO
(d) DINO CSPCL
Pressure, vessel
Figure 4: The t-SNE visualization results of the content queries (dots) and classifier weights (stars) from the first decoder layer. (a) and (b) show the visualization of content queries for DINO and DINO with the CSPCL mechanism, respectively. (c) and (d) show the visualization results of the classifier weights and content queries simultaneously reduced for the two models, DINO and DINO with the CSPCL mechanism, respectively.
To analyze the effectiveness of the CSPCL mechanism for detection results, we visualize the IoU scores and classification scores of prediction results of DINO on the PIXray dataset, as shown in Figure 5a We draw the scatter plot of prediction results whose classification scores and IoU scores are higher than 0.3, along with the Kernel Density Estimation (KDE) curves. Blue and orange represent the results of DINO and DINO with the CSPCI mechanism, respectively. The orange points are more concentrated and distributed further to the right compared to the blue points, indicating that under the CSPCL mechanism, the content queries capture more classification semantic prior information without losing localization features, improving the accuracy classification results. This demonstrates that our CSPCL mechanism can help the model more effectively perceive and extract foreground information of specific classes from the overlapping features X-ray images.
7

---

(1))
high
0.9
wo CSSPET
0.8
20.66
high
0.5
DONO wa. CSPCE
DOND CSPT
0.3
0.3
0.4
0.5
0.6
0.7
0.9
1.0
Classification score
(a)
(h)
Figure 5: (a) The scatter plot and Kernel Density Estimation (KDE) joint distribution plot of prediction results of the final decoder layer. Blue and Orange represent the results of DINO and DINO with the CSPCL mechanism, respectively. (b) Visualization of deformable attention sampling points, reference points, and prediction results for corresponding group content queries in the last decoder layer. (i)-iii) represent different groups. Each sampling point is shown as a filled circle, with color indicating its attention weight, and the reference point is marked by a green cross.
Experiments
4.1 Experimental setup
Datasets and evaluation metrics. We conduct extensive experiments on four large-scale publicly available X-ray prohibited item datasets, OPIXray (2] PIXray [[3], CLCXray [6], and PIDray M. which are widely used in the field of prohibited item detection. The PIXray, CLCXxay, and PIDray datasets adopt the COCO 47 evaluation metric, AP, which measures the detector's 's average precision across various IoU thresholds, providing comprehensive assessment of overall detection perfor- mance. The OPIXray dataset adopts the VOC [48] evaluation metric, mAP, which is calculated as the mean average precision across all categories an IoU threshold of 0.5.
Implementation details. For fair, all training and testing are conducted on the same computer platform, equipped with NVIDIA GeForce RTX 4090 GPU, an Intel Core i9- 13900K CPU, 64GB of memory, running Windows 10, and using PyTorch 1.13.1. Furthermore, we utilize pre-trained ResNet-50 models from the official MMDetection 49] repository the backbone, and all models are trained by the SGD optimizer with a learning rate of 0.01, a momentum of 0.9, and a weight decay of 0.1. In addition, all models trained for 12 epochs, following the original training strategy, with an image size of 320 x 320 unless otherwise stated.
4.2 Generalization
Contrastive loss. To verify the gener- alization of the CSPCL mechanism for contrastive loss, we replace the proposed CSP loss with classic contrastive losses, such as N-pair loss and InfoNCE loss, align content queries and prototypes of the same category, and evaluate them on DINO. As shown in Ta these losses still improve DINO's AP score on the PIXray dataset by 1.7% and 1.1%, respectively, but are less effective than the 3.2% improvement achieved by CSP loss. From these results, we draw two conclu- sions: (1) The strategy of aligning content queries with category prototypes in the CSPCL mechanism is generally effecttiv for prohibited item detection in X-ray images; (2) Thanks to gradient truncation and the adaptive repulsion mechanism, CSP loss is better suited for the multi-class multi-sample aligning task compared to the aforementioned classic contrastive losses. More theoretical comparison analysis with other contrastive losses can be found in Appendix B
Table 1: Comparing classic contrastive losses with our
CSP loss under CSPCL mechanism.
Method
AP
AP
APrs
APs
AP
AP,
DINO
64.3
86.5
71.0
19.3
48.9
73.9
DNIO N-pair
66.0 (+1.7)
88.1
72.2
23.7
51.3
75.4
DINO InfoNCE
65.4 (+1.1)
87.4
72.3
22.1
51.1
74.6
DINO CSP (our)
67.5 (+3.2)
88.7
74.6
23.3
52.3
76.8
Models and datasets. To verify the generalization of the CSPCL mechanism for models and datasets, we apply it to multiple representative Deformable DETR variants, including the basic Deformable DETR, the powerful DINO, RT-DETR, and the contrabann-speccialied AO-DETR two prohibited

---

Table Generalization analysis of CSPCL mechanism on PIXray and OPIXray.
Method
CSPCL
PARAMs
GFLOPs
PlXray
OPIXray
AP
AP3:
APp:
mAP
FO
ST
MU
60
52,14M
13.47
36.6
66.4
37.1
65.6
68.1
30.1
88.9
66.0
75.0
Deformable DETR
60
52.14M
13.47
41.8 (+5.2)
72.3
44.5
69.0 (43.4)
78.4
38.8
86.0
62.8
79.1
42.81M
17.07
61.4
84.0
68.5
69.2
75.6
30.5
88.4
66.7
84.9
RT-DETR
V
64
42.81M
17:07
61.8 (+0.4)
84.3
68.7
70.1 (40.9)
76,0
34.4
88.6
67.4
84.3
DINO
58,38M
26.89
64.3
86.5
71.0
77.0
81.7
56.3
90.0
71.4
85.5
54
58,38M
26.89
67.5 (+3.2)
88.7
74.6
77.9 (+0.9)
82.8
56.0
89.9
74.2
86.7
AO-DETR
X
54
58.38M
26.89
65.6
86.1
72.0
77.7
82.8
57.6
89.8
71.2
86.9
58.38M
26.89
66.4 (+0.8)
86.8
73.6
78.5 (+0.8)
84.3
57.7
87.1
Table 3: Comparison with SOTA models on PIDray,
Method
Backhone
Image Size
PARAMs
FLOPs
easy
hard
hidden
overall
Faster R-CNN (50)
ResNeXt-101-32x4d
1333
800
70.0
64,5
49.7
61.4
60.2M
300.5G
Mask R-CNN 51
ResNcXt-101-32xld
1333 800
77.7
70.0
53.7
67.0
101.9M
514.7G
FSAF 52
ResNeXi-101-64x44
1333
800
71.0
61.9
50.7
61.2
94.0M
461.6G
FCOS
53
ResNeXt-101-6kxl
1333
800
72.9
63.4
51.1
62.5
89.6M
457.0G
ATSS
ResNet-101
800
71.0
64.5
55.4
63.6
51.IM
295.5G
VFNet
55
ResNet-101
70.3
62.8
48.6
60.6
32.74M
TOOD
56
ResNet-101
68.5
63.8
48.9
60.4
32.04M
UniFormer
S7
UniFormer-B
1333 800
70.4
63.9
40.7
58.3
69.0M
399.0G
Deformable DETR
16
ResNet-50
1333 800
72.1
65,7
46.2
61,3
41.0M
210.2G
DN-DETR
ResNet-50
1333 800
76.8
71.0
55.6
67.8
47.0M
860.0G
SDANel
ResNet-101
500 x 500
71.2
64.2
49.5
61.6
ForkNet
39
ResNet--00
500 x 500
75.0
66.9
58.6
66.8
AO-DETR 10
Swin-I.
512 x 512
81.8
72.6
55.7
70.0
229.0M
276.5G
C-AO-DETR (ours)
Swin-L
82.2
73.3
56.9
70.8
229.0M
276.5G
item datasets PIXray and OPIXray. As shown in Table [ the CSPCL mechanism improves the detection accuracy of Deformable DETR, RT-DETR, DINO, and AO-DETR on the PIXray dataset by 5.2%. 0.4%, 3.2%. and 0.8% AP, respectively. Notably, CSPCL does not impose additional burdens on model complexity such as GFLOPs and PARAMs, nor does it reduce the model inference speed (FPS). Similarly, CSPCL enhances the detection accuracy of the four models on the OPIXray dataset by 3.4%, 0.9%, 0.9%, and 0.8% mAP, respectively. These experimental results demonstrate that the CSPCL mechanism can effectively improve the Deformable DETR-based models' ability handle overlapping detection tasks by aligning class prototypes and content queries.
Comparison with SOTA Models. To demonstrate the enhancement effect of CSPCL the prohib- ited item detection model, we chose AO-DETR as the baseline and train it with CSPCL under the condition of 512 x 512 image size, 14 epochs, 240 queries challenge other SOTA models, including general detectors and prohibited item detectors, on the largest known dataset for the prohibited item detection dataset PIDray (1] As shown in Table C-AO-DETR (AO-DETR + CSPCL) obtains the highest AP over easy, hard, and hidden sets, while outperforms in terms of Image Size and FLOPs. The validation on the fine-grained dataset for cutters and liquid containers. CLCXray (6) is provided in Appendix A
4.3 Ablation experiments
To obtain the optimal hyperparameters of CSP loss, we conduct extensive ablation experiments about integrating CSPCL into DINO on the PIXray dataset. As shown in Table 4a we first independently insert ITA loss at the 0-th decoder layer to adjust the truncation factor 7, with the optimal truncation factor y = 5 10-3 achieving 65.4% AP on the PIXray dataset. Similarly, as shown in Table the independent insertion of IAR loss yields the optimal temperature factor 7" 0.3, achieving 65.6% AP. Furthermore, Table 4c shows that when both ITA loss and IAR loss are used simultaneously. i.e., the full version CSP loss, the model's is AP increases by 2.4%, which higher than the individual use of ITA loss and IAR loss. This demonstrates the compatibility of the two loss functions. Subsequently, we adjust the target layer set where the CSPCL is inserted. As shown in Table 4d] the model achieves 67. 2% AP by aligning the content queries of all decoder layers with the category prototypes better

---

than aligning any single layer. Notably, when aligning only one layer, shallower layers, such as layer O, tend perform better. This could be because deeper layers, such as layer 5, involve content queries that more directly contribute to detection results, and indiscriminate alignment might disrupt the spatial features perceived by the model. Finally, as shown Table /4e and Table [4] we adjust the parameters a and [ in Hq. (5) to control the contribution ratio of the two losses. The optimal values for a and 3 are 1 and 0.5, respectively. Overall, the CSPCL mechanism with the optimal hyperparameters can help DINO achieve the highest AP score of 67.5% on PIXray.
Table 4: Ablation study about the CSPCL mechanism DINO 9 on the PIXray 15 dataset. L
means all decoder layers. The superscript represents the optimal value of the hyper- pyper-parameter.
AP
AP30
AP7s
AP
APw
7P
ITA
IAR
AP
APma
APm
x 10-2
64.9 (+0.6)
86.1
72.6
0.1
64.6 (+0.3)
85.5
72.2
X
x
64.3
86.5
71.0
5 x 10-3
65.4 (+1.1)
86,9
72.8
0.3
65.6 (+1.3)
86,8
73.3
/
65.4
(+0.9)
86.9
72.8
5 10
65.2 (+0.9)
86.6
72.6
65.3
(+1.0)
86.1
73.1
x
65.6 (+1.1)
86.8
73.3
(+0.5)
86.3
72.4
64.5 (+0.2)
86.1
71.7
66.7 (+2.4)
87.5
74.4
(a) Ablation study of ITA.
(b) Ablation study of TAR.
(c) Ablation study of ITA and LAR.
AP
AP50
AP7a
a
AP
AP50
APrs
8
AP
AP50 50
AP75
66.7 (42.4)
87.5
74.4
5
66.6 (+2.3)
88.1
73.7
5
66.3
(+2.0)
87.6
73.3
66.0 (+1.7)
87.0
73.5
67.2 (+2.9)
88.4
74,4
67.2 (+2.9)
88.4
74,4
60.6 (-3.7)
82.9
67.0
0.5
66.7 (+2.4)
87.5
74.4
0.5
67.5 (+3.2)
88.7
74.6
67.2 (+2.9)
88.4
74.4
0.1
65.1 (+0.8)
86.8
72.3
0.1
66.7 (+2.4)
87.9
73.8
(d) Ablation study target layer set.
(c) = 1,7"
5 10
0.3
(f)
1,n" 5
7,7" 0.3
4.4 Visualization
To investigate the effect of the CSPCL mechanism how content queries perceive and detect foreground prohibited items, we visualize the sampling points, reference points, and detection results in the last decoder layer for both DINO and "DINO+CSPCL" models, as shown in Fig. 5b Specifically, columns (i) and (ii) demonstrate that, compared to the original DINO model. the sampling points responsible for feature extraction in the "DINO+CSPCL" are more concentrated on the contraband objects themselves, and the confidence and localization accuracy of the detection results are higher. In column (iii), under the condition of severe background overlap, DINO mistakenly identifies a "metal shaft" in the background as a "dart", while the "DINO+CSPCL" focuses on the less conspicuous "lighter". These results indicate that the CSPCL mechanism helps the model focus on foreground information and enhances its ability to the anti-overlapping detection task.
5 Conclusion
In this paper, for the prohibited item detection task based on X-ray images, we propose a plug-am and- play CSPCL mechanism that aligns the classifier weights and content queries in Deformable DETR- based models. This mechanism supplements and clarifies the semantic information responsible for classification within the content queries, thereby improving the model's ability to perceive foreground information in overlapping features. Our proposed CSP loss outperforms classic contrastive losses and is better suited for the multi-class multi-sample alignment task. The CSPCL mechanism has strong generalizability, and it can enhance the anti-overlapping detection ability of various models on four datasets by classic contrastive losses, all without increasing model complexity.
Acknowledgments
This work is supported by the National Natural Science Foundation of China under Grant U22A2063, 62173083, 62276186, and 62206043; the China Postdoctoral Science Foundation under No.2023M730517 and 2024T170114; the Liaoning Provincial "Selecting the Best Can- didates by Opening Competition Mechanism" Science and Technology Program under Grant 2023JH1/10400045; the Fundamental Research Funds for the Central Universities under Grant N2424022; the Major Program of National Natural Science Foundation of China (71790614) and the 111 Project (B 16009); and the scholarship of China Scholarship Council (202506080096).
10

---

References
[1] B. Wang, L. Zhang, L. Wen, X. Liu, and Y. Wu, "Towards real-world prohibited item detection: A large- scale x-ray benchmark," in International Conference on Computer Vision (ICCV), 2021, pp. 5412-5421.
[2] Y. Wei, R. Tao, Z. Wu, Y. Ma. L. Zhang. and X. Liu, "Oecluded prohibited items detection: An x-ray security inspection benchmark and de-occlusion attention module," in ACM International Conference on Multimedia (ACM MM), 2020, pp. 138-144 146.
[3] Li, T. Jia, H. Lu, Y. Li, B. Ma, Wang, and D. Chen, "Multi-scale dense detector for prohibited items detection in x-ray images," in 2024 7th International Symposium on Autonomous Systems (ISAS). IEEE,
2024, pp. 1-6.
[4] M. Li, B. Ma, H. Wang, D. Chen, and T. Jia, "Gadet: A geometry- aware X-ray prohibited items detector," IEEE Sensors Journal (JSEN), vol. 24, no. 2, pp. 1665-1678, 2024.
[5] A. Chang, Zhang. Zhang, Zhong, and L. Zhang, "Detecting prohibited objects with physical size constraint from cluttered x-ray baggage images," Knowledge-Based Systems (KBS), vol. 237, p. 107916, 2022.
[6] C. Zhao, L. Zhu, S. Dou, W. Deng, and L. Wang, "Detecting overlapped objects in x-ray security imagery by label-aware mechanism," " IEEE Transactions on Information Forensics and Security (TIFS), vol. 17, pp. 998-1009, 2022.
[7] N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko, "End-to-end object detection with transformers," in European Conference on Computer Vision (ECCV). Springer, 2020, pp. 213-229.
[8] S. Liu, F. Li, H. Zhang, X. Yang. X. Qi. H. Su, J. Zhu, and L. Zhang, "Dab-detr: Dynamic anchor boxes better queries for detr," arXiv preprint arXiv:2201.12322 2022.
[9] H. Zhang, F. Li, Liu, L. Zhang, H. Su, Zhu, L. Ni, and H.-Y. Shum, "Dino: Detr with improved denois- ing anchor boxes for end-to and-to-ur end object detection," in International Conference on Learning Representations (ICLR), 2023.
[10] M. Li, T. Jia, H. Wang, B. Ma, H. Lu, S. Lin, D. Cai, and D. Chen, "Ao-detr: Anti-overlapping detr for x-ray prohibited items detection," IEEE Transactions Neural Networks and Learning Systems (TNNLS), 2024.
[11] Li, T. Jia, Lu, B. Ma, H. Wang, and D. Chen, "Mmel: Boosting deformable detr-based detectors with multi-class min-margin contrastive learning for superior prohibited item detection," arXiv preprint arXiv:2406.03) 2024.
[12] K. Sohn, "Improved deep metric learning with multi-class n-pair loss objective," Advances in Neural Information Processing Systems (NeurIPS), vol. 29, 2016.
[13] A. v. dd Oord, Y. Li, and O. Vinyals, "Representation learning with contrastive predictive coding," arXiv preprint Xiv: / 807.03748 2018.
[14] Y. Zhao, W. Lv, S. Xu, J. Wei, G. Wang. Q. Dang, Y. Liu, and J. Chen, "Detrs beat yolos on real-time object detection," arXiv preprint N.Xiv:330400806 2023.
[15] B. Ma, Jia, M. Su, X. Jia, D. Chen, and Zhang, "Automated segmentation of prohibited items in x-ray baggage images using dense de-overlap attention snake," IEEE Transactions on Multimedia (TMM), 2022.
[16] X. Zhu, W. Su, L. Lu, B. Li, X. Wang, and Dai, "Deformable (detr): Deformable transformers for end-to-end object detection," in International Conference on Learning Representations (ICLR), 2021.
[17] S. Liu, T. Ren, J. Chen, Z. Zeng, H. Zhang, F. Li, H. Li, J. Huang. H. Su, J. Zhu et al., "Detection transformer with stable matching." in International Conference Computer Vision (ICCV), 2023, pp. 6491-6500.
[18] Q Chen, X. Chen, J. Wang. S. Zhang, K. Yao, H. Feng, J. Han, E. Ding, G. Zeng, and J. Wang, "Group detr: Fast detr training with group-wise one-to-many assignment," in International Conference on Computer Vision (ICCV), 2023, pp. 6633-6642.
[19] D. Jia. Y. Yuan, H. He, X. Wu. H. Yu, W. Lin, L. Sun, C. Zhang, and H. Hu, "Detrs with hybrid matching." in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023, pp. 19 702- 102-1977 19--19722 712.
[20] 7. Zong, G. Song, and Y. Liu, "Detrs with collaborative hybrid assignments training." in International Conference on Computer Vision (ICCV), 2023, pp. 6748-6758.
[21] D. Meng, X. Chen, Z. Fan, G. Zeng. H. Li, Y. Yuan, L. Sun, and J. Wang, "Conditional detr for fast training convergence," in International Conference Computer Vision (ICCV), 2021, pp. 3651-3660.
11

---

[22] Y. Wang. X. Zhang, T. Yang, and J. Sun, "Anchor detr: Query design for transformer-based detector." in AAAI Conference on Artificial Intelligence (AAAI), vol. 36, no. 3, 2022. pp. 2567-2575.
[23] F. Li, H. Zhang. S. Liu, J. Guo, L. M. Ni, and L.. Zhang. "Dn-detr: Accelerate detr training by introducing query denoising." in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022,
pp. 13 619-13 627.
[24] Z. Wu, Y. Xiong, S. X. Yu, and D. Lin, "Unsupervised feature learning via non-paramttric instance discrimination," in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018, pp. 3733-3742.
[25] T. Chen, Kornblith, M. Norouzi, and G. Hinton, "A simple framework for contrastive learning of visual representations." in International Conference on Machine Learning (ICML), 2020, pp. 1597-1607.
[26] Y. Li, P. Hu, Z. Liu, D. Peng, J. T. Zhou, and X. Peng. "Contrastive clustering," in AAAI Conference on Artificial Intelligence (AAAI), vol. 35, no. 10, 2021, pp. 8547-8555.
[27] Y. Li, M. Yang. D. Peng. Li, J. Huang, and X. Peng. "Twin contrastive learning for online clustering," International Journal of Computer Vixion (IJCV), vol. 130, no. 9. pp. 2205-2221, 2022.
[28] K. Q Weinberger, J. Blitzer, and L. Saul, "Distance metric learning for large margin nearest neighbor classification," in Advances in Neural Information Processing Systems (NeurIPS), vol. 18, 2005.
[29] F. Wang, J. Cheng, W. Liu, and H. Liu, "Additive margin softmax for face verification." IEEE Signal Processing Letters (SPL). vol. 25, no. 7. pp. 926-930, 2018.
[30] Y. Sun, C. Cheng, Y. Zhang, C. Zhang, L. Zheng, Z. Wang, and Y. Wei, "Cirele loss: A unified perspective of pair similarity optimization," in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020, pp. 6398-6407.
[31] P. Khosla, P. Teterwak, C. Wang, A. Sarna, Y. Tian, P. Isola, A. Maschinot, C. Liu, and D. Krishnan, "Suueervised contrastive learning," Advances in Neural Information Processing Systems (NeurIPS), vol. 33, pp. 168661-3 18 673, 2020.
[32] S. Chopra, R. Hadsell, and Y. LeCun, "Learning a similarity metric discriminatively, with application to face verification." in IEEE/CVF Conference on Computer Vision and Puttern Recognition (CVPR), vol. 1, 2005, pp. 539-546 vol. 1.
[33] J. Xie, J. Xiang. J. Chen, X. Hou, X. Zhao, and L. Shen, "C2am: Contrastive learning of class agnostic activation map for weakly supervised object localization and semantic segmentation," IEEE/CVF conference on computer vision and pattern recognition (CVPR), 2022, pp. 989-998.
[34] C. Miao, L. Xie, F. Wan, C. Su, H. Liu, J. Jiao, and Q. Ye, "Sixray: A large-scale security inspection x-ray benchmark for prohibited item discovery in overlapping images," in IEEE/CVF Conference on Computer Vision and Pottern Recognition (CVPR), 2019. pp.
[35] R. Tao, H. Wang. Y. Guo, H. Chen, L. Zhang, X. Liu, Y. Wei, and Y. Zhao, "Dual-view x-ray detection: Can ai detect prohibited items from dual-view x-ray images like humans?" in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2025.
[36] B. Ma. T. Jia, M. Li, S. Wu, H. Wang, and D. Chen, "Towards dual-view x-ray baggage inspection: A large-scal scale benchmark and adaptive hierarchical cross refinement for prohibited item discovery," IEEE Transactions on Information Forensics and Security (TTFS), pp. 1-1, 2024.
[37] R. Tao, T. Wang, Z. Wu, C. Liu, A. Liu, and X. Liu, "Few-shot x-ray prohibited item detection: benchmark and weak-feature enhancement network," in ACM International Conference on Multimedia (ACM MM), 2022, pp. 2012-2020
[38] R. Tao, H. I., T. Wang, Y. Wei, Y. Ding, B. Jin, H. 7hi, X. Liu, and A. Liu, "Exploring endogenous shift for cross-domain detection: A large-scale benchmark and perturbation suppression network," in IEFF/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEF, 2022, pp. 21 157-21 167.
[39] T. Jia, B. Ma, H. Wang, M. Li, S. Lin, and D. Chen, "Forknet: Overlapping image disentanglement for accurate prohibited item detection," IEEE Transactions on Instrumentation and Measurement (TIM), vol. 73, pp. 1-12, 2024.
[40] R. Tao, Y. Wei, X. Jiang, H. Li. H. Qin, Wang, Y. Ma, L. Zhang, and X. Liu, "Towards real-worhe x-ray security inspection: A high-quality benchmark and lateral inhibition module for prohibited items detection." " in IEEE/CVF Conference on Computer Vision and Puttern Recognition (CVPR), 2021, pp. 10923-10932.
[41] 7. Zhu, Y. Zhu, H. Wang, N. Wang, J. Ye, and X. Ling, "Fdmet: Enhancing frequency- aware representation for prohibited object detection from x-ray images via dual-stream transformers," Engineering Applications
12

---

of Artificial Intelligence (EAAT), vol. 133, p. 108076, 2024.
[42] H. Liao, B. Huang, and H. Gao, "Feature-awarc prohibited items detection for x-ray images," in IEEE International Conference on Image Processing (ICIP). IEEE, 2023, pp. 1040-1044.
[43] A. Vaswani. Shazeer, N. Parmar. J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. "Attention is all you need," Advances in Neural Information Processing Systems (NeurIPS), vol. 30, 2017.
[44] K. Cao, C. Wei, A. Gaidon, N. Arechiga, and T. Ma, "Learning imbalanced datasets with label-distribution- aware margin loss," Advances in Neural Information Processing Systems (NeurIPS), vol. 32, 2019.
[45] S. M. Kakade, K. Sridharan, and A. Tewari, "On the complexity of linear prediction: Risk bounds, margin bounds, and regularization." Advances Neural Information Processing Systems (NeurIPS), vol. 21. 2008
[46] L.. van der Maaten and G. Hinton, "Visualizing data using t-sne," Journal of Machine Learning Research (JMLR), vol. 9, no. 86, pp. 2579-2605, 2008.
[47] T.-Y. Lin, M. Maire, S. Belongie. J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick, "Microsoft coco: Common objects in context," in European Conference on Computer Vision (ECCV). Springer, 2014, pp. 740-755.
[48] M. Everingham, L.. Van Gool, C. K. Williams, Winn, and A. Zisserman, "The pascal visual object classes (voc) challenge," International Journal of Computer Vision (ICV), vol. 88, pp. 303-338, 2010.
[49] K. Chen, J. Wang. J. Pang. Y. Cao, Y. Xiong, X. Li. S. Sun, W. Feng, Z. Liu, J. Xu, Z. Zhang, D. Cheng. C. Zhu, T. Cheng, Q. Zhao, B. Li, X. Lu, R. Zhu, Y. Wu, J. Dai, J. Wang, J. Shi, W. Ouyang, C. C. Loy, and D. Lin, "MMDetection: Open mmlab detection toolbox and benchmark," arXiv preprint arXiv: 1006,0996..555 07155, 2019.
[50] S. Ren, K. He, R. Girshick, and J. Sun, "Faster r-cnn: Towards real-time object detection with region proposal networks," IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), vol. 39, 06, pp. 1137-1149, 2017.
[51] K. He. G. Gkioxari, P. Dollár, and R. Girshick, "Mask r-enn," in International Conference on Computer Vision (ICCV), 2017, pp. 2961-2969.
[52] C. Zhu, Y. He, and M. Savvides, "Feature selective anchor-free module for single-shot object detection," in 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019, pp. 440-849.
[53] Z. Tian, C. Shen, H. Chen, and T. He, "Feos: Fully convolutional one-stage object detection," in Interna- tional Conference on Computer Vision (ICCV), 2019. pp. 9627-9636.
[54] S. Zhang. C. Chi, Yao, Lei, and S. Z. Li, "Bridging the gap between mnchor-based and anchor-free detection via adaptive training sample selection," in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020, pp. 9759-9768.
[55] H. Zhang, Y. Wang, F. Dayoub, and N. Sunderhauf, "Varifocalnet: An iou-aware dense object detector," in IEEE/CVF Conference Computer Vision and Pattern Recognition (CVPR), 2021, pp. 8514-8523.
[56] C. Feng, Y. Zhong, Y. Gao, M. Scott, and W. Huang, "Tood: Task alikead one-stage object detection," " in International Conference on Computer Vision (ICCV). IEEE Computer Society, 2021, pp.
[57] K. Li, Y. Wang. J. Zhang, P. Gao, G. Song, Y. Liu, H. Li, and Y. Qiao, "Uniformer: Unifying convolution and self-attention for visual recognition." IEEE Transactions on Puttern Analysis and Machine Intelligence (TPMAI), vol. 45, no. 10, pp. 181 12 600, 2023.
[58] Z. Cai and N. Vasconcelos, "Cascade r-cmn: Delving into high quality object detection," " in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2018
[59] H. Zhang, H. Chang, B. Ma, N. Wang, and X. Chen, "Dynamic r-can: Towards high quality object detection via dynamic training." in European Conference on Computer Vision (ECCV). Springer, 2020, pp. 260-275.
[60] Y. Xu, Q. Zhang, Su, and Y. Lu, "Pixdet: Prohibited item detection in x-ray image based whole- process feature fusion and local-global semantic dependency interaction," " JEEE Transactions on Instru- mentation and Measurement (TIM), vol. 72, pp. 1-17, 2023.
[61] W. Li, Z. Fan, Huo, and Y. Gao, "Modeling inter-class and intra-class constraints in novel class discovery," in IEEE/CVF Conference Computer Vision and Pattern Recognition (CVPR), 2023, pp. 3449 3458.
[62] H. Chen, B. Lagadec, and F. Bremond, "Ice: Inter-instance contrastive encoding for unsupervised person re-identification"" in International Conference on Computer Vision (ICCV), 2021, pp. 14 14900-1499 969.
13

---

Appendix
A Comparison with SOTA Models of CLCXray
We further conduct experiments to verify the superiority of C-AO-DETR on the fine-grained dataset for cutters and liquid containers, CLCXray [6. As shown in Tab. 5 C-AO-DETR obtains the highest AP of 63.1% among general objectors, including models like Cascade R-CNN, Dynamic R-CNN, and VarifocalNet, well prohibited item detectors, such DOAM, LAreg, and ForkNet. It is worth mentioning that, although our model uses Swin-L as the backbone, resulting in a relatively high number of parameters, the smaller input image size of 512x51> 12 reduces the model's computational complexity, making it slightly lower than the previously state-of thre--r-t dual mnal-backbone prohibited item detector, ForkNet.
Table 5: Comparison with state-of offte-of-thhear general detectors on CLCXray.
Method
Backbone
AP
AP
AP
APs
APM
APr
PARAMs
FLOPS
Cascade R-CNN 58
ResNet-50
58.4
71.4
68.4
6,8
31,5
63.8
77.06M
1789.9G
Dynamic R CNN
59
ResNet-50
56.7
70.9
66.9
2.7
28.5
62.8
41.75M
176.1G
Varifocal
55
ResNet-50
55.3
68.3
64.6
3.4
29.4
60.9
32.74M
159.7G
TOOD
56
ResNet-50
57.9
71.1
66.5
6.7
34.8
63.4
32.01M
165.9G
DOAM
ResNet-50
54.3
68.5
63.5
27.3
59.9
LAreg
ResNet-50
58.5
70.9
67.7
12.6
30.5
63.8
LAcls 6
ResNet-50
59.3
71.8
68.2
23.0
32.4
64.5
PIXDet 60
CFB
60.4
72.4
69.4
25.3
31.7
66.0
ForkNet 39
R50&
61.0
73.5
69.4
31.1
36.3
63.4
39.81M
224.6G
ForkNet 39
RI0I&R18
62.0
74.0
71.4
35.6
41.9
67.7
55.95M
278.5G
C-AO-DETR(oury)
Swin-L
63.1
74.6
72.6
49.4
36.7
68.9
229.0M
276.5G
B Comparison with other contrastive losses.
take the last two representative contrastive losses as examples to analyze the advantage of our CSP loss.
ICC loss [6]]. The inter-class Repulsion function of the IIC loss based on Kullback-Leiller divergence, as follows:
LSKLD -- (DKL + (PL()))P!
where p¹ and pd compose negative sample pairs, while i and j are the sample index number.
Weakness: This method designed for comparing only two classes of samples. In the multi-class, multi-sample space, applies the same strength of inter-class repulsion across all categories, and does not ensure that inter-class content queries of similar categories maintain sufficient differences to learn discriminative identifying features.
The intra-class Attraction function of IIC loss is follows:
1 N Σ Dku(pille)) + Dr (Pilp))
L
(10)
where pi is the probability distribution of augmented data, which forms positive sample pairs with pt- This constraint helps the model learn consistent feature representations of intra-class.
Weakness: It doesn't have the gradient truncation mechanism like our ITA loss (Eq. 6 to prevent excessive homogenization of intra-class content queries.
ICE loss 622 The intra-class Attraction function of the ICE loss:
exp ((fi, (ff.,m)) Thine)
)
Lhins
E
log
(11)
J+1 1i
exp (1ss my)/ Theme)
14

---

where mi represents the hardest positive instance for anchor fi, and Thins is the temperature hyper- parameter. This method is essentially the InfoNCE loss [33] with a special construction method of positive sample pairs, and it only considers the furthest intra-class sample from the anchor/center.
Weakness: It will also lead the intra-class content queries to lose the necessary differences, it lacks a gradient truncation mechanism like our ITA loss, which prevents intra-class homogenization.
The intra-class Attraction function of the ICE loss:
Lsn (K
(12)
where P and Q represent the distributions inter-instance similarities before and after augmentation. It is based on KLD loss and its defects the same as previously mentioned IIC loss.
Overall, compared with other existing contrastive losses, our CSP loss, through the intra-class gradient truncation and inter-class adaptive repulsion mechanisms, ensures that intra-class content queries do not become homogenized, preserving the necessary feature diversity within the class, while also ensuring that inter-class content queries align with the class prototypes' feature distribution, learning discriminative identifying features for similar categories.
C
The significance of the alignment.
Aligning class prototypes with content queries essentially utilizes class prototypes attract the content queries to prevent them from drifting into irrelevant regions in the feature space specific to the corresponding category, thereby correcting and supplementing the missing semantic information. Specifically, this alignment serves two purposes as follows:
1. Correcting the misguiding information caused by overlapping background features: After being trained on X-ray images with overlapping phenomena, the content queries can be- come ambiguous and misled by irrelevant background information. Aligning the content queries with class prototypes enables the queries to focus on the features specific to their corresponding categories, thereby correcting the noisy information in the queries caused by the overlapping background in the training phase.
2. Supplying the missing semantic information caused by the integration of positional encoding information in the decoder phase: As shown in Section 3.1 in the training phase, more and more positional encoding information is integrated into the content queries, which leads to the missing and catastrophic forgetting of the original class semantic information. The class prototypes are composed of classifier weights, which have learned the reliable inherent class semantic priors. Therefore, the alignment can ensure that the content queries do not deviate too much from the category semantic priors, supplying the missing and forgetting category semantic information.
As shown in Figure cc), the content queries of the original DINO are scattered randomly in the feature space and are far from the class prototypes (indicating low correlation between them). In contrast, as shown in Figure d), after the alignment, the intra-class queries are clustered and distributed around their corresponding class prototypes (classifier weights). This also demonstrates that, through the alignment effect of CSPCL, the content queries supplemented with effective category semantic information.
D Limitations
The CSPCL mechanism performs exceptionally well on X-ray image datasets with overlapping instances, typically helping to improve the model's AP (Average Precision) by over 1%. However, on natural light image datasets such as COCO [47], where there no feature coupling phenomenon. CSPCL only contributes to an AP improvement of about 0.1%. We are currently delving into the reasons behind this and exploring ways to further refine the CSPCL strategy and CSP loss to extend its application to general object detection datasets.
15

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification:
We have discussed them on page and page 2.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or
NA answer to this question will not perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results be expected to generalize other settings.
is fine include aspirational goals as motivation as long is clear that these goals are not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification:
We have discussed about that in the supplementary material.
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those not discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification. asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low images are taken in low lighting. Or speech-to-text system might be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach address problems of privacy and faimess.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [NA]
16

---

Justification: We do not have theoretical contributions in this work, where our contributions are validated with experiments.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Question:
Answer: [Yes]
Justification: All the hyper-parameters and network organizations are provided in the main paper and the appendix. Additionally, the code is included in the supplementary materials
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is novel architecture, describing the architecture fully might suffice, or if the contribution a specific model and empirical evaluation, it may be necessary either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of large language model), releasing of a model checkpoint, or other means that appropriate to the research performed.
While NeurlPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) the contribution is primarily a new algorithm, the paper should make clear how reproduce that algorithm. (b) If the contribution is primarily new model architecture, the paper should describe the architecture clearly and fully.
(c) the contribution is a new model (e.g., a large language model), then there should either be way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome deseribe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should possible for other researchers to have some path to reproducing or verifying the results.
5. Open access to data and code
17

---

Question: Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [No]
Justification: The code is included in the supplementary materials, and it will be open sourced upon acceptance of the paper.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurIPS code and data submission guidelines (https://nips... cc/
Polooyllllyyyooyyoooolo for more details.
While encourage the release of code and data, understand that this might not be possible, so "No" an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurlPS code and data submission guidelines (https
//nips.ccpublle pwwppppguuuiiieeeee httpa///guidessoeeeuubbissss SooodeSubiissi.e ssiiiioicccy for more details.
The authors should provide instructions data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) recommended, but including URLs to data and code permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification:
The experimental setup and implement details provided in Sec. 4.1
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer:
[No]
Justification:
We follow existing related works for the setting of error bars.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi-
dence intervals, statistical significance tests, least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for
example, train/test split, initialization, random drawing of some parameter, or overall with given experimental conditions).
18

---

The method for calculating the error bars should be explained (closed form formula, call a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation the standard error of the mean.
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful figures symmetric error bars that would yield results that are out of range (e.g. negative rates).
show in tables or
If error bars are reported in tables or plots, The authors should explain the text how they were calculated and reference the corresponding figures tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: We provide information on the compute memory and model efficiency in Sec. and Tab.
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make into the paper).
9. Code of ethics
Question: Does the research conducted the paper conform, in every respect, with the NeurlPS Code of Ethics https: pestpa://neuripeee
Answer: [Yes]
Justification:
We have reviewed that and claim conform that Code of Ethics.
Guidelines:
The answer NA means that the authors have reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., there a special consid- eration due to laws or regulations in their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive socictal impacts and negative societal impacts of the work performed?
Answer: [No]
Justification: Our work is only for academic research purpose.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
19

---

Examples of negative societal impacts include potential malicious unintended uses (e.g., disinformation, generating fake profiles, surveillance), faireess considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms monitor how system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Does the paper deseribe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification:
The paper does not have such risks.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification:
We have cited them in the references.
Guidelines:
The answer NA means that the paper does use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset used and, possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website). the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms use in package should be provided. For popular datasets, paperswithcone com/ datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
20

---

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if has changed) should be provided.
this information is not available online, the authors are encouraged to reach out to the asset's s creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [NA]
Justification: We and cite existing datasets in this work. Other assets including code/model will be released after submitting.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/moodl as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification:
This paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According to the NeurIPS Code Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: This paper does involve crowdsourcing research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere the NeurIPS Code of Ethics and the guidelines for their institution.
21

---

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is important, original, or non-standard component of the core methods this research? Note that the LLM is used only for writing. editing, formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.
Answer: [NA]
Justification: The core method development in this research does involve LLMs any important, original, or non-standard components.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs as any important, original, non non-standard components.
Please refer to LLM policy for what should or should not be described.
22


Reviews:
[{"review_id": "6X3oxyl6So", "reviewer": "Reviewer_BMUt", "summary": "This paper focuses on improving prohibited item detection in X-ray images, where the main challenge lies in the overlapping of objects that causes foreground-background feature coupling—something general object detectors struggle with. To tackle this, the authors propose a Category Semantic Prior Contrastive Learning (CSPCL) framework, which enhances the model’s ability to focus on foreground features by aligning class prototypes with content queries during training. The method is evaluated on multiple X-ray datasets (PIXray, OPIXray, PIDray, and CLCXray), showing consistent improvements over existing state-of-the-art methods.", "questions": "Please see Weaknesses.", "limitations": "Lack of sufficient (theoretical) explanation:\nThe paper lacks a clear theoretical justification or intuitive explanation for the core claim that aligning class prototypes with content queries can correct and supplement missing semantic information. The logical connection between these el（ements is not fully established.\n\nUnfair experimental comparisons:\nThere are differences in experimental settings between C-AO-DETR and the comparison methods (e.g., DN-DETR), such as using a stronger backbone or more favorable training configurations. This makes it difficult to determine whether the performance improvements truly come from the proposed method itself.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 3, "significance": 2, "originality": 2, "strengths_and_weaknesses": "Strengths\n1. A plug-and-play module that can be integrated into Deformable DETR-based detectors without increasing inference complexity.\n2. Better performance than baseline methods.\n\nWeaknesses\n1. Why aligning class prototypes with content queries can correct and supplement the missing semantic information is not immediately clear. The connection between the two is not direct, and the authors need to provide further explanation.\n2. Compared to existing DETR-based methods, what are the specific advantages of the approach proposed in this paper? In addition, the paper should also clarify the advantages of DETR-based methods over non-DETR-based methods.\n3. The performance of AO-DETR on PIDray in Table 3 is missing. This result is crucial for evaluating the effectiveness of the proposed method.\n4. The settings of C-AO-DETR (ours) and the comparison methods are different, which raises the question of whether the performance improvement comes from a better backbone or other configuration choices, rather than from the proposed method itself.\n5. The design of inter-class and intra-class losses is not novel, as it is conceptually very similar to approaches like triplet loss and contrastive loss. This limits the overall novelty of the paper.", "was_revised": true, "final_justification": "Apart from the last loss being somewhat limited in terms of novelty, my other concerns have been well addressed by the authors. Overall, I have raised my score.", "rebuttal": "Thank you for the detailed comments and valuable feedback! We provide our point-to-point responses below.\n\n**1 Why aligning class prototypes with content queries can correct and supplement the missing semantic information is not immediately clear. The connection between the two is not direct, and the authors need to provide further explanation.**\n\nSorry for the confusion! This alignment serves two purposes as follows:\n\n(1)\tCorrecting the misguiding information caused by overlapping background features: After being trained on X-ray images with overlapping phenomena, the content queries can become ambiguous and misled by irrelevant background information. Aligning the content queries with class prototypes enables the queries to focus on the features specific to their corresponding categories, thereby correcting the noisy information in the queries caused by the overlapping background in the training phase.\n\n(2)\tSupplying the missing semantic information caused by the integration of positional encoding information in the decoder phase: As shown in Sec. 3.1 of the original paper, in the training phase, more and more positional encoding information is integrated into the content queries, which leads to the missing and catastrophic forgetting of the original class semantic information. The class prototypes are composed of classifier weights, which have learned the reliable inherent class semantic priors. Therefore, the alignment can ensure that the content queries do not deviate too much from the category semantic priors, supplying the missing and forgetting category semantic information.\n\nMoreover, as shown in Fig. 4(c) of the original paper, the content queries of the original DINO are scattered randomly in the feature space and are far from the class prototypes (indicating low correlation between them). However, as shown in Fig. 4(d), after the alignment, the intra-class queries are clustered and distributed around their corresponding class prototypes (classifier weights). This also demonstrates that, through the alignment effect of CSPCL, the content queries are supplemented with effective category semantic information.\n\n**2.1 Compared to existing DETR-based methods, what are the specific advantages of the approach proposed in this paper?**\n\nCSPCL compensates for the core flaw of \"category semantic ambiguity in content queries\" in DETR-based models. Existing DETR-based methods (e.g., Deformable DETR, DINO) reduce model complexity and improve convergence speed with deformable attention, while reference point designs strengthen the spatial information of queries in the decoder (e.g., Conditional DETR, Anchor-DETR, DAB-DETR). Denoising training (e.g., DN-DETR, DINO) optimizes the stability of bipartite graph matching, and improved label assignment strategies (e.g., Stable-DINO, Group-DETR, H-DETR, Co-DETR) enhance the quality and quantity of samples for queries. However, these methods do not provide explicit class semantic guidance for content queries, leading to the loss of classification-related features during iterations.\n\nCSPCL addresses this by using classifier weights as class prototypes, forcing content queries to align with the inherent feature distributions of their corresponding class prototypes (as shown in Fig. 1 of the original paper). This directly compensates for the core flaw of \"category semantic ambiguity in content queries\" in DETR, allowing the model to more effectively perceive and extract foreground information of specific classes from the overlapping features in X-ray images, as shown in Fig. 5a.\n\n**2.2 In addition, the paper should also clarify the advantages of DETR-based methods over non-DETR-based methods.**\n\nDETR-based methods use a Transformer encoder-decoder architecture, where queries in the decoder serve as prompts, incorporating various priors, such as category semantic priors (our paper) or location and size priors (Conditional DETR, Anchor DETR, and DAB DETR). In contrast, non-DETR methods like YOLO and Faster R-CNN rely only on anchor boxes to provide spatial priors, which is more limited.\n\nDETR-based methods eliminate the need for anchor generation and NMS post-processing, simplifying the workflow and avoiding manual hyperparameter tuning for different datasets.\n\n**3 The performance of AO-DETR on PIDray in Table 3 is missing. This result is crucial for evaluating the effectiveness of the proposed method.**\n\nThank you for your suggestion. We have now added the experimental results of AO-DETR on PIDray:\n|Method |Backbone |Image Size| AP_{easy} |AP_{hard} |AP_{hidden} |AP_{overall}| PARAMs |FLOPs|\n|-|-|-|-|-|-|-|-|-|\n|AO-DETR | Swin-L | $512\\times512$ | 81.8 |72.6 |55.7 |70.0| 229.0M |276.5G|\n|$C$-AO-DETR (ours) | Swin-L | $512\\times512$ | 82.2 |73.3 |56.9 |**70.8**(+0.8)| 229.0M |276.5G|\n\nOur CSPCL improves AO-DETR’s AP by 0.8.\n\n**4 The settings of C-AO-DETR (ours) and the comparison methods are different, which raises the question of whether the performance improvement comes from a better backbone or other configuration choices, rather than from the proposed method itself.**\n\nThank you for your valuable suggestion. Our original intention was to train the best prohibited item detector, which led us to overlook the fairness of the comparison in Tab. 3 of the original paper. For fairness, we train C-AO-DETR (ResNet-101) on the PIDray dataset, and the comparison results are as follows:\n|Method |Backbone |Image Size| AP_{easy} |AP_{hard} |AP_{hidden} |AP_{overall}|\n|-|-|-|-|-|-|-|\nSDANet |ResNet-101 |500 × 500 |71.2 |64.2 |49.5 |61.6 \nForkNet | ResNet-101| 500 × 500| 75.0| 66.9 |58.6 |66.8\n|$C$-AO-DETR (ours) | ResNet-101 | 500 × 500|**76.1**|**69.2**|**61.5**|**68.9**|\n\nUnder the same backbone network and image size, C-AO-DETR outperforms the latest prohibited item detectors SDANet and ForkNet. This result will be added to Tab. 3 in the original paper.\n\nPlease note that different types of models are suited for different optimizers and learning rates. For example, CNN-based SDANet and ForkNet use the SGD optimizer, while the DETR-based C-AO-DETR uses AdamW. Additionally, the optimal learning rate, momentum, and weight decay differ for each optimizer. Therefore, we used the default training strategy for each model's configuration. Furthermore, C-AO-DETR achieves the best performance at epoch 14, whereas SDANet was trained for 80 epochs with an early stopping strategy, and ForkNet did not specify its training strategy in the paper, nor is the code open-sourced.\n\n**5 The design of inter-class and intra-class losses is not novel, as it is conceptually very similar to approaches like triplet loss and contrastive loss. This limits the overall novelty of the paper.**\n\nThank you for your valuable suggestion. We have conducted a comprehensive comparison and analysis of the three methods, along with experimental validation, and concluded that the CSP loss proposed in this paper is superior.\n\n(1) Triplet Loss: $$L_{Triplet}=max(d(a,p)−d(a,n)+α,0)$$\nWhere $a$ and $p$ compose positive sample pair, while $a$ and $n$ compose negative sample pair. margin α is constant. $d()$ is the euclidean distance/similarity. Triplet loss only ensures the distance between $p$ and $n$ is over margin α.\n\n Weaknesses:\n1. Inter-class repulsion issue: Since the margin α is constant, it does not incorporate any adaptive mechanism for the similarity between categories, meaning it applies the same repulsion regardless of how similar the categories are (e.g., knife and saw).\n2. It is only applicable to triplet samples and cannot directly apply to multi-sample multi-class tasks.\n\n(2) Contrastive Loss: $$L_{Contrastive}=(1−y)⋅d²+y⋅max(m−d,0)²$$\nWhere $y$ is 0 if the sample pair is considered from intra-class and 1 otherwise, $d$ is the Euclidean distance of the sample pair, and $m$ is a margin.\n\nWeaknesses: Contrastive loss pulls positive pairs together and pushes negative pairs apart but uses a fixed margin $m$. This approach does not adapt to the similarities between classes, which could be problematic when distinguishing highly similar categories (e.g., knife and saw).\n\n(3) CSP Loss:\n\nCSP loss, as shown in Eq.(5-8) of original paper, beats Triplet loss and Contrastive loss by two mechanisms:\n\n1. Gradient truncation mechanism $\\mathcal{T}(x,\\gamma)$ in ITA ensures that intra-class diversity is preserved once similarity exceeds a threshold, avoiding over-homogenization of content queries within the same class.\n\n2. Adaptive repulsion factor $R(k_1,k_2)=e^{1-\\tau\\cdot\\big(1-\\text{sim}(\\mathbf{p}_i^{k_1},\\mathbf{p}_j^{k_2})\\big)}$ in IAR strengthens the repulsion between highly similar categories (like knife and saw) and weakens it for dissimilar categories (like knife and fireworks). This nuanced adjustment ensures that inter-class content queries align with the class prototypes' feature distribution, learning discriminative identifying features for similar categories, thereby improving the model's ability to distinguish between subtly different categories.\n\n**Experiments**: We also tried transforming triplet loss and contrastive loss into forms suitable for multi-sample multi-class contrastive learning. By defining inter-class pairs as negative samples and intra-class pairs as positive samples, we reduced the task to a triplet problem and tested different margin values (0.9, 0.7, 0.5) in a set of experiments on PIXray. The results show that our method outperforms these two methods:\n| Mthoed | AP | AP$_{50}$| AP$_{75}$ | AP$_S$ | AP$_M$ | AP$_L$ |\n|-|-|-|-|-|-|-|\n| DINO |64.3 |86.5 |71.0| 19.3 |48.9 |73.9 |\nDINO+Triplet($\\alpha=0.9$)|64.4|86.5|71.5|19.2|48.7|73.9\nDINO+Triplet($\\alpha=0.7$)|64.1|86.3|70.2|19.0|48.8|73.5\nDINO+Triplet($\\alpha=0.5$)|63.7|85.7|70.0|19.1|47.9|73.4\nDINO+Contrastive($m=0.9$)|64.9|87.1|71.5|20.0|48.9|73.8\nDINO+Contrastive($m=0.7$)|64.8|86.8|71.3|19.5|49.3|74.1\nDINO+Contrastive($m=0.5$)|64.4|86.4|71.2|19.4|48.8|73.6\nDINO + CSP (our)| **67.5** (+3.2)| 88.7 |74.6 |23.3 |52.3 |76.8"}, {"review_id": "PWIj3odSbg", "reviewer": "Reviewer_eTaq", "summary": "This paper proposes CSPCL, a Category Semantic Prior Contrastive Learning mechanism designed to enhance Deformable DETR-based object detectors for X-ray security imagery, particularly for detecting prohibited items. The method introduces a novel CSP loss, composed of Intra-Class Truncated Attraction (ITA) and Inter-Class Adaptive Repulsion (IAR), to align content queries with class prototypes (classifier weights), thereby correcting and supplementing the semantic information degraded by overlapping features. CSPCL is plug-and-play, architecture-agnostic, and demonstrates consistent performance gains across four datasets and multiple backbone models.", "questions": "1. Does the model trained with this loss generalize well to other downstream tasks, such as zero-shot or open-set detection?\n\n2. Could you provide additional visual results—for example, ten more examples—similar to those shown in Figure 5?", "limitations": "Yes, the authors discuss limitations in supplementary material.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 2, "significance": 2, "originality": 2, "strengths_and_weaknesses": "Strengths:\n1. This paper focuses on a critical issue in the field of X-ray detection.\n2. The proposed plug-and-play CSPCL outperforms classic contrastive learning methods—such as N-pair and InfoNCE losses—in enhancing anti-overlapping detection capability.\n3. Experiments demonstrate the effectiveness of the proposed CSPCL for X-ray image detection.\n\nWeaknesses:\n1. I observe that the backbone of proposed  C-AO-DETR is Swin-L, which is inherently more powerful than those used in the other baselines; moreover, the input image sizes vary across methods, making the comparison unfair\n2. The paper only compares against relatively old contrastive losses (InfoNCE, N-pair), none of which were designed specifically to improve anti-overlapping detection. The authors should include more recent loss functions to further validate their approach\n3. The models listed in Table 2 are quite similar; the authors should evaluate a broader range of more recent, diverse architectures to strengthen their analysis.", "was_revised": true, "final_justification": "My concerns have been addressed.", "rebuttal": "Thank you for the detailed comments and valuable feedback! We provide our point-to-point responses below.\n\n**1. I observe that the backbone of proposed C-AO-DETR is Swin-L, which is inherently more powerful than those used in the other baselines; moreover, the input image sizes vary across methods, making the comparison unfair**\n\nThank you for the valuable advice!\n\nOur original intention was to train the most powerful prohibited item detector, which led us to overlook the fairness of the comparison in Tab. 3 of the original paper.\n\nFor fairness, we train C-AO-DETR with the same backbone network, ResNet-101, on the PIDray dataset:\n|Method |Backbone|Image Size| AP_{easy} |AP_{hard} |AP_{hidden} |AP_{overall}|\n|-|-|-|-|-|-|-|\nFCOS|ResNeXt-101-64x4d |1333×800|72.9| 63.4 |51.1| 62.5\nFSAF|ResNeXt-101-64x4d |1333×800|71.0| 61.9 |50.7| 61.2\nSDANet|ResNet-101|500×500 |71.2|64.2 |49.5|61.6 \nForkNet|ResNet-101| 500×500|75.0| 66.9|58.6 |66.8\nC-AO-DETR (ours)| ResNet-101| 500 × 500|**76.1**|**69.2**|**61.5**|**68.9**\n\nUnder the same backbone and image size, C-AO-DETR still outperforms other SOTA prohibited item detectors, SDANet and ForkNet. Furthermore, general object detectors, such as FCOS and FSAF, even with more powerful backbones (ResNeXt-101-64x4d) and larger image sizes (1333 × 800), still fail to surpass C-AO-DETR in the prohibited item detection task.\n\nThis result will be added to Table 3 in the original paper.\n\n**2. The paper only compares against relatively old contrastive losses (InfoNCE, N-pair), none of which were designed specifically to improve anti-overlapping detection. The authors should include more recent loss functions to further validate their approach**\n\nThanks for your valuable advice! We have added an analysis and comparison of three recent works on contrastive losses, including **MMCL[1], IIC loss [2], and ICE loss [3]**.\n\n**（1）MMCL [1]：**\nMMCL is a recent and only work that uses contrastive learning to improve the anti-overlapping detection ability of Deformable DETR-based models. MMCL groups content queries and applies orthogonal repulsion between groups, enabling content queries to learn different category semantic information. However, this orthogonal repulsion does not align with the true distribution of class prototypes among the samples. As shown in Fig. 1 of our original paper, the representations of knife and saw are closer together in feature space than those of knife and fireworks, because knife and saw share more similar color, texture, and contour information compared to knife and fireworks. Consequently, the inter-class orthogonal repulsion in MMCL hinders content queries from learning the true category semantics, particularly for similar categories, such as knife and saw.\n\n**Analysis MMCL with Formulas:**\nThe inter-class repulsion function of MMCL:\n$$L_{MIE}(Q, K) = -\\frac{1}{K(K-1)n^2} \\sum_{k_1=1}^{K} \\sum_{k_2=1}^{K} \\sum_{i=1}^{n} \\sum_{j=1}^{n}\n1[|k_1 \\neq k_2|] \\cdot \\log(1 - sim(q_i^{k_1},q_j^{k_2})),$$ \nwhere sim() represents the cosine similarity, $q_i^{k_1}$ represents the $i$-th content query from the $k_1$-th group, and $q_j^{k_2}$ is the $j$-th content query from the $k_2$-th group.\n\nWeakness: This method lacks the correct guidance from class prototypes, and it simply applies equivalent repulsion between content queries from different groups, making them tend toward orthogonality.\n\n**Improving the MM loss using the CSPCL strategy:**\n\nFurther, following our CSPCL strategy, if we try to replace $q_i^{k_1}$ with the class prototypes $p_i^{k_1}$, the inter-class repulsion formula of MMCL would be as:\n$$L_{MIE-CSPCL}(Q, K) = -\\frac{1}{K(K-1)n^2} \\sum_{k_1=1}^{K} \\sum_{k_2=1}^{K} \\sum_{i=1}^{n} \\sum_{j=1}^{n}\n1[|k_1 \\neq k_2|] \\cdot \\log(1 - sim(p_i^{k_1},q_j^{k_2}))$$ \n\nWeakness: This method lacks the adaptive repulsion mechanism and just makes inter-class content queries orthogonality.\n\n**The advantages of our CSPCL:** Adaptive repulsion factor $R(k_1,k_2)=e^{1-\\tau\\cdot\\big(1-\\text{sim}(\\mathbf{p}_i^{k_1},\\mathbf{p}_j^{k_2})\\big)}$ in IAR strengthens the repulsion between highly similar categories (like knife and saw) and weakens it for dissimilar categories (like knife and fireworks). This nuanced adjustment ensures that inter-class content queries align with the class prototypes' feature distribution, learning discriminative identifying features for similar categories, thereby improving the model's ability to distinguish between subtly different categories in overlapping scenes.\n\n**Analysis with Experimental Results on PIXray:**\n| Mthoed | AP | AP$_{50}$| AP$_{75}$ | AP$_S$ | AP$_M$ | AP$_L$ |\n|-|-|-|-|-|-|-|\nDINO |64.3 |86.5 |71.0| 19.3 |48.9| 73.9\nDINO + MM loss(MMCL) |66.7| 87.5| 74.4 |23.5| 50.7 |75.5\nDINO + MM-CSPCL loss|67.0|87.6|74.3|23.3|51.4|75.9\nDINO + CSP loss(our CSPCL) |67.5 (+3.2) |88.7 |74.6| 23.3 |52.3 |76.8\n\nIn this table, MM-CSPCL loss refers to replacing the inter-class repulsion part of MMCL’s MM loss, namely the MIE loss, with the MIE-CSPCL loss. The result shows that MM-CSPCL loss outperforms the basic MM loss, proving the effectiveness of the CSPCL mechanism in guiding content queries using class prototypes. Furthermore, CSP loss outperforms both MM loss and MM-CSPCL loss, demonstrating that our CSP loss helps content queries learn more accurate category semantics, thereby enhancing the model’s ability to handle overlapping detection tasks.\n\n**（2）IIC loss [2]：**\nInter-class Repulsion function is based on Kullback-Leibler divergence, as follows：\n$$L_{sKLD} = -\\frac{1}{2} \\left( D_{KL}(p^l_i || p^u_j) + D_{KL}(p^u_j || p^l_i) \\right)$$\nwhere $p^l$ and $p^u$ compose negative sample pairs, while $i$ and $j$ are the sample index number.\n\nWeakness: This method is designed for comparing only two classes of samples. In the multi-class, multi-sample space, it applies the same strength of inter-class repulsion across all categories, and does not ensure that inter-class content queries of similar categories maintain sufficient differences to learn discriminative identifying features.\n\nIntra-class Attraction function：\n$$L=\\frac{1}{N}\\sum_{i=1}^N D_{KL}(p_l||\\hat{p_l}) + D_{KL}(\\hat{p_l}||p_l)$$\nwhere $\\hat{p_l} $ is the probability distribution of augmented data, which forms positive sample pairs with $p_l$. This constraint helps the model learn consistent feature representations of intra-class.\n\nWeakness: It doesn't have the gradient truncation mechanism like CSPCL (Eq. 6 in the original paper) to prevent excessive homogenization of intra-class content queries.\n\n**（3）ICE loss [3]:**\n\nIntra-class Attraction function: \n$$L_{hins}=E\\left[-\\log\\left(\\frac{\\exp\\left(\\langle f_i,m_k^i\\rangle /\\tau_{h_{ins}} \\right)}{\\sum_{j=1}^{J+1} \\exp \\left(\\langle f_i,m_j\\rangle/\\tau_{h_{ins}} \\right)}\\right)\\right]$$\nWhere $m_k^i$ represents the hardest positive instance for anchor $f_i$, and $\\tau_{h_{ins}}$ is the temperature hyperparameter. This method is essentially the InfoNCE loss with a special construction method of positive sample pairs, and it only considers the furthest intra-class sample from the anchor/center. \n\nWeakness: It will lead the intra-class content queries to lose the necessary differences, as it lacks a gradient truncation mechanism like the ITA loss in our paper, which prevents intra-class homogenization.\n\nIntra-class Attraction function：\n$$Ls_{ins} = D_{KL}(P || Q)$$\nWhere $P$ and $Q$ represent the distributions of inter-instance similarities before and after augmentation. It is based on KLD loss and its defects are the same as previously mentioned IIC loss.\n\n**3.1 The models listed in Table 2 are quite similar;**\n\nCSPCL is specifically designed for the decoder structure of Deformable DETR models, and we validated its effectiveness on a series of Deformable DETR-based models, in Tab. 2, whose structures and focuses differ. Specifically, RT-DETR focuses on real-time detection with an efficient hybrid encoder to process multi-scale features. DINO emphasizes model convergence speed and optimizes bipartite graph matching stability with a contrastive denoising training strategy. AO-DETR focuses on anti-overlap detection with CSA strategy and LFD scheme to improve foreground classification and localization. Despite their different structures and training strategies, all follow the Deformable DETR decoder structure, so our CSPCL remains applicable, demonstrating strong generalization.\n\n**3.2 the authors should evaluate a broader range of more recent, diverse architectures to strengthen their analysis.**\n\nThank you for the valuable advice!\n\nOn the necessity of extending to more recent architectures:\nTo the best of my knowledge, Deformable DETR-based models are currently the most advanced and accurate Transformer-based object detection architectures, outperforming CNN-based models like YOLO and Faster R-CNN.\n\nFeasibility analysis of extending CSPCL to other diverse architectures (CNN-based models):\nIn YOLO or Faster R-CNN architectures, due to the lack of an encoder-decoder structure (no content queries), CSPCL cannot be directly incorporated to leverage content queries for learning category semantic priors in the classifier. However, inspired by WEN [4], we can attempt to adaptively align and combine features from the backbone with classifier prototypes to supplement the foreground feature semantics and improve model performance. We will try our best to evaluate the feasibility of this approach and include the results in the revised version.\n\n[1] MMCL: Boosting Deformable DETR-Based Detectors with Multi-Class Min-Margin Contrastive Learning for Superior Prohibited Item Detection[J]. arXiv2024.\n\n[2] Li, Wenbin, et al. Modeling inter-class and intra-class constraints in novel class discovery.ICCV2023.\n\n[3] Chen, Hao, et al. Ice: Inter-instance contrastive encoding for unsupervised person re-identification. ICCV2021.\n\n[4] Tao, Renshuai, et al. Few-shot x-ray prohibited item detection: A benchmark and weak-feature enhancement network. ACMMM2022."}, {"review_id": "oifrjnqWqt", "reviewer": "Reviewer_GPtN", "summary": "This paper proposes a Category Semantic Prior Contrastive Learning (CSPCL) mechanism to improve prohibited item detection in Deformable DETR-based models, addressing the challenge of object overlapping in X-ray images. The core idea is to remedy the issue of content queries losing category-specific semantic information during the decoder's update process. CSPCL aligns content queries with class prototypes derived from the classifier's weights. This is achieved through a devised CSP loss, featuring two key components: an Inter-Class Adaptive Repulsion (IAR) loss that pushes dissimilar classes apart with a force proportional to their feature similarity, and an Intra-Class Truncated Attraction (ITA) loss that prevents feature homogenization by stopping attraction at a set threshold. The authors demonstrate that this plug-and-play module enhances performance across four datasets without increasing inference complexity.", "questions": "1.The proposed method defines class prototypes using the classifier's weights, which are simultaneously updated by both the classification loss and the new CSP loss. This raises a question about the stability of the prototypes. It is suggested that the authors discuss if this dual-update mechanism could cause the prototypes to become unstable, or merely reflect an average of the content queries rather than serving as a fixed semantic prior.\n\n2.The ITA loss is designed with a gradient truncation mechanism to preserve intra-class variance, with the stated goal of handling variations in object appearance. However, the direct benefit of this preserved variance is not empirically demonstrated. It is suggested that the authors provide a more direct analysis linking this specific design choice to a measurable improvement in performance, for example, on categories with high fine-grained diversity.\n\n3.The IAR loss utilizes an exponential function to scale the repulsion strength based on inter-class prototype similarity. The paper does not provide a justification for this specific mathematical choice. It is suggested that the authors explain why an exponential function was chosen over simpler alternatives, such as a linear scaling factor.\n\n4.The paper is ambiguous regarding which decoder layers the CSP loss is applied to, mentioning \"layer 1\" in one instance but a \"set of target layers\" () in the algorithm description. It is suggested that the authors clarify this crucial implementation detail and provide a clear justification for their choice.\n\n5.The core idea of using classifier weights as learnable class prototypes has been explored in prior literature such as ADAM[1]. It is suggested that the authors more clearly articulate the novelty of their approach in comparison to these existing works. A more explicit discussion of how the proposed CSP loss, particularly its adaptive and truncated nature, provides a distinct advantage over other prototype-based learning schemes would help to better situate the paper's contribution .\n\n[1]Zhou D W, Cai Z W, Ye H J, et al. Revisiting class-incremental learning with pre-trained models: Generalizability and adaptivity are all you need[J]. International Journal of Computer Vision, 2025, 133(3): 1012-1032.", "limitations": "Yes.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 3, "significance": 2, "originality": 2, "strengths_and_weaknesses": "Strengths\n1. The paper is well-motivated, clearly identifying a plausible weakness in Deformable DETR models to provide a justification for its proposed method.\n2. The paper proposes a practical method, as the CSPCL module is plug-and-play and adds no computational overhead during inference.\n\nWeaknesses\n1. The paper's originality seems limited. This paper appears to be an incremental improvement on existing contrastive learning works, which has been widely explored in various object detection architectures, such as [1] and [2]. The idea of inter-class and intra-class contrasts have also been adopted in previous studies, such as [3] and [4]. Specifically, there also exists a prototype-based contrastive learning work in X-ray prohibited items detection [5]. The proposed adaptive loss, while thoughtful, refines this existing foundation rather than introducing a new paradigm. Therefore, it’s suggested that the author should further address the above originality concerns.\n\n2. The paper lacks a direct experimental comparison with other X-ray detection methods. In table 3, none of the anti-overlapping methods (e.g. [6][7]) mentioned in related works are compared. Additionally, the most relevant competitors MMCL[8] that uses contrastive learning on DETR-based models for X-ray images is neglected. The baseline model AO-DETR is not compared, either. \nTherefore, it’s suggested that the author should conduct head-to-head comparisons with more X-ray detectors to empirically validate the claimed benefits of the proposed CSPCL.\n\n3. The SOTA comparison in Table 3 is difficult to interpret fairly due to an inconsistent baseline. The presented C-AO-DETR uses a Swin-L backbone, which is more powerful than the ResNet/ResNeXt backbones used by most competing methods listed in the table. This makes it difficult to attribute performance gains to the CSPCL module itself rather than to the superior capacity of its baseline architecture. \n\n4. The proposed method appears to have limited applicability beyond Transformer-based architectures. Similar to techniques that are exclusively applicable to CNN-based detectors, this work seems constrained to Transformer architectures. Moreover, the results in Table 3 show that the performance of Transformer-based detectors does not surpass the CNN-based Mask R-CNN. Therefore, it is recommended that the authors provide further explanation of the practical value of CSPCL.\n\n5. The paper does not clearly explain how the proposed method solves the object overlapping problem. The argument relies on indirect reasoning and a single qualitative example, rather than a quantitative analysis that directly measures performance on overlapping objects.\n\n6. The paper lacks a sufficient discussion of its key design choices. This includes the selection and sensitivity analysis of new hyperparameters , as well as the justification for which decoder layer to apply the proposed loss.\n\n[1]Wei, Fangyun, et al. \"Aligning pretraining for detection via object-level contrastive learning.\" Advances in Neural Information Processing Systems 34 (2021): 22682-22694. Li M, Jia T, Lu H, et al. \n\n[2]Xie, Enze, et al. \"Detco: Unsupervised contrastive learning for object detection.\" Proceedings of the IEEE/CVF international conference on computer vision. 2021.\n\n[3]Li, Wenbin, et al. \"Modeling inter-class and intra-class constraints in novel class discovery.\" Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2023.\n\n[4]Chen, Hao, Benoit Lagadec, and Francois Bremond. \"Ice: Inter-instance contrastive encoding for unsupervised person re-identification.\" Proceedings of the IEEE/CVF international conference on computer vision. 2021.\n\n[5]Tao, Renshuai, et al. \"Few-shot x-ray prohibited item detection: A benchmark and weak-feature enhancement network.\" Proceedings of the 30th ACM international conference on multimedia. 2022.\n\n[6]Y. Wei, R. Tao, Z. Wu, Y. Ma, L. Zhang, and X. Liu, “Occluded prohibited items detection: An x-ray security inspection benchmark and de-occlusion attention module,” in Proceedings of the 28th ACM International Conference on Multimedia, 2020, pp. 138–146.\n\n[7]C. Zhao, L. Zhu, S. Dou, W. Deng, and L. Wang, “Detecting overlapped objects in x-ray security imagery by a label-aware mechanism,” IEEE Transactions on Information Forensics and Security, vol. 17, pp. 998–1009, 2022\n\n[8]MMCL: Boosting Deformable DETR-Based Detectors with Multi-Class Min-Margin Contrastive Learning for Superior Prohibited Item Detection[J]. arXiv preprint arXiv:2406.03176, 2024.", "was_revised": true, "final_justification": "The authors have addressed most of my earlier concerns with thoughtful and detailed responses. However, the inter-class repulsion concept in CSPloss is relatively common, which limits the perceived novelty. For the X-ray prohibited items detection task, the loss design could be better tailored to challenges such as heavy occlusion and overlapping objects. Overall, given the improvements and clarifications provided, I lean towards a borderline accept.", "rebuttal": "Thank you for the detailed comments and valuable feedback! We provide our point-to-point responses below. **Please note! Due to the rebuttal character limit, for questions that have already been addressed in other reviewers' comments, we will only display the reviewer's name and the question number. Please check the relevant answer for the detailed response. Additionally, the papers’ cited id matches your comment.** Thank you for your understanding!\n\n**1.1 This paper appears to be an incremental improvement on existing contrastive learning works, which has been widely explored in various object detection architectures, such as [1] and [2].**\n\nBoth SoCo[1] and DetCo[2] design self-supervised pretext tasks to provide a strong pre-trained model for instance-level detection tasks. Essentially, they are upstream tasks for full-supervised object detection in natural light images, whereas CSPCL is focused on the downstream task about prohibited item detection in X-ray images. They can be compatible at their respective training stages. For example, we can fine-tune a pre-trained model by DetCo for prohibited item detection tasks.\n\nWeakness: SoCo and DetCo are designed for unsupervised tasks, and their construction of object-level positive and negative sample pairs relies on selective search and local patch sets of image-level inputs. To ensure the quality of sample pairs, these models are more suitable for pre-training on \"one image for one class\" datasets like ImageNet. However, when facing complex multi-object overlapping X-ray image datasets such as PIXray, their supervisory information becomes unreliable.\n\n**1.2 The idea of inter-class and intra-class contrasts have also been adopted in previous studies, such as IIC loss [3] and ICE loss [4].**\n\nWe greatly appreciate the valuable advice! This comparison on IIC loss [3] and ICE loss [4] has already been addressed in response to Question 2 of Reviewer eTaq. Due to the rebuttal character limit, please kindly refer to that for further details, thank you!\n\n**1.3 Specifically, there also exists a prototype-based contrastive learning work in X-ray prohibited items detection [5].**\n\nWEN[5] focuses on a different aspect, as it is designed for few-shot prohibited item detection.\nSpecifically, first, the PR module generates a prototype library by aggregating and extracting the base features from critical regions around instances obtained by the RPN and ROI modules. Then, the FR module adaptively integrates the base features and the corresponding prototype to enhance the feature extraction ability of few-shot models.\n\nInter-class repulsion design:\nThe prototype-based contrastive learning in this work is calculated through orthogonalization (inter-class repulsion) after dividing ROI proposals into K groups, as follows:\n$$L_p = \\frac{\\sum_{i=1}^{N_k} \\sum_{j=1, j \\neq i}^{N_k} \\phi(\\Omega(i), \\Omega(j))}{N_k (N_k - 1)}$$\nWhere $\\phi$ refers to the distance calculated by the cosine function, $i$ and $j$ are class indices of the class prototype $\\Omega$, and $N_k$ is the total class number. Thus, by minimizing $L_p$, inter-class prototypes $\\Omega$ tend to be orthogonal gradually. \n\nWeakness: This orthogonal repulsion strategy does not align with the true distribution of class prototypes among the samples.\n\n**1.4 The proposed adaptive loss, while thoughtful, refines this existing foundation rather than introducing a new paradigm. Therefore, it’s suggested that the author should further address the above originality concerns.**\n\nCSPCL is specifically designed for fully supervised prohibited item detection tasks, whose originality is reflected in two main aspects:\n\nFirstly, our plug-and-play CSPCL mechanism utilizes class prototypes to clarify the class semantic information of content queries for the Deformable DETR-based models.\n\nSecondly, its CSP loss, through the intra-class gradient truncation and inter-class adaptive repulsion mechanisms, ensures that intra-class content queries do not become homogenized, preserving the necessary feature diversity within the class, while also ensuring that inter-class content queries align with the class prototypes' feature distribution, learning discriminative identifying features for similar categories.\n\n\n**2.1 The paper lacks a direct experimental comparison with other X-ray detection methods. In table 3, none of the anti-overlapping methods (e.g. [6][7]) mentioned in related works are compared.**\n\nThank you for your suggestion, and apologies for the confusion! We have made clarifications and added experiments:\n\nClarification: Tab. 3 in the original paper already includes results for the SOTA prohibited item detectors, SDANet and ForkNet, on the PIDray dataset. Additionally, Tab. 2 in the supplementary material contains comparisons between methods like LAreg[7], LAcls[7], DOAM[6], and our CSPCL on the CLCXray[7] dataset (Note that CLCXray was chosen because some methods like LAreg, LAcls, and MMCL[8] are not fully open-sourced, making it impossible to perform a complete comparison on the PIDray dataset).\n\nAddition Experiment: For a fair comparison, we provide the results of C-AO-DETR (ResNet-101; 500 × 500), as follows:\n|Method |Backbone |Image Size| AP_{easy} |AP_{hard} |AP_{hidden} |AP_{overall}|\n|-|-|-|-|-|-|-|\nSDANet |ResNet-101|500×500 |71.2 |64.2 |49.5 |61.6 \nForkNet | ResNet-101|500×500|75.0| 66.9 |58.6 |66.8\nC-AO-DETR (ours)|ResNet-101|500×500|76.1|69.2|61.5|68.9\n\nAs shown, our C-AO-DETR, outperforms other prohibited item detection models in the same condition.\n\n**2.2 Additionally, the most relevant competitors MMCL[8] that uses contrastive learning on DETR-based models for X-ray images is neglected.**\n\nThank you for your constructive advice! The comparison experiments and analysis about MMCL[8] have already been conducted in response to Question 2 of Reviewer eTaq. \n\n**2.3 The baseline model AO-DETR is not compared, either.**\n\nThanks for your valuable advice!\n\nRegarding the comparison with the baseline model AO-DETR, we had validated it on both the PIXray and OPIXray datasets (as shown in Tab. 2 of the original paper). Please kindly check it. \n\nThe further comparison of the baseline model AO-DETR on PIDray has been addressed in response to Question 3 of Reviewer BMUt.\n\n**3 The SOTA comparison in Table 3 is difficult to interpret fairly due to an inconsistent baseline. The presented C-AO-DETR uses a Swin-L backbone, which is more powerful than the ResNet/ResNeXt backbones used by most competing methods listed in the table.**\n\nThank you for your important suggestion! The fair comparison on same backbone ResNet-101 has been conducted in response to Question 1 of Reviewer eTaq.\n\n**4.1 The proposed method appears to have limited applicability beyond Transformer-based architectures. Similar to techniques that are exclusively applicable to CNN-based detectors, this work seems constrained to Transformer architectures.**\n\nIn YOLO or Faster R-CNN architectures, due to the absence of an encoder-decoder structure (and no content queries), CSPCL cannot be directly integrated to leverage content queries for learning category semantic priors in the classifier. \n\nHowever, inspired by WEN[5], we can attempt to adaptively align and combine features from the backbone with classifier prototypes to supplement the foreground feature semantics and improve model performance. We will evaluate the feasibility of this approach and include the results in the revised version of the paper where possible.\n\n**4.2 Moreover, the results in Table 3 show that the performance of Transformer-based detectors does not surpass the CNN-based Mask R-CNN. Therefore, it is recommended that the authors provide further explanation of the practical value of CSPCL.**\n\nWe have added experiment to demonstrate that, under the same backbone and image size, AO-DETR outperforms Mask R-CNN. The specific results are as follows:\n|Method |Backbone |Image Size| AP_{easy} |AP_{hard} |AP_{hidden} |AP_{overall}|\n|-|-|-|-|-|-|-|\nMaskR-CNN|ResNet-101|500×500| 64.7|59.0|43.8|55.8\nAO-DETR|ResNet-101|500×500|75.7|68.5|60.2|68.1\n\n**5 The paper does not clearly explain how the proposed method solves the object overlapping problem. The argument relies on indirect reasoning and a single qualitative example, rather than a quantitative analysis that directly measures performance on overlapping objects.**\n\nWe greatly appreciate the valuable advice! \n\nThe more in-depth theoretical analysis has already been addressed to Question 1 of Reviewer BMUt.\n\nTo address the missing quantitative analysis in the original manuscript, we supply an experiment on the PIDray dataset, which has three subsets with increasing occlusion and overlap levels: easy, hard, and hidden. The specific results are as follows:\n\n|Method/Metric|AP_{easy}|AP_{hard}|AP_{hidden}|\n|-|-|-|-|\n|AO-DETR|81.8|72.6|55.7|\nC-AO-DETR (ours)|82.2|73.3|56.9\nAbsolute Increment (AI)|0.4|0.7|**1.2**\nIncrement Space (IS)|18.2|27.4|44.3\nRelative Increment (RI)|2.20(min)|2.55|**2.71(max)**\n\nWe design the RI metric (AI/IS), which is fairer than the AI metric.\n\nDiscussion: Both AI and RI values show that CSPCL significantly improves the model's overlapping detection ability, with the largest relative improvement in the hidden subset (2.71%), followed by the hard (2.55%) and easy (2.20%) subsets. This confirms that CSPCL enhances the model's anti-overlapping ability to handle more complex occlusion scenarios, particularly when objects are heavily overlapped.\n\n**6. The paper lacks a sufficient discussion of its key design choices. This includes the selection and sensitivity analysis of new hyperparameters, as well as the justification for which decoder layer to apply the proposed loss.**\n\nSorry for the confusion! Note that we had conducted these experiments and had placed the results in the supplementary materials. Please kindly check the ZIP file in the supplementary materials again. Thank you! In the revised version, we will place this content in the main text!"}, {"review_id": "7d3q91KL4R", "reviewer": "Reviewer_jNYc", "summary": "This paper proposes a plug-and-play contrastive learning mechanism, named Category Semantic Prior Contrastive Learning (CSPCL), to address the feature coupling issue caused by object overlap in X-ray images. CSPCL ingeniously leverages category semantic prior knowledge embedded in the classification head to guide and enhance content queries, enabling Deformable-DETR-based models to achieve stronger foreground feature perception. To support this guidance, the paper introduces a novel contrastive learning loss function, CSP loss, which consists of ITA loss for positive pairs within the same class and IAR loss for negative pairs across different classes. This design decomposes the contrastive learning problem into two sub-problems—inter-class repulsion and intra-class attraction—allowing for more targeted optimization aligned with specific tasks. CSP loss demonstrates superior performance compared to classical N-pair loss and InfoNCE loss. Extensive evaluations on four prohibited item detection datasets show that CSPCL can improve the detection accuracy of Deformable DETR-based models without introducing additional computational overhead and further establishes a new state-of-the-art benchmark for prohibited item detection models.", "questions": "1.The authors should consider adding additional experiments, for example, to investigate whether CSPCL can help smaller models, such as AO-DETR (ResNet-50), surpass the performance of SOTA models when using CSPCL.\n2.Based on the paper and code, the current design of CSP loss only works for cases where the number of content queries is an integer multiple. The authors should consider how category-specific content queries should be allocated in scenarios where the number of content queries is not an integer multiple of the number of categories, such as with 100 content queries and 15 categories. If this aspect can be improved, CSPCL would be able to adapt to fine-tuning tasks based on Deformable-DETR models for various numbers of content queries, further enhancing the significance of this work.\n3.For better readability, it would be helpful to clarify the meaning of all variables. For example, in Lines 151-160, the dimensions N and C are not explained. Although this doesn’t affect understanding, it does impact reading fluency.\n4.The authors should carefully check the completeness of the references to ensure that all relevant citations are included. This will help readers better understand the content of the paper and the inspirations behind it.", "limitations": "Yes. It's worth noting that, in natural-light images, densely appearing objects often lead to occlusion, resulting in the loss of foreground object features, while the kind of foreground-background feature coupling problem always found in X-ray images is rare. Therefore, the inability to demonstrate CSPCL’s effectiveness on the COCO dataset actually highlights the strength of the proposed method in addressing the specific challenge of overlapping phenomena.", "rating": 5, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 4, "clarity": 4, "significance": 3, "originality": 4, "strengths_and_weaknesses": "Strengths：\n1.The idea proposed in this paper is highly novel. Instead of focusing on typical modifications of label assignment strategies or network structures in mainstream DETR-like models, the authors introduce a simple and efficient contrastive learning strategy that guides content queries to learn category semantic features, thereby improving detection accuracy. This is particularly effective for addressing the feature coupling issue between foreground and background caused by the unique overlapping phenomenon in X-ray images.\n2.CSPCL is a plug-and-play method that can be broadly applied to Deformable-DETR-based models. It improves detection accuracy without increasing computational complexity, which is a significant advantage in the current landscape that favors large models and scaling laws.\n3.The CSP loss is simple, intuitive, and effective. It decomposes the contrastive learning problem into two sub-problems: inter-class repulsion and intra-class attraction. This targeted design, tailored to the specific task, outperforms classical losses such as N-pair loss and InfoNCE loss.\n4.CSPCL demonstrates strong generalizability, achieving effective results across different models, backbones, and datasets. This contribution is commendable, as it represents a more fundamental and insightful approach rather than a simple model-specific modification.\n5.The paper is well-written, clearly structured, and easy to follow. The method is explained step by step, the experiments are comprehensive and rigorous, and the figures clearly illustrate how the proposed augmentation strategy is applied during training.\nWeaknesses：\n(1) The code for the paper does not appear to be fully open-sourced; instead, it only provides the implementation of the main innovations.\n(2) In Tables 3 and 4, the paper should supplement experimental results for AO-DETR (ResNet-50) + CSPCL to comprehensively demonstrate whether smaller-scale models can also achieve SOTA results with the CSPCL mechanism.\n(3) The Non-Maximum Suppression (NMS) post-processing step has not been cited.", "was_revised": true, "final_justification": "After reading the response, I decide to maintain my original score.", "rebuttal": "Thank you for the detailed comments and valuable feedback! We provide our point-to-point responses below.\n\n**1. The code for the paper does not appear to be fully open-sourced; instead, it only provides the implementation of the main innovations.**\n\nThank you for your review of our work and for raising these questions.\n\nWe fully understand the importance of open-source code for the reproducibility and further development of research. The core code related to the embedding and application of CSP loss has been fully presented in the supplementary material ZIP file, which is sufficient for understanding the operational logic and execution details of CSPCL. However, due to the risk of code leakage and plagiarism during the review period, we have currently only made public the implementation code for the main innovations in the paper.\n\n**Once the paper is accepted, we will open-source the complete code and weight files to promote academic exchange and collaboration.** Thank you for your understanding and support.\n\n**2. In Tables 3 and 4, the paper should supplement experimental results for AO-DETR (ResNet-50) + CSPCL to comprehensively demonstrate whether smaller-scale models can also achieve SOTA results with the CSPCL mechanism.**\n\nThank you for your valuable suggestion!\n\nOur original intention was to train the best prohibited item detection model, which led us to overlook the fairness of the comparison in Tab. 3 of the original paper.\n\nTo comprehensively and fairly demonstrate whether smaller-scale C-AO-DETR models can also achieve SOTA results, we trained C-AO-DETR with the same backbone network, ResNet-101, on the PIDray dataset. The comparison results are as follows:\n|Method |Backbone |Image Size| AP_{easy} |AP_{hard} |AP_{hidden} |AP_{overall}|\n| -------- | -------- | -------- | -------- | -------- | -------- |-------- |\nFCOS | ResNeXt-101-64x4d |1333 × 800 |72.9| 63.4 |51.1| 62.5\nFSAF | ResNeXt-101-64x4d |1333 × 800| 71.0| 61.9 |50.7| 61.2\nSDANet |ResNet-101 |500 × 500 |71.2 |64.2 |49.5 |61.6 \nForkNet | ResNet-101| 500 × 500| 75.0| 66.9 |58.6 |66.8\n|$C$-AO-DETR (ours) | ResNet-101 | 500 × 500|**76.1**|**69.2**|**61.5**|**68.9**|\n\nUnder the same backbone network and image size, C-AO-DETR still outperforms the latest prohibited item detectors, SDANet and ForkNet. Furthermore, general object detectors, such as FCOS and FSAF, even with more powerful backbones (ResNeXt-101-64x4d) and larger image sizes (1333 × 800), still fail to surpass C-AO-DETR in the prohibited item detection task.\n\nAdditionally, for the CLCXray dataset, our results are as follows:\n| Mthoed |AP | AP$_{50}$| AP$_{75}$ | AP$_S$ | AP$_M$ | AP$_L$ |\n| -------- | -------- |-------- | -------- | -------- | -------- |-------- |\nDOAM |54.3 |68.5| 63.5 |31.2 |27.3| 59.9 \nLAreg| 58.5| 70.9| 67.7 |12.6 |30.5 |63.8\nLAcls|59.3 |71.8 |68.2 |23.0 |32.4 |64.5\nPIXDet| 60.4| 72.4| 69.4 |25.3 |31.7 |66.0 \nForkNet |62.0 |74.0| 71.4 |35.6 |41.9 |67.7 \nC-AO-DETR(ours) |62.7| 74.3 |71.9 |45.1 |36.2| 68.4\n\nOverall, C-AO-DETR proposed in this paper demonstrates superior detection accuracy. More importantly, the CSPCL mechanism is not limited to AO-DETR. When more advanced Deformable DETR-based models are available, CSPCL remains applicable, enhancing the model's anti-overlap detection capability.\n\n**3. The Non-Maximum Suppression (NMS) post-processing step has not been cited.**\n\nThank you for your meticulous review and valuable suggestions.  \n\nWe will cite the Non-Maximum Suppression (NMS) post-processing step in the final version to ensure that all related work is appropriately acknowledged. Additionally, we have conducted a thorough review of the paper to ensure that there are no other citation omissions."}]

Author rebuttal:

Meta-review: Reviewers confirmed the novelty, thorough experiments and writing of this paper. After rebuttal and discussion, most of the concerns raised by reviewers are resolved the authors and all the ratings are positive.  I thereby recommend to accept this submission.
Decision: Accept (poster)