Llm data selection improves by balancing similarity and diversity

ICLHerd: Herding-Based Data Selection for LLMs with In-Context Learning as a Proxy

Computation and LanguageArtificial IntelligenceMachine Learning

Summary

Choosing the right training data is very important for making large language models work better. The authors noticed that picking data too similar to examples can lead to poor variety and performance. They created a new method called ICLHerd that finds a better balance between selecting very similar data and more diverse data. They also use a way to test this balance quickly by checking how well the model learns from examples. Their approach works better than older methods by avoiding too much focus on just one type of data.

What this means in practice

Authors

Yuqiao Wen, Lili Mou

Abstract

Data selection plays a central role in modern large language model training, as the quality of training data strongly influences downstream performance. A common approach is to curate a development set that encodes the desired skills (e.g., reasoning or multilinguality) and select data that are similar to them. Existing methods compute similarity using cosine distance over either the model's hidden states or gradients. However, we observe that this max-similarity strategy induces a mode-seeking bias: the selected data clusters tightly around the development samples. To address this, we propose ICLHerd, a data selection framework that leverages the von Mises-Fisher kernel to balance mode-seeking with mode-averaging. We further introduce in-context learning as a validation proxy, enabling efficient hyperparameter search over the balance trade-off. Results show that ICLHerd outperforms existing LLM data selection algorithms, highlighting the importance of balancing mode-seeking and mode-averaging.