[論文レビュー] CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows
CSWin Transformer は、横方向と縦方向のストライプを並列に用いた十字窓自己注意と、局所強化位置エンコーディングを導入することで、分類・検出・セマンティック分割において高い性能を発揮する、スケーラブルで汎用的なビジョンバックボーンを実現します。
We present CSWin Transformer, an efficient and effective Transformer-based backbone for general-purpose vision tasks. A challenging issue in Transformer design is that global self-attention is very expensive to compute whereas local self-attention often limits the field of interactions of each token. To address this issue, we develop the Cross-Shaped Window self-attention mechanism for computing self-attention in the horizontal and vertical stripes in parallel that form a cross-shaped window, with each stripe obtained by splitting the input feature into stripes of equal width. We provide a mathematical analysis of the effect of the stripe width and vary the stripe width for different layers of the Transformer network which achieves strong modeling capability while limiting the computation cost. We also introduce Locally-enhanced Positional Encoding (LePE), which handles the local positional information better than existing encoding schemes. LePE naturally supports arbitrary input resolutions, and is thus especially effective and friendly for downstream tasks. Incorporated with these designs and a hierarchical structure, CSWin Transformer demonstrates competitive performance on common vision tasks. Specifically, it achieves 85.4\% Top-1 accuracy on ImageNet-1K without any extra training data or label, 53.9 box AP and 46.4 mask AP on the COCO detection task, and 52.2 mIOU on the ADE20K semantic segmentation task, surpassing previous state-of-the-art Swin Transformer backbone by +1.2, +2.0, +1.4, and +2.0 respectively under the similar FLOPs setting. By further pretraining on the larger dataset ImageNet-21K, we achieve 87.5% Top-1 accuracy on ImageNet-1K and high segmentation performance on ADE20K with 55.7 mIoU. The code and models are available at https://github.com/microsoft/CSWin-Transformer.
研究の動機と目的
- 汎用的なビジョンTransformerバックボーンを、効率と長距離モデリングを改善して構築する。
- 横方向と縦方向のストライプ注意を並列に計算する十字窓自己注意機構を提案する。
- ローカルな空間位置偏差を改善する Locally-Enhanced Positional Encoding (LePE) を導入し、入力解像度の柔軟性をサポートする。
- 階層的な CSWin Transformer アーキテクチャを構築し、ImageNet-1K、COCO、ADE20K で検証する。
- Swin Transformer と比較して同等の FLOPs で改善を示し、より大規模な事前学習データでスケールさせる。
提案手法
- CSWin 自己注意を定義し、多頭を横ストライプと縦ストライプの二つの並列グループに分割してストライプ注意を実現する。
- 等幅のストライプ sw 内で注意を計算し、ストライプ幅は深さに応じて変化させ、容量とコストのバランスを取る。
- ブロック内で横方向と縦方向の注意を並列に実行できるようにヘッドを二つのグループに分割し、追加計算を発生させない。
- self-attention に parallel モジュールとして追加され、投影値に対して動作し、任意の入力解像度をサポートする Locally-Enhanced Positional Encoding (LePE) を導入する。
- 埋め込みを重ね合わせる four-stage の階層的 CSWin Transformer を構築し、CSWin-T/S/B/L の four variant を、指定されたチャネル数とヘッド構成で構築する。
- ImageNet-1K 分類、COCO のオブジェクト検出/インスタンスセグメンテーション、ADE20K のセマンティックセグメンテーションで、ImageNet-21K の前学習あり/なしで評価する。
実験結果
リサーチクエスチョン
- RQ1CSWin 自己注意は十字窓を用いることで、効率的により大きな有効受容野を達成できるか。
- RQ2横方向/縦方向のストライプ注意を並列化することで、計算量を大幅に増やさずにモデリング能力を向上させられるか。
- RQ3LePE は、さまざまな入力解像度および下流タスクに対して堅牢な位置エンコoding を提供するか。
- RQ4CSWin Transformer は、Swin ほかのビジョンTransformer と比較して、分類・検出・セグメンテーションの一般的なバックボーンとしてどの程度機能するか。
主な発見
- CSWin-T は ImageNet-1K で Top-1 82.7% を、4.3G FLOPs で達成し、同等予算の Swin-T および DeiT-S を上回る。
- CSWin-S および CSWin-B は、同等の FLOPs とモデルサイズを使用した場合、ImageNet-1K で Swin-S および Swin-B を凌駕する。
- COCO での物体検出では、CSWin-B が 53.9 box AP および 46.4 mask AP を達成し、Swin-B を顕著に上回る。
- ADE20K のセグメンテーションでは、CSWin-B は 53.9 mIoU(特定の設定で 52.2 mIoU)を達成し、CSWin-L は ImageNet-21K 前学習で 55.7 mIoU に達して、従来のSOTAバックボーンを上回る。
- ImageNet-21K の前学習を用いた場合、CSWin-B/L はそれぞれ ImageNet-1K で 87.0/87.5 Top-1 accuracy に到達し、より大規模データのメリットを示す。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。