LaPE: Layer-adaptive Position Embedding for Vision Transformers with Independent Layer Normalization
Runyi Yu, Zhennan Wang, Yinhuai Wang, Kehan Li, Chang Liu, Haoyi Duan, Xiangyang Ji, Jie Chen
Abstract
Position information is critical for Vision Transformers (VTs) due to the permutation-invariance of self-attention operations. A typical way to introduce position information is adding the absolute Position Embedding (PE) to patch embedding before entering VTs. However, this approach operates the same Layer Normalization (LN) to token embedding and PE, and delivers the same PE to each layer. This results in restricted and monotonic PE across layers, as the shared LN affine parameters are not dedicated to PE, and the PE cannot be adjusted on a per-layer basis. To overcome these limitations, we propose using two independent LNs for token embeddings and PE in each layer, and progressively delivering PE across layers. By implementing this approach, VTs will receive layer-adaptive and hierarchical PE. We name our method as Layer-adaptive Position Embedding, abbreviated as LaPE, which is simple, effective, and robust. Extensive experiments on image classification, object detection, and semantic segmentation demonstrate that LaPE significantly outperforms the default PE method. For example, LaPE improves +1.06% for CCT on CIFAR100, +1.57% for DeiT-Ti on ImageNet-1K, +0.7 box AP and +0.5 mask AP for ViT-Adapter-Ti on COCO, and +1.37 mIoU for tiny Segmenter on ADE20K. This is remarkable considering LaPE only increases negligible parameters, memory, and computational cost.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Cross-modal Prompts: Adapting Large Pre-trained Models for Audio-Visual Downstream Tasks cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Cross-modal Prompts: Adapting Large Pre-trained Models for Audio-Visual Downstream Tasks cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Maximizing the Position Embedding for Vision Transformers with Global Average Pooling cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Maximizing the Position Embedding for Vision Transformers with Global Average Pooling cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Maximizing the Position Embedding for Vision Transformers with Global Average Pooling cites Training data-efficient image transformers & distillation through attention
- Maximizing the Position Embedding for Vision Transformers with Global Average Pooling cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
Cited by top-tier papers2
- Cross-modal Prompts: Adapting Large Pre-trained Models for Audio-Visual Downstream TasksHaoyi Duan, Yan Xia, Mingze Zhou, Li Tang et al.NeurIPS 2023 · 59 citations
- Maximizing the Position Embedding for Vision Transformers with Global Average PoolingWonjun Lee, Bumsub Ham, Suhyun KimAAAI 2025 · 3 citations
Builds on25
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar et al.NeurIPS 2021 · 9,661 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
- Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li et al.ICLR 2021 · 7,353 citations
Related papers
- LOOPE: Learnable Optimal Patch Order for Positional Encoders in Vision TransformersMd Abtahi Majeed Chowdhury, Md Rifat Ur Rahman, Akil Ahmad TakiCVPR Findings 2026
- Dynamic Token Normalization improves Vision TransformersWenqi Shao, Yixiao Ge, Zhaoyang Zhang, Xuyuan Xu et al.ICLR 2022 · 13 citations
- MSPE: Multi-Scale Patch Embedding Prompts Vision Transformers to Any ResolutionWenzhuo Liu, Fei Zhu, Shijie Ma, Cheng-Lin LiuNeurIPS 2024 · 17 citations
- Positional Label for Self-Supervised Vision TransformerZhemin Zhang, Xun GongAAAI 2023 · 12 citations
- Scale-space Tokenization for Improving the Robustness of Vision TransformersLei Xu, Rei Kawakami, Nakamasa InoueACM MM 2023 · 1 citation
