arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.11303cs.LGcs.AIcs.CL
收藏

TSDS:面向任务特定模型微调的数据选择

TSDS: Data Selection for Task-Specific Model Finetuning

University of Wisconsin-Madison(威斯康星大学麦迪逊分校);Yale University(耶鲁大学);Apple(苹果公司)

Zifan Liu, Amin Karbasi, Theodoros Rekatsinas

AI总结:

本文提出任务特定数据选择框架 TSDS,通过最优传输分布对齐和多样性正则化,结合近似最近邻搜索高效选择微调数据,在 1% 数据比例下即可超越全量数据微调效果。

摘要:

针对特定任务微调基础模型是现代机器学习中一种新兴范式。任务特定微调的效果在很大程度上取决于对合适训练数据的选择。我们提出 TSDS(Task-Specific Data Selection,任务特定数据选择),这是一个在目标任务中少量但具有代表性的示例引导下,为任务特定模型微调选择数据的框架。为此,我们将任务特定微调的数据选择形式化为一个优化问题,并引入基于最优传输的分布对齐损失,以刻画所选数据与目标分布之间的差异。此外,我们加入一个正则化项以鼓励所选数据的多样性,并将核密度估计纳入该正则化项,以降低候选数据中近似重复项带来的负面影响。我们将该优化问题与最近邻搜索联系起来,并基于近似最近邻搜索技术设计了高效算法来计算最优解。我们在语言模型的持续预训练和指令微调两种数据选择场景下评估了所提方法。结果表明,使用我们的方法以 1% 的选择比例选出的数据进行指令微调,其效果通常优于使用完整数据集,并且在 F1 分数上平均比基线选择方法高出 1.5 个点。

英文摘要:

Finetuning foundation models for specific tasks is an emerging paradigm in modern machine learning. The efficacy of task-specific finetuning largely depends on the selection of appropriate training data. We present TSDS (Task-Specific Data Selection), a framework to select data for task-specific model finetuning, guided by a small but representative set of examples from the target task. To do so, we formulate data selection for task-specific finetuning as an optimization problem with a distribution alignment loss based on optimal transport to capture the discrepancy between the selected data and the target distribution. In addition, we add a regularizer to encourage the diversity of the selected data and incorporate kernel density estimation into the regularizer to reduce the negative effects of near-duplicates among the candidate data. We connect our optimization problem to nearest neighbor search and design efficient algorithms to compute the optimal solution based on approximate nearest neighbor search techniques. We evaluate our method on data selection for both continued pretraining and instruction tuning of language models. We show that instruction tuning using data selected by our method with a 1% selection ratio often outperforms using the full dataset and beats the baseline selection methods by 1.5 points in F1 score on average.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑