  Fine-tuning has been demonstrated to be an effective method to improve the
domain performance of large language models (LLMs). However, LLMs might fit the
dataset bias and shortcuts for prediction, leading to poor generation
performance. Previous works have proven that LLMs are prone to exhibit position
bias, i.e., leveraging information positioned at the beginning or end, or
specific positional cues within the input. Existing debiasing methods for LLMs
require external bias knowledge or annotated non-biased samples, which is
lacking for position debiasing and impractical in reality. In this work, we
propose a self-supervised position debiasing (SOD) framework to mitigate
position bias for LLMs. SOD leverages unsupervised responses from pre-trained
LLMs for debiasing without relying on any external knowledge. To improve the
quality of unsupervised responses, we propose an objective alignment (OAM)
module to prune these responses. Experiments on eight datasets and five tasks
show that SOD consistently outperforms existing methods in mitigating three
types of position biases. Besides, SOD achieves this by sacrificing only a
small performance on biased samples, which is general and effective. To
facilitate the reproducibility of the results, we share the code of all methods
and datasets on https://github.com/LZKSKY/SOD.
