用验证集反推训练数据,快速选对微调样本
Train on Validation (ToV): Fast data selection with applications to fine-tuning
- 用训练集在验证集上微调前后的预测变化选样本
- 小样本下测试损失比现有方法低,提升稳定
- 适合数据稀缺的指令微调和实体识别任务
当前机器学习常采用两阶段流程:先在大规模通用数据集上预训练,再在特定任务数据上微调。微调时,选择与目标分布相近的样本至关重要,但目标分布样本往往极少。现有方法将这些样本视为验证集,通过在验证集上推理来估计增删单个样本的影响。本文提出更简单快速的替代方案:反转训练与验证角色,先在训练集上进行微调前的推理,再在验证集上微调后重新推理,选取预测变化最大的样本。核心洞察是:在小规模验证集上微调后影响最大的训练样本,最有助于降低目标分布上的测试损失。在指令微调和命名实体识别任务上的实验表明,多数情况下本方法测试对数损失低于当前最优方法。理论分析支持了该发现。
原文摘要 · Abstract (English)
State-of-the-art machine learning often follows a two-stage process: $(i)$~pre-training on large, general-purpose datasets; $(ii)$~fine-tuning on task-specific data. In fine-tuning, selecting training examples that closely reflect the target distribution is crucial. However, it is often the case that only a few samples are available from the target distribution. Existing data selection methods treat these target samples as a validation set and estimate the effect of adding or removing a single sample from the training pool by performing inference on the validation set. We propose a simpler and faster alternative that inverts the usual role of train and validation: we perform inference on the training pool before and after fine-tuning on the validation set. We then select samples whose predictions change the most. Our key insight is that the training samples most affected by fine-tuning on a small validation set tend to be the most beneficial for reducing test loss on the target distribution. Experiments on instruction tuning and named entity recognition tasks show that, in most cases, our method achieves lower test log-loss than state-of-the-art approaches. We support our findings with theoretical analysis.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。