mlsanityData to 7 Oct 2026

Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding Scaling

arXiv 2606.27705 ↗First posted 26 Jun 2026cs.CLcited by 0

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

  1. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  2. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  3. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  4. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  5. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  6. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  7. 2023C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Modelscited by 694
  8. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
  9. 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
  10. 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
  11. 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
  12. 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
5 more
  1. 2021Summ^N: A Multi-Stage Summarization Framework for Long Input Dialogues and Documentscited by 64
  2. 2021A Survey on Dialogue Summarization: Recent Advances and New Frontierscited by 51
  3. 2023Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Usecited by 27
  4. 2025LongRoPE2: Near-Lossless LLM Context Window Scalingcited by 21
  5. 2024Mixture of In-Context Experts Enhance LLMs' Long Context Awarenesscited by 17

Built on by

Not cited yet.