Skip to main content
QUICK REVIEW

[Paper Review] DN-DETR: Accelerate DETR Training by Introducing Query DeNoising

Feng Li, Hao Zhang|arXiv (Cornell University)|Mar 2, 2022
Network Packet Processing and OptimizationComputer Science54 citations
TL;DR

DN-DETR introduces a denoising task that uses noisy ground-truth boxes as auxiliary decoder inputs to stabilize bipartite matching and accelerate DETR-like model training, achieving faster convergence and better accuracy. It can be plugged into existing DETR variants with minimal code changes.

ABSTRACT

We present in this paper a novel denoising training method to speedup DETR (DEtection TRansformer) training and offer a deepened understanding of the slow convergence issue of DETR-like methods. We show that the slow convergence results from the instability of bipartite graph matching which causes inconsistent optimization goals in early training stages. To address this issue, except for the Hungarian loss, our method additionally feeds ground-truth bounding boxes with noises into Transformer decoder and trains the model to reconstruct the original boxes, which effectively reduces the bipartite graph matching difficulty and leads to a faster convergence. Our method is universal and can be easily plugged into any DETR-like methods by adding dozens of lines of code to achieve a remarkable improvement. As a result, our DN-DETR results in a remarkable improvement ($+1.9$AP) under the same setting and achieves the best result (AP $43.4$ and $48.6$ with $12$ and $50$ epochs of training respectively) among DETR-like methods with ResNet-$50$ backbone. Compared with the baseline under the same setting, DN-DETR achieves comparable performance with $50\%$ training epochs. Code is available at \url{https://github.com/FengLi-ust/DN-DETR}.

Motivation & Objective

  • Understand why DETR models converge slowly due to bipartite graph matching instability.
  • Propose a denoising training auxiliary task using noised GT boxes to stabilize optimization.
  • Show that denoising speeds up convergence across DETR variants and related models.
  • Provide ablations to analyze the effects of noise, label embedding, and attention masks.

Proposed method

  • Introduce a denoising training branch that ingests noised GT boxes and labels as additional decoder inputs.
  • Formulate decoder queries as two parts: a denoising (noised GT) part and a traditional matching (learnable anchor) part.
  • Use multiple denoising groups with an attention mask to prevent information leakage between groups and between denoising and matching parts.
  • Apply reconstruction losses (l1 and GIoU for boxes; focal loss for labels) in the denoising branch alongside the standard Hungarian loss.
  • Represent decoder embeddings as label embeddings augmented with an indicator to distinguish denoising versus matching tasks.
  • Optionally extend denoising to Deformable DETR, Faster R-CNN, and Mask2Former to demonstrate generality.

Experimental results

Research questions

  • RQ1Can a denoising auxiliary task stabilize the unstable bipartite matching in DETR and accelerate training?
  • RQ2How does adding noised GT boxes (and labels) as denoising queries affect convergence speed and final accuracy?
  • RQ3Does denoising training generalize across different DETR-like architectures and even traditional CNN detectors?
  • RQ4What are the contributions of noise type, label embedding, and attention masking to performance?
  • RQ5How much can training epochs be reduced while maintaining or improving performance?

Key findings

  • DN-DETR reduces instability in Hungarian matching during training.
  • The denoising task leads to faster convergence and improved AP (notably in 12-epoch settings).
  • Using multiple noised GT groups with attention masks preserves training stability and yields gains across DETR variants and even non-DETR detectors.
  • DN-DETR demonstrates improvements when applied to DAB-DETR, Deformable DETR, Anchor DETR, Vanilla DETR, Faster R-CNN, and Mask2Former, indicating broad applicability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.