arXiv reaDer
ビジョン トランスフォーマーの条件付き位置エンコーディング
Conditional Positional Encodings for Vision Transformers
ビジョン トランスフォーマーの条件付き位置符号化 (CPE) スキームを提案します。事前に定義され、入力トークンに依存しない、以前の固定または学習可能な位置エンコーディングとは異なり、CPE は動的に生成され、入力トークンのローカル近傍で調整されます。その結果、CPE は、トレーニング中にモデルがこれまでに見たものよりも長い入力シーケンスに簡単に一般化できます。さらに、CPE は画像分類タスクで必要な変換不変性を維持できるため、パフォーマンスが向上します。現在の Transformer フレームワークにシームレスに組み込まれるように、単純な位置エンコード ジェネレーター (PEG) を使用して CPE を実装します。 PEG 上に構築された条件付き位置エンコーディング ビジョン トランスフォーマー (CPVT) を紹介します。 CPVT は、位置エンコーディングを学習したアテンション マップと比較して視覚的に類似したアテンション マップを持ち、優れた結果を提供することを示しています。コードは https://github.com/Meituan-AutoML/CPVT で入手できます。
We propose a conditional positional encoding (CPE) scheme for vision Transformers. Unlike previous fixed or learnable positional encodings, which are pre-defined and independent of input tokens, CPE is dynamically generated and conditioned on the local neighborhood of the input tokens. As a result, CPE can easily generalize to the input sequences that are longer than what the model has ever seen during training. Besides, CPE can keep the desired translation-invariance in the image classification task, resulting in improved performance. We implement CPE with a simple Position Encoding Generator (PEG) to get seamlessly incorporated into the current Transformer framework. Built on PEG, we present Conditional Position encoding Vision Transformer (CPVT). We demonstrate that CPVT has visually similar attention maps compared to those with learned positional encodings and delivers outperforming results. Our code is available at https://github.com/Meituan-AutoML/CPVT .
updated: Mon Feb 13 2023 01:19:57 GMT+0000 (UTC)
published: Mon Feb 22 2021 10:29:55 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アソシエイト