用迭代聚类选数据,让大模型训练更高效全面。
Diversify and Conquer: Diversity-Centric Data Selection with Iterative Refinement
- 基于聚类的多样性筛选,动态调整每类数据权重。
- 在多任务评测中提升7%性能,优于当前最优方法3.8%。
- 适合需要高质量指令微调数据的模型开发者。
在大规模语言模型指令微调中,选择最优数据子集对提升模型能力至关重要。随着指令数据集不断增长,如何有效选取训练数据成为关键挑战。现有研究多关注单个样本质量等局部标准,本文主张应以全局多样性为核心。提出一种基于k-means聚类的采样方法,通过受主动学习启发的迭代精炼机制,在每轮训练中重新采样各簇实例,并动态评估簇的重要性与采样权重,从而降低异常值影响并自动过滤低质簇。在自然语言推理、通用常识、代码与数学推理等任务上,对多种模型家族进行广泛评估,结果表明该方法性能显著优于随机采样(提升7%)和当前最优方法(提升3.8%)。实验验证了多样性优先采样的重要性,可有效提升模型在多样化任务上的表现。代码已开源:https://github.com/for-ai/iterative-data-selection。
原文摘要 · Abstract (English)
Finetuning large language models on instruction data is crucial for enhancing pre-trained knowledge and improving instruction-following capabilities. As instruction datasets proliferate, selecting optimal data for effective training becomes increasingly important. This work addresses the question: How can we determine the optimal subset of data for effective training? While existing research often emphasizes local criteria like instance quality for subset selection, we argue that a global approach focused on data diversity is more critical. Our method employs k-means clustering to ensure the selected subset effectively represents the full dataset. We propose an iterative refinement method inspired by active learning techniques to resample instances from clusters, reassessing each cluster's importance and sampling weight in every training iteration. This approach reduces the effect of outliers and automatically filters out clusters containing low-quality data. Through extensive evaluation across natural language reasoning, general world knowledge, code and math reasoning tasks, and by fine-tuning models from various families, we observe consistent improvements, achieving a 7% increase over random selection and a 3.8% improvement over state-of-the-art sampling methods. Our work highlights the significance of diversity-first sampling when finetuning LLMs to enhance performance across a broad array of evaluation tasks. Our code is available at https://github.com/for-ai/iterative-data-selection.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。