ComRoPE: Scalable and Robust Rotary Position Embedding Parameterized by Trainable Commuting Angle Matrices
Hao Yu, Tangyu Jiang, Shuning Jia, Shannan Yan, Shunning Liu, Haolong Qian, Guanghao Li, Shuting Dong, Chun Yuan
摘要
The Transformer architecture has revolutionized various fields since it was proposed, where positional encoding plays an essential role in effectively capturing sequential order and context. Therefore, Rotary Positional Encoding (RoPE) was proposed to alleviate these issues, which integrates positional information by rotating the embeddings in the attention mechanism. However, RoPE utilizes manually defined rotation matrices, a design choice that favors computational efficiency but limits the model's flexibility and adaptability. In this work, we propose ComRoPE, which generalizes RoPE by defining it in terms of trainable commuting angle matrices. Specifically, we demonstrate that pairwise commutativity of these matrices is essential for RoPE to achieve scalability and positional robustness. We formally define the RoPE Equation, which is an essential condition that ensures consistent performance with position offsets. Based on the theoretical analysis, we present two types of trainable commuting angle matrices as sufficient solutions to the RoPE equation, which significantly improve performance, surpassing the current state-of-the-art method by 1.6% at training resolution and 2.9% at higher resolution on the ImageNet-1K dataset. Furthermore, our framework shows versatility in generalizing to existing RoPE formulations and offering new insights for future positional encoding research. To ensure reproducibility, the source code and instructions are available at https://github.com/Longin-Yu/ComRoPE .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation 引用了 Language Models are Few-Shot Learners
- A Circular Argument: Does RoPE need to be Equivariant for Vision? 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- A Circular Argument: Does RoPE need to be Equivariant for Vision? 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- A Circular Argument: Does RoPE need to be Equivariant for Vision? 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
- MuViT: Multi-Resolution Vision Transformers for Learning Across Scales in Microscopy 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MuViT: Multi-Resolution Vision Transformers for Learning Across Scales in Microscopy 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- AgentBench: Evaluating LLMs as Agents 引用了 Language Models are Few-Shot Learners
- Learning Cross-View Object Correspondence via Cycle-Consistent Mask Prediction 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
引用它的顶会 Paper8
- A Circular Argument: Does RoPE need to be Equivariant for Vision?Chase van de Geijn, Timo Lüddecke, Polina Turishcheva, Alexander S. EckerNeurIPS 2025 · 6 次引用
- Learning Cross-View Object Correspondence via Cycle-Consistent Mask PredictionShannan Yan, Leqi Zheng, Keyu Lv, Jingchen Ni 等CVPR 2026 · 5 次引用
- SoPE: Spherical Coordinate-Based Positional Embedding for Enhancing Spatial Perception of 3D LVLMsKoonting Yip, Qiyan Zhao, Wenhao Yu, Liangyu Yuan 等CVPR 2026 · 3 次引用
- SafeRoPE: Risk-specific Head-wise Embedding Rotation for Safe Generation in Rectified Flow TransformersXiang Yang, Feifei Li, Mi Zhang, Geng Hong 等CVPR 2026 · 2 次引用
- MuViT: Multi-Resolution Vision Transformers for Learning Across Scales in MicroscopyAlbert Dominguez Mantes, Gioele La Manno, Martin WeigertCVPR 2026 · 1 次引用
它引用的 Paper15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
- AgentBench: Evaluating LLMs as AgentsXiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu 等ICLR 2024 · 748 次引用
相关 Paper
- LieRE: Lie Rotational Positional EncodingsSophie Ostmeier, Brian Axelrod, Maya Varma, Michael E. Moseley 等ICML 2025
- Spiral RoPE: Rotate Your Rotary Positional Embeddings in the 2D PlaneHaoyu Liu, Sucheng Ren, Tingyu Zhu, Peng Wang 等ICML 2026
- Compass-RoPE: Isotropic Rotary Position Embeddings for Vision TransformersChengxi Min, Wei Wang, Yao ZhaoICML 2026
- Deconstructing Positional Information: From Attention Logits to Training BiasesZihan Gu, Ruoyu Chen, Han Zhang, Hua Zhang 等ICLR 2026 · 4 次引用
- AdaRoPE: Not All Attention Heads Should Rotate and Scale EquallyShaowen Wang, Yuke Zheng, Tansheng Zhu, Shuang Chen 等ICML 2026
