Holdout-Loss-Based Data Selection for LLM Finetuning via In-Context Learning

Ling Zhang, Xianliang Yang, Juwon Yu, Park Cheonyoung, Lei Song, Jiang Bian · DOI

Abstract

Fine-tuning Large Language Models (LLMs) requires high-quality data to avoid performance degradation from noise. Traditional data selection methods, such as RHO-Loss, often require expensive secondary reference models. This paper introduces In-Context Approximation (ICA), a method that leverages the in-context learning (ICL) capabilities of LLMs to estimate the value of training examples. By treating the model's behavior when conditioned on a holdout set as a proxy for a fine-tuned state, ICA identifies high-value data with minimal computational overhead (~1.5%). Experiments across SFT and preference alignment tasks demonstrate that ICA-trained models consistently outperform standard training and existing selection baselines.

Introduction

The "Data-Centric AI" paradigm has established that the quality of fine-tuning data is often more critical than its quantity. While small, curated datasets like LIMA have shown impressive results, the computational cost of identifying such "gold" examples remains a significant barrier. Existing selection methods typically rely on blunt heuristics or computationally intensive reference models.

This research proposes a principled, Bayesian-inspired approach called In-Context Approximation (ICA). ICA utilizes the model's own ability to learn from examples in its prompt to predict how much a specific training candidate will contribute to minimizing loss on a clean holdout set. This approach bypasses the need for training separate reference models, making high-quality data selection accessible and efficient.

Methodology: In-Context Approximation (ICA)

The core of the proposed method is the ICA Score, which measures the utility of a training example relative to a high-quality holdout set.

The ICA Workflow

  1. kNN Retrieval: For each training candidate, the system retrieves the top-$k$ (typically $k=3$) most semantically similar examples from a clean, expert-level holdout set using embedding similarity.
  2. Score Calculation: The model calculates the loss of the candidate example under two conditions: a standard forward pass and a pass where the $k$ retrieved holdout examples are included in the context window.
  3. ICA Score Derivation: The ICA score is the difference between these two losses. A high score indicates that the information in the candidate example is well-explained by the high-quality holdout set, marking it as a valuable training signal.
  4. Dynamic Gradient Reweighting: Rather than hard-filtering data, the ICA scores are used to dynamically scale gradients during training. High-scoring examples receive higher weights, while noisy or irrelevant examples are down-weighted, preserving batch diversity while prioritizing quality.

Experimental Results

The researchers evaluated ICA across various models, including LLaMA-3 and Qwen, and multiple datasets spanning Supervised Fine-Tuning (SFT) and preference alignment (DPO/SimPO).

Performance and Efficiency

ICA demonstrated significant improvements in model performance as judged by GPT-4o win rates. In SFT tasks using datasets like Alpaca and Yahoo Answers, ICA-trained models achieved win rates often exceeding 70-80% against standard training baselines.

Win rates on SFT datasets (Alpaca and Yahoo_Answers_Topics) comparing ICA (labeled 'w/o' reference model) against RHO-Loss and One-Shot baselines.

Crucially, ICA achieved these gains with only ~1.5% computational overhead, significantly lower than RHO-Loss (~10%) or One-shot learning (~4%). The method also proved robust in preference alignment tasks, consistently outperforming more expensive reference-based methods.

Win rates on preference alignment datasets (UltraFeedback and StanfordNLP/SHP-2) showing the superiority of the ICA approach.

Noise Robustness

In controlled experiments using a corrupted version of the GSM8K math dataset (where 40% of logic chains were intentionally broken), ICA-based reweighting successfully filtered out the "bad" logic, recovering nearly all the performance lost to noise and outperforming specialized selection methods like LESS.

Discussion and Conclusion

ICA reinforces the theoretical link between In-Context Learning and implicit gradient descent, providing a practical tool for "previewing" training effects. The method's efficiency and stability through soft reweighting make it a viable candidate for large-scale LLM pipelines.

Future work may address the dependency on the quality of the holdout set and explore the application of ICA to on-policy alignment methods like PPO, which currently present challenges due to the real-time nature of data generation. Nonetheless, ICA represents a significant step toward efficient, principled data curation for the next generation of LLMs.

Summary updated

BibTeX
@inproceedings{zhang2026holdout,
  author = {Ling Zhang and Xianliang Yang and Juwon Yu and Park Cheonyoung and Lei Song and Jiang Bian},
  title = {{Holdout-Loss-Based Data Selection for LLM Finetuning via In-Context Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=Cw9Bxpda2h},
}
Figure