IDEAL: Influence-Driven Selective Annotations Empower In-Context Learners in Large Language Models

Shaokun Zhang, Xiaobo Xia, Zhaoqing Wang, Ling-Hao Chen, Jiale Liu, Qingyun Wu, Tongliang Liu

TL;DR

IDEAL is a novel framework that uses graph-based "influence maximization" to select the most impactful unlabeled data points for human annotation. By choosing a subset that best represents the entire data distribution through a diffusion process, IDEAL significantly improves In-Context Learning (ICL) performance while being nearly 8x faster than previous state-of-the-art selection methods.

The Challenge of Example Selection

Large Language Models (LLMs) possess a remarkable ability known as In-Context Learning (ICL): they can learn to perform a task simply by observing a few examples provided in their prompt. However, the quality of these examples is the make-or-break factor for downstream performance.

To achieve the best results, researchers typically retrieve examples from a massive pool of annotated data. The catch is that annotating thousands of examples is incredibly expensive and time-consuming. Previous attempts to solve this problem (such as the Vote-k method) tried to select a "diverse and representative" subset to annotate. Unfortunately, these methods are often slow, require multiple stages of processing, and struggle to find the right balance between covering the whole dataset and avoiding unhelpful outliers.

The IDEAL Method

The authors introduce IDEAL (Influence-Driven selective Annotations empower in-context Learners), a framework that treats data selection as a graph problem rather than a standard sampling task.

1. Graph Construction

First, the framework converts unlabeled text into vector embeddings (using Sentence-BERT) and builds a directed graph. Each data point becomes a node, connected to its $k$-nearest neighbors based on semantic similarity.

2. Influence Quantification

To determine how "influential" a subset of nodes is, IDEAL employs an Independent Cascade diffusion model.

Illustration of the Independent Cascade diffusion model used to quantify the influence of selected examples.

Imagine "activating" a few initial nodes. Those nodes then have a set probability of activating their neighbors, who in turn might activate their neighbors, and so on. The total number of activated nodes at the end of this process represents the "influence" (or coverage) of that specific subset.

3. Greedy Selection and Theoretical Guarantees

Because finding the absolute best subset in a massive graph is computationally impossible (NP-hard), IDEAL uses a simple but highly effective greedy algorithm. It iteratively picks the single data point that provides the maximum "marginal gain" to the total influence until the annotation budget is met.

Crucially, because the influence function is "submodular" (meaning it follows the law of diminishing returns), the authors mathematically prove that this greedy selection is guaranteed to yield a result within a specific, tight range of the optimal solution.

Key Insights and Ideas

  • Influence > Diversity + Representativeness: Instead of trying to manually balance two conflicting goals (diversity vs. representativeness), IDEAL uses "influence" as a single, unified metric. A highly influential subset naturally covers the major clusters of the data manifold.
  • End-to-End Efficiency: Unlike previous methods that require an LLM to make "test" predictions on the unlabeled pool to gauge confidence, IDEAL is entirely unsupervised and works directly on the embeddings.
  • The "Aha" Moment: The paper demonstrates that a subset capable of "influencing" more nodes in the graph correlates directly with higher accuracy when those nodes are used as ICL prompts. Being a good "proxy" for the dataset is exactly what makes for a high-quality prompt pool.
Visualization of the diffusion process on a data graph, demonstrating how broader influence coverage correlates with higher downstream accuracy.

Experimental Results

The researchers evaluated IDEAL across 9 diverse datasets covering four major NLP categories: Classification, Multi-Choice Reasoning, Dialogue, and Generation, as well as Out-of-Distribution (OOD) tests.

  • Superior Accuracy: IDEAL outperformed the previous state-of-the-art (Vote-k) in 17 out of 18 experimental cases.
  • Massive Speedup: IDEAL is incredibly efficient. It achieved these top-tier results requiring only 13% of the time consumption of Vote-k (a roughly 7.8x speedup).
  • Stability: The method proved to be more robust to "prompt order" (the sequence in which examples appear in the context window), which is a notorious pain point in LLM prompting.
  • Generalization: Examples selected by IDEAL on one dataset (e.g., SST-2) proved to be highly effective even when the model was tested on a different domain (e.g., IMDb), showing that the "influential" points capture invariant task properties.

Limitations and Future Work

While IDEAL drastically reduces the time spent selecting examples, loading and running the LLMs for the final evaluation still requires significant GPU memory. Furthermore, the authors experimented with an "Auto-IDEAL" version that uses the LLM to automatically label the rest of the data. While promising, it risks "error propagation" if the initial human-labeled subset isn't perfectly relevant to the rest of the pool.

Future research will likely focus on reducing the inference costs of automatic annotation while maintaining the high-quality selection standards set by the IDEAL framework.

Summary updated

BibTeX
@inproceedings{zhang2024ideal,
  author = {Shaokun Zhang and Xiaobo Xia and Zhaoqing Wang and Ling-Hao Chen and Jiale Liu and Qingyun Wu and Tongliang Liu},
  title = {{IDEAL: Influence-Driven Selective Annotations Empower In-Context Learners in Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=Spp2i1hKwV},
}
Figure