LookupViT: Compressing visual information to a limited number of tokens

要約

ビジョン トランスフォーマー (ViT) は、数多くの業界グレードのビジョン ソリューションの事実上の選択肢として浮上しています。
しかし、各層で自己注意を計算するため、トークンの数が 2 次の計算で複雑になるため、多くの設定では推論コストが法外に高くなる可能性があります。
一方、画像の空間情報やビデオの時空間情報は通常、疎で冗長です。
この研究では、この情報の希薄性を利用して ViT 推論コストを削減することを目的とした LookupViT を紹介します。
LookupViT は、高解像度のトークンからの情報を固定数のトークンに圧縮することによって動作する、新しい汎用ビジョン トランスフォーマー ブロックを提供します。
これらの少数の圧縮トークンは細心の注意を払って処理され、高解像度のトークンは計算コストの低いレイヤーを通過します。
これら 2 つのトークン セット間の情報共有は、双方向クロスアテンション メカニズムを通じて有効になります。
このアプローチには複数の利点があります。(a) 標準の高レベル オペレーターを介して標準 ML アクセラレータ (GPU/TPU) に実装しやすい、(b) 標準 ViT およびそのバリアントに適用できるため、さまざまなタスクに一般化できる、(c) 処理できる
さまざまなトークン化と注目のアプローチ。
LookupViT は圧縮トークンの柔軟性も提供し、単一のトレーニング済みモデルでパフォーマンスと計算のトレードオフを可能にします。
複数のドメインにおける LookupViT の有効性を示します。(a) 画像分類 (ImageNet-1K および ImageNet-21K)、(b) ビデオ分類 (Kinetics400 および Something-Something V2)、(c) 画像キャプション (COCO-Captions)
フリーズしたエンコーダ。
LookupViT は、これらのドメイン全体で精度を維持または向上させながら、FLOP を 2 倍の削減を実現します。
さらに、LookupViT は、画像分類 (ImageNet-C、R、A、O) におけるすぐに使える堅牢性と一般化も実証しており、ViT よりも最大 $4\%$ 向上しています。

要約(オリジナル)

Vision Transformers (ViT) have emerged as the de-facto choice for numerous industry grade vision solutions. But their inference cost can be prohibitive for many settings, as they compute self-attention in each layer which suffers from quadratic computational complexity in the number of tokens. On the other hand, spatial information in images and spatio-temporal information in videos is usually sparse and redundant. In this work, we introduce LookupViT, that aims to exploit this information sparsity to reduce ViT inference cost. LookupViT provides a novel general purpose vision transformer block that operates by compressing information from higher resolution tokens to a fixed number of tokens. These few compressed tokens undergo meticulous processing, while the higher-resolution tokens are passed through computationally cheaper layers. Information sharing between these two token sets is enabled through a bidirectional cross-attention mechanism. The approach offers multiple advantages – (a) easy to implement on standard ML accelerators (GPUs/TPUs) via standard high-level operators, (b) applicable to standard ViT and its variants, thus generalizes to various tasks, (c) can handle different tokenization and attention approaches. LookupViT also offers flexibility for the compressed tokens, enabling performance-computation trade-offs in a single trained model. We show LookupViT’s effectiveness on multiple domains – (a) for image-classification (ImageNet-1K and ImageNet-21K), (b) video classification (Kinetics400 and Something-Something V2), (c) image captioning (COCO-Captions) with a frozen encoder. LookupViT provides $2\times$ reduction in FLOPs while upholding or improving accuracy across these domains. In addition, LookupViT also demonstrates out-of-the-box robustness and generalization on image classification (ImageNet-C,R,A,O), improving by up to $4\%$ over ViT.

arxiv情報

著者 Rajat Koner,Gagan Jain,Prateek Jain,Volker Tresp,Sujoy Paul
発行日 2024-07-17 17:22:43+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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