Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Mitigate Position Bias in Large Language Models via Scaling a Single Dimension (2406.02536v2)

Published 4 Jun 2024 in cs.CL and cs.LG

Abstract: 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.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Yijiong Yu (11 papers)
  2. Huiqiang Jiang (32 papers)
  3. Xufang Luo (25 papers)
  4. Qianhui Wu (19 papers)
  5. Chin-Yew Lin (22 papers)
  6. Dongsheng Li (240 papers)
  7. Yuqing Yang (83 papers)
  8. Yongfeng Huang (110 papers)
  9. Lili Qiu (50 papers)
Citations (2)
X Twitter Logo Streamline Icon: https://streamlinehq.com