arXiv reaDer
初期のグローバル統合によるローカルシフトの注目
Locally Shifted Attention With Early Global Integration
最近の研究は、コンピュータビジョンアプリケーション用のトランスの可能性を示しています。画像は最初にパッチに分割され、パッチはアテンションメカニズムの入力トークンとして使用されます。アテンションメカニズムの2次コストが高いため、大きなパッチサイズが使用されて、粗いグローバルインタラクションが発生するか、または、長距離インタラクションを犠牲にして、画像のローカル領域にのみアテンションが適用されます。 。この作業では、ビジョントランスフォーマーの初期層ですでに粗いグローバル相互作用と細粒度のローカル相互作用の両方を可能にするアプローチを提案します。私たちの方法の中核は、ローカルおよびグローバルな注意層の適用です。ローカルアテンションレイヤーでは、各パッチとそのローカルシフトにアテンションを適用し、単一の特定の場所にバインドされていない、仮想的に配置されたローカルパッチを作成します。これらの仮想的に配置されたパッチは、グローバルアテンションレイヤーで使用されます。アテンションレイヤーをローカルとグローバルの対応するレイヤーに分離することで、パッチ数の計算コストを低く抑えながら、他のビジュアルトランスフォーマーでの静的な配置とは対照的に、すでに最初のレイヤーでのデータ依存のローカリゼーションをサポートします。私たちの方法は、CIFAR10、CIFAR100、およびImageNetでの画像分類に関して、畳み込み法とトランスフォーマーベースの方法の両方よりも優れていることが示されています。コードはhttps://github.com/shellysheynin/Locally-SAG-Transformerで入手できます。
Recent work has shown the potential of transformers for computer vision applications. An image is first partitioned into patches, which are then used as input tokens for the attention mechanism. Due to the expensive quadratic cost of the attention mechanism, either a large patch size is used, resulting in coarse-grained global interactions, or alternatively, attention is applied only on a local region of the image, at the expense of long-range interactions. In this work, we propose an approach that allows for both coarse global interactions and fine-grained local interactions already at early layers of a vision transformer. At the core of our method is the application of local and global attention layers. In the local attention layer, we apply attention to each patch and its local shifts, resulting in virtually located local patches, which are not bound to a single, specific location. These virtually located patches are then used in a global attention layer. The separation of the attention layer into local and global counterparts allows for a low computational cost in the number of patches, while still supporting data-dependent localization already at the first layer, as opposed to the static positioning in other visual transformers. Our method is shown to be superior to both convolutional and transformer-based methods for image classification on CIFAR10, CIFAR100, and ImageNet. Code is available at: https://github.com/shellysheynin/Locally-SAG-Transformer.
updated: Thu Dec 09 2021 18:12:24 GMT+0000 (UTC)
published: Thu Dec 09 2021 18:12:24 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト