Skip to main content
QUICK REVIEW

[Paper Review] Global Context Vision Transformers

Ali Hatamizadeh, Hongxu Yin|arXiv (Cornell University)|Jun 20, 2022
Advanced Neural Network ApplicationsComputer Science34 citations
TL;DR

GC ViT introduces global context self-attention with shared global query tokens in a hierarchical ViT, achieving state-of-the-art results on ImageNet-1K without pre-training and strong performance on COCO and ADE20K downstream tasks.

ABSTRACT

We propose global context vision transformer (GC ViT), a novel architecture that enhances parameter and compute utilization for computer vision. Our method leverages global context self-attention modules, joint with standard local self-attention, to effectively and efficiently model both long and short-range spatial interactions, without the need for expensive operations such as computing attention masks or shifting local windows. In addition, we address the lack of the inductive bias in ViTs, and propose to leverage a modified fused inverted residual blocks in our architecture. Our proposed GC ViT achieves state-of-the-art results across image classification, object detection and semantic segmentation tasks. On ImageNet-1K dataset for classification, the variants of GC ViT with 51M, 90M and 201M parameters achieve 84.3%, 85.0% and 85.7% Top-1 accuracy, respectively, at 224 image resolution and without any pre-training, hence surpassing comparably-sized prior art such as CNN-based ConvNeXt and ViT-based MaxViT and Swin Transformer by a large margin. Pre-trained GC ViT backbones in downstream tasks of object detection, instance segmentation, and semantic segmentation using MS COCO and ADE20K datasets outperform prior work consistently. Specifically, GC ViT with a 4-scale DINO detection head achieves a box AP of 58.3 on MS COCO dataset.

Motivation & Objective

  • Motivate the need to capture both short- and long-range spatial information efficiently in vision transformers.
  • Propose a hierarchical ViT that interleaves local and global self-attention without expensive masks or shifting.
  • Introduce a CNN-like downsampling module to inject inductive bias and model inter-channel dependencies.
  • Design a global query generator that produces global tokens shared across global attention blocks.
  • Demonstrate state-of-the-art classification and competitive downstream performance on detection and segmentation.

Proposed method

  • Propose a hierarchical GC ViT architecture with stages that halve spatial resolution and double embedding dimension.
  • Use alternating blocks of local self-attention (within windows) and global self-attention (via pre-computed global query tokens).
  • Introduce a global query generator that extracts global features from the whole image at each stage and reshapes them for interaction with local keys/values.
  • Employ a modified fused MBConv downsampling block (with SE and GELU) to provide convolutional inductive bias and inter-channel modeling.
  • Provide a downsampler with strided convolution and a max-pooling step to reduce resolution while preserving information.
  • Analyze complexity to show GC ViT operates with comparable cost to Swin Transformer while enabling global context modeling.

Experimental results

Research questions

  • RQ1Can global context self-attention with shared global query tokens improve long-range interaction modeling in ViTs without expensive masking or shifting?
  • RQ2Does the addition of CNN-inspired downsampling and a global query generator provide substantial inductive bias and performance gains across classification, detection, and segmentation?
  • RQ3What are the trade-offs in parameters, FLOPs, and accuracy when scaling GC ViT across image classification and downstream tasks?

Key findings

  • GC ViT variants with 51M, 90M, and 201M parameters achieve 84.3%, 85.0%, and 85.7% Top-1 accuracy on ImageNet-1K without pre-training.
  • GC ViT-T, -S, -B, and -L backbones show competitive-to-state-of-the-art results on ImageNet-1K when trained from scratch.
  • On MS COCO, GC ViT with a pre-trained ImageNet backbone and Cascade Mask R-CNN head achieves 52.9 AP (box) and 45.8 AP (mask) with 4-scale detection heads; GC ViT-L with ImageNet-21K + 4-scale DINO head reaches 58.3% box AP.
  • On ADE20K, GC ViT backbones achieve 49.2 mIoU (GC ViT-B) with UPerNet head using single-scale inference.
  • Ablation shows removing window shifting or downsampling degrades performance, and incorporating a CNN-like stem and global self-attention yields substantial gains across classification, detection, and segmentation.
  • ImageNet-21K pretraining followed by fine-tuning yields GC ViT-L at 86.6% top-1, competitive with Swin-L and ConvNeXt-L when transferring to ImageNet-1K.

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.