RICo: Refined In-Context Contribution for Automatic Instruction-Tuning Data Selection

Data selection for instruction tuning is crucial for improving the performance of large language models (LLMs) while reducing training costs. In this paper, we propose Refined Contribution Measurement with In-Context Learning (RICo), a novel gradient-free method that quantifies the fine-grained contribution of individual samples to both task-level and global-level model performance. RICo enables more accurate identification of high-contribution data, leading to better instruction tuning. We further introduce a lightweight selection paradigm trained on RICo scores, enabling scalable data selection with a strictly linear inference complexity. Extensive experiments on three LLMs across 12 benchmarks and 5 pairwise evaluation sets demonstrate the effectiveness of RICo. Remarkably, on LLaMA3.1-8B, models trained on 15% of RICo-selected data outperform full datasets by 5.42% points and exceed the best performance of widely used selection methods by 2.06% points. We further analyze high-contribution samples selected by RICo, which show both diverse tasks and appropriate difficulty levels, rather than just the hardest ones.
View on arXiv@article{yang2025_2505.05327, title={ RICo: Refined In-Context Contribution for Automatic Instruction-Tuning Data Selection }, author={ Yixin Yang and Qingxiu Dong and Linli Yao and Fangwei Zhu and Zhifang Sui }, journal={arXiv preprint arXiv:2505.05327}, year={ 2025 } }