In-context Example Selection with Influences

Tai Nguyen, Eric Wong
2/21/2023
cs.CLcs.LG

No official code found. Best implementation: BrachioLab/incontext_influences (15 stars, last commit 2023-05-12).

Abstract

In-context learning (ICL) is a powerful paradigm emerged from large language models (LLMs). Despite its promises, ICL performance is known to be highly sensitive to input examples. In this work, we use $\textit{in-context influences}$ to analyze few-shot ICL performance directly from the in-context examples. Our proposed influence-based example selection method can identify both positive and negative examples, outperforming several baselines when evaluated on 9 SuperGLUE tasks. Our analysis uncovers up to a $16.3\%$ performance gap between using the most negative in-context examples compared to the most positive. In a case study, we apply our influence-based framework to quantify the phenomena of recency bias in example ordering for few-shot ICL.

View on arXivView PDF

Code Implementations(1)

In-context Example Selection with Influences

151Python, DockerfileFeb 21, 20233 years ago

Cite this paper

@article{nguyen2023incontext,
  title  = {In-context Example Selection with Influences},
  author = {Tai Nguyen and Eric Wong},
  year   = {2023},
  eprint = {2302.11042},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.11042v2}
}

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

Discussion