ACL Findings2024
Length Generalization of Causal Transformers without Position Encoding
Jie Wang, Tao Ji, Yuanbin Wu, Hang Yan, Tao Gui, Qi Zhang, Xuanjing Huang, Xiaoling Wang
Abstract
Generalizing to longer sentences is important for recent Transformer-based language models. Besides algorithms manipulating explicit position features, the success of Transformers without position encodings (NoPE) provides a new way to overcome the challenge. In this paper, we study the length generalization property of NoPE. We find that although NoPE can extend to longer sequences than the commonly used explicit position encodings, it still has a limited context length. We identify a connection between the failure of NoPE's generalization and the distraction of attention distributions. We propose a parameterefficient tuning for searching attention heads' best temperature hyper-parameters, which substantially expands NoPE's context size. Experiments on long sequence language modeling, the synthetic passkey retrieval task and real-world long context tasks show that NoPE can achieve competitive performances with state-of-the-art length generalization algorithms. The source code is publicly accessible 1 .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
27 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Efficient Streaming Language Models with Attention Sinks cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- Efficient Streaming Language Models with Attention Sinks cites YaRN: Efficient Context Window Extension of Large Language Models
- Efficient Streaming Language Models with Attention Sinks cites Compressive Transformers for Long-Range Sequence Modelling
- Rope to Nope and Back Again: A New Hybrid Attention Strategy cites Efficient Streaming Language Models with Attention Sinks
- Rope to Nope and Back Again: A New Hybrid Attention Strategy cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- Rope to Nope and Back Again: A New Hybrid Attention Strategy cites YaRN: Efficient Context Window Extension of Large Language Models
- Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation cites Compressive Transformers for Long-Range Sequence Modelling
- YaRN: Efficient Context Window Extension of Large Language Models cites Compressive Transformers for Long-Range Sequence Modelling
- POSITION BIAS MITIGATES POSITION BIAS: Mitigate Position Bias Through Inter-Position Knowledge Distillation cites Efficient Streaming Language Models with Attention Sinks
- POSITION BIAS MITIGATES POSITION BIAS: Mitigate Position Bias Through Inter-Position Knowledge Distillation cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- DAPE: Data-Adaptive Positional Encoding for Length Extrapolation cites Efficient Streaming Language Models with Attention Sinks
- DAPE: Data-Adaptive Positional Encoding for Length Extrapolation cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- DAPE: Data-Adaptive Positional Encoding for Length Extrapolation cites YaRN: Efficient Context Window Extension of Large Language Models
- LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMs cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMs cites YaRN: Efficient Context Window Extension of Large Language Models
- Exploring Context Window of Large Language Models via Decomposed Positional Vectors cites Efficient Streaming Language Models with Attention Sinks
- Exploring Context Window of Large Language Models via Decomposed Positional Vectors cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- Exploring Context Window of Large Language Models via Decomposed Positional Vectors cites YaRN: Efficient Context Window Extension of Large Language Models
- Exploring Context Window of Large Language Models via Decomposed Positional Vectors cites Compressive Transformers for Long-Range Sequence Modelling
Cited by top-tier papers27
- Rope to Nope and Back Again: A New Hybrid Attention StrategyBowen Yang, Bharat Venkitesh, Dwaraknath Gnaneshwar, Hangyu Lin et al.NeurIPS 2025 · 51 citations
- DAPE: Data-Adaptive Positional Encoding for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Minbin Huang et al.NeurIPS 2024 · 42 citations
- Exploring Context Window of Large Language Models via Decomposed Positional VectorsZican Dong, Junyi Li, Xin Men, Xin Zhao et al.NeurIPS 2024 · 37 citations
- LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMsXiaoran Liu, Yuerong Song, Zhigeng Liu, Zengfeng Huang et al.AAAI 2026 · 30 citations
- POSITION BIAS MITIGATES POSITION BIAS: Mitigate Position Bias Through Inter-Position Knowledge DistillationYifei Wang, Feng Xiong, Yong Wang, Linjing Li et al.EMNLP 2025 · 16 citations
Builds on12
- Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris et al.UIST 2023 · 1,882 citations
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
- Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier et al.ICLR 2020 · 833 citations
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 citations
Related papers
- The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das et al.NeurIPS 2023 · 444 citations
- LongHeads: Multi-Head Attention is Secretly a Long Context ProcessorYi Lu, Xin Zhou, Wei He, Jun Zhao et al.EMNLP Findings 2024 · 12 citations
- Bayesian Attention Mechanism: A Probabilistic Framework for Positional Encoding and Context Length ExtrapolationArthur S. Bianchessi, Yasmin C. Aguirre, Rodrigo C. Barros, Lucas S. KupssinsküICLR 2026 · 6 citations
- Context Length Extension via Generalized Extrapolation ScaleLinhan Li, Huaping ZhangACL Findings 2024
- Functional Interpolation for Relative Positions improves Long Context TransformersShanda Li, Chong You, Guru Guruganesh, Joshua Ainslie et al.ICLR 2024 · 66 citations
