Multi-Tailed Vision Transformer for Efficient Inference

要約

最近、Vision Transformer (ViT) は画像認識において有望なパフォーマンスを達成し、さまざまな視覚タスクで強力なバックボーンとして徐々に機能しています。
Transformer の順次入力を満たすために、ViT のテールはまず各画像を固定長の一連のビジュアル トークンに分割します。
次に、次のセルフ アテンション レイヤーがトークン間のグローバルな関係を構築し、下流のタスクに役立つ表現を生成します。
経験的には、より多くのトークンで画像を表現するとパフォーマンスが向上しますが、トークンの数に対するセルフアテンション層の二次計算の複雑さは、ViT の推論の効率に深刻な影響を与える可能性があります。
計算量を削減するために、いくつかのプルーニング メソッドは、Transformer エンコーダー内の有益でないトークンを段階的にプルーニングし、Transformer の前のトークンの数はそのままにします。
実際、Transformer エンコーダーの入力としてのトークンが少なくなると、次の計算コストが直接削減されます。
この精神に基づいて、本稿では Multi-Tailed Vision Transformer (MT-ViT) を提案します。
MT-ViT は、複数のテールを採用して、次の Transformer エンコーダー用にさまざまな長さのビジュアル シーケンスを生成します。
テール予測器は、画像が正確な予測を生成するためにどのテールが最も効率的であるかを決定するために導入されています。
どちらのモジュールも、Gumbel-Softmax トリックを使用してエンドツーエンドの方法で最適化されます。
ImageNet-1K での実験では、MT-ViT が精度を低下させることなく FLOP の大幅な削減を達成でき、精度と FLOP の両方で他の比較手法よりも優れていることが実証されました。

要約(オリジナル)

Recently, Vision Transformer (ViT) has achieved promising performance in image recognition and gradually serves as a powerful backbone in various vision tasks. To satisfy the sequential input of Transformer, the tail of ViT first splits each image into a sequence of visual tokens with a fixed length. Then the following self-attention layers constructs the global relationship between tokens to produce useful representation for the downstream tasks. Empirically, representing the image with more tokens leads to better performance, yet the quadratic computational complexity of self-attention layer to the number of tokens could seriously influence the efficiency of ViT’s inference. For computational reduction, a few pruning methods progressively prune uninformative tokens in the Transformer encoder, while leaving the number of tokens before the Transformer untouched. In fact, fewer tokens as the input for the Transformer encoder can directly reduce the following computational cost. In this spirit, we propose a Multi-Tailed Vision Transformer (MT-ViT) in the paper. MT-ViT adopts multiple tails to produce visual sequences of different lengths for the following Transformer encoder. A tail predictor is introduced to decide which tail is the most efficient for the image to produce accurate prediction. Both modules are optimized in an end-to-end fashion, with the Gumbel-Softmax trick. Experiments on ImageNet-1K demonstrate that MT-ViT can achieve a significant reduction on FLOPs with no degradation of the accuracy and outperform other compared methods in both accuracy and FLOPs.

arxiv情報

著者 Yunke Wang,Bo Du,Wenyuan Wang,Chang Xu
発行日 2023-06-26 13:13:08+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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