Comparable Demonstrations Are Important in In-Context Learning: A Novel Perspective on Demonstration Selection

Caoyun Fan,Jidong Tian,Yitian Li,Hao He,Yaohui Jin
DOI: https://doi.org/10.1109/icassp48485.2024.10448239
2023-01-01
Abstract:In-Context Learning (ICL) is an important paradigm for adapting LargeLanguage Models (LLMs) to downstream tasks through a few demonstrations.Despite the great success of ICL, the limitation of the demonstration numbermay lead to demonstration bias, i.e. the input-label mapping induced by LLMsmisunderstands the task's essence. Inspired by human experience, we attempt tomitigate such bias through the perspective of the inter-demonstrationrelationship. Specifically, we construct Comparable Demonstrations (CDs) byminimally editing the texts to flip the corresponding labels, in order tohighlight the task's essence and eliminate potential spurious correlationsthrough the inter-demonstration comparison. Through a series of experiments onCDs, we find that (1) demonstration bias does exist in LLMs, and CDs cansignificantly reduce such bias; (2) CDs exhibit good performance in ICL,especially in out-of-distribution scenarios. In summary, this study exploresthe ICL mechanisms from a novel perspective, providing a deeper insight intothe demonstration selection strategy for ICL.
What problem does this paper attempt to address?