[論文レビュー] CrossFormer: A Versatile Vision Transformer Hinging on Cross-scale Attention
CrossFormerはクロススケールの埋め込みと長短距離の注意力を導入して、ビジョン・トランスフォーマーにおけるクロススケール相互作用を可能にし、可変入力サイズのための動的位置バイアスを追加して、分類、検出、インスタンス分割、セマンティック分割の全般的な良好な結果を達成します。
Transformers have made great progress in dealing with computer vision tasks. However, existing vision transformers do not yet possess the ability of building the interactions among features of different scales, which is perceptually important to visual inputs. The reasons are two-fold: (1) Input embeddings of each layer are equal-scale, so no cross-scale feature can be extracted; (2) to lower the computational cost, some vision transformers merge adjacent embeddings inside the self-attention module, thus sacrificing small-scale (fine-grained) features of the embeddings and also disabling the cross-scale interactions. To this end, we propose Cross-scale Embedding Layer (CEL) and Long Short Distance Attention (LSDA). On the one hand, CEL blends each embedding with multiple patches of different scales, providing the self-attention module itself with cross-scale features. On the other hand, LSDA splits the self-attention module into a short-distance one and a long-distance counterpart, which not only reduces the computational burden but also keeps both small-scale and large-scale features in the embeddings. Through the above two designs, we achieve cross-scale attention. Besides, we put forward a dynamic position bias for vision transformers to make the popular relative position bias apply to variable-sized images. Hinging on the cross-scale attention module, we construct a versatile vision architecture, dubbed CrossFormer, which accommodates variable-sized inputs. Extensive experiments show that CrossFormer outperforms the other vision transformers on image classification, object detection, instance segmentation, and semantic segmentation tasks. The code has been released: https://github.com/cheerss/CrossFormer.
研究の動機と目的
- ビジョン・トランスフォーマーにおける多様な視覚タスクでクロススケールの特徴相互作用の必要性を動機づける。
- 計算量を過度に増やすことなくクロススケールのアテンションを実現するメカニズムを提案する。
- タスク間で可変サイズ入力を扱える多用途アーキテクチャを開発する。
提案手法
- Cross-scale Embedding Layer (CEL) は埋め込みごとに複数スケールのパッチをサンプリングし、それらを連結してクロススケール埋め込みを形成する。
- Long Short Distance Attention (LSDA) は自己アテンションを Short Distance Attention (SDA) と Long Distance Attention (LDA) に分割し、小規模スケールと大規模スケールの特徴を両立させつつ計算を削減する。
- Dynamic Position Bias (DPB) は埋め込み距離から相対位置バイアスを生成するMLPを用い、可変の画像/グループサイズを可能にする。
- CELとCrossFormerブロック(LSDA + DPB)を用いたピラミッド型アーキテクチャを構築し、複数段階と多様なビジョンタスクをサポートする。
- 4つのCrossFormerバリアント(T、S、B、L)を構築し、スモールからラージのモデルスケールと異なるダウンストリームのニーズに対応する。
実験結果
リサーチクエスチョン
- RQ1クロススケール埋め込みと長短距離の注意が、ビジョン・トランスフォーマーにおける効果的なクロススケール相互作用を可能にするか。
- RQ2動的位置バイアスは可変入力サイズとグルーピングに対する堅牢性をタスク横断で改善するか。
- RQ3CrossFormerモデルは、分類、検出、インスタンス/セマンティック分割において、最先端のビジョントランスフォーマーより精度とタスクパフォーマンスを向上させるか。
- RQ4CELとLSDAは小規模ディテールを犠牲にすることなく計算効率に寄与するか。
- RQ5密度の高い予測タスク(検出/分割)でのゲインは、画像分類のときより顕著か。
主な発見
- CrossFormerは、パラメータとFLOPsが同等でありながらImageNet分類で最先端のビジョントランスフォーマーを一貫して上回る。
- CrossFormer-S/B/Lは、モデルサイズを問わず強力なベースライン(例: DeiT, Swin)を上回る精度を達成し、特に大きなモデルで顕著な改善を示す。
- COCOのオブジェクト検出とインスタンス分割において、CrossFormerバリアントはより高いAP指標を得、モデルが大きいほど利益が大きい。
- ADE20Kのセマンティック分割でCrossFormerバックボーンはIOU/MS IOUスコアを改善し、特に大きいバリアントで顕著。
- アブレーション実験は、クロススケール埋め込みとLSDAがPVT風およびSwin風の注意より優れており、DPBは可変入力サイズの柔軟性を追加しつつRPBの性能に匹敵することを示している。
より良い研究を、今すぐ始めましょう
論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。