arXiv reaDer
DynamicViT: 動的なトークンのスパース化による効率的なビジョン トランスフォーマー
DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification
ビジョン トランスフォーマーの注目はまばらです。ビジョン トランスフォーマーの最終的な予測は、最も有益なトークンのサブセットにのみ基づいており、正確な画像認識には十分であることがわかります。この観察に基づいて、入力に基づいて冗長トークンを段階的かつ動的にプルーニングする動的トークン スパース化フレームワークを提案します。具体的には、現在の特徴を考慮して、各トークンの重要度スコアを推定する軽量の予測モジュールを考案します。このモジュールは、冗長なトークンを階層的にプルーニングするために、さまざまなレイヤーに追加されます。エンド ツー エンドの方法で予測モジュールを最適化するために、他のトークンとの相互作用をブロックすることによってトークンを差別的にプルーニングするアテンション マスキング戦略を提案します。自己注意の性質を利用して、構造化されていないスパース トークンは依然としてハードウェア フレンドリーであるため、フレームワークは実際のスピードアップを簡単に達成できます。入力トークンの 66% を階層的にプルーニングすることにより、私たちの方法は 31% ~ 37% の FLOP を大幅に削減し、スループットを 40% 以上向上させ、さまざまなビジョン トランスフォーマーの精度の低下を 0.5% 以内に抑えます。動的トークン スパーシフィケーション フレームワークを備えた DynamicViT モデルは、ImageNet の最先端の CNN やビジョン トランスフォーマーと比較して、非常に競争力のある複雑性/精度のトレードオフを実現できます。コードは https://github.com/raoyongming/DynamicViT で入手できます。
Attention is sparse in vision transformers. We observe the final prediction in vision transformers is only based on a subset of most informative tokens, which is sufficient for accurate image recognition. Based on this observation, we propose a dynamic token sparsification framework to prune redundant tokens progressively and dynamically based on the input. Specifically, we devise a lightweight prediction module to estimate the importance score of each token given the current features. The module is added to different layers to prune redundant tokens hierarchically. To optimize the prediction module in an end-to-end manner, we propose an attention masking strategy to differentiably prune a token by blocking its interactions with other tokens. Benefiting from the nature of self-attention, the unstructured sparse tokens are still hardware friendly, which makes our framework easy to achieve actual speed-up. By hierarchically pruning 66% of the input tokens, our method greatly reduces 31%~37% FLOPs and improves the throughput by over 40% while the drop of accuracy is within 0.5% for various vision transformers. Equipped with the dynamic token sparsification framework, DynamicViT models can achieve very competitive complexity/accuracy trade-offs compared to state-of-the-art CNNs and vision transformers on ImageNet. Code is available at https://github.com/raoyongming/DynamicViT
updated: Tue Oct 26 2021 13:37:53 GMT+0000 (UTC)
published: Thu Jun 03 2021 17:57:41 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アソシエイト