Eliminating Position Bias of Language Models: A Mechanistic Approach
Ziqi Wang, Hanlin Zhang, Xiner Li, Kuan-Hao Huang, Chi Han, Shuiwang, Ji, Sham M. Kakade, Hao Peng, Heng Ji

TL;DR
This paper identifies the root causes of position bias in language models and introduces a training-free, zero-shot method called PINE that enhances model robustness and performance across various tasks by eliminating position bias.
Contribution
The paper proposes a novel, training-free approach called PINE that removes position bias in language models by modifying attention mechanisms, improving reliability and performance in downstream tasks.
Findings
PINE improves performance by 8-10 percentage points on reasoning tasks.
Eliminating position bias enhances model robustness and reliability.
PINE outperforms GPT-4 on the RewardBench reasoning set.
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…
Peer Reviews
Decision·ICLR 2025 Poster
- very relevant problem - the recency and primacy biases are interesting.
- Figure 2 is confusing, since the documents change color when you move them (in the right plot). So it looks like the $D_3$ in the first row is the tokens [2,3], but in the second assignment iteration suddenly $D_3$ is [4,5]? It seems inconsistent with the last row, where importance ordering is $D_2 > D_3 > D_1$, but they are not ordered in that way. - I don’t think you can claim that you pinpointed the causes of positional bias in transformers. Everybody knows what those are. - Please Correct
- I like this paper. they propose a bidirectional attention in the input documents to achieve input order independent attention. - Their results are solid. For order dependent benchmarks, they do achieve significant gains. - While the paper is solid, I would like the authors to revise their claims of position invariance to input-position invariance.
- I tried understanding Figure 2 many times, it was not clear to me. Please see question below. The only sensible explanation is that the attention is simulating the document under question being placed at the end of the sequence, with nearness being provided by importance scores. - What about the n^2 importance score computations per set of n documents. How to do this when there are multiple documents? - The position invariance is quite misleading. The correct term I believe would be importance
1. The paper is well-written and the graphics are appealing. 2. Position-invariant representations are nice, and you obtain them without k! overhead. 3. The positional bias on RewardBench appears significant and adds credibility to your argument that position bias is an important problem. 4. Strong results for the Qwen models on RewardBench. 5. Strong results for Llama on the reasoning subset of RewardBench.
1. You compare your method to other mechanistic methods with different goals: for example, PCW helps extend the context window; NIA gives a speed boost by making the attention computation sub-quadratic. Thus, these are both *approximate* methods. Your method, by contrast, introduces extra overhead compared to standard sampling. For a fair comparison, it is important to look for methods that are more resource-intensive than standard sampling (for example, if your method has 8x overhead, a simple
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Speech and dialogue systems
MethodsSoftmax · Attention Is All You Need
