Eliminating Positional Bias in LLMs via Attention Weight Averaging

ACL ARR 2024 June Submission558 Authors

12 Jun 2024 (modified: 02 Jul 2024)ACL ARR 2024 June SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Abstract: Positional bias in LLMs means that changing the order of input sentences leads to semantic inconsistency in the output. Positional bias occurs even though the overall meaning of the input remains the same. Recent studies have observed and verified that positional bias is prevalent across various LLMs and tasks. Our study proposes Average Attention Infer module, which starts from the calculation of the attention mechanism and aims to reduce positional bias by computing the average attention weight of different arrangements. We design experiments to verify the module's effectiveness in mitigating positional bias. It is also verified that the LLMs can still maintain their language functions after debiasing, which makes our module easy to extend to other tasks. Methods for selecting layers and permutations are provided to accelerate the module's computation further. We release the code and hope this research can inspire the design and research of a new generation of attention modules, thereby contributing to the fundamental elimination of positional bias.
Paper Type: Long
Research Area: Question Answering
Research Area Keywords: Robustness; Positional bias; Large Language Model; Attention mechanism;
Contribution Types: Model analysis & interpretability, NLP engineering experiment
Languages Studied: English
Submission Number: 558
Loading