arXiv reaDer
SimA:ビジョントランスフォーマー向けのシンプルなSoftmaxフリーの注意
SimA: Simple Softmax-free Attention for Vision Transformers
最近、ビジョントランスが非常に人気になっています。ただし、それらを多くのアプリケーションにデプロイすることは、アテンションブロックのSoftmaxレイヤーのために、計算コストが高くなります。シンプルで効果的なSoftmaxフリーのアテンションブロックであるSimAを紹介します。これは、Softmaxレイヤーを使用する代わりに、クエリとキーの行列を単純なℓ_1-normで正規化します。次に、SimAのアテンションブロックは3つの行列の単純な乗算であるため、SimAはテスト時に計算の順序を動的に変更して、トークン数またはチャネル数の線形計算を実現できます。 SimAをトランスの3つのSOTAバリエーション、DeiT、XCiT、およびCvTに適用すると、Softmax層を必要とせずに、SOTAモデルと比較して同等の精度が得られることを経験的に示します。興味深いことに、SimAをマルチヘッドからシングルヘッドに変更しても、精度への影響はわずかであり、注意ブロックがさらに単純化されます。コードはここから入手できます:https://github.com/UCDvision/simaThis https URL
Recently, vision transformers have become very popular. However, deploying them in many applications is computationally expensive partly due to the Softmax layer in the attention block. We introduce a simple but effective, Softmax-free attention block, SimA, which normalizes query and key matrices with simple ℓ_1-norm instead of using Softmax layer. Then, the attention block in SimA is a simple multiplication of three matrices, so SimA can dynamically change the ordering of the computation at the test time to achieve linear computation on the number of tokens or the number of channels. We empirically show that SimA applied to three SOTA variations of transformers, DeiT, XCiT, and CvT, results in on-par accuracy compared to the SOTA models, without any need for Softmax layer. Interestingly, changing SimA from multi-head to single-head has only a small effect on the accuracy, which simplifies the attention block further. The code is available here: https://github.com/UCDvision/simaThis https URL
updated: Fri Jun 17 2022 17:15:01 GMT+0000 (UTC)
published: Fri Jun 17 2022 17:15:01 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アソシエイト