Knowledge Distillation vs. Pretraining from Scratch under a Fixed (Computation) Budget
作者: Minh Duc Bui, Fabian David Schmidt, Goran Glavaš, Katharina von der Wense
分类: cs.CL
发布日期: 2024-04-30
备注: Accepted to the 5th Workshop on Insights from Negative Results in NLP at NAACL 2024
💡 一句话要点
比较知识蒸馏与从头预训练在固定计算预算下的效果
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 知识蒸馏 语言模型 预训练 计算预算 自然语言处理
📋 核心要点
- 现有的知识蒸馏方法在语言模型预训练中引入了额外的计算开销,导致吞吐量降低。
- 论文提出在固定计算预算下,比较从头预训练与多种知识蒸馏策略的效果,探索其优劣。
- 实验结果显示,尽管从头预训练表现良好,但TinyBERT和MiniLM等KD策略在性能上有显著提升。
📝 摘要(中文)
与标准语言模型的从头预训练相比,知识蒸馏(KD)需要通过一个通常比目标学生模型大得多的教师模型进行额外的前向传播。这使得KD在语言模型预训练中显著降低了预训练实例的吞吐量。根据语言模型预训练的扩展法则,较小的模型如果在更多数据上训练,可以缩小与较大模型的差距。在固定计算预算下,较小的模型能够处理更多数据。因此,我们假设KD在获得较小语言模型时可能并不优于从头预训练。通过公平的实验设置,我们比较了从头预训练与几种KD策略在掩码语言建模(MLM)中的表现。尽管结果未能证实我们的假设,但更复杂的KD策略如TinyBERT和MiniLM在固定计算预算下的表现显著优于从头预训练。
🔬 方法详解
问题定义:本论文旨在解决在固定计算预算下,知识蒸馏(KD)是否优于从头预训练的问题。现有方法的痛点在于KD引入的额外计算开销可能影响预训练效率。
核心思路:论文的核心思路是通过公平的实验设置,比较从头预训练与不同KD策略的性能,评估在固定预算下的效果差异。
技术框架:整体架构包括从头预训练和多种KD策略的对比实验,主要模块包括数据处理、模型训练和性能评估。
关键创新:最重要的技术创新在于通过系统的实验设计,揭示了在固定计算预算下,复杂KD策略如TinyBERT和MiniLM的优势,挑战了传统观点。
关键设计:在实验中,设置了相同的计算预算和数据量,使用了标准的损失函数和网络结构,确保了比较的公平性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,在固定计算预算下,TinyBERT和MiniLM等复杂KD策略的性能显著优于从头预训练,尤其是在数据重复的情况下,KD策略的优势更加明显。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、机器翻译和对话系统等。通过优化预训练策略,可以提高模型的训练效率和性能,推动相关技术的实际应用和发展。
📄 摘要(原文)
Compared to standard language model (LM) pretraining (i.e., from scratch), Knowledge Distillation (KD) entails an additional forward pass through a teacher model that is typically substantially larger than the target student model. As such, KD in LM pretraining materially slows down throughput of pretraining instances vis-a-vis pretraining from scratch. Scaling laws of LM pretraining suggest that smaller models can close the gap to larger counterparts if trained on more data (i.e., processing more tokens)-and under a fixed computation budget, smaller models are able be process more data than larger models. We thus hypothesize that KD might, in fact, be suboptimal to pretraining from scratch for obtaining smaller LMs, when appropriately accounting for the compute budget. To test this, we compare pretraining from scratch against several KD strategies for masked language modeling (MLM) in a fair experimental setup, with respect to amount of computation as well as pretraining data. Downstream results on GLUE, however, do not confirm our hypothesis: while pretraining from scratch performs comparably to ordinary KD under a fixed computation budget, more sophisticated KD strategies, namely TinyBERT (Jiao et al., 2020) and MiniLM (Wang et al., 2023), outperform it by a notable margin. We further find that KD yields larger gains over pretraining from scratch when the data must be repeated under the fixed computation budget.