arXiv reaDer
HiLo Attention を搭載した Fast Vision トランスフォーマー
Fast Vision Transformers with HiLo Attention
ビジョン トランスフォーマー (ViT) は、コンピューター ビジョンにおける最新かつ重要なブレイクスルーの引き金となっています。それらの効率的な設計は、計算の複雑さの間接的な指標、つまり FLOP によってほとんど導かれますが、スループットなどの直接的な指標とは明確なギャップがあります。したがって、効率的な ViT の設計原則として、ターゲット プラットフォームでの直接的な速度評価を使用することを提案します。特に、LITv2 はシンプルで効果的な ViT であり、さまざまなモデル サイズのスペクトル全体で既存の最先端の方法よりも高速で優れたパフォーマンスを発揮します。 LITv2 の中核にあるのは、私たちが HiLo と名付けた新しい自己注意メカニズムです。 HiLo は、画像内の高周波数が局所的な詳細をキャプチャし、低周波数がグローバル構造に焦点を合わせるという洞察に触発されていますが、マルチヘッド自己注意層は異なる周波数の特性を無視しています。したがって、ヘッドを 2 つのグループに分けることで、アテンション層の高/低周波数パターンを解きほぐすことを提案します。1 つのグループは、各ローカル ウィンドウ内の自己注意を介して高周波数をエンコードし、別のグループは、グローバル アテンションを実行することにより低周波数をエンコードします。入力特徴マップ内の各ウィンドウおよび各クエリ位置から平均プールされた低頻度のキーと値。両方のグループの効率的な設計の恩恵を受けて、GPU と CPU の FLOP、速度、およびメモリ消費量を包括的にベンチマークすることにより、HiLo が既存のアテンション メカニズムよりも優れていることを示します。たとえば、HiLo は、CPU での空間削減アテンションよりも 1.4 倍速く、ローカル ウィンドウ アテンションよりも 1.6 倍高速です。 HiLo を搭載した LITv2 は、画像分類、高密度検出、セグメンテーションなど、主流の視覚タスクの強力なバックボーンとして機能します。コードは https://github.com/ziplab/LITv2 で入手できます。
Vision Transformers (ViTs) have triggered the most recent and significant breakthroughs in computer vision. Their efficient designs are mostly guided by the indirect metric of computational complexity, i.e., FLOPs, which however has a clear gap with the direct metric such as throughput. Thus, we propose to use the direct speed evaluation on the target platform as the design principle for efficient ViTs. Particularly, we introduce LITv2, a simple and effective ViT which performs favourably against the existing state-of-the-art methods across a spectrum of different model sizes with faster speed. At the core of LITv2 is a novel self-attention mechanism, which we dub HiLo. HiLo is inspired by the insight that high frequencies in an image capture local fine details and low frequencies focus on global structures, whereas a multi-head self-attention layer neglects the characteristic of different frequencies. Therefore, we propose to disentangle the high/low frequency patterns in an attention layer by separating the heads into two groups, where one group encodes high frequencies via self-attention within each local window, and another group encodes low frequencies by performing global attention between the average-pooled low-frequency keys and values from each window and each query position in the input feature map. Benefiting from the efficient design for both groups, we show that HiLo is superior to the existing attention mechanisms by comprehensively benchmarking FLOPs, speed and memory consumption on GPUs and CPUs. For example, HiLo is 1.4x faster than spatial reduction attention and 1.6x faster than local window attention on CPUs. Powered by HiLo, LITv2 serves as a strong backbone for mainstream vision tasks including image classification, dense detection and segmentation. Code is available at https://github.com/ziplab/LITv2.
updated: Wed Apr 19 2023 12:04:13 GMT+0000 (UTC)
published: Thu May 26 2022 08:16:14 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アソシエイト