Skip to main content
QUICK REVIEW

[Paper Review] D^2ETR: Decoder-Only DETR with Computationally Efficient Cross-Scale Attention

Jun-Yu Lin, Xiaofeng Mao|arXiv (Cornell University)|Mar 2, 2022
Advanced Neural Network ApplicationsComputer Science15 citations
TL;DR

D²ETR proposes a decoder-only object detection framework that replaces the conventional encoder-decoder Transformer architecture with a computationally efficient cross-scale attention mechanism (CECA), enabling direct attention from the decoder to multi-scale, fine-fused features from a backbone. It achieves state-of-the-art accuracy on COCO with 50.0 AP using only 106 GFLOPs, outperforming Deformable DETR while reducing memory and latency.

ABSTRACT

DETR is the first fully end-to-end detector that predicts a final set of predictions without post-processing. However, it suffers from problems such as low performance and slow convergence. A series of works aim to tackle these issues in different ways, but the computational cost is yet expensive due to the sophisticated encoder-decoder architecture. To alleviate this issue, we propose a decoder-only detector called D^2ETR. In the absence of encoder, the decoder directly attends to the fine-fused feature maps generated by the Transformer backbone with a novel computationally efficient cross-scale attention module. D^2ETR demonstrates low computational complexity and high detection accuracy in evaluations on the COCO benchmark, outperforming DETR and its variants.

Motivation & Objective

  • To simplify end-to-end object detection by eliminating the encoder in DETR, reducing architectural complexity and computational cost.
  • To address the high computational cost of multi-scale feature fusion and cross-attention in existing Transformer-based detectors.
  • To improve detection accuracy—especially for small objects—without increasing model parameters or inference latency.
  • To explore whether a decoder-only architecture can match or exceed the performance of encoder-decoder counterparts in object detection.
  • To develop a plug-and-play module (CECA) that enables efficient cross-scale feature interaction in a lightweight, end-to-end detection pipeline.

Proposed method

  • Proposes a decoder-only detection framework (D²ETR) that removes the encoder and directly attends to fine-fused multi-scale features from a Transformer backbone.
  • Introduces Computationally Efficient Cross-scale Attention (CECA), where high-level features act as queries and low-level features as keys/values, enabling sparse, efficient cross-scale interaction.
  • Uses a standard multi-head attention or deformable attention mechanism in the decoder for object query refinement and prediction.
  • Employs a novel token labeling loss to enhance feature representation, particularly effective in the deformable variant with initialized queries.
  • Applies a location-aware loss to improve bounding box localization accuracy by constraining predicted box coordinates.
  • Integrates CECA as a plug-in module that can replace the encoder in any Transformer-based detector, enabling flexible deployment with various backbones and decoders.

Experimental results

Research questions

  • RQ1Can a decoder-only Transformer architecture achieve competitive detection performance without an encoder in end-to-end object detection?
  • RQ2How can cross-scale feature interaction be made computationally efficient while preserving detection accuracy, especially for small objects?
  • RQ3What is the impact of removing the encoder on model complexity, inference speed, and accuracy compared to standard DETR and its variants?
  • RQ4Can auxiliary losses (token labeling and location-aware) further improve performance in a decoder-only setting, particularly when object queries are initialized from backbone features?
  • RQ5How does the proposed CECA module compare in efficiency and accuracy to standard cross-attention and deformable attention mechanisms in multi-scale detection?

Key findings

  • D²ETR achieves 50.0 AP on COCO 2017 with a Deformable D²ETR-SwinT backbone, outperforming Deformable DETR (44.5 AP) while using only 106 GFLOPs.
  • The Deformable D²ETR reduces memory usage from 1109MB (Deformable DETR) to 776MB and increases throughput from 187 to 355 images/sec on a 16GB V100 GPU.
  • With TensorRT FP16 optimization, inference time drops to 43ms, reducing the latency gap to baseline models while maintaining high accuracy.
  • The CECA module improves AP by +8.3 over baseline D²ETR and +5.5 over Deformable DETR when combined with token labeling, demonstrating strong generalization.
  • The ablation study confirms that removing the encoder reduces GFLOPs by 49% (from 197 to 106 GFLOPs) and improves throughput, despite a slight accuracy drop without auxiliary losses.
  • The location-aware loss and token labeling loss significantly improve localization and feature representation, especially in the deformable variant where queries are initialized from backbone features.

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.