Skip to main content
QUICK REVIEW

[논문 리뷰] Green Hierarchical Vision Transformer for Masked Image Modeling

Lang Huang, Shan You|arXiv (Cornell University)|2022. 05. 26.
Advanced Neural Network ApplicationsComputer Science인용 수 25
한 줄 요약

introduces a green approach to Masked Image Modeling with hierarchical Vision Transformers by enabling training on visible patches only through Group Window Attention, optimal grouping via Dynamic Programming, and Sparse Convolution, achieving major efficiency gains with competitive accuracy.

ABSTRACT

We present an efficient approach for Masked Image Modeling (MIM) with hierarchical Vision Transformers (ViTs), allowing the hierarchical ViTs to discard masked patches and operate only on the visible ones. Our approach consists of three key designs. First, for window attention, we propose a Group Window Attention scheme following the Divide-and-Conquer strategy. To mitigate the quadratic complexity of the self-attention w.r.t. the number of patches, group attention encourages a uniform partition that visible patches within each local window of arbitrary size can be grouped with equal size, where masked self-attention is then performed within each group. Second, we further improve the grouping strategy via the Dynamic Programming algorithm to minimize the overall computation cost of the attention on the grouped patches. Third, as for the convolution layers, we convert them to the Sparse Convolution that works seamlessly with the sparse data, i.e., the visible patches in MIM. As a result, MIM can now work on most, if not all, hierarchical ViTs in a green and efficient way. For example, we can train the hierarchical ViTs, e.g., Swin Transformer and Twins Transformer, about 2.7$ imes$ faster and reduce the GPU memory usage by 70%, while still enjoying competitive performance on ImageNet classification and the superiority on downstream COCO object detection benchmarks. Code and pre-trained models have been made publicly available at https://github.com/LayneH/GreenMIM.

연구 동기 및 목표

  • Motivate efficient self-supervised pre-training for hierarchical ViTs in Masked Image Modeling (MIM).
  • Extend asymmetric MAE-style pre-training to Swin/Twins architectures while operating on visible patches only.
  • Reduce computation and memory by rethinking attention, grouping, and convolution for sparse inputs.
  • Ensure compatibility with downstream tasks like ImageNet classification and MS-COCO detection and segmentation.

제안 방법

  • Propose Group Window Attention to partition local windows into equal-sized groups of visible patches and apply masked attention within groups.
  • Formulate optimal grouping as a constrained optimization problem and solve via Dynamic Programming to minimize attention computation cost.
  • Convert convolution and pooling operations to Sparse Convolution to naturally handle sparse (visible) patches.
  • Use a batch-wise random masking strategy with a fixed mask size equal to the largest encoder patch size to enable parallel computation.
  • Replace standard convolutions with sparse convolution across hierarchical backbones (Swin, Twins) to maintain compatibility with MIM on visible patches.

실험 결과

연구 질문

  • RQ1Can hierarchical ViTs (e.g., Swin/Twins) be efficiently trained with MIM while discarding masked patches?
  • RQ2How can window-based attention and convolutions be adapted to sparse, masked inputs without sacrificing accuracy?
  • RQ3What grouping strategy minimizes computational cost for masked self-attention in local windows?
  • RQ4Does the proposed green MIM approach maintain competitive ImageNet and COCO performance while reducing training time and memory?

주요 결과

  • Achieves up to 2.7× training speedup and 70% GPU memory reduction versus a baseline on Swin-L/Twins-L configurations.
  • Demonstrates competitive ImageNet-1K top-1 accuracy with Swin-B (83.8%), Twins-L (83.9%), and Swin-L (85.1%) after pre-training.
  • On MS-COCO, delivers competitive object detection and instance segmentation performance against strong baselines when fine-tuned from the green MIM pre-training.
  • Group Window Attention with Optimal Grouping reduces redundant computations in masked self-attention and scales well with larger models.
  • Batch-wise masking with fixed patch size enables efficient parallel computation and sparse convolutions to handle sparse inputs effectively.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.