Enhancing In-Context Learning via Implicit Demonstration Augmentation

Xiaoling Zhou, Wei Ye, Yidong Wang, Chaoya Jiang, Zhemg Lee +2 more
6/27/2024
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

The emergence of in-context learning (ICL) enables large pre-trained language models (PLMs) to make predictions for unseen inputs without updating parameters. Despite its potential, ICL's effectiveness heavily relies on the quality, quantity, and permutation of demonstrations, commonly leading to suboptimal and unstable performance. In this paper, we tackle this challenge for the first time from the perspective of demonstration augmentation. Specifically, we start with enriching representations of demonstrations by leveraging their deep feature distribution. We then theoretically reveal that when the number of augmented copies approaches infinity, the augmentation is approximately equal to a novel logit calibration mechanism integrated with specific statistical properties. This insight results in a simple yet highly efficient method that significantly improves the average and worst-case accuracy across diverse PLMs and tasks. Moreover, our method effectively reduces performance variance among varying demonstrations, permutations, and templates, and displays the capability to address imbalanced class distributions.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhou2024enhancing,
  title  = {Enhancing In-Context Learning via Implicit Demonstration Augmentation},
  author = {Xiaoling Zhou and Wei Ye and Yidong Wang and Chaoya Jiang and Zhemg Lee and Rui Xie and Shikun Zhang},
  year   = {2024},
  eprint = {2407.00100},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.00100v1}
}

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

Discussion