Skip to main content
QUICK REVIEW

[Paper Review] DAT++: Spatially Dynamic Vision Transformer with Deformable Attention

Zhuofan Xia, Xuran Pan|arXiv (Cornell University)|Sep 4, 2023
Advanced Neural Network ApplicationsComputer Science10 citations
TL;DR

DAT++ introduces a deformable multi-head attention mechanism within a pyramid vision Transformer to focus on informative regions, achieving state-of-the-art results on ImageNet, COCO, and ADE20K.

ABSTRACT

Transformers have shown superior performance on various vision tasks. Their large receptive field endows Transformer models with higher representation power than their CNN counterparts. Nevertheless, simply enlarging the receptive field also raises several concerns. On the one hand, using dense attention in ViT leads to excessive memory and computational cost, and features can be influenced by irrelevant parts that are beyond the region of interests. On the other hand, the handcrafted attention adopted in PVT or Swin Transformer is data agnostic and may limit the ability to model long-range relations. To solve this dilemma, we propose a novel deformable multi-head attention module, where the positions of key and value pairs in self-attention are adaptively allocated in a data-dependent way. This flexible scheme enables the proposed deformable attention to dynamically focus on relevant regions while maintains the representation power of global attention. On this basis, we present Deformable Attention Transformer (DAT), a general vision backbone efficient and effective for visual recognition. We further build an enhanced version DAT++. Extensive experiments show that our DAT++ achieves state-of-the-art results on various visual recognition benchmarks, with 85.9% ImageNet accuracy, 54.5 and 47.0 MS-COCO instance segmentation mAP, and 51.5 ADE20K semantic segmentation mIoU.

Motivation & Objective

  • Develop a deformable attention module that adapts key/value sampling locations in a data-dependent manner.
  • Build a scalable vision backbone (DAT) with deformable attention for diverse visual recognition tasks.
  • Enhance DAT to DAT++ with local perception and convolutional refinements for improved performance.
  • Demonstrate state-of-the-art results on ImageNet classification, MS-COCO object detection/instance segmentation, and ADE20K semantic segmentation.

Proposed method

  • Propose deformable multi-head attention (DMHA) where a shared set of deformed key/value sampling points is learned per input via an offset generation network.
  • Generate reference points on a uniform grid, offset them with learnable offsets from query features, and sample features by bilinear interpolation to form deformed keys/values.
  • Compute attention using q with deformed k and v, augmented by a deformable relative position bias for spatial awareness.
  • Analyze and compare the complexity of DMHA, showing linear-like overhead relative to standard attention due to sampling instead of full dense keys/values.
  • Enhance the backbone with overlapped patch embedding, Local Perception Unit (LPU), ConvFFN, and other convolutional modules to form DAT++.
  • Alternate local and deformable attention blocks (Neighborhood Attention as local operator) in the first stages, with deformable attention dominating the last stage.

Experimental results

Research questions

  • RQ1How can deformable attention be integrated into Vision Transformers without prohibitive memory/computation costs?
  • RQ2Does learning data-dependent sampling locations improve recognition across classification, detection/segmentation tasks?
  • RQ3Can DAT++ outperform or match state-of-the-art ViTs and CNNs on ImageNet, COCO, and ADE20K?
  • RQ4What architectural refinements (overlapped patch embedding, LPU, ConvFFN) most contribute to DAT++ performance?

Key findings

  • DAT++ achieves 85.9% Top-1 accuracy on ImageNet for the largest model variant (DAT-B++).
  • DAT++ attains 54.5 bbox mAP and 47.0 mask mAP on MS-COCO instance segmentation.
  • DAT++ reaches 51.5 mIoU on ADE20K semantic segmentation.
  • The deformable attention mechanism maintains linear-like space complexity while enabling data-dependent focus on informative regions.
  • DAT++ benefits from overlapped patch embedding and convolutional enhancements, contributing to improved local feature modeling and positional information.

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.