What Do Llamas Really Think? Revealing Preference Biases in Language Model Representations

Raphael Tang, Xinyu Zhang, Jimmy Lin, Ferhan Ture
11/30/2023
cs.CL

No confident code implementation found for this paper.

Abstract

Do large language models (LLMs) exhibit sociodemographic biases, even when they decline to respond? To bypass their refusal to "speak," we study this research question by probing contextualized embeddings and exploring whether this bias is encoded in its latent representations. We propose a logistic Bradley-Terry probe which predicts word pair preferences of LLMs from the words' hidden vectors. We first validate our probe on three pair preference tasks and thirteen LLMs, where we outperform the word embedding association test (WEAT), a standard approach in testing for implicit association, by a relative 27% in error rate. We also find that word pair preferences are best represented in the middle layers. Next, we transfer probes trained on harmless tasks (e.g., pick the larger number) to controversial ones (compare ethnicities) to examine biases in nationality, politics, religion, and gender. We observe substantial bias for all target classes: for instance, the Mistral model implicitly prefers Europe to Africa, Christianity to Judaism, and left-wing to right-wing politics, despite declining to answer. This suggests that instruction fine-tuning does not necessarily debias contextualized embeddings. Our codebase is at https://github.com/castorini/biasprobe.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tang2023what,
  title  = {What Do Llamas Really Think? Revealing Preference Biases in Language Model Representations},
  author = {Raphael Tang and Xinyu Zhang and Jimmy Lin and Ferhan Ture},
  year   = {2023},
  eprint = {2311.18812},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.18812v1}
}

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/2311.18812.svg)](https://codeofpaper.com/paper/2311.18812)

Discussion