Active Example Selection for In-Context Learning

Yiming Zhang, Shi Feng, Chenhao Tan
11/8/2022
cs.CLcs.AI

Official code: ChicagoHAI/active-example-selection (48 stars, Python, MIT, last commit 2024-07-22).

Abstract

With a handful of demonstration examples, large-scale language models show strong capability to perform various tasks by in-context learning from these examples, without any fine-tuning. We demonstrate that in-context learning performance can be highly unstable across samples of examples, indicating the idiosyncrasies of how language models acquire information.

Show full abstract

We formulate example selection for in-context learning as a sequential decision problem, and propose a reinforcement learning algorithm for identifying generalizable policies to select demonstration examples. For GPT-2, our learned policies demonstrate strong abilities of generalizing to unseen tasks in training, with a $5.8\%$ improvement on average. Examples selected from our learned policies can even achieve a small improvement on GPT-3 Ada. However, the improvement diminishes on larger GPT-3 models, suggesting emerging capabilities of large language models.

View on arXivView PDF

Code Implementations(1)

MIT

Active Example Selection for In-Context Learning (EMNLP'22)

484PythonOct 21, 20222 years agoMIT

Similar Papers

Cite this paper

@article{zhang2022active,
  title  = {Active Example Selection for In-Context Learning},
  author = {Yiming Zhang and Shi Feng and Chenhao Tan},
  year   = {2022},
  eprint = {2211.04486},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.04486}
}

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

Discussion