Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Enhancing In-Context Learning via Implicit Demonstration Augmentation

About

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.

Xiaoling Zhou, Wei Ye, Yidong Wang, Chaoya Jiang, Zhemg Lee, Rui Xie, Shikun Zhang• 2024

Related benchmarks

TaskDatasetResultRank
Text ClassificationAG News (test)--
210
Sentiment ClassificationSST-2
Accuracy93.2
174
Natural Language InferenceCB
Accuracy52.1
110
Sentiment ClassificationSST-5
Accuracy47.2
31
Sentiment and topic classificationSubj (test)
Macro-F189.3
13
Text ClassificationCR (test)
Macro-F193.3
10
Text ClassificationCB (test)
Macro-F164.6
10
Showing 7 of 7 rows

Other info

Follow for update