Vision Transformers with Hierarchical Attention

要約

この論文では、バニラ ビジョン トランスフォーマーのマルチヘッド セルフ アテンション (MHSA) に関連する高い計算/空間の複雑さに取り組みます。
この目的を達成するために、階層的な方法で自己注意を計算する新しいアプローチである階層型 MHSA (H-MHSA) を提案します。
具体的には、まず一般的に行われているように入力画像をパッチに分割し、各パッチをトークンとして見ます。
次に、提案された H-MHSA はローカル パッチ内のトークン関係を学習し、ローカル関係モデリングとして機能します。
次に、小さなパッチが大きなパッチにマージされ、H-MHSA はマージされた少数のトークンのグローバルな依存関係をモデル化します。
最後に、ローカルおよびグローバルの注意深い特徴が集約されて、強力な表現能力を備えた特徴が得られます。
各ステップで限られた数のトークンについてのみアテンションを計算するため、計算負荷が大幅に軽減されます。
したがって、H-MHSA は、きめの細かい情報を犠牲にすることなく、トークン間のグローバルな関係を効率的にモデル化できます。
H-MHSA モジュールを組み込むことで、階層アテンションベースのトランスフォーマー ネットワーク ファミリ、つまり HAT-Net を構築します。
シーン理解における HAT-Net の優位性を実証するために、画像分類、セマンティック セグメンテーション、オブジェクト検出、インスタンス セグメンテーションなどの基本的な視覚タスクに関する広範な実験を実施しました。
したがって、HAT-Net はビジョン トランスフォーマーに新しい視点を提供します。
コードと事前トレーニングされたモデルは https://github.com/yun-liu/HAT-Net で入手できます。

要約(オリジナル)

This paper tackles the high computational/space complexity associated with Multi-Head Self-Attention (MHSA) in vanilla vision transformers. To this end, we propose Hierarchical MHSA (H-MHSA), a novel approach that computes self-attention in a hierarchical fashion. Specifically, we first divide the input image into patches as commonly done, and each patch is viewed as a token. Then, the proposed H-MHSA learns token relationships within local patches, serving as local relationship modeling. Then, the small patches are merged into larger ones, and H-MHSA models the global dependencies for the small number of the merged tokens. At last, the local and global attentive features are aggregated to obtain features with powerful representation capacity. Since we only calculate attention for a limited number of tokens at each step, the computational load is reduced dramatically. Hence, H-MHSA can efficiently model global relationships among tokens without sacrificing fine-grained information. With the H-MHSA module incorporated, we build a family of Hierarchical-Attention-based Transformer Networks, namely HAT-Net. To demonstrate the superiority of HAT-Net in scene understanding, we conduct extensive experiments on fundamental vision tasks, including image classification, semantic segmentation, object detection, and instance segmentation. Therefore, HAT-Net provides a new perspective for vision transformers. Code and pretrained models are available at https://github.com/yun-liu/HAT-Net.

arxiv情報

著者 Yun Liu,Yu-Huan Wu,Guolei Sun,Le Zhang,Ajad Chhatkuli,Luc Van Gool
発行日 2024-01-12 12:07:31+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV パーマリンク