MEP: Multiple Kernel Learning Enhancing Relative Positional Encoding Length Extrapolation
Not on the map. Why?
Abstract (arXiv)
When the predicted sequence length exceeds the length seen during training, the transformer's inference accuracy diminishes. Existing relative position encoding methods, such as those based on the ALiBi technique, address the length extrapolation challenge exclusively through the implementation of a single kernel function, which introduces a constant bias to every post-softmax attention scores according to their distance. These approaches do not investigate or employ multiple kernel functions to address the extrapolation challenge. Drawing on the ALiBi approach, this study proposes a novel relative positional encoding method, called MEP, which employs a weighted average to combine distinct kernel functions(such as the exponential kernel and the Gaussian kernel) to generate a bias that is applied to post-softmax attention scores. Initially, the framework utilizes various kernel functions to construct multiple kernel functions. Each kernel function adheres to a consistent mean weight coefficient, harnessing the synergistic advantages of different kernels to formulate an innovative bias function. Subsequently, specific slopes are tailored for each kernel function, applying penalties at varying rates, to enhance the model's extrapolation capabilities. Finally, this bias is seamlessly incorporated as a penalty to the post-softmax scores. We present two distinct versions of our method: a parameter-free variant that requires no new learnable parameters, which enhances length extrapolation capabilities without compromising training efficiency, and a parameterized variant capable of integrating state-of-the-art techniques. Empirical evaluations across diverse datasets have demonstrated that both variants of our method achieve state-of-the-art performance, outperforming traditional parameter-free and parameterized approaches.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 17 of its 26 references that are in the map. First posted on arXiv 26 Mar 2024.
Builds on
17 of 26 references.
References · 17
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,102
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
5 more
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2021Position Information in Transformers: An Overviewcited by 103
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 86
- 2022Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysiscited by 42
- 2021A Simple and Effective Positional Encoding for Transformerscited by 37
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025Context-aware Biases for Length Extrapolationcited by 2
- 2026PJ-RoPE: A Fourier-Jet-Affine Position Space for Relative Attentioncited by 0
- 2026PJ-RoPE: A Fourier-Jet-Affine Position Space for Relative Attention3 Jun 2026
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025Context-aware Biases for Length Extrapolation11 Mar 2025