A Length-Extrapolatable Transformer
Not on the map. Why?
Abstract (arXiv)
Position modeling plays a critical role in Transformers. In this paper, we focus on length extrapolation, i.e., training on short texts while evaluating longer sequences. We define attention resolution as an indicator of extrapolation. Then we propose two designs to improve the above metric of Transformers. Specifically, we introduce a relative position embedding to explicitly maximize attention resolution. Moreover, we use blockwise causal attention during inference for better resolution. We evaluate different Transformer variants with language modeling. Experimental results show that our model achieves strong performance in both interpolation and extrapolation settings. The code will be available at https://aka.ms/LeX-Transformer.
Key facts. Cited by 123 papers in the map (data through 7 Oct 2026). Builds on 31 of its 42 references that are in the map. First posted on arXiv 20 Dec 2022.
Builds on
31 of 42 references.
References · 31
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
19 more
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2017The NarrativeQA Reading Comprehension Challengecited by 590
- 2022Image as a Foreign Language: BEiT Pretraining for All Vision and Vision-Language Taskscited by 510
- 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 363
- 2022Mega: Moving Average Equipped Gated Attentioncited by 178
- 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
- 2022Block-Recurrent Transformerscited by 107
- 2021Position Information in Transformers: An Overviewcited by 103
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
- 2021Simple Local Attentions Remain Competitive for Long-Context Taskscited by 25
- 2022TorchScale: Transformers at Scalecited by 10
Built on by
Citing papers per year: 2023: 31; 2024: 48; 2025: 29; 2026: 15.
123 papers.
Sort:
By area:
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2024Chronos: Learning the Language of Time Seriescited by 712
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
- 2023Language Is Not All You Need: Aligning Perception with Language Modelscited by 543
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
38 more
- 2024LLM Inference Unveiled: Survey and Roofline Model Insightscited by 147
- 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 133
- 2023Scaling Laws of RoPE-based Extrapolationcited by 124
- 2023Foundational Models Defining a New Era in Vision: A Survey and Outlookcited by 109
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
- 2024MEMORYLLM: Towards Self-Updatable Large Language Modelscited by 89
- 2024Meshtron: High-Fidelity, Artist-Like 3D Mesh Generation at Scalecited by 87
- 2024A Survey of Resource-efficient LLM and Multimodal Foundation Modelscited by 84
- 2024FiT: Flexible Vision Transformer for Diffusion Modelcited by 84
- 2025Lifelong Learning of Large Language Model based Agents: A Roadmapcited by 78
- 2023GTA: A Geometry-Aware Attention Mechanism for Multi-View Transformerscited by 75
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Modelscited by 71
- 2024What is Wrong with Perplexity for Long-context Language Modeling?cited by 68
- 2024Inference Scaling for Long-Context Retrieval Augmented Generationcited by 65
- 2025This Time is Different: An Observability Perspective on Time Series Foundation Modelscited by 57
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2024Base of RoPE Bounds Context Lengthcited by 49
- 2024DeciMamba: Exploring the Length Extrapolation Potential of Mambacited by 45
- 2024Toto: Time Series Optimized Transformer for Observabilitycited by 44
- 2025Massive Values in Self-Attention Modules are the Key to Contextual Knowledge Understandingcited by 44
- 2023CLEX: Continuous Length Extrapolation for Large Language Modelscited by 43
- 2024FengWu-GHR: Learning the Kilometer-scale Medium-range Global Weather Forecastingcited by 30
- 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 30
- 2023DISTFLASHATTN: Distributed Memory-efficient Attention for Long-context LLMs Trainingcited by 28
- 2024V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encodingcited by 28
- 2024Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolationcited by 23
- 2024LongRecipe: Recipe for Efficient Long Context Generalization in Large Language Modelscited by 23
- 2023FLM-101B: An Open LLM and How to Train It with 100K Budgetcited by 22
- 2023BTLM-3B-8K: 7B Parameter Performance in a 3B Parameter Modelcited by 19
- 2025Docopilot: Improving Multimodal Models for Document-Level Understandingcited by 19
- 2023Scaling TabPFN: Sketching and Feature Selection for Tabular Prior-Data Fitted Networkscited by 18
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Expertscited by 17
- 2024Transforming the Bootstrap: Using Transformers to Compute Scattering Amplitudes in Planar N = 4 Super Yang-Mills Theorycited by 17
- 2024Mixture of In-Context Experts Enhance LLMs' Long Context Awarenesscited by 17
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothingcited by 17
- 2024Bass Accompaniment Generation via Latent Diffusioncited by 16
- 2023M4LE: A Multi-Ability Multi-Range Multi-Task Multi-Domain Long-Context Evaluation Benchmark for Large Language Modelscited by 15
50 most cited of 123 All 123 (JSON)
- 2026RoPE is Dead, Long Live RoPE: Towards Scalable Data-aware Positional Encodings28 Sep 2026
- 2026MoSAR: Mixture of Semantic Attention Regimes for Learning Adaptive and Approximable Attention Geometries25 Sep 2026
- 2026t0: A Time-Series Foundation Model for Forecasting with Context21 Sep 2026
- 2026Learning Length-Extrapolatable Recurrent Models8 Sep 2026
- 2026Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension10 Aug 2026
- 2026Addressable Memory for Video World Models7 Aug 2026
- 2026PJ-RoPE: A Fourier-Jet-Affine Position Space for Relative Attention3 Jun 2026
- 2026The Transformer as a Polar State Estimator10 May 2026
- 2026Jordan-RoPE: Non-Semisimple Relative Positional Encoding via Complex Jordan Blocks5 May 2026
- 2026Adaptive 3D-RoPE: Physics-Aligned Rotary Positional Encoding for Wireless Foundation Models1 May 2026
- 2026Dual Triangle Attention: Effective Bidirectional Attention Without Positional Embeddings9 Apr 2026
- 2026CARE: Covariance-Aware and Rank-Enhanced Decomposition for Enabling Multi-Head Latent Attention18 Mar 2026
38 more
- 2026Parabolic Position Encoding: Vision-Centric, Principled, Extrapolatable, General1 Feb 2026
- 2026MrRoPE: Mixed-radix Rotary Position Embedding28 Jan 2026
- 2026Attention Needs to Focus: A Unified Perspective on Attention Allocation1 Jan 2026
- 2025Group Representational Position Encoding8 Dec 2025
- 2025Phase-Aligned RoPE for Mixed-Resolution Diffusion Transformer24 Nov 2025
- 2025MTraining: Distributed Dynamic Sparse Attention for Efficient Ultra-Long Context Training21 Oct 2025
- 2025HeSRN: Representation Learning On Heterogeneous Graphs via Slot-Aware Retentive Network10 Oct 2025
- 2025AttAnchor: Guiding Cross-Modal Token Alignment in VLMs with Attention Anchors27 Sep 2025
- 2025Mamba Modulation: On the Length Generalization of Mamba23 Sep 2025
- 2025Causality-Induced Positional Encoding for Transformer-Based Representation Learning of Non-Sequential Features20 Sep 2025
- 2025Local Mechanisms of Compositional Generalization in Conditional Diffusion19 Sep 2025
- 2025Positional Encoding via Token-Aware Phase Attention16 Sep 2025
- 2025EgoMem: Lifelong Memory Agent for Full-duplex Omnimodal Models15 Sep 2025
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings5 Sep 2025
- 2025Robust Filter Attention: Self-Attention as Precision-Weighted State Estimation4 Sep 2025
- 2025SAC-MIL: Spatial-Aware Correlated Multiple Instance Learning for Histopathology Whole Slide Image Classification4 Sep 2025
- 2025ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Models25 Aug 2025
- 2025Docopilot: Improving Multimodal Models for Document-Level Understanding19 Jul 2025
- 2025AudioMAE++: learning better masked audio representations with SwiGLU FFNs14 Jul 2025
- 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs13 Jun 2025
- 2025AbsenceBench: Language Models Can't Tell What's Missing13 Jun 2025
- 2025RiemannFormer: A Framework for Attention in Curved Spaces9 Jun 2025
- 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directions8 Jun 2025
- 2025Long Context Scaling: Divide and Conquer via Multi-Agent Question-driven Collaboration27 May 2025
- 2025This Time is Different: An Observability Perspective on Time Series Foundation Models20 May 2025
- 2025Scaling Instruction-Tuned LLMs to Million-Token Contexts via Hierarchical Synthetic Data Generation17 Apr 2025
- 2025Hierarchical Balance Packing: Towards Efficient Supervised Fine-tuning for Long-Context LLM10 Mar 2025
- 2025SAGE-Amine: Generative Amine Design with Multi-Property Optimization for Efficient CO2 Capture4 Mar 2025
- 2025Massive Values in Self-Attention Modules are the Key to Contextual Knowledge Understanding3 Feb 2025
- 2025Irrational Complex Rotations Empower Low-bit Optimizers22 Jan 2025
- 2025Lifelong Learning of Large Language Model based Agents: A Roadmap13 Jan 2025
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding1 Jan 2025
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothing31 Dec 2024
- 2024GIRAFFE: Design Choices for Extending the Context Length of Visual Language Models17 Dec 2024
- 2024V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encoding12 Dec 2024
- 2024Meshtron: High-Fidelity, Artist-Like 3D Mesh Generation at Scale12 Dec 2024
- 2024Test-time Cost-and-Quality Controllable Arbitrary-Scale Super-Resolution with Variable Fourier Components7 Dec 2024
- 2024Retentive Neural Quantum States: Efficient Ans"atze for Ab Initio Quantum Chemistry6 Nov 2024
50 newest of 123 All 123 (JSON)
- 2024FiT: Flexible Vision Transformer for Diffusion Modelcited by 84
- 2024Bass Accompaniment Generation via Latent Diffusioncited by 16
- 2024FiTv2: Scalable and Improved Flexible Vision Transformer for Diffusion Modelcited by 15
- 2025Local Mechanisms of Compositional Generalization in Conditional Diffusioncited by 3
- 2023FlashVideo: A Framework for Swift Inference in Text-to-Video Generationcited by 2
- 2025Phase-Aligned RoPE for Mixed-Resolution Diffusion Transformercited by 1
- 2025Phase-Aligned RoPE for Mixed-Resolution Diffusion Transformer24 Nov 2025
- 2025Local Mechanisms of Compositional Generalization in Conditional Diffusion19 Sep 2025
- 2024FiTv2: Scalable and Improved Flexible Vision Transformer for Diffusion Model17 Oct 2024
- 2024FiT: Flexible Vision Transformer for Diffusion Model19 Feb 2024
- 2024Bass Accompaniment Generation via Latent Diffusion2 Feb 2024
- 2023FlashVideo: A Framework for Swift Inference in Text-to-Video Generation30 Dec 2023
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2024DeciMamba: Exploring the Length Extrapolation Potential of Mambacited by 45
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothingcited by 17
- 2025Mamba Modulation: On the Length Generalization of Mambacited by 13
- 2024LongSSM: On the Length Extension of State-space Models in Language Modellingcited by 3
- 2024Long-context Protein Language Modeling Using Bidirectional Mamba with Shared Projection Layerscited by 1
- 2025Mamba Modulation: On the Length Generalization of Mamba23 Sep 2025
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothing31 Dec 2024
- 2024Long-context Protein Language Modeling Using Bidirectional Mamba with Shared Projection Layers29 Oct 2024
- 2024DeciMamba: Exploring the Length Extrapolation Potential of Mamba20 Jun 2024
- 2024LongSSM: On the Length Extension of State-space Models in Language Modelling4 Jun 2024
- 2023Gated Linear Attention Transformers with Hardware-Efficient Training11 Dec 2023
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Modelscited by 71
- 2024E2LLM: Encoder Elongated Large Language Models for Long-Context Understanding and Reasoningcited by 13
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encodingcited by 4
- 2025Scaling Instruction-Tuned LLMs to Million-Token Contexts via Hierarchical Synthetic Data Generationcited by 4
- 2025Scaling Instruction-Tuned LLMs to Million-Token Contexts via Hierarchical Synthetic Data Generation17 Apr 2025
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding1 Jan 2025
- 2024E2LLM: Encoder Elongated Large Language Models for Long-Context Understanding and Reasoning10 Sep 2024
- 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Models3 Feb 2024
- 2023Code Llama: Open Foundation Models for Code24 Aug 2023
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
- 2025Lifelong Learning of Large Language Model based Agents: A Roadmapcited by 78
- 2025Long Context Scaling: Divide and Conquer via Multi-Agent Question-driven Collaborationcited by 7
- 2025EgoMem: Lifelong Memory Agent for Full-duplex Omnimodal Modelscited by 4
- 2025EgoMem: Lifelong Memory Agent for Full-duplex Omnimodal Models15 Sep 2025
- 2025Long Context Scaling: Divide and Conquer via Multi-Agent Question-driven Collaboration27 May 2025
- 2025Lifelong Learning of Large Language Model based Agents: A Roadmap13 Jan 2025
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory7 Feb 2024
- 2024LLM Inference Unveiled: Survey and Roofline Model Insightscited by 147
- 2024Let the Code LLM Edit Itself When You Edit the Codecited by 8
- 2026CARE: Covariance-Aware and Rank-Enhanced Decomposition for Enabling Multi-Head Latent Attentioncited by 5
- 2025ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Modelscited by 3
- 2026CARE: Covariance-Aware and Rank-Enhanced Decomposition for Enabling Multi-Head Latent Attention18 Mar 2026
- 2025ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Models25 Aug 2025
- 2024Let the Code LLM Edit Itself When You Edit the Code3 Jul 2024
- 2024LLM Inference Unveiled: Survey and Roofline Model Insights26 Feb 2024
- 2024V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encodingcited by 28
- 2025Docopilot: Improving Multimodal Models for Document-Level Understandingcited by 19
- 2024LVCHAT: Facilitating Long Video Comprehensioncited by 4
- 2024GIRAFFE: Design Choices for Extending the Context Length of Visual Language Modelscited by 2
- 2025Docopilot: Improving Multimodal Models for Document-Level Understanding19 Jul 2025
- 2024GIRAFFE: Design Choices for Extending the Context Length of Visual Language Models17 Dec 2024
- 2024V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encoding12 Dec 2024
- 2024LVCHAT: Facilitating Long Video Comprehension19 Feb 2024
- 2023Language Is Not All You Need: Aligning Perception with Language Modelscited by 543
- 2026Addressable Memory for Video World Modelscited by 11
- 2026Addressable Memory for Video World Models7 Aug 2026
- 2023Language Is Not All You Need: Aligning Perception with Language Models27 Feb 2023
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Expertscited by 17
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Experts7 Jun 2023
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2024Chronos: Learning the Language of Time Seriescited by 712
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 133
- 2023Scaling Laws of RoPE-based Extrapolationcited by 124
- 2023Foundational Models Defining a New Era in Vision: A Survey and Outlookcited by 109
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
12 most cited of 90 All 90 (JSON)
- 2026RoPE is Dead, Long Live RoPE: Towards Scalable Data-aware Positional Encodings28 Sep 2026
- 2026MoSAR: Mixture of Semantic Attention Regimes for Learning Adaptive and Approximable Attention Geometries25 Sep 2026
- 2026t0: A Time-Series Foundation Model for Forecasting with Context21 Sep 2026
- 2026Learning Length-Extrapolatable Recurrent Models8 Sep 2026
- 2026Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension10 Aug 2026
- 2026PJ-RoPE: A Fourier-Jet-Affine Position Space for Relative Attention3 Jun 2026
- 2026The Transformer as a Polar State Estimator10 May 2026
- 2026Jordan-RoPE: Non-Semisimple Relative Positional Encoding via Complex Jordan Blocks5 May 2026
- 2026Adaptive 3D-RoPE: Physics-Aligned Rotary Positional Encoding for Wireless Foundation Models1 May 2026
- 2026Dual Triangle Attention: Effective Bidirectional Attention Without Positional Embeddings9 Apr 2026
- 2026Parabolic Position Encoding: Vision-Centric, Principled, Extrapolatable, General1 Feb 2026
- 2026MrRoPE: Mixed-radix Rotary Position Embedding28 Jan 2026
12 newest of 90 All 90 (JSON)