2021

Conditional Positional Encodings for Vision Transformers

Chu, Xiangxiang, Tian, Zhi, Zhang, Bo et al.

Understand

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.

Reading the bibliography…