Lune

ACL Findings2026

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

Zhenghua Wang, Yiran Ding, Changze Lv, Yixin Wu, Tianlong Li, Zhibo Xu, Muling Wu, Tianyuan Shi, Shizheng Li, Qi Qian, Xuanjing Huang, Xiaoqing Zheng

Abstract

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 layerspecific 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ézier 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.

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encoding cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens cites Measuring Massive Multitask Language Understanding
  • LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on8

  1. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  3. LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu et al.ICML 2024 · 316 citations
  4. Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional EncodingZhenyu Zhang, Runjin Chen, Shiwei Liu, Zhewei Yao et al.NeurIPS 2024 · 99 citations
  5. ZeroSCROLLS: A Zero-Shot Benchmark for Long Text UnderstandingUri Shaham, Maor Ivgi, Avia Efrat, Jonathan Berant et al.EMNLP Findings 2023 · 23 citations

Related papers

  1. LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan et al.ACL Findings 2026
  2. Mitigate Position Bias in LLMs via Scaling a Single Hidden States ChannelYijiong Yu, Huiqiang Jiang, Xufang Luo, Qianhui Wu et al.ACL Findings 2025 · 5 citations
  3. AdaRoPE: Not All Attention Heads Should Rotate and Scale EquallyShaowen Wang, Yuke Zheng, Tansheng Zhu, Shuang Chen et al.ICML 2026
  4. Found in the middle: Calibrating Positional Attention Bias Improves Long Context UtilizationCheng-Yu Hsieh, Yung-Sung Chuang, Chun-Liang Li, Zifeng Wang et al.ACL Findings 2024 · 31 citations
  5. HoPE: A Novel Positional Encoding Without Long-Term Decay for Enhanced Context Awareness and ExtrapolationYuhan Chen, Ang Lv, Jian Luan, Bin Wang et al.ACL 2025
Dusk over the sea between two cliffs drawn in fine vertical lines