[Paper Review] Finding Support Examples for In-Context Learning
The paper introduces LENS, a two-stage filter-then-search method to select task-representative support examples for in-context learning, improving performance over baselines and prior coreset methods. It first filters for individually informative examples using InfoScore, then performs a diversity-guided search to find a performant permutation of examples.
Additionally, the strong dependency among in-context examples makes it an NP-hard combinatorial optimization problem and enumerating all permutations is infeasible. Hence we propose LENS, a fiLter-thEN-Search method to tackle this challenge in two stages: First we filter the dataset to obtain informative in-context examples individually. Specifically, we propose a novel metric, InfoScore, to evaluate the example's in-context informativeness based on the language model's feedback, and further propose a progressive filtering process to filter out uninformative examples. Then we propose diversity-guided example search which iteratively refines and evaluates the selected example permutations, to find examples that fully depict the task. The experimental results show that LENS significantly outperforms a wide range of baselines.
Motivation & Objective
- Define the problem of selecting task-representative support examples for in-context learning (ICL).
- Propose a two-stage method to identify informative and diverse in-context examples from annotated data.
- Demonstrate that the method outperforms baselines and prior coreset approaches across multiple text classification tasks.
- Analyze properties of support examples, such as order sensitivity and transferability across models.
- Provide insights and potential directions for future ICL-specific example selection research.
Proposed method
- Stage 1: Informative Examples Filtering using InfoScore to measure in-context informativeness based on language model feedback.
- Progressive filtering to efficiently compute InfoScore on increasing subsets of the data.
- Stage 2: Diversity-Guided Example Search that refines and evaluates permutations of filtered examples using a beam-search style process with diversity considerations (s(e,E') and f(e)).
- Evaluation on GPT2-L and transfer tests across GPT2-M, GPT2-XL, and GPT-Neo-2.7B.
- Use of a small validation set to guide permutation selection and random shuffles to mitigate ordering effects.
- Grounded in two-stage design to address NP-hard combinatorial nature of ICL example selection.
- Analysis of ground-truth label importance for support vs random examples.
Experimental results
Research questions
- RQ1Can a two-stage filter-then-search approach reliably identify task-representative support examples for ICL?
- RQ2Do support examples reduce sensitivity to in-context ordering compared with random samples?
- RQ3Are ground-truth labels and input structure of support examples crucial for ICL performance?
- RQ4Do support examples transfer effectively across models with different sizes and pre-training corpora?
- RQ5How do hyperparameters affect performance and robustness of the method?
Key findings
- LENS significantly outperforms a wide range of baselines on multiple text classification datasets with GPT2-L.
- Support examples show more stable performance across different orderings than random examples.
- Ground-truth labels are important for support examples, whereas random examples show less sensitivity to labels.
- Support examples transfer effectively across different LMs (GPT2-M, GPT2-XL, GPT-Neo-2.7B).
- Coreset-style gradient-based methods provide marginal gains over random baselines in ICL, highlighting the need for ICL-specific strategies.
- The two-stage approach (InfoScore filtering plus diversity-guided search) is essential; removing the second stage degrades performance, demonstrating the value of diversity in permutation selection.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.