Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrations

Xinxi Lyu, Sewon Min, Iz Beltagy, Luke Zettlemoyer, Hannaneh Hajishirzi
12/19/2022
93 citations
cs.CLcs.AI

Official code: Alrope123/z-icl (9 stars, Python, last commit 2023-06-27).

Abstract

Although large language models can be prompted for both zero- and few-shot learning, performance drops significantly when no demonstrations are available. In this paper, we introduce Z-ICL, a new zero-shot method that closes the gap by constructing pseudo-demonstrations for a given test input using a raw text corpus.

Show full abstract

Concretely, pseudo-demonstrations are constructed by (1) finding the nearest neighbors to the test input from the corpus and pairing them with random task labels, and (2) applying a set of techniques to reduce the amount of direct copying the model does from the resulting demonstrations. Evaluation on nine classification datasets shows that Z-ICL outperforms previous zero-shot methods by a significant margin, and is on par with in-context learning with labeled training data in the few-shot setting. Overall, Z-ICL provides a significantly higher estimate of the zero-shot performance levels of a model, and supports future efforts to develop better pseudo-demonstrations that further improve zero-shot results.

View on arXivView PDF

Code Implementations(1)

Alrope123/z-iclOfficial100%
91Python, ShellDec 21, 20223 years agoNOASSERTION

Similar Papers

Cite this paper

@article{lyu2022zicl,
  title  = {Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrations},
  author = {Xinxi Lyu and Sewon Min and Iz Beltagy and Luke Zettlemoyer and Hannaneh Hajishirzi},
  year   = {2022},
  eprint = {2212.09865},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.09865}
}

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

Discussion