mlsanityData to 14 Oct 2026

SeqPE: Transformer with Sequential Position Encoding

arXiv 2506.13277 ↗First posted 16 Jun 2025cs.LG cs.AI cs.CLcited by 2

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  4. 2020Language Models are Few-Shot Learnerscited by 32,419
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  6. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  7. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  8. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  9. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  10. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
  11. 2025Qwen3 Technical Reportcited by 8,820
  12. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
38 more
  1. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  3. 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,750
  4. 2017Neural Discrete Representation Learningcited by 4,712
  5. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  6. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  7. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  8. 2018Neural Ordinary Differential Equationscited by 3,779
  9. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
  10. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,173
  11. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  12. 2023ImageBind: One Embedding Space To Bind Them Allcited by 1,175
  13. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
  14. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
  15. 2018Self-Attention with Relative Position Representationscited by 1,120
  16. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
  17. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  18. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
  19. 2017Adversarial Examples for Evaluating Reading Comprehension Systemscited by 571
  20. 2017Convolutional Sequence to Sequence Learningcited by 552
  21. 2023The Falcon Series of Open Language Modelscited by 535
  22. 2024Transfusion: Predict the Next Token and Diffuse Images with One Multi-Modal Modelcited by 483
  23. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
  24. 2024Rotary Position Embedding for Vision Transformercited by 236
  25. 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
  26. 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 150
  27. 2024Aria: An Open Multimodal Native Mixture-of-Experts Modelcited by 138
  28. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
  29. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 111
  30. 2020Improve Transformer Models with Better Relative Position Embeddingscited by 73
  31. 2020Learning to Encode Position for Transformer with Continuous Dynamical Modelcited by 61
  32. 2019Encoding word order in complex embeddingscited by 53
  33. 2024Base of RoPE Bounds Context Lengthcited by 52
  34. 2025Scaling Laws for Native Multimodal Modelscited by 50
  35. 2025Rope to Nope and Back Again: A New Hybrid Attention Strategycited by 47
  36. 2023CLEX: Continuous Length Extrapolation for Large Language Modelscited by 44
  37. 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 39
  38. 2022Masked Jigsaw Puzzle: A Versatile Position Embedding for Vision Transformerscited by 33

50 most cited of 53 All 53 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Learning interpretable positional encodings in transformers depends on initialization
  2. 2023Attention Alignment and Flexible Positional Embeddings Improve Transformer Length Extrapolation
  3. 2026Short Data, Long Context: Distilling Positional Knowledge in Transformers
  4. 2025Position as Probability: Self-Supervised Transformers that Think Past Their Training for Length Extrapolation
  5. 2026ZetaGPT: A Reference Implementation of Positional--Encoding--Free State--Space--Attention Language Models
  6. 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding
  7. 2025Selective Rotary Position Embedding
  8. 2026Position Encoding with Random Float Sampling Enhances Length Generalization of Transformers