[论文解读] ERNIE 3.0 Tiny: Frustratingly Simple Method to Improve Task-Agnostic Distillation Generalization
本文提出多任务注入的无任务特异性知识蒸馏(MITKD),通过在知识蒸馏前先使用多任务学习对教师模型在多个下游任务上进行微调,从而增强无任务特异性蒸馏的效果。由此得到的学生模型在域内、域外及低资源基准测试中均达到最先进性能,甚至在 SQuAD 和四个 GLUE 任务上超越了 8 倍大的 BERT$_{\text{Base}}$ 模型。
Task-agnostic knowledge distillation attempts to address the problem of deploying large pretrained language model in resource-constrained scenarios by compressing a large pretrained model called teacher into a smaller one called student such that the student can be directly finetuned on downstream tasks and retains comparable performance. However, we empirically find that there is a generalization gap between the student and the teacher in existing methods. In this work, we show that we can leverage multi-task learning in task-agnostic distillation to advance the generalization of the resulted student. In particular, we propose Multi-task Infused Task-agnostic Knowledge Distillation (MITKD). We first enhance the teacher by multi-task training it on multiple downstream tasks and then perform distillation to produce the student. Experimental results demonstrate that our method yields a student with much better generalization, significantly outperforms existing baselines, and establishes a new state-of-the-art result on in-domain, out-domain, and low-resource datasets in the setting of task-agnostic distillation. Moreover, our method even exceeds an 8x larger BERT$_{ ext{Base}}$ on SQuAD and four GLUE tasks. In addition, by combining ERNIE 3.0, our method achieves state-of-the-art results on 10 Chinese datasets.
研究动机与目标
- 解决现有无任务特异性蒸馏方法中学生模型与教师模型之间的泛化差距。
- 在不为每个应用引入任务特异性蒸馏的前提下,提升蒸馏学生模型的下游性能。
- 探究多任务学习(MTL)是否能增强无任务特异性蒸馏的泛化能力。
- 开发一种结合一次为所有(once-for-all)蒸馏效率与任务特异性知识优势的方法。
- 在多样化基准测试中实现最先进结果,包括低资源和域外设置。
提出的方法
- 首先,使用多任务学习(MTL)在一系列多样化的下游 NLP 任务上对教师模型进行微调,以学习更具泛化能力的表征。
- 使用标准蒸馏目标(如软标签蒸馏)从经过 MTL 微调的教师模型向更小的学生模型执行标准的无任务特异性知识蒸馏。
- 在预训练数据上执行单次蒸馏过程,将教师模型压缩为一个可直接在任何下游任务上进行微调的学生模型。
- 利用经过 MTL 微调的教师模型提升的表征能力,将更鲁棒、更具泛化能力的知识传递给学生模型。
- 将该方法应用于 ERNIE 3.0,生成专为中文 NLP 任务优化的紧凑学生模型 ERNIE 3.0 Tiny。
- 针对每个任务优化学习率、批量大小和 dropout 率等超参数,参数设置参考 PaddleNLP 和标准基线。
实验结果
研究问题
- RQ1对教师模型进行多任务微调是否能提升无任务特异性蒸馏中学生模型的泛化能力?
- RQ2将 MTL 与无任务特异性蒸馏结合,是否能带来优于标准无任务特异性或任务特异性蒸馏的下游性能?
- RQ3所提出方法在域内、域外及低资源 NLP 基准测试中的表现如何?
- RQ4在特定任务中,蒸馏学生模型是否能超越一个大得多的教师模型(例如 8 倍大的 BERT$_{\text{Base}}$)?
- RQ5在决定学生模型性能时,教师模型的知识质量是否比其参数规模更为关键?
主要发现
- MITKD 在域内、域外及低资源数据集上显著优于现有的无任务特异性蒸馏基线方法。
- 当应用于 ERNIE 3.0 时,该方法在 10 个中文 NLP 基准测试中均达到最先进水平,生成了 ERNIE 3.0 Tiny 模型。
- ERNIE 3.0 Tiny 在 SQuAD 和四个 GLUE 任务上超越了 8 倍大的 BERT$_{\text{Base}}$ 模型,展现出强大的泛化能力。
- 经过 MTL 微调的教师模型实现了更有效的知识迁移,缩小了教师与学生之间的泛化差距。
- 该方法在低资源设置下也表现出色,其在 FewCLUE 基准测试中优于所有基线方法。
- 实证结果表明,教师模型中知识的质量(通过 MTL 提升)对学生模型性能的影响大于其模型规模。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。