TL;DR
This paper introduces a two-step framework for in-context learning that prioritizes annotation efficiency. By using a novel, unsupervised graph-based selection method called vote-k, the authors demonstrate that Large Language Models (LLMs) can match or outperform state-of-the-art fine-tuned models while requiring 10 to 100 times fewer labeled examples.
The Challenge of Example Selection
In-context learning (ICL) allows LLMs to solve new tasks simply by seeing a few examples (prompts) at test time, without any parameter updates. However, most research assumes the existence of a massive pool of labeled data from which to pull these examples. In the real world, labeling data is expensive and time-consuming.
The authors identify a major gap: How do we choose which specific examples to label in the first place to maximize the LLM's performance? Most current methods rely on random selection, which often misses representative cases or includes redundant information, leading to sub-optimal "few-shot" performance.
A Two-Step Framework for Efficient Annotation
To address this, the authors propose an annotation-efficient, two-step framework:
- Selective Annotation: Choosing a small, high-quality pool of examples to be labeled by humans before test time.
- Prompt Retrieval: Selecting the most relevant examples from that small labeled pool for a specific test input at test time.
The core innovation is vote-k, an unsupervised, graph-based selection algorithm. It works by converting unlabeled sentences into embeddings and building a directed graph where each sentence points to its nearest neighbors. It then scores examples based on diversity and representativeness. Once an example is selected, its neighbors are "discounted" to prevent the algorithm from picking redundant points. Finally, it uses the LLM itself to predict labels for the unlabeled data, selecting examples across different confidence levels to ensure the model learns from both "easy" and "hard" cases.
Datasets and Evaluation
The researchers evaluated their method across 10 diverse NLP datasets covering classification (e.g., MRPC, SST-5), multiple-choice commonsense reasoning (HellaSwag), dialogue state tracking (MWOZ 2.4), and generation (e.g., GeoQuery, XSum). They tested these using models of varying sizes, including GPT-J (6B), Codex, and GPT-3 (175B).
Key Insights and Results
The results highlight the critical importance of the candidate pool's quality. A small, diverse, and representative pool of just 18 examples can often outperform a randomly selected pool of 100.
- Massive Efficiency Gains: On average, vote-k achieved a 12.9% relative gain over random selection with a tiny budget of just 18 labeled examples. To reach the same accuracy level, standard fine-tuning required 10x to 100x more labeled data than the selective annotation ICL approach.
- ICL vs. Fine-tuning: Fine-tuning on small datasets is notoriously unstable and sensitive to outliers. In contrast, ICL combined with similarity-based retrieval is highly robust. Because the model only "sees" the most relevant examples for a given query, outliers in the larger pool don't derail the model as they would during gradient descent.
- Stability and Convergence: The method significantly reduced the variance in model performance. While random selection often leads to "lucky" or "unlucky" prompts, vote-k provides a consistently high-performing set of demonstrations. Furthermore, ICL performance with vote-k tends to converge quickly—usually after only 100–300 samples are annotated.
- Diminishing Returns of Scale: The benefit of selective annotation is most pronounced for smaller LLMs. While larger models (like GPT-3) are better at "recovering" from poor example selection, they still show significant gains when the annotation budget is tight.
Limitations and Future Work
While highly effective, the approach has limitations. Building the $k$-NN graph for very large unlabeled sets can be computationally expensive, though the authors propose a "Fast vote-k" variant to mitigate this. The method's success also relies heavily on the quality of the initial embeddings; if the embedding model fails to capture niche domain nuances, graph construction suffers. Finally, selective annotation must be paired with similarity-based retrieval at test time to maintain performance gains.
Future directions include exploring how this framework applies to multi-modal models and more complex, multi-step reasoning tasks.
Summary updated