Mitigating Label Biases for In-context Learning

Yu Fei, Yifan Hou, Zeming Chen, Antoine Bosselut
5/28/2023
cs.CLcs.AIcs.LG

No official code found. Best implementation: fywalter/label-bias (10 stars, last commit 2023-08-04).

Abstract

Various design settings for in-context learning (ICL), such as the choice and order of the in-context examples, can bias a model toward a particular prediction without being reflective of an understanding of the task. While many studies discuss these design choices, there have been few systematic investigations into categorizing them and mitigating their impact. In this work, we define a typology for three types of label biases in ICL for text classification: vanilla-label bias, context-label bias, and domain-label bias (which we conceptualize and detect for the first time). Our analysis demonstrates that prior label bias calibration methods fall short of addressing all three types of biases. Specifically, domain-label bias restricts LLMs to random-level performance on many tasks regardless of the choice of in-context examples. To mitigate the effect of these biases, we propose a simple bias calibration method that estimates a language model's label bias using random in-domain words from the task corpus. After controlling for this estimated bias when making predictions, our novel domain-context calibration significantly improves the ICL performance of GPT-J and GPT-3 on a wide range of tasks. The gain is substantial on tasks with large domain-label bias (up to 37% in Macro-F1). Furthermore, our results generalize to models with different scales, pretraining methods, and manually-designed task instructions, showing the prevalence of label biases in ICL.

View on arXivView PDF

Code Implementations(1)

fywalter/label-biasCommunity100%

A codebase for ACL 2023 paper: Mitigating Label Biases for In-context Learning

102PythonAug 4, 20233 years ago

Similar Papers

Cite this paper

@article{fei2023mitigating,
  title  = {Mitigating Label Biases for In-context Learning},
  author = {Yu Fei and Yifan Hou and Zeming Chen and Antoine Bosselut},
  year   = {2023},
  eprint = {2305.19148},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.19148v3}
}

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

Discussion