Papers › Conditional DETR for Fast Training Convergence

Conditional DETR for Fast Training Convergence

13 Aug 2021ICCV 2021 10arXiv:2108.06152archive 2025-07-28

Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, Jingdong Wang

The recently-developed DETR approach applies the transformer encoder and decoder architecture to object detection and achieves promising performance. In this paper, we handle the critical issue, slow training convergence, and present a conditional cross-attention mechanism for fast DETR training. Our approach is motivated by that the cross-attention in DETR relies highly on the content embeddings for localizing the four extremities and predicting the box, which increases the need for high-quality content embeddings and thus the training difficulty. Our approach, named conditional DETR, learns a conditional spatial query from the decoder embedding for decoder multi-head cross-attention. The benefit is that through the conditional spatial query, each cross-attention head is able to attend to a band containing a distinct region, e.g., one object extremity or a region inside the object box. This narrows down the spatial range for localizing the distinct regions for object classification and box regression, thus relaxing the dependence on the content embeddings and easing the training. Empirical results show that conditional DETR converges 6.7x faster for the backbones R50 and R101 and 10x faster for stronger backbones DC5-R50 and DC5-R101. Code is available at https://github.com/Atten4Vis/ConditionalDETR.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2108.06152")

Code

Syntology Ran 5 of 9 code samples harvested from 2 repositories linked to this paper; 4 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 2 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 4 ran; community (archive-listed): 1 sample from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

atten4vis/conditionaldetr officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
IDEA-Research/detrex mentioned on GitHubpytorch report
huggingface/transformers mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 5 ran; 1 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
2ran · our draft was wrong
1ran
4unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

convert_to_xywh atten4vis/conditionaldetr/datasets/coco_eval.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · f31a58bf6457ced5 · report
dice_loss atten4vis/conditionaldetr/models/segmentation.py official repository ran · violated contract fingerprinted Apache-2.0 (permissive) · ac8fe530cdad4d8c · report
evaluate atten4vis/conditionaldetr/datasets/coco_eval.py official repository ran · our draft was wrong Apache-2.0 (permissive) · fe0ddcc2d420c9a0 · report
sigmoid_focal_loss atten4vis/conditionaldetr/models/segmentation.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 5c0711aada67957e · report
ConditionalDETR Atten4Vis/ConditionalDETR/models/conditional_detr.py official repository unverified Apache-2.0 (permissive) · 630f5aa14fbee6c6 · report
build_transformer atten4vis/conditionaldetr/models/transformer.py official repository unverified Apache-2.0 (permissive) · bf149877606cbfba · report
gen_sineembed_for_position atten4vis/conditionaldetr/models/transformer.py official repository unverified Apache-2.0 (permissive) · d573d92393e20123 · report
multi_head_attention_forward atten4vis/conditionaldetr/models/attention.py official repository unverified Apache-2.0 (permissive) · f09175b0f39f0ad0 · report
ConditionalCrossAttention IDEA-Research/detrex/detrex/layers/attention.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 47b02db49bdfd76e · report

Tasks

DecoderObjectObject Detectionobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Object Detection COCO minival Conditional DETR-DC5-R101 AP50 66.8 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R101 AP75 49.5 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R101 APL 63.3 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R101 APM 50.3 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R101 APS 27.2 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R101 Params (M) 63 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R101 box AP 45.9 #110 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 AP50 65.4 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 AP75 48.5 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 APL 62.2 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 APM 49 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 APS 25.3 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 Params (M) 44 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-DC5-R50 box AP 45.1 #116 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 AP50 65.6 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 AP75 47.5 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 APL 63.6 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 APM 48.4 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 APS 23.6 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 Params (M) 63 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R101 box AP 44.5 #127 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 AP50 64 #147 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 AP75 45.7 #147 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 APL 61.5 #147 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 APM 46.7 #147 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 APS 22.7 #147 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 Params (M) 44 #147 of 220 Archive leaderboard report
Object Detection COCO minival Conditional DETR-R50 box AP 43 #147 of 220 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEConvolutionDense ConnectionsDetrDropoutFeedforward NetworkLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections