title: Eliminating Position Bias of Language Models: A Mechanistic Approach
summary: 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 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.
paper_authors._id: 668365c0f8fd8217cc21a8a3
paper_authors.name: Ziqi Wang
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-07-05T06:55:41.246Z
paper_authors._id: 651c321c4e15c57e1b0efca6
paper_authors.avatarUrl: /avatars/241c4d975356bd986bad7303e1534bce.svg
paper_authors.fullname: Ziqi wang
paper_authors.type: user
paper_authors.user: wzq016
paper_authors._id: 668365c0f8fd8217cc21a8a4
paper_authors.name: Hanlin Zhang
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-12-11T09:23:26.518Z
paper_authors._id: 624054bcc2c17da6a63eb539
paper_authors.avatarUrl: /avatars/bf52dc0683b4100733f8696a97696d0e.svg
paper_authors.fullname: hlzhang109
paper_authors.type: user
paper_authors.user: hlzhang109
paper_authors._id: 668365c0f8fd8217cc21a8a5
paper_authors.name: Xiner Li
paper_authors._id: 668365c0f8fd8217cc21a8a6
paper_authors.name: Kuan-Hao Huang
paper_authors._id: 668365c0f8fd8217cc21a8a7
paper_authors.name: Chi Han
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-03-18T08:12:55.939Z
paper_authors._id: 645b11ff5987734177a7cdcf
paper_authors.avatarUrl: /avatars/3b04d2ca166eb28f227fc8d800e55c1c.svg
paper_authors.fullname: Chi Han
paper_authors.type: user
paper_authors.user: Glaciohound
paper_authors._id: 668365c0f8fd8217cc21a8a8
paper_authors.name: Shuiwang Ji
paper_authors._id: 668365c0f8fd8217cc21a8a9
paper_authors.name: Sham M. Kakade
paper_authors._id: 668365c0f8fd8217cc21a8aa
paper_authors.name: Hao Peng
paper_authors._id: 668365c0f8fd8217cc21a8ab
paper_authors.name: Heng Ji
paper_title: Eliminating Position Bias of Language Models: A Mechanistic Approach
paper_summary: 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 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.
paper_ai_keywords: causal attention relative positional encodings RoPE retrieval-augmented question answering QA vision-language models VLMs bidirectional attention Position-Invariant inference PINE LM-as-a-judge RewardBench