arXiv reaDer
ビジョントランスフォーマーの条件付き位置エンコーディング
Conditional Positional Encodings for Vision Transformers
ビジョントランスフォーマーの条件付き位置エンコーディング(CPE)スキームを提案します。事前定義され、入力トークンから独立している以前の固定または学習可能な位置エンコーディングとは異なり、CPEは動的に生成され、入力トークンのローカル近傍で条件付けられます。その結果、CPEは、モデルがトレーニング中にこれまでに見たものよりも長い入力シーケンスに簡単に一般化できます。さらに、CPEは、画像分類タスクで必要な並進不変性を維持できるため、分類の精度が向上します。 CPEは、単純なPosition Encoding Generator(PEG)を使用して簡単に実装でき、現在のTransformerフレームワークにシームレスに組み込むことができます。 PEG上に構築され、Vision Transformer(CPVT)をエンコードする条件付き位置を提示します。 CPVTは、学習した位置エンコーディングを使用したものと比較して、視覚的に類似した注意マップを持っていることを示しています。条件付き位置エンコーディングスキームの恩恵を受けて、これまでのビジョントランスフォーマーと比較して、ImageNet分類タスクで最先端の結果を取得します。私たちのコードは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 classification accuracy. CPE can be effortlessly implemented with a simple Position Encoding Generator (PEG), and it can be 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. Benefit from the conditional positional encoding scheme, we obtain state-of-the-art results on the ImageNet classification task compared with vision Transformers to date. Our code will be made available at https://github.com/Meituan-AutoML/CPVT .
updated: Thu Mar 18 2021 10:59:50 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アソシエイト