Eliminating Position Bias of Language Models: A Mechanistic Approach
Wang, Ziqi, Zhang, Hanlin, Li, Xiner, Huang, Kuan-Hao, Han, Chi, Ji, Shuiwang, Kakade, Sham M., Peng, Hao, Ji, Heng
–arXiv.org Artificial Intelligence
Position bias has proven to be a prevalent issue of modern language models (LMs), where the models prioritize content based on its position within the given context. This bias often leads to unexpected model failures and hurts performance, robustness, and reliability across various applications. Our mechanistic analysis attributes the position bias to two components employed in nearly all state-of-the-art LMs: causal attention and relative positional encodings. Specifically, we find that causal attention generally causes models to favor distant content, while relative positional encodings like RoPE Su et al. (2024) prefer nearby ones based on the analysis of retrieval-augmented question answering (QA). Further, our empirical study on object detection reveals that position bias is also present in vision-language models (VLMs). Based on the above analyses, we propose to eliminate position bias caused by different input segment orders (e.g., options in LM-as-a-judge, retrieved documents in QA) in a training-free zero-shot manner. Our method changes the causal attention to bidirectional attention between segments and utilizes model attention values to decide the relative orders of segments instead of using the order provided in input prompts, therefore enabling Position-INvariant inferencE (PINE) at the segment level. By eliminating position bias, models achieve better performance and reliability in downstream tasks where position bias widely exists, such as LM-as-a-judge and retrieval-augmented QA. Notably, PINE is especially useful when adapting LMs for evaluating reasoning pairs: it consistently provides 8 to 10 percentage points performance gains in most cases, and makes Llama-3-70B-Instruct perform even better than GPT-4-0125-preview on the RewardBench reasoning subset.
arXiv.org Artificial Intelligence
Jul-1-2024
- Country:
- Africa
- Eritrea (0.04)
- Middle East
- Sudan (0.04)
- Asia
- Japan > Honshū
- Kansai > Kyoto Prefecture > Kyoto (0.04)
- Indonesia > Bali (0.04)
- Malaysia (0.04)
- Middle East
- Saudi Arabia > Arabian Gulf (0.04)
- Yemen (0.04)
- Philippines (0.04)
- China (0.04)
- Myanmar (0.04)
- Singapore (0.04)
- India
- Lakshadweep (0.04)
- West Bengal > Kolkata (0.04)
- Japan > Honshū
- Europe (0.04)
- Indian Ocean
- Arabian Gulf (0.04)
- Arabian Sea (0.04)
- Bay of Bengal > Laccadive Sea (0.04)
- Red Sea (0.04)
- North America
- Canada > Ontario
- Toronto (0.04)
- United States
- Illinois > Champaign County
- Urbana (0.04)
- Texas (0.04)
- Illinois > Champaign County
- Canada > Ontario
- Oceania
- Australia (0.04)
- Cook Islands (0.04)
- Fiji (0.04)
- Pacific Ocean > North Pacific Ocean
- South China Sea (0.04)
- Africa
- Genre:
- Research Report > New Finding (0.46)
- Technology: