[Paper Review] ERNIE 3.0 Tiny: Frustratingly Simple Method to Improve Task-Agnostic Distillation Generalization
This paper proposes Multi-task Infused Task-agnostic Knowledge Distillation (MITKD), a method that enhances task-agnostic distillation by first finetuning the teacher model on multiple downstream tasks via multi-task learning before knowledge distillation. The resulting student model achieves state-of-the-art performance across in-domain, out-domain, and low-resource benchmarks, even surpassing an 8x larger BERT$_{\text{Base}}$ on SQuAD and four GLUE tasks.
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.
Motivation & Objective
- Address the generalization gap between student and teacher models in existing task-agnostic distillation methods.
- Improve the downstream performance of distilled student models without requiring task-specific distillation for each application.
- Investigate whether multi-task learning (MTL) can enhance the generalization capacity of task-agnostic distillation.
- Develop a method that combines the efficiency of once-for-all distillation with the performance benefits of task-specific knowledge.
- Achieve state-of-the-art results on diverse benchmarks, including low-resource and out-of-domain settings.
Proposed method
- First, finetune the teacher model on a diverse set of downstream NLP tasks using multi-task learning (MTL) to learn a more generalizable representation.
- Perform standard task-agnostic knowledge distillation from the MTL-finetuned teacher to a smaller student model using standard distillation objectives (e.g., soft label distillation).
- Use a single distillation process on pretraining data to compress the teacher into a student that can be directly fine-tuned on any downstream task.
- Leverage the improved representational capacity of the MTL-finetuned teacher to transfer more robust and generalizable knowledge to the student.
- Apply the method to ERNIE 3.0 to produce ERNIE 3.0 Tiny, a compact student model optimized for Chinese NLP tasks.
- Optimize hyperparameters such as learning rate, batch size, and dropout rate per task, with settings adapted from PaddleNLP and standard baselines.
Experimental results
Research questions
- RQ1Can multi-task finetuning of the teacher model improve the generalization of the student in task-agnostic distillation?
- RQ2Does combining MTL with task-agnostic distillation yield better downstream performance than standard task-agnostic or task-specific distillation?
- RQ3How does the proposed method perform across in-domain, out-of-domain, and low-resource NLP benchmarks?
- RQ4Can a distilled student model outperform a much larger teacher model (e.g., 8x larger BERT$_{\text{Base}}$) in specific tasks?
- RQ5Does the knowledge quality of the teacher matter more than its size in determining student performance?
Key findings
- MITKD significantly outperforms existing task-agnostic distillation baselines across in-domain, out-domain, and low-resource datasets.
- The method achieves state-of-the-art results on 10 Chinese NLP benchmarks when applied to ERNIE 3.0, producing ERNIE 3.0 Tiny.
- ERNIE 3.0 Tiny surpasses an 8x larger BERT$_{\text{Base}}$ model on SQuAD and four GLUE tasks, demonstrating strong generalization.
- The MTL-finetuned teacher provides more effective knowledge transfer, reducing the generalization gap between teacher and student.
- The method achieves strong performance even in low-resource settings, where it outperforms baselines on FewCLUE benchmarks.
- Empirical results show that the quality of knowledge in the teacher (enhanced via MTL) is more critical than its size for student performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.