BERT-EMD: Many-to-Many Layer Mapping for BERT Compression with Earth Mover's Distance
Jianquan Li, Xiaokang Liu, Honghong Zhao, Ruifeng Xu, Min Yang, Yaohong Jin
摘要
Pre-trained language models (e.g., BERT) have achieved significant success in various natural language processing (NLP) tasks. However, high storage and computational costs obstruct pre-trained language models to be effectively deployed on resourceconstrained devices. In this paper, we propose a novel BERT distillation method based on many-to-many layer mapping, which allows each intermediate student layer to learn from any intermediate teacher layers. In this way, our model can learn from different teacher layers adaptively for various NLP tasks. In addition, we leverage Earth Mover's Distance (EMD) to compute the minimum cumulative cost that must be paid to transform knowledge from teacher network to student network. EMD enables the effective matching for many-to-many layer mapping. Furthermore, we propose a cost attention mechanism to learn the layer weights used in EMD automatically, which is supposed to further improve the model's performance and accelerate convergence time. Extensive experiments on GLUE benchmark demonstrate that our model achieves competitive performance compared to strong competitors in terms of both accuracy and model compression. For reproducibility, we release the code and data at https: //github.com/lxk00/BERT-EMD.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 BERT-of-Theseus: Compressing BERT by Progressive Module Replacing
- BERT-of-Theseus: Compressing BERT by Progressive Module Replacing 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- TinyBERT: Distilling BERT for Natural Language Understanding 引用了 MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
- MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- Lifting the Curse of Capacity Gap in Distilling Language Models 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- Lifting the Curse of Capacity Gap in Distilling Language Models 引用了 MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers
- Lifting the Curse of Capacity Gap in Distilling Language Models 引用了 MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
- BERT-of-Theseus: Compressing BERT by Progressive Module Replacing 引用了 Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- BERT-of-Theseus: Compressing BERT by Progressive Module Replacing 引用了 MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
- Dynamic Knowledge Distillation for Pre-trained Language Models 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- Dynamic Knowledge Distillation for Pre-trained Language Models 引用了 MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers
- Dynamic Knowledge Distillation for Pre-trained Language Models 引用了 BERT-of-Theseus: Compressing BERT by Progressive Module Replacing
- f-Divergence Minimization for Sequence-Level Knowledge Distillation 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERT 引用了 TinyBERT: Distilling BERT for Natural Language Understanding
- Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERT 引用了 MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
引用它的顶会 Paper11
- Not All Negatives are Equal: Label-Aware Contrastive Loss for Fine-grained Text ClassificationVarsha Suresh, Desmond C. OngEMNLP 2021 · 71 次引用
- Dynamic Knowledge Distillation for Pre-trained Language ModelsLei Li, Yankai Lin, Shuhuai Ren, Peng Li 等EMNLP 2021 · 32 次引用
- f-Divergence Minimization for Sequence-Level Knowledge DistillationYuqiao Wen, Zichao Li, Wenyu Du, Lili MouACL 2023 · 14 次引用
- Lifting the Curse of Capacity Gap in Distilling Language ModelsChen Zhang, Yang Yang, Jiahao Liu, Jingang Wang 等ACL 2023 · 9 次引用
- Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERTJing Zhao, Yifan Wang, Junwei Bao, Youzheng Wu 等ACL 2022 · 7 次引用
它引用的 Paper6
- MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained TransformersWenhui Wang, Furu Wei, Li Dong, Hangbo Bao 等NeurIPS 2020 · 2,727 次引用
- TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang 等EMNLP Findings 2020 · 1,787 次引用
- MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited DevicesZhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu 等ACL 2020 · 660 次引用
- Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTSheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma 等AAAI 2020 · 656 次引用
- BERT-of-Theseus: Compressing BERT by Progressive Module ReplacingCanwen Xu, Wangchunshu Zhou, Tao Ge, Furu Wei 等EMNLP 2020 · 168 次引用
相关 Paper
- One Teacher is Enough? Pre-trained Language Model Distillation from Multiple TeachersChuhan Wu, Fangzhao Wu, Yongfeng HuangACL Findings 2021 · 47 次引用
- Intermediate Layer Distillation with the Reused Teacher Classifier: A Study on the Importance of the Classifier of Attention-based ModelsHang Zhang, Seyyed Hasan Mozafari, James J. Clark, Brett H. Meyer 等EMNLP Findings 2024
- FastBERT: a Self-distilling BERT with Adaptive Inference TimeWeijie Liu, Peng Zhou, Zhiruo Wang, Zhe Zhao 等ACL 2020 · 257 次引用
- Accelerating Training of Transformer-Based Language Models with Progressive Layer DroppingMinjia Zhang, Yuxiong HeNeurIPS 2020 · 126 次引用
- Contrastive Distillation on Intermediate Representations for Language Model CompressionSiqi Sun, Zhe Gan, Yuwei Fang, Yu Cheng 等EMNLP 2020 · 59 次引用
