Skip to main content
QUICK REVIEW

[論文レビュー] LocalViT: Analyzing Locality in Vision Transformers

Yawei Li, Kai Zhang|arXiv (Cornell University)|Apr 12, 2021
Advanced Neural Network Applications参考文献 44被引用数 283
ひとこと要約

LocalViTは、フィードフォワードネットワークに深さ方向畳み込みを挿入して局所性機構をビジョン変換器に追加し、追加コストを最小限に抑えつつImageNet精度を向上させ、複数のトランスフォーマーアーキテクチャ間で汎用性を示している。

ABSTRACT

The aim of this paper is to study the influence of locality mechanisms in vision transformers. Transformers originated from machine translation and are particularly good at modelling long-range dependencies within a long sequence. Although the global interaction between the token embeddings could be well modelled by the self-attention mechanism of transformers, what is lacking is a locality mechanism for information exchange within a local region. In this paper, locality mechanism is systematically investigated by carefully designed controlled experiments. We add locality to vision transformers into the feed-forward network. This seemingly simple solution is inspired by the comparison between feed-forward networks and inverted residual blocks. The importance of locality mechanisms is validated in two ways: 1) A wide range of design choices (activation function, layer placement, expansion ratio) are available for incorporating locality mechanisms and proper choices can lead to a performance gain over the baseline, and 2) The same locality mechanism is successfully applied to vision transformers with different architecture designs, which shows the generalization of the locality concept. For ImageNet2012 classification, the locality-enhanced transformers outperform the baselines Swin-T, DeiT-T, and PVT-T by 1.0%, 2.6% and 3.1% with a negligible increase in the number of parameters and computational effort. Code is available at https://github.com/ofsoundof/LocalViT.

研究の動機と目的

  • 局所性機構をビジョントランスフォーマーに統合する動機付けを示す。
  • フィードフォワードネットワークに深さ方向畳み込みを挿入して局所性強化トランスフォーマーを提案する。
  • 局所性、活性化関数、および拡張比が性能に与える影響を分析する。
  • 一般性を示すために複数のビジョントランスフォーマーアーキテクチャにわたってこのアプローチを実証する。

提案手法

  • 入力をトークン埋め込みの列として解釈し、2D格子に再配置する(Seq2Img)。
  • フィードフォワードネットワークを、1x1畳み込みと深さ方向2D畳み込みを含む、反転Residualに触発されたモジュールに置換する。
  • 深さ方向畳み込みの後に非線形活性化を使用する(例:ReLU6、h-swish)および任意の注意モジュール(ECA/SE)。
  • 分類トークンをフィードフォワードネットワークの前に分割し、画像トークン処理後に再結合して分類挙動を保持する。
  • 局所性を選択したトランスフォーマー層に適用し、配置と拡張比(gamma)のパフォーマンスへの影響を分析する。

実験結果

リサーチクエスチョン

  • RQ1フィードフォワードネットワークに局所性を注入することで、パラメータやFLOPsの大幅な増加なしにビジョントランスフォーマーの精度が向上するか?
  • RQ2活性化関数、層配置、および hidden dimension expansion が局所性の利点にどう影響するか?
  • RQ3局所性機構はDeiT、T2T-ViT、PVT、TNTなど異なるビジョントランスフォーマーアーキテクチャ間でどの程度汎化するか?

主な発見

  • 深さ方向畳み込みだけでベースラインのトランスフォーマーを改善する。
  • 深さ方向畳み込み後の活性化の選択は利得に大きく影響する(例:SE/ECAを用いたh-swishはより大きな利得を生む)。
  • 局所性は低いレイヤーの方が高いレイヤーより有益である。
  • 隠れ層の次元拡張比(gamma)を増やすと容量と精度の利得が大きくなる。
  • 局所性機構はDeiT、T2T-ViT、PVT、TNTの間で一般化し、いくつかのケースでベースラインを上回る顕著な改善を示す。
  • ImageNet上で、LocalViTのバリアントはDeiT-TおよびPVT-Tのベースラインを数ポイント上回るが、パラメータ/計算オーバーヘッドは最小限。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。