arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1910.01769cs.CLcs.LGstat.ML
收藏

将BERT提取为具有无标记传输数据的简单神经网络

Distilling BERT into Simple Neural Networks with Unlabeled Transfer Data

Microsoft Research(微软研究院)

Subhabrata Mukherjee, Ahmed Hassan Awadallah

摘要:

通过自我监督在大量文本上预训练巨大模型的最新进展已经在各种自然语言处理任务中获得了最先进的结果。然而,这些庞大而昂贵的模型在实践中难以用于下游任务。最近的一些努力使用知识蒸馏来压缩这些模型。然而,我们看到较小的学生模型的性能与大型教师模型的性能之间存在差距。在这项工作中,我们利用大量的域内未标记的传输数据,除了有限数量的标记训练实例,以弥补这一差距,提取BERT。我们证明了简单的基于RNN的学生模型,即使具有硬蒸馏,也可以与给定转移集的巨大教师相提并论。学生的表现可以进一步提高与软蒸馏和利用教师的中间表示。我们表明,我们的学生模型可以将庞大的教师压缩高达26倍,同时仍然匹配甚至略微超过教师在低资源环境中的表现,只有少量的标记数据。此外,对于XtremeDistil的多语言扩展(Mukherjee和Hassan Awadallah,2020),我们展示了多语言BERT类教师模型的大规模蒸馏,在参数压缩方面高达35倍,在批处理推理的延迟加速方面高达51倍,同时保留了41种语言的NER的95%的F1分数。

英文摘要:

Recent advances in pre-training huge models on large amounts of text through self supervision have obtained state-of-the-art results in various natural language processing tasks. However, these huge and expensive models are difficult to use in practise for downstream tasks. Some recent efforts use knowledge distillation to compress these models. However, we see a gap between the performance of the smaller student models as compared to that of the large teacher. In this work, we leverage large amounts of in-domain unlabeled transfer data in addition to a limited amount of labeled training instances to bridge this gap for distilling BERT. We show that simple RNN based student models even with hard distillation can perform at par with the huge teachers given the transfer set. The student performance can be further improved with soft distillation and leveraging teacher intermediate representations. We show that our student models can compress the huge teacher by up to 26x while still matching or even marginally exceeding the teacher performance in low-resource settings with small amount of labeled data. Additionally, for the multilingual extension of this work with XtremeDistil (Mukherjee and Hassan Awadallah, 2020), we demonstrate massive distillation of multilingual BERT-like teacher models by upto 35x in terms of parameter compression and 51x in terms of latency speedup for batch inference while retaining 95% of its F1-score for NER over 41 languages.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑