Anchored Answers: Unravelling Positional Bias in GPT-2's Multiple-Choice Questions

Ruizhe Li, Yanjun Gao
5/6/2024
20 citations
cs.CLcs.AIcs.LG

Official code: ruizheliUOA/Anchored_Bias_GPT2 (4 stars, MIT, last commit 2024-06-20).

Abstract

Large Language Models (LLMs), such as the GPT-4 and LLaMA families, have demonstrated considerable success across diverse tasks, including multiple-choice questions (MCQs). However, these models exhibit a positional bias, particularly an even worse anchored bias in the GPT-2 family, where they consistently favour the first choice 'A' in MCQs during inference.

Show full abstract

This anchored bias challenges the integrity of GPT-2's decision-making process, as it skews performance based on the position rather than the content of the choices in MCQs. In this study, we utilise the mechanistic interpretability approach to identify the internal modules within GPT-2 models responsible for this bias. We focus on the Multi-Layer Perceptron (MLP) layers and attention heads, using the "logit lens" method to trace and modify the specific value vectors that contribute to the bias. By updating these vectors within MLP and recalibrating attention patterns to neutralise the preference for the first choice 'A', we effectively mitigate the anchored bias. Our interventions not only mitigate the bias but also improve the overall MCQ prediction accuracy for the GPT-2 family across various datasets. This work represents the first comprehensive mechanistic analysis of anchored bias from the failing cases in MCQs within the GPT-2 models, introducing targeted, minimal-intervention strategies that significantly enhance GPT2 model robustness and accuracy in MCQs. Our code is available at https://github.com/ruizheliUOA/Anchored_Bias_GPT2.

View on arXivView PDF

Code Implementations(1)

MIT

This is the official code for anchored bias of GPT2

40May 5, 20242 years agoMIT

Similar Papers

Cite this paper

@article{li2024anchored,
  title  = {Anchored Answers: Unravelling Positional Bias in GPT-2's Multiple-Choice Questions},
  author = {Ruizhe Li and Yanjun Gao},
  year   = {2024},
  eprint = {2405.03205},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.03205v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.03205.svg)](https://codeofpaper.com/paper/2405.03205)

Discussion