Rectifying Demonstration Shortcut in In-Context Learning

Joonwon Jang, Sanghwan Jang, Wonbin Kweon, Minjin Jeon, Hwanjo Yu
3/14/2024
cs.CLcs.AI

No official code found. Best implementation: Lainshower/In-Context-Calibration (4 stars, last commit 2024-10-03).

Abstract

Large language models (LLMs) are able to solve various tasks with only a few demonstrations utilizing their in-context learning (ICL) abilities. However, LLMs often rely on their pre-trained semantic priors of demonstrations rather than on the input-label relationships to proceed with ICL prediction. In this work, we term this phenomenon as the 'Demonstration Shortcut'. While previous works have primarily focused on improving ICL prediction results for predefined tasks, we aim to rectify the Demonstration Shortcut, thereby enabling the LLM to effectively learn new input-label relationships from demonstrations. To achieve this, we introduce In-Context Calibration, a demonstration-aware calibration method. We evaluate the effectiveness of the proposed method in two settings: (1) the Original ICL Task using the standard label space and (2) the Task Learning setting, where the label space is replaced with semantically unrelated tokens. In both settings, In-Context Calibration demonstrates substantial improvements, with results generalized across three LLM families (OPT, GPT, and Llama2) under various configurations.

View on arXivView PDF

Code Implementations(1)

The Implementation of Rectifying Demonstration Shortcut in In-Context Learning (NAACL 2024 Main)

40Shell, PythonJun 24, 20232 years ago

Similar Papers

Cite this paper

@article{jang2024rectifying,
  title  = {Rectifying Demonstration Shortcut in In-Context Learning},
  author = {Joonwon Jang and Sanghwan Jang and Wonbin Kweon and Minjin Jeon and Hwanjo Yu},
  year   = {2024},
  eprint = {2403.09488},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.09488v3}
}

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

Discussion