Skip to main content
QUICK REVIEW

[论文解读] Take the Bull by the Horns: Hard Sample-Reweighted Continual Training Improves LLM Generalization

Xuxi Chen, Zhendong Wang|arXiv (Cornell University)|Feb 22, 2024
Machine Learning and Data ClassificationComputer Science被引用 3
一句话总结

本文提出通过实例重加权分布鲁棒优化(IR-DRO)实现硬样本重加权持续训练,通过在持续预训练和指令微调过程中动态重加权中等高损失样本(被视为信息量丰富)来提升大语言模型(LLM)的泛化能力。该方法在计算开销极低的情况下,在多个基准测试中实现了最先进性能提升,优于均匀采样和极端损失采样策略。

ABSTRACT

In the rapidly advancing arena of large language models (LLMs), a key challenge is to enhance their capabilities amid a looming shortage of high-quality training data. Our study starts from an empirical strategy for the light continual training of LLMs using their original pre-training data sets, with a specific focus on selective retention of samples that incur moderately high losses. These samples are deemed informative and beneficial for model refinement, contrasting with the highest-loss samples, which would be discarded due to their correlation with data noise and complexity. We then formalize this strategy into a principled framework of Instance-Reweighted Distributionally Robust Optimization (IR-DRO). IR-DRO is designed to dynamically prioritize the training focus on informative samples through an instance reweighting mechanism, streamlined by a closed-form solution for straightforward integration into established training protocols. Through rigorous experimentation with various models and datasets, our findings indicate that our sample-targeted methods significantly improve LLM performance across multiple benchmarks, in both continual pre-training and instruction tuning scenarios. Our codes are available at https://github.com/VITA-Group/HardFocusTraining.

研究动机与目标

  • 通过在持续训练中利用现有预训练数据集,解决在高质量训练数据有限的情况下提升大语言模型(LLM)性能的挑战。
  • 识别并优先处理信息量丰富的样本——特别是中等高损失样本,而非损失最高的样本(通常为噪声或复杂样本)。
  • 开发一种原理严谨、无需超参数调节的优化框架,根据样本的信息量自动调整其权重,用于持续训练。
  • 通过闭式解实现与现有大语言模型(LLM)训练流程的无缝集成。
  • 在多种模型(如OPT、LLaMA、Sheared-LLaMA)和训练场景(包括持续预训练和指令微调)中验证该方法的有效性。

提出的方法

  • 该方法提出IR-DRO,一种基于损失值对单个训练实例进行重加权的分布鲁棒优化框架,以优先处理信息量丰富的样本。
  • 将实例重加权建模为闭式优化问题,实现高效且即插即用的集成,适用于标准大语言模型(LLM)训练协议。
  • 该方法避开高损失样本(与噪声或复杂性相关)和低损失样本(已充分学习),转而聚焦于中等高损失实例作为信息量丰富的样本。
  • IR-DRO在训练过程中动态调整样本权重,以突出对模型泛化贡献最大的样本。
  • 该方法在持续预训练和指令微调设置中均进行了评估,证明了其在不同模型架构和数据集上的鲁棒性。
  • 消融实验表明,IR-DRO优于均匀采样、高损失采样和低损失采样基线。
Figure 1: We introduce IR-DRO, a principled optimization-based framework named that automatically decides the importance scores at instance level and reweight the training process.
Figure 1: We introduce IR-DRO, a principled optimization-based framework named that automatically decides the importance scores at instance level and reweight the training process.

实验结果

研究问题

  • RQ1在不增加额外数据的前提下,选择性地重加权中等高损失样本是否能提升大语言模型(LLM)在持续训练中的泛化能力?
  • RQ2IR-DRO在性能和鲁棒性方面与均匀采样和极端损失采样策略相比如何?
  • RQ3所提出的方法是否能在不同大语言模型(LLM)架构和训练场景(如持续预训练和指令微调)中实现泛化?
  • RQ4哪些超参数设置(如初始学习率、训练步数)能在多种基准测试中实现最优性能?
  • RQ5IR-DRO的闭式解是否能有效集成到现有训练流程中,而无需显著工程开销?

主要发现

  • IR-DRO在所有评估基准测试中均优于均匀采样和极端损失采样策略,包括MMLU、HellaSwag和WinoGrande。
  • 在使用Alpaca和Open-Platypus微调的LLaMA-v2-7b模型上,IR-DRO平均得分达到63.29,超过均匀基线(63.20)和其他采样策略。
  • 在指令微调中,IR-DRO在MMLU*上取得45.08分,显著优于低分基线(32.03)和高分基线(34.01)。
  • 该方法在BoolQ上于500个训练批次后达到最优性能,在WinoGrande上仅需100个批次,表明不同基准测试存在最优训练时长。
  • 消融实验表明,较高学习率有利于BoolQ,而较低学习率更适合其他基准测试,表明对超参数敏感,而IR-DRO通过自动重加权有效缓解了该问题。
  • IR-DRO系数的分布表现出显著差异,证实该方法避免了均匀加权,并有效优先处理了信息量丰富的样本。
Figure 2: The distribution of the coefficients generated by IR-DRO during continual pre-training. We visualize both the frequency of the coefficients and also the cumulative percentage.
Figure 2: The distribution of the coefficients generated by IR-DRO during continual pre-training. We visualize both the frequency of the coefficients and also the cumulative percentage.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。