DoGE: Domain Reweighting with Generalization Estimation

Award LLM PTSAD ML NNGTB LFDDR
预训练数据语料库的覆盖范围和组成显著影响大型语言模型的泛化能力。传统上,预训练语料库由各种来源域(例如CommonCrawl、Wikipedia、Github等)组成,根据一定的采样概率(域权重)进行采样。然而,目前的方法缺乏一种原则性的方法来优化域权重以实现最终的泛化目标。我们提出了基于泛化估计的域重新加权(DoGE),其中我们基于基于梯度的泛化估计函数评估的最终泛化目标的贡献重新加权每个域的采样概率。首先,我们使用最小-最大优化训练一个小规模代理模型以获得重新加权的域权重。在每个步骤中,通过镜像下降更新域权重以最大化整体泛化增益。最后,我们使用获得的域权重来训练一个更大规模的完整语言模型。在SlimPajama-6B数据集上,使用通用泛化目标,DoGE实现了更好的平均困惑度和零-shot推理准确性。在域外泛化任务上,DoGE大幅降低了目标域上的困惑度。我们进一步应用参数选择方案来提高泛化估计的效率。
The coverage and composition of the pretraining data corpus significantly impacts the generalization ability of large language models. Conventionally, the pretraining corpus is composed of various source domains (e.g. CommonCrawl, Wikipedia, Github etc.) according to certain sampling probabilities (domain weights). However, current methods lack a principled way to optimize domain weights for ultimate goal for generalization. We propose DOmain reweighting with Generalization Estimation (DoGE), where we reweigh the sampling probability from each domain based on its contribution to the final generalization objective assessed by a gradient-based generalization estimation function. First, we train a small-scale proxy model with a min-max optimization to obtain the reweighted domain weights. At each step, the domain weights are updated to maximize the overall generalization gain by mirror descent. Finally we use the obtained domain weights to train a larger scale full-size language model. On SlimPajama-6B dataset, with universal generalization objective, DoGE achieves better average perplexity and zero-shot reasoning accuracy. On out-of-domain generalization tasks, DoGE reduces perplexity on the target domain by a large margin. We further apply a parameter-selection scheme which improves the efficiency of generalization estimation.
许愿