Skip to main content
QUICK REVIEW

[Paper Review] Advancing Vision Transformers with Group-Mix Attention

Chongjian Ge, Xiaohan Ding|arXiv (Cornell University)|Nov 26, 2023
Advanced Neural Network ApplicationsComputer Science12 citations
TL;DR

Introduces Group-Mix Attention (GMA) to capture token-to-token, token-to-group, and group-to-group relations within ViTs, forming GroupMixFormer backbones that achieve state-of-the-art results on ImageNet, COCO, and ADE20K with fewer parameters.

ABSTRACT

Vision Transformers (ViTs) have been shown to enhance visual recognition through modeling long-range dependencies with multi-head self-attention (MHSA), which is typically formulated as Query-Key-Value computation. However, the attention map generated from the Query and Key captures only token-to-token correlations at one single granularity. In this paper, we argue that self-attention should have a more comprehensive mechanism to capture correlations among tokens and groups (i.e., multiple adjacent tokens) for higher representational capacity. Thereby, we propose Group-Mix Attention (GMA) as an advanced replacement for traditional self-attention, which can simultaneously capture token-to-token, token-to-group, and group-to-group correlations with various group sizes. To this end, GMA splits the Query, Key, and Value into segments uniformly and performs different group aggregations to generate group proxies. The attention map is computed based on the mixtures of tokens and group proxies and used to re-combine the tokens and groups in Value. Based on GMA, we introduce a powerful backbone, namely GroupMixFormer, which achieves state-of-the-art performance in image classification, object detection, and semantic segmentation with fewer parameters than existing models. For instance, GroupMixFormer-L (with 70.3M parameters and 384^2 input) attains 86.2% Top-1 accuracy on ImageNet-1K without external data, while GroupMixFormer-B (with 45.8M parameters) attains 51.2% mIoU on ADE20K.

Motivation & Objective

  • Motivate and address limitations of vanilla Q-K-V self-attention in ViTs which only models token-to-token correlations at a single granularity.
  • Propose Group-Mix Attention (GMA) to model token-to-token, token-to-group, and group-to-group correlations across multiple group sizes.
  • Develop GroupMixFormer as a hierarchical vision transformer backbone utilizing GMA for classification, detection, and segmentation tasks.
  • Demonstrate that GMA improves performance with competitive or fewer parameters across standard benchmarks.

Proposed method

  • Split Q, K, and V into multiple segments and generate group proxies via aggregators with different kernel sizes.
  • Compute attention on mixtures of original tokens and group proxies to capture multi-granularity correlations.
  • Use a token ensemble layer to fuse outputs from attention and non-attention branches.
  • Employ depth-wise convolutions as aggregators, with optional identity mappings to preserve token-level correlations.
  • Provide four GroupMixFormer configurations (M, T, S, B, L) with a four-stage hierarchical backbone.
  • Train and evaluate on ImageNet-1K for classification; COCO for detection/segmentation with Mask R-CNN and RetinaNet; ADE20K for segmentation with UperNet and Semantic FPN.

Experimental results

Research questions

  • RQ1Can Group-Mix Attention model correlations among tokens and groups at multiple granularities within each Transformer encoder layer?
  • RQ2Does incorporating token-to-group and group-to-group interactions improve visual representation over traditional self-attention across tasks (classification, detection, segmentation)?
  • RQ3How do GroupMixFormer backbones compare to state-of-the-art ViTs and CNNs in terms of accuracy and efficiency on ImageNet, COCO, and ADE20K?
  • RQ4What is the impact of different aggregators (kernel sizes) and architectural configurations on performance?

Key findings

  • GroupMixFormer achieves state-of-the-art or competitive accuracy across ImageNet-1K classification, COCO object detection/segmentation, and ADE20K semantic segmentation.
  • A smaller GroupMixFormer variant achieves strong ImageNet performance comparable to larger models, while larger variants reach higher accuracy at higher resolutions.
  • In ablations, aggregators are crucial; including group-based aggregations in multiple pre-attention branches improves Top-1 accuracy and detection/segmentation metrics.
  • Group-Mix mechanism provides benefits across other ViT architectures, indicating broad applicability beyond GroupMixFormer.
  • Efficient design via sliding-window-based aggregations enables multi-granularity modeling with practical computational considerations.

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.