SeqPE: Transformer with Sequential Position Encoding
Not on the map. Why?
Abstract (arXiv)
Since self-attention layers in Transformers are permutation invariant by design, positional encodings must be explicitly incorporated to enable spatial understanding. However, fixed-size lookup tables used in traditional learnable position embeddings (PEs) limit extrapolation capabilities beyond pre-trained sequence lengths. Expert-designed methods such as ALiBi and RoPE, mitigate this limitation but demand extensive modifications for adapting to new modalities, underscoring fundamental challenges in adaptability and scalability. In this work, we present SeqPE, a unified and fully learnable position encoding framework that represents each n-dimensional position index as a symbolic sequence and employs a lightweight sequential position encoder to learn their embeddings in an end-to-end manner. To regularize SeqPE's embedding space, we introduce two complementary objectives: a contrastive objective that aligns embedding distances with a predefined position-distance function, and a knowledge distillation loss that anchors out-of-distribution position embeddings to in-distribution teacher representations, further enhancing extrapolation performance. Experiments across language modeling, long-context question answering, and 2D image classification demonstrate that SeqPE not only surpasses strong baselines in perplexity, exact match (EM), and accuracy--particularly under context length extrapolation--but also enables seamless generalization to multi-dimensional inputs without requiring manual architectural redesign. We release our code, data, and checkpoints at https://github.com/ghrua/seqpe.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 53 of its 63 references that are in the map. First posted on arXiv 16 Jun 2025.
Builds on
53 of 63 references.
References · 53
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2014Microsoft COCO: Common Objects in Contextcited by 17,608
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2025Qwen3 Technical Reportcited by 8,820
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
38 more
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,750
- 2017Neural Discrete Representation Learningcited by 4,712
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2018Neural Ordinary Differential Equationscited by 3,779
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2023ImageBind: One Embedding Space To Bind Them Allcited by 1,175
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2018Self-Attention with Relative Position Representationscited by 1,120
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
- 2017Adversarial Examples for Evaluating Reading Comprehension Systemscited by 571
- 2017Convolutional Sequence to Sequence Learningcited by 552
- 2023The Falcon Series of Open Language Modelscited by 535
- 2024Transfusion: Predict the Next Token and Diffuse Images with One Multi-Modal Modelcited by 483
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2024Rotary Position Embedding for Vision Transformercited by 236
- 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 150
- 2024Aria: An Open Multimodal Native Mixture-of-Experts Modelcited by 138
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 111
- 2020Improve Transformer Models with Better Relative Position Embeddingscited by 73
- 2020Learning to Encode Position for Transformer with Continuous Dynamical Modelcited by 61
- 2019Encoding word order in complex embeddingscited by 53
- 2024Base of RoPE Bounds Context Lengthcited by 52
- 2025Scaling Laws for Native Multimodal Modelscited by 50
- 2025Rope to Nope and Back Again: A New Hybrid Attention Strategycited by 47
- 2023CLEX: Continuous Length Extrapolation for Large Language Modelscited by 44
- 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 39
- 2022Masked Jigsaw Puzzle: A Versatile Position Embedding for Vision Transformerscited by 33
50 most cited of 53 All 53 (JSON)
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
- 2026MemDefrag: Latent Memory Defragmentation for Large Language Models7 Jul 2026
- 2025RePo: Language Models with Context Re-Positioning16 Dec 2025
Similar, not cited
Close in wording, no citation either way
- 2024Learning interpretable positional encodings in transformers depends on initialization
- 2023Attention Alignment and Flexible Positional Embeddings Improve Transformer Length Extrapolation
- 2026Short Data, Long Context: Distilling Positional Knowledge in Transformers
- 2025Position as Probability: Self-Supervised Transformers that Think Past Their Training for Length Extrapolation
- 2026ZetaGPT: A Reference Implementation of Positional--Encoding--Free State--Space--Attention Language Models
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding
- 2025Selective Rotary Position Embedding
- 2026Position Encoding with Random Float Sampling Enhances Length Generalization of Transformers