Skip to main content
QUICK REVIEW

[Paper Review] Less is More: Focus Attention for Efficient DETR

Dehua Zheng, Wenhui Dong|arXiv (Cornell University)|Jul 24, 2023
Advanced Neural Network ApplicationsComputer Science6 citations
TL;DR

Focus-DETR proposes a dual-attention mechanism that selectively focuses on foreground and fine-grained object tokens using a multi-scale, top-down scoring strategy, achieving 50.4 AP on COCO with 30% fewer queries and comparable computation cost to state-of-the-art sparse DETR models, significantly improving efficiency and accuracy trade-offs.

ABSTRACT

DETR-like models have significantly boosted the performance of detectors and even outperformed classical convolutional models. However, all tokens are treated equally without discrimination brings a redundant computational burden in the traditional encoder structure. The recent sparsification strategies exploit a subset of informative tokens to reduce attention complexity maintaining performance through the sparse encoder. But these methods tend to rely on unreliable model statistics. Moreover, simply reducing the token population hinders the detection performance to a large extent, limiting the application of these sparse models. We propose Focus-DETR, which focuses attention on more informative tokens for a better trade-off between computation efficiency and model accuracy. Specifically, we reconstruct the encoder with dual attention, which includes a token scoring mechanism that considers both localization and category semantic information of the objects from multi-scale feature maps. We efficiently abandon the background queries and enhance the semantic interaction of the fine-grained object queries based on the scores. Compared with the state-of-the-art sparse DETR-like detectors under the same setting, our Focus-DETR gets comparable complexity while achieving 50.4AP (+2.2) on COCO. The code is available at https://github.com/huawei-noah/noah-research/tree/master/Focus-DETR and https://gitee.com/mindspore/models/tree/master/research/cv/Focus-DETR.

Motivation & Objective

  • To address the high computational cost of standard DETR encoders, which treat all tokens equally without discrimination.
  • To overcome the limitations of existing sparse DETR methods that rely on unreliable attention maps for token selection.
  • To improve detection accuracy by selectively enhancing fine-grained object queries while reducing background token processing.
  • To achieve a better balance between model efficiency and accuracy through a robust, multi-level token scoring mechanism.
  • To design a cascaded, dual-attention encoder that improves feature refinement with minimal computational overhead.

Proposed method

  • Introduces a Foreground Token Selector (FTS) that uses learnable labels and multi-scale feature maps to score tokens based on localization and category semantics.
  • Employs top-down score modulation, where higher-level feature scores refine lower-level foreground probability predictions to improve selection reliability.
  • Designs a multi-category score predictor to jointly assess foreground likelihood and semantic specificity, enabling fine-grained token selection.
  • Reconstructs the encoder with dual attention: one for background-pruned foreground tokens and another for enhanced fine-grained queries to improve long-range feature interaction.
  • Applies a cascade structure across encoder layers to progressively reduce the number of foreground tokens while maintaining fault tolerance and performance.
  • Uses cross-attention maps from the decoder only as a weak supervision signal, replacing reliance on them for token selection with a more robust, multi-scale semantic scoring mechanism.

Experimental results

Research questions

  • RQ1Can a multi-scale, top-down scoring mechanism improve the reliability of token selection in sparse DETR models?
  • RQ2Does focusing on fine-grained object tokens through semantic-aware scoring enhance detection accuracy without increasing computational cost?
  • RQ3How does dual attention in the encoder improve feature representation when combined with selective token processing?
  • RQ4Can a cascaded token pruning strategy maintain performance while progressively reducing the number of active tokens?
  • RQ5How does the proposed method compare to state-of-the-art sparse DETR models in terms of accuracy, computation cost, and robustness?

Key findings

  • Focus-DETR achieves 50.4 AP on COCO, a +2.2 AP improvement over the baseline Deformable DETR, with only 30% of the original query count.
  • At 128 GFLOPs, Focus-DETR outperforms Sparse DETR by +2.7 AP and DINO with Sparse DETR strategies by +1.4 AP under similar computation budgets.
  • The dual-attention mechanism contributes +0.8 AP, demonstrating that enhanced fine-grained token interaction significantly improves detection performance.
  • The top-down score modulation strategy improves AP by 0.2 over bottom-up modulation, validating the effectiveness of high-level semantic guidance on low-level selection.
  • The cascade structure in the encoder improves fault tolerance and boosts performance by +0.5 AP, showing the benefit of progressive refinement.
  • Focus-DETR maintains high inference speed (23.7 FPS at 128 GFLOPs) while achieving state-of-the-art accuracy, proving its efficiency and scalability.

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.