Eliminating Position Bias of Language Models: A Mechanistic Approach
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 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 **P**osition-**IN**variant inferenc**E** (**PINE**) at the segment level. Results on the LM-as-a-judge task show that PINE is especially useful when adapting LMs for evaluating reasoning pairs: it consistently provides $8$ to $10$ percentage points performance gains in most cases. It makes Llama-3-70B-Instruct perform even better than GPT-4-0125-preview and GPT-4o-2024-08-06 on the RewardBench reasoning subset. This is a short version for workshop, full version can be found here: https://arxiv.org/abs/2407.01100.
BibTeX
@inproceedings{wang2025eliminating,
author = {Ziqi Wang and Hanlin Zhang and Xiner Li and Kuan-Hao Huang and Chi Han and Shuiwang Ji and Sham M. Kakade and Hao Peng and Heng Ji},
title = {{Eliminating Position Bias of Language Models: A Mechanistic Approach}},
booktitle = {International Conference on Learning Representations},
year = {2025},
url = {https://openreview.net/forum?id=fvkElsJOsN},
}Ask Althea to put this paper to the test.