Position Embedding Needs an Independent Layer Normalization
Not on the map. Why?
Abstract (arXiv)
The Position Embedding (PE) is critical for Vision Transformers (VTs) due to the permutation-invariance of self-attention operation. By analyzing the input and output of each encoder layer in VTs using reparameterization and visualization, we find that the default PE joining method (simply adding the PE and patch embedding together) operates the same affine transformation to token embedding and PE, which limits the expressiveness of PE and hence constrains the performance of VTs. To overcome this limitation, we propose a simple, effective, and robust method. Specifically, we provide two independent layer normalizations for token embeddings and PE for each layer, and add them together as the input of each layer's Muti-Head Self-Attention module. Since the method allows the model to adaptively adjust the information of PE for different layers, we name it as Layer-adaptive Position Embedding, abbreviated as LaPE. Extensive experiments demonstrate that LaPE can improve various VTs with different types of PE and make VTs robust to PE types. For example, LaPE improves 0.94% accuracy for ViT-Lite on Cifar10, 0.98% for CCT on Cifar100, and 1.72% for DeiT on ImageNet-1K, which is remarkable considering the negligible extra parameters, memory and computational cost brought by LaPE. The code is publicly available at https://github.com/Ingrid725/LaPE.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 38 of its 49 references that are in the map. First posted on arXiv 10 Dec 2022.
Builds on
38 of 49 references.
References · 38
- 2017Attention Is All You Needcited by 59,932
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2020End-to-End Object Detection with Transformerscited by 7,384
- 2016Layer Normalizationcited by 5,579
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
- 2018Group Normalizationcited by 1,514
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,215
26 more
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
- 2021CvT: Introducing Convolutions to Vision Transformerscited by 946
- 2021Uformer: A General U-Shaped Transformer for Image Restorationcited by 864
- 2021Segmenter: Transformer for Semantic Segmentationcited by 855
- 2019Segmentation Transformer: Object-Contextual Representations for Semantic Segmentationcited by 573
- 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
- 2021Conditional Positional Encodings for Vision Transformerscited by 402
- 2019Attention Augmented Convolutional Networkscited by 363
- 2021Rethinking Spatial Dimensions of Vision Transformerscited by 361
- 2021Escaping the Big Data Paradigm with Compact Transformerscited by 261
- 2021Incorporating Convolution Designs into Visual Transformerscited by 248
- 2021Rethinking and Improving Relative Position Encoding for Vision Transformercited by 206
- 2021Embracing Single Stride 3D Object Detector with Sparse Transformercited by 193
- 2021VOLO: Vision Outlooker for Visual Recognitioncited by 164
- 2022Multi-class Token Transformer for Weakly Supervised Semantic Segmentationcited by 138
- 2021Towards Robust Vision Transformercited by 137
- 2021Position Information in Transformers: An Overviewcited by 103
- 2022Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Cloudscited by 102
- 2021Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understandingcited by 97
- 2021Learning Position and Target Consistency for Memory-based Video Object Segmentationcited by 63
- 2022Expectation-Maximization Contrastive Learning for Compact Video-and-Language Representationscited by 57
- 2020What Do Position Embeddings Learn? An Empirical Study of Pre-Trained Language Model Positional Encodingcited by 52
- 2021HCRF-Flow: Scene Flow from Point Clouds with Continuous High-order CRFs and Position-aware Flow Embeddingcited by 36
- 2021Recurrent Glimpse-based Decoder for Detection with Transformercited by 21
- 2022Bridged Transformer for Vision and Point Cloud 3D Object Detectioncited by 19
Built on by
Citing papers per year: 2023: 1.
1 paper.