Skip to main content
QUICK REVIEW

[Paper Review] D$^3$ETR: Decoder Distillation for Detection Transformer

Xiaokang Chen, Jiahui Chen|arXiv (Cornell University)|Nov 17, 2022
Advanced Neural Network ApplicationsComputer Science5 citations
TL;DR

This paper proposes D³ETR, a knowledge distillation method for DETR-based object detectors that addresses the challenge of unordered transformer decoder outputs by introducing MixMatcher—a hybrid matching strategy combining adaptive and fixed matching. By distilling predictions and attention maps from a teacher to a student model, D³ETR achieves state-of-the-art performance, improving Conditional DETR-R50-C5 by 7.8 mAP under 12-epoch training.

ABSTRACT

While various knowledge distillation (KD) methods in CNN-based detectors show their effectiveness in improving small students, the baselines and recipes for DETR-based detectors are yet to be built. In this paper, we focus on the transformer decoder of DETR-based detectors and explore KD methods for them. The outputs of the transformer decoder lie in random order, which gives no direct correspondence between the predictions of the teacher and the student, thus posing a challenge for knowledge distillation. To this end, we propose MixMatcher to align the decoder outputs of DETR-based teachers and students, which mixes two teacher-student matching strategies, i.e., Adaptive Matching and Fixed Matching. Specifically, Adaptive Matching applies bipartite matching to adaptively match the outputs of the teacher and the student in each decoder layer, while Fixed Matching fixes the correspondence between the outputs of the teacher and the student with the same object queries, with the teacher's fixed object queries fed to the decoder of the student as an auxiliary group. Based on MixMatcher, we build extbf{D}ecoder extbf{D}istillation for extbf{DE}tection extbf{TR}ansformer (D$^3$ETR), which distills knowledge in decoder predictions and attention maps from the teachers to students. D$^3$ETR shows superior performance on various DETR-based detectors with different backbones. For example, D$^3$ETR improves Conditional DETR-R50-C5 by $ extbf{7.8}/ extbf{2.4}$ mAP under $12/50$ epochs training settings with Conditional DETR-R101-C5 as the teacher.

Motivation & Objective

  • To address the lack of standardized knowledge distillation (KD) methods for DETR-based detectors, particularly due to unordered decoder outputs.
  • To overcome the challenge of matching teacher and student predictions when decoder outputs are permutation-invariant.
  • To develop a robust, effective KD framework tailored for the transformer decoder in DETR architectures.
  • To establish a new baseline and recipe for KD in DETR-based object detection models.

Proposed method

  • Proposes MixMatcher, a hybrid matching strategy that combines adaptive matching (via bipartite matching per decoder layer) and fixed matching (using shared object queries as auxiliary inputs).
  • Uses adaptive matching to dynamically align teacher and student predictions at each decoder layer based on optimal bipartite assignment.
  • Employs fixed matching by feeding the teacher’s fixed object queries into the student’s decoder as an auxiliary group to stabilize correspondence.
  • Performs knowledge distillation not only on final predictions but also on self-attention and cross-attention maps in decoder layers.
  • Applies a constraint in fixed matching to ensure consistent supervision between teacher and student outputs from the same query.
  • Integrates an inheriting strategy that initializes the student with the teacher’s parameters to further boost performance.
Figure 2 : Architecture of the proposed method. We propose the mixed teacher-student matching strategy that composes of two components, adaptative matching and fixed matching. We adopt two groups, where the first group feeds student queries to the decoder and the second feeds teacher queries to the
Figure 2 : Architecture of the proposed method. We propose the mixed teacher-student matching strategy that composes of two components, adaptative matching and fixed matching. We adopt two groups, where the first group feeds student queries to the decoder and the second feeds teacher queries to the

Experimental results

Research questions

  • RQ1How can knowledge distillation be effectively applied to DETR-based detectors given the unordered nature of their decoder outputs?
  • RQ2What matching strategy best stabilizes and improves knowledge transfer between teacher and student models in DETR's decoder?
  • RQ3Can distillation on attention maps, in addition to predictions, significantly improve student model performance?
  • RQ4How does combining adaptive and fixed matching strategies affect distillation stability and accuracy?
  • RQ5What is the impact of using auxiliary object queries and constrained supervision in the fixed matching mechanism?

Key findings

  • D³ETR improves Conditional DETR-R50-C5 by 7.8 mAP under 12-epoch training and 2.4 mAP under 50-epoch training when using Conditional DETR-R101-C5 as the teacher.
  • The combination of adaptive and fixed matching in MixMatcher achieves 38.1 mAP, outperforming either strategy alone.
  • Adding a constraint in fixed matching improves performance from 38.1 to 38.1 mAP, while removing it drops performance to 37.0 mAP.
  • Visualizations confirm that student models trained with D³ETR learn more accurate spatial attention patterns similar to the teacher.
  • D³ETR achieves 40.2 mAP on COCO, comparable to a full 50-epoch training of Conditional DETR-R50-C5 (40.9 mAP).
  • Combining D³ETR with MGD further boosts performance to 38.8 mAP, demonstrating compatibility with other KD methods.
Figure 3 : Analysis of different components in Conditional DETR. We adopt ResNet- $101$ /ResNet- $50$ as the backbone and train the model for $12$ epochs (1 $\times$ schedule). Best viewed in color.
Figure 3 : Analysis of different components in Conditional DETR. We adopt ResNet- $101$ /ResNet- $50$ as the backbone and train the model for $12$ epochs (1 $\times$ schedule). Best viewed in color.

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.