Finding Supporting Examples for In-Context Learning

02/27/2023
by   Xiaonan Li, et al.
0

In-context learning is a new learning paradigm where a language model observes a few examples and then straightly outputs the test input's prediction. Previous works have shown that in-context learning is sensitive to the provided examples and randomly sampled examples show significantly unstable performance. In this paper, we propose to find “supporting examples” for in-context learning: Given the training dataset, we need to select one permutation of a few examples, which are informative for the task's in-context learning and lead to superior performance. Although in traditional gradient-based learning, e.g., fine-tuning, there are numerous methods to find a “coreset” from the entire dataset, they are sub-optimal and not suitable for this problem since in-context learning occurs in the language model's inference without gradients or parameter updates. Additionally, the strong dependence among in-context examples makes this problem an NP-hard combinatorial optimization problem and enumerating all possible permutations is infeasible. Hence we propose a two-stage method to tackle this challenge. First we propose a novel metric to select informative examples based on the language model's feedback, with a progressive filtering strategy. And then we propose a diversity-guided beam search method to refine and evaluate the selected examples, iteratively. The experimental results show our method significantly outperforms a wide range of baselines, and further analyses show the effectiveness of our method and shed light on the properties of supporting examples and in-context learning.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/07/2023

Unified Demonstration Retriever for In-Context Learning

In-context learning is a new learning paradigm where a language model co...
research
08/08/2023

In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning

In this note, we explore inference-time alignment through in-context lea...
research
10/15/2021

Meta-learning via Language Model In-context Tuning

The goal of meta-learning is to learn to adapt to a new task with only a...
research
05/23/2023

RetICL: Sequential Retrieval of In-Context Examples with Reinforcement Learning

Many recent developments in large language models focus on prompting the...
research
09/29/2020

StratLearner: Learning a Strategy for Misinformation Prevention in Social Networks

Given a combinatorial optimization problem taking an input, can we learn...
research
12/16/2021

Learning To Retrieve Prompts for In-Context Learning

In-context learning is a recent paradigm in natural language understandi...
research
05/24/2023

How Predictable Are Large Language Model Capabilities? A Case Study on BIG-bench

We investigate the predictability of large language model (LLM) capabili...

Please sign up or login with your details

Forgot password? Click here to reset