Mitigate Position Bias in Large Language Models via Scaling a Single Dimension
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) are increasingly applied in various real-world scenarios due to their excellent generalization capabilities and robust generative abilities. However, they exhibit position bias, also known as "lost in the middle", a phenomenon that is especially pronounced in long-context scenarios, which indicates the placement of the key information in different positions of a prompt can significantly affect accuracy. This paper first explores the micro-level manifestations of position bias, concluding that attention weights are a micro-level expression of position bias. It further identifies that, in addition to position embeddings, causal attention mask also contributes to position bias by creating position-specific hidden states. Based on these insights, we propose a method to mitigate position bias by scaling this positional hidden states. Experiments on the NaturalQuestions Multi-document QA, KV retrieval, LongBench and timeline reorder tasks, using various models including RoPE models, context windowextended models, and Alibi models, demonstrate the effectiveness and generalizability of our approach. Our method can improve performance by up to 15.2% by modifying just one dimension of hidden states. Our code is available at https://aka.ms/PositionalHidden.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 28 of its 44 references that are in the map. First posted on arXiv 4 Jun 2024.
Builds on
28 of 44 references.
References · 28
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 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
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2023Mistral 7Bcited by 3,065
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,093
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
16 more
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
- 2023LooGLE: Can Long-Context Language Models Understand Long Contexts?cited by 200
- 2024World Model on Million-Length Video And Language With Blockwise RingAttentioncited by 196
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 148
- 2024Make Your LLM Fully Utilize the Contextcited by 118
- 2023Attention Sorting Combats Recency Bias In Long Context Language Modelscited by 89
- 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
- 2023Large Language Models Can be Lazy Learners: Analyze Shortcuts in In-Context Learningcited by 69
- 2024Length Generalization of Causal Transformers without Position Encodingcited by 46
- 2023Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional Trainingcited by 31
- 2023Peek Across: Improving Multi-Document Modeling via Cross-Document Question-Answeringcited by 28
- 2023Fortify the Shortest Stave in Attention: Enhancing Context Awareness of Large Language Models for Effective Tool Usecited by 27
- 2023Latent Positional Information is in the Self-Attention Variance of Transformer Language Models Without Positional Embeddingscited by 23
- 2024Position Engineering: Boosting Large Language Models through Positional Information Manipulationcited by 9
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.