Skip to main content
QUICK REVIEW

[論文レビュー] Green Hierarchical Vision Transformer for Masked Image Modeling

Lang Huang, Shan You|arXiv (Cornell University)|May 26, 2022
Advanced Neural Network ApplicationsComputer Science被引用数 25
ひとこと要約

Mask Image Modelingを階層型Vision Transformerでグリーンなアプローチを導入し、Group Window Attention、Dynamic Programmingによる最適グルーピング、Sparse Convolutionを通じて visible patches のみで訓練を可能にし、主要な効率性向上を実現、競争力のある精度。

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.

研究の動機と目的

  • Mask Image Modeling (MIM) における階層型 ViT の効率的な自己教師あり事前学習を動機づける。
  • 可視パッチのみを操作しつつ、非対称なMAE風の事前学習をSwin/Twinsアーキテクチャへ拡張する。
  • 疎な入力に対して、注意機構、グルーピング、畳み込みを再考することで計算量とメモリを削減する。
  • ImageNet分類やMS-COCOの検出・セグメンテーションなどの下流タスクとの互換性を確保する。

提案手法

  • Group Window Attentionを提案し、局所ウィンドウを可視パッチの等サイズグループに分割し、グループ内でマスク付き注意を適用する。
  • 最適なグルーピングを制約付き最適化問題として定式化し、Dynamic Programmingにより注意計算コストを最小化する。
  • 畳み込みとプーリング操作をSparse Convolutionに変換し、疎な(visible)パッチを自然に扱えるようにする。
  • 最大のエンコーダーパッチサイズと同じ固定マスクサイズを用いたバッチ単位のランダムマスキング戦略を使用して並列計算を可能にする。
  • 階層的バックボーン(Swin, Twins)全体で標準畳み込みをSparse Convolutionに置換し、visible patches上のMIMとの互換性を維持する。

実験結果

リサーチクエスチョン

  • RQ1階層型ViT(例:Swin/Twins)を、マスクされたパッチを破棄しつつ、MIMで効率的に訓練できるのか?
  • RQ2窓ベースの注意機構と畳み込みを、精度を落とさずに疎でマスクされた入力に適応させるにはどうすればよいか?
  • RQ3局所ウィンドウ内のマスク付き自己注意の計算コストを最小化するグルーピング戦略は何か?
  • RQ4提案されたグリーンMIMアプローチは、訓練時間とメモリを削減しつつ、ImageNetおよびCOCOの性能を競争力のある水準で維持できるか?

主な発見

  • Swin-L/Twins-L構成で、ベースラインに対して最大で2.7×の訓練速度アップとGPUメモリ70%削減を達成。
  • 事前学習後、Swin-B (83.8%), Twins-L (83.9%), Swin-L (85.1%)でImageNet-1Kトップ1精度を競争力ある水準で示す。
  • MS-COCOでは、グリーンMIM事前学習からファインチューニングした場合、強力なベースラインに対して競争力のある物体検出とインスタンスセグメンテーション性能を発揮。
  • Optimal Groupingを備えたGroup Window Attentionは、マスク付き自己注意の冗長な計算を削減し、より大きなモデルでのスケーリングに適している。
  • 固定パッチサイズのバッチ単位マスキングは、効率的な並列計算と疎な入力を扱うためのSparse Convolutionsを効果的に可能にする。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。