Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding Scaling
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) still struggle with the ``lost-in-the-middle'' problem, where critical information located in the middle of long-context inputs is often underrepresented or lost. While existing methods attempt to address this by combining multi-scale rotary position embeddings (RoPE), they typically suffer from high latency or rely on suboptimal hand-crafted scaling strategies. To overcome these limitations, we introduce a layer-specific positional embedding scaling~(LPES) method that assigns distinct scaling factors to each layer. LPES achieves a more balanced attention distribution without fine-tuning model parameters or increasing inference delay. A specially designed genetic algorithm is employed to efficiently select the optimal scaling factors for each layer by incorporating B'ezier curves to significantly reduce the search space. Extensive experiments demonstrate that LPES effectively mitigates positional attention bias and delivers consistent improvements across multiple long-context benchmarks, yielding up to an 11.2% accuracy gain on the key-value retrieval dataset.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 17 of its 25 references that are in the map. First posted on arXiv 26 Jun 2026.
Builds on
17 of 25 references.
References · 17
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2023C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Modelscited by 694
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
- 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
5 more
- 2021Summ^N: A Multi-Stage Summarization Framework for Long Input Dialogues and Documentscited by 64
- 2021A Survey on Dialogue Summarization: Recent Advances and New Frontierscited by 51
- 2023Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Usecited by 27
- 2025LongRoPE2: Near-Lossless LLM Context Window Scalingcited by 21
- 2024Mixture of In-Context Experts Enhance LLMs' Long Context Awarenesscited by 17
Built on by
Not cited yet.