English

Weight-Inherited Distillation for Task-Agnostic BERT Compression

Computation and Language 2024-03-21 v2 Machine Learning

Abstract

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.

Keywords

Cite

@article{arxiv.2305.09098,
  title  = {Weight-Inherited Distillation for Task-Agnostic BERT Compression},
  author = {Taiqiang Wu and Cheng Hou and Shanshan Lao and Jiayi Li and Ngai Wong and Zhe Zhao and Yujiu Yang},
  journal= {arXiv preprint arXiv:2305.09098},
  year   = {2024}
}

Comments

9 pages, 4 figures, NAACL2024 findings

R2 v1 2026-06-28T10:35:23.152Z