[论文解读] Get more for less: Principled Data Selection for Warming Up Fine-Tuning in LLMs
该论文提出GOT-D,一种用于大语言模型预微调的原理性数据选择方法,通过选择能将预训练分布更贴近目标分布的样本,利用最优传输(optimal transport)度量分布差异。该方法在NLU、NLG及零样本任务中表现优异,最大支持2.7B参数模型,性能超越基线方法,且可在单张GPU小时内处理数百万样本。
This work focuses on leveraging and selecting from vast, unlabeled, open data to pre-fine-tune a pre-trained language model. The goal is to minimize the need for costly domain-specific data for subsequent fine-tuning while achieving desired performance levels. While many data selection algorithms have been designed for small-scale applications, rendering them unsuitable for our context, some emerging methods do cater to language data scales. However, they often prioritize data that aligns with the target distribution. While this strategy may be effective when training a model from scratch, it can yield limited results when the model has already been pre-trained on a different distribution. Differing from prior work, our key idea is to select data that nudges the pre-training distribution closer to the target distribution. We show the optimality of this approach for fine-tuning tasks under certain conditions. We demonstrate the efficacy of our methodology across a diverse array of tasks (NLU, NLG, zero-shot) with models up to 2.7B, showing that it consistently surpasses other selection methods. Moreover, our proposed method is significantly faster than existing techniques, scaling to millions of samples within a single GPU hour. Our code is open-sourced (Code repository: https://anonymous.4open.science/r/DV4LLM-D761/ ). While fine-tuning offers significant potential for enhancing performance across diverse tasks, its associated costs often limit its widespread adoption; with this work, we hope to lay the groundwork for cost-effective fine-tuning, making its benefits more accessible.
研究动机与目标
- 解决在稀缺、任务特定数据集上微调大语言模型时成本高昂且数据效率有限的问题。
- 通过在精选的开放、未标注数据子集上进行预微调,提升目标微调任务的性能。
- 设计一种在低预算条件下可扩展、可泛化且高效的新数据选择策略。
- 克服现有方法的局限性——这些方法往往优先选择与目标分布匹配的数据,但常导致已充分存在于预训练数据中的样本被重复选择。
- 为两阶段微调中的数据选择建立理论基础坚实且计算高效的解决方案。
提出的方法
- 提出GOT-D(用于数据选择的最优传输梯度),通过最小化预训练分布与目标分布之间的最优传输距离来选择数据。
- 使用代理预训练数据(如常见开源数据集)表示预训练分布,并计算分布偏移。
- 利用句子嵌入(如sentence-transformer、distilled-BERT)对数据点进行嵌入,以高效计算OT距离。
- 将数据选择建模为子模优化问题,以在预算约束下保证多样性与覆盖度。
- 对最优传输目标应用基于梯度的近似方法,实现在数百万样本上的可扩展、GPU加速选择。
- 将所选数据集成到两阶段微调流程中:先在选定的开放数据上进行预微调,再在有限的标注数据上进行目标微调。

实验结果
研究问题
- RQ1能否通过最小化预训练数据与目标数据之间的分布差距,实现后续微调性能的提升?
- RQ2与分布匹配基线方法(如DSIR、TAPT/c)相比,GOT-D在数据效率和性能增益方面表现如何?
- RQ3GOT-D在大规模开放数据集上能实现多大程度的可扩展性,同时保持低计算成本?
- RQ4嵌入空间的选择是否显著影响数据选择流程的性能?
- RQ5GOT-D能否在包括NLU、NLG及零样本设置在内的多样化NLP任务中实现泛化?
主要发现
- 在AGNews数据集上使用GPT-2 XL时,GOT-D在20k个预微调样本下达到61.4%准确率,较基线提升11.9%,显著优于DSIR(53.1%)和TAPT/c(57.0%)。
- 在BoolQ数据集上使用gpt-neo(2.7B)时,GOT-D在40k个样本下达到57.7%准确率,较基线提升6.6%,优于DSIR(53.3%)和TAPT/c(51.2%)。
- GOT-D在多样化任务中均达到最先进性能,包括零样本评估,无论任务类型或模型规模,均表现出一致的性能增益。
- 该方法可在单张GPU小时内处理数百万样本,计算效率显著优于现有基于梯度或重训练的方法。
- 消融实验表明,sentence-transformer嵌入与distilled-BERT性能相当,表明只要能捕捉语义结构,嵌入空间的选择并非关键因素。
- 通过LDA词云可视化确认,GOT-D选中了在候选集中代表性不足但对目标任务对齐至关重要的正式商业新闻内容(如“bank”、“market”)。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。