Green Hierarchical Vision Transformer for Masked Image Modeling
Lang Huang, Shan You, Mingkai Zheng, Fei Wang, Chen Qian, Toshihiko Yamasaki
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 [25, 13] 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 [49] and Twins Transformer [14], about 2.7× 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: https://github.com/LayneH/GreenMIM .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
18 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Hiera: A Hierarchical Vision Transformer without the Bells-and-Whistles cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Hiera: A Hierarchical Vision Transformer without the Bells-and-Whistles cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
- Anatomical Invariance Modeling and Semantic Alignment for Self-supervised Learning in 3D Medical Image Analysis cites A Simple Framework for Contrastive Learning of Visual Representations
- Anatomical Invariance Modeling and Semantic Alignment for Self-supervised Learning in 3D Medical Image Analysis cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Anatomical Invariance Modeling and Semantic Alignment for Self-supervised Learning in 3D Medical Image Analysis cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- SimMatchV2: Semi-Supervised Learning with Graph Consistency cites A Simple Framework for Contrastive Learning of Visual Representations
- SimMatchV2: Semi-Supervised Learning with Graph Consistency cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- SimMatchV2: Semi-Supervised Learning with Graph Consistency cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- LMD: Faster Image Reconstruction with Latent Masking Diffusion cites Denoising Diffusion Probabilistic Models
Cited by top-tier papers18
- Hiera: A Hierarchical Vision Transformer without the Bells-and-WhistlesChaitanya Ryali, Yuan-Ting Hu, Daniel Bolya, Chen Wei et al.ICML 2023 · 388 citations
- Anatomical Invariance Modeling and Semantic Alignment for Self-supervised Learning in 3D Medical Image AnalysisYankai Jiang, Mingze Sun, Heng Guo, Xiaoyu Bai et al.ICCV 2023 · 38 citations
- TorchSparse++: Efficient Training and Inference Framework for Sparse Convolution on GPUsHaotian Tang, Shang Yang, Zhijian Liu, Ke Hong et al.MICRO 2023 · 32 citations
- SimMatchV2: Semi-Supervised Learning with Graph ConsistencyMingkai Zheng, Shan You, Lang Huang, Chen Luo et al.ICCV 2023 · 17 citations
- LMD: Faster Image Reconstruction with Latent Masking DiffusionZhiyuan Ma, Zhihuan Yu, Jianjun Li, Bowen ZhouAAAI 2024 · 15 citations
Builds on38
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
Related papers
- HiViT: A Simpler and More Efficient Design of Hierarchical Vision TransformerXiaosong Zhang, Yunjie Tian, Lingxi Xie, Wei Huang et al.ICLR 2023
- Unleashing Vanilla Vision Transformer with Masked Image Modeling for Object DetectionYuxin Fang, Shusheng Yang, Shijie Wang, Yixiao Ge et al.ICCV 2023 · 67 citations
- Scalable Vision Transformers with Hierarchical PoolingZizheng Pan, Bohan Zhuang, Jing Liu, Haoyu He et al.ICCV 2021 · 154 citations
- EViT: Expediting Vision Transformers via Token ReorganizationsYouwei Liang, Chongjian Ge, Zhan Tong, Yibing Song et al.ICLR 2022 · 137 citations
- SHF: Symmetrical Hierarchical Forest with Pretrained Vision Transformer Encoder for High-Resolution Medical SegmentationEnzhi Zhang, Peng Chen, Rui Zhong, Du Wu et al.NeurIPS 2025 · 1 citation
