{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/detection-transformer-with-stable-matching","title":"Detection Transformer with Stable Matching","arxiv_id":"2304.04742","date":"2023-04-10","proceeding":"ICCV 2023 1","authors":["Shilong Liu","Tianhe Ren","Jiayu Chen","Zhaoyang Zeng","Hao Zhang","Feng Li","Hongyang Li","Jun Huang","Hang Su","Jun Zhu","Lei Zhang"],"abstract":"This paper is concerned with the matching stability problem across different decoder layers in DEtection TRansformers (DETR). We point out that the unstable matching in DETR is caused by a multi-optimization path problem, which is highlighted by the one-to-one matching design in DETR. To address this problem, we show that the most important design is to use and only use positional metrics (like IOU) to supervise classification scores of positive examples. Under the principle, we propose two simple yet effective modifications by integrating positional metrics to DETR's classification loss and matching cost, named position-supervised loss and position-modulated cost. We verify our methods on several DETR variants. Our methods show consistent improvements over baselines. By integrating our methods with DINO, we achieve 50.4 and 51.5 AP on the COCO detection benchmark using ResNet-50 backbones under 12 epochs and 24 epochs training settings, achieving a new record under the same setting. We achieve 63.8 AP on COCO detection test-dev with a Swin-Large backbone. Our code will be made available at https://github.com/IDEA-Research/Stable-DINO.","url_abs":"https://arxiv.org/abs/2304.04742v1","url_pdf":"https://arxiv.org/pdf/2304.04742v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"detection-transformer-with-stable-matching","repo_url":"https://github.com/idea-research/stable-dino","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"detection-transformer-with-stable-matching","repo_url":"https://github.com/idea-research/stabledino","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":null,"task_name":"Position"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"detr","method_name":"Detr"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.04742","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.04742"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/fundamentalvision/Deformable-DETR","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idea-research/stabledino","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/IDEA-Research/detrex","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idea-research/stable-dino","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/IDEA-Research/Stable-DINO","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"ran_draft_wrong":2,"ran_fixture":1,"unverified":3},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"found_in_text":{"samples":8,"ran":6,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"3f8838b327e62992","entry":"FocalLossCost","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3f8838b327e62992"}},{"code_sha256_prefix":"570320cdbc1ac2d2","entry":"GIoUCost","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"570320cdbc1ac2d2"}},{"code_sha256_prefix":"12e38e14abb434a8","entry":"L1Cost","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"12e38e14abb434a8"}},{"code_sha256_prefix":"856982244cffd7e3","entry":"box_cxcywh_to_xyxy","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"856982244cffd7e3"}},{"code_sha256_prefix":"d8e49e4f454b76fc","entry":"box_iou","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d8e49e4f454b76fc"}},{"code_sha256_prefix":"be174c5da2b1ca9a","entry":"generalized_box_iou","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be174c5da2b1ca9a"}},{"code_sha256_prefix":"f1c2b24b9f7949dd","entry":"HungarianMatcher","repo":"IDEA-Research/detrex","repo_kind":"found_in_text","path":"detrex/modeling/matcher/modified_matcher.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/matcher/modified_matcher.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f1c2b24b9f7949dd"}},{"code_sha256_prefix":"66ff5da6253f8775","entry":"SetCriterion","repo":"fundamentalvision/Deformable-DETR","repo_kind":"found_in_text","path":"models/deformable_detr.py","file_url":"https://github.com/fundamentalvision/Deformable-DETR/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"66ff5da6253f8775"}},{"code_sha256_prefix":"97059585f50ae421","entry":"sigmoid_focal_loss","repo":"IDEA-Research/Stable-DINO","repo_kind":"official","path":"projects/stabledino/modeling/dn_criterion.py","file_url":"https://github.com/IDEA-Research/Stable-DINO/blob/HEAD/projects/stabledino/modeling/dn_criterion.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"97059585f50ae421"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}