mlsanityData to 14 Oct 2026

Position as Probability: Self-Supervised Transformers that Think Past Their Training for Length Extrapolation

arXiv 2506.00920 ↗First posted 1 Jun 2025cs.LG cs.AI cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

Deep sequence models typically degrade in accuracy when test sequences significantly exceed their training lengths, yet many critical tasks--such as algorithmic reasoning, multi-step arithmetic, and compositional generalization--require robust length extrapolation. We introduce PRISM, a Probabilistic Relative-position Implicit Superposition Model, a novel positional encoding mechanism that enables Transformers to extrapolate accurately up to 10x beyond their training length. PRISM learns continuous relative positions through a differentiable histogram-filter update, preserving position uncertainty via a probabilistic superposition rather than conventional deterministic embeddings. Empirically, PRISM achieves state-of-the-art length extrapolation, successfully generalizing to previously intractable sequence lengths across algorithmic benchmarks--including arithmetic (addition, multiplication), SCAN compositionality tasks, and complex copy variants derived from DeepMind's recent datasets. Our analysis demonstrates that PRISM's stochastic positional encoding maintains sharp and interpretable internal states, providing a theoretical basis for reliable length generalization. These results advance the goal of neural sequence models that remain algorithmically robust at lengths far exceeding their training horizon.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 25 of its 32 references that are in the map. First posted on arXiv 1 Jun 2025.

Builds on

25 of 32 references.

References · 25

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domainscited by 2,200
  3. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
  4. 2022Toy Models of Superpositioncited by 971
  5. 2022In-context Learning and Induction Headscited by 964
  6. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
  7. 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
  8. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
  9. 2022Neural Networks and the Chomsky Hierarchycited by 217
  10. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
  11. 2021Thinking Like Transformerscited by 184
  12. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
13 more
  1. 2024Looped Transformers for Length Generalizationcited by 99
  2. 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
  3. 2015Inferring Algorithmic Patterns with Stack-Augmented Recurrent Netscited by 76
  4. 2023Length Extrapolation of Transformers: A Survey from the Perspective of Positional Encodingcited by 32
  5. 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 31
  6. 2025Self-Improving Transformers Overcome Easy-to-Hard and Length Generalization Challengescited by 31
  7. 2024Universal Length Generalization with Turing Programscited by 25
  8. 2024Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolationcited by 24
  9. 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 23
  10. 2025Thus Spake Long-Context Large Language Modelcited by 12
  11. 2023From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformerscited by 10
  12. 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
  13. 2025Context-aware Biases for Length Extrapolationcited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024On Provable Length and Compositional Generalization
  2. 2025SeqPE: Transformer with Sequential Position Encoding
  3. 2026Position Encoding with Random Float Sampling Enhances Length Generalization of Transformers
  4. 2024DeciMamba: Exploring the Length Extrapolation Potential of Mamba
  5. 2024Enhancing Length Extrapolation in Sequential Models with Pointer-Augmented Neural Memory
  6. 2024Learning interpretable positional encodings in transformers depends on initialization
  7. 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding
  8. 2023Never Train from Scratch: Fair Comparison of Long-Sequence Models Requires Data-Driven Priors