Eliminating Position Bias of Language Models: A Mechanistic Approach

📅 2024-07-01
🏛️ arXiv.org
📈 Citations: 9
Influential: 1
📄 PDF
🤖 AI Summary
Position bias—where large language models’ performance depends on token positions within the context—undermines their robustness and reliability. This work is the first to mechanistically attribute this bias to the coupling of causal attention masking and relative positional encoding. To address it, we propose PINE, a zero-shot, training-free, position-invariant inference framework. Its core innovations are: (1) replacing unidirectional causal attention with bidirectional document-level attention, and (2) introducing attention-value-driven document reordering to eliminate input-order dependence. On RewardBench, PINE boosts Llama-3-70B-Instruct by 8–10 percentage points, surpassing GPT-4 variants. It also significantly improves stability and generalization across LM-as-a-judge, RAG-based QA, mathematical reasoning, and molecular generation tasks. This work provides the first mechanism-interpretable, plug-and-play solution for position-invariant inference, establishing a foundational advance toward reliable, context-order-agnostic language modeling.

Technology Category

Application Category

📝 Abstract
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. Based on the analyses, we propose to eliminate position bias (e.g., different retrieved documents' orders in QA affect performance) with a training-free zero-shot approach. Our method changes the causal attention to bidirectional attention between documents and utilizes model attention values to decide the relative orders of documents instead of using the order provided in input prompts, therefore enabling Position-INvariant inferencE (PINE) at the document level. By eliminating position bias, models achieve better performance and reliability in downstream tasks, including LM-as-a-judge, retrieval-augmented QA, molecule generation, and math reasoning. Notably, PINE is especially useful when adapting LMs for evaluating reasoning pairs: it consistently provides 8 to 10 percentage points performance gains, making Llama-3-70B-Instruct perform even better than GPT-4-0125-preview and GPT-4o-2024-08-06 on the RewardBench reasoning set.
Problem

Research questions and friction points this paper is trying to address.

Eliminating position bias in language models
Addressing performance and reliability issues in downstream tasks
Improving model accuracy in document-level inference
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses bidirectional attention for documents
Replaces input order with attention values
Enables position-invariant document-level inference
🔎 Similar Papers
No similar papers found.