ViG: Linear-complexity Visual Sequence Learning with Gated Linear Attention

要約

最近、線形複雑性シーケンス モデリング ネットワークは、FLOP とメモリの使用量を減らしながら、さまざまなコンピューター ビジョン タスクで Vision Transformers と同様のモデリング機能を実現しました。
ただし、実際の実行速度の点での利点はそれほど大きくありません。
この問題に対処するために、当社では、優れたハードウェア認識と効率性を活用した視覚向けの Gated Linear Attendant (GLA) を導入しました。
我々は、双方向モデリングを通じて 1D グローバル コンテキストをキャプチャする方向別ゲーティングと、2D ローカル詳細を 1D グローバル コンテキストに適応的に注入する 2D ゲーティング局所性注入を提案します。
当社のハードウェア対応実装では、順方向スキャンと逆方向スキャンが単一のカーネルに統合され、並列処理が強化され、メモリのコストと遅延が削減されます。
提案されたモデル \name{} は、ImageNet およびダウンストリーム タスクの精度、パラメータ、FLOP において有利なトレードオフを提供し、一般的な Transformer および CNN ベースのモデルよりも優れたパフォーマンスを発揮します。
特に、\name{}-S はパラメータの 27\% と FLOP の 20\% のみを使用しながら DeiT-B の精度と一致し、$224\times224$ のイメージで 2$\times$ 高速に実行されます。
$1024\times$ の解像度では、\name{}-T は DeiT よりも 5.2$\times$ 少ない FLOP を使用し、90\% GPU メモリを節約し、4.8$\time$ 高速に実行し、20.7\% 高いトップ 1 精度を達成します。
T.
これらの結果により、\name{} は視覚表現学習のための効率的でスケーラブルなソリューションとして位置づけられます。
コードは \url{https://github.com/hustvl/ViG} で入手できます。

要約(オリジナル)

Recently, linear complexity sequence modeling networks have achieved modeling capabilities similar to Vision Transformers on a variety of computer vision tasks, while using fewer FLOPs and less memory. However, their advantage in terms of actual runtime speed is not significant. To address this issue, we introduce Gated Linear Attention (GLA) for vision, leveraging its superior hardware-awareness and efficiency. We propose direction-wise gating to capture 1D global context through bidirectional modeling and a 2D gating locality injection to adaptively inject 2D local details into 1D global context. Our hardware-aware implementation further merges forward and backward scanning into a single kernel, enhancing parallelism and reducing memory cost and latency. The proposed model, \name{}, offers a favorable trade-off in accuracy, parameters, and FLOPs on ImageNet and downstream tasks, outperforming popular Transformer and CNN-based models. Notably, \name{}-S matches DeiT-B’s accuracy while using only 27\% of the parameters and 20\% of the FLOPs, running 2$\times$ faster on $224\times224$ images. At $1024\times1024$ resolution, \name{}-T uses 5.2$\times$ fewer FLOPs, saves 90\% GPU memory, runs 4.8$\times$ faster, and achieves 20.7\% higher top-1 accuracy than DeiT-T. These results position \name{} as an efficient and scalable solution for visual representation learning. Code is available at \url{https://github.com/hustvl/ViG}.

arxiv情報

著者 Bencheng Liao,Xinggang Wang,Lianghui Zhu,Qian Zhang,Chang Huang
発行日 2024-05-28 17:59:21+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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