arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.09098cs.CLcs.LG

用于任务无关 BERT 压缩的权重继承蒸馏

Weight-Inherited Distillation for Task-Agnostic BERT Compression

The University of Hong Kong(香港大学);Tencent AI Lab(腾讯AI实验室);Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院)

Taiqiang Wu, Cheng Hou, Shanshan Lao, Jiayi Li, Ngai Wong, Zhe Zhao, Yujiu Yang

AI总结:

本文提出 Weight-Inherited Distillation(WID),通过直接继承 teacher 权重并结合结构重参数化压缩 student 模型,无需额外对齐损失,在 GLUE 和 SQuAD 上优于现有 KD 基线。

摘要:

知识蒸馏(KD)是 BERT 压缩的主流方法。以往基于 KD 的方法侧重于为 student 模型设计额外的对齐损失,以模仿 teacher 模型的行为。这些方法以间接方式传递知识。本文提出一种新颖的 Weight-Inherited Distillation(WID),直接从 teacher 传递知识。WID 无需任何额外对齐损失,通过继承权重训练紧凑的 student,展现了知识蒸馏的新视角。具体而言,我们将行压缩器和列压缩器设计为映射,然后通过结构重参数化压缩权重。在 GLUE 和 SQuAD 基准上的实验结果表明,WID 优于以往最先进的基于 KD 的基线方法。进一步分析表明,WID 还能在没有任何注意力分布对齐损失的情况下,从 teacher 模型学习到注意力模式。代码可在 https://github.com/wutaiqiang/WID-NAACL2024 获取。

英文摘要:

Knowledge Distillation (KD) is a predominant approach for BERT compression. Previous KD-based methods focus on designing extra alignment losses for the student model to mimic the behavior of the teacher model. These methods transfer the knowledge in an indirect way. In this paper, we propose a novel Weight-Inherited Distillation (WID), which directly transfers knowledge from the teacher. WID does not require any additional alignment loss and trains a compact student by inheriting the weights, showing a new perspective of knowledge distillation. Specifically, we design the row compactors and column compactors as mappings and then compress the weights via structural re-parameterization. Experimental results on the GLUE and SQuAD benchmarks show that WID outperforms previous state-of-the-art KD-based baselines. Further analysis indicates that WID can also learn the attention patterns from the teacher model without any alignment loss on attention distributions. The code is available at https://github.com/wutaiqiang/WID-NAACL2024.

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

↑