Lune

EMNLP2020Top-tier venue

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

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

11 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TinyBERT: Distilling BERT for Natural Language Understanding cites MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers
  • TinyBERT: Distilling BERT for Natural Language Understanding cites BERT-of-Theseus: Compressing BERT by Progressive Module Replacing
  • BERT-of-Theseus: Compressing BERT by Progressive Module Replacing cites TinyBERT: Distilling BERT for Natural Language Understanding
  • TinyBERT: Distilling BERT for Natural Language Understanding cites Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
  • TinyBERT: Distilling BERT for Natural Language Understanding cites MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
  • MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Lifting the Curse of Capacity Gap in Distilling Language Models cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Lifting the Curse of Capacity Gap in Distilling Language Models cites MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers
  • Lifting the Curse of Capacity Gap in Distilling Language Models cites MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
  • BERT-of-Theseus: Compressing BERT by Progressive Module Replacing cites Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
  • BERT-of-Theseus: Compressing BERT by Progressive Module Replacing cites MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
  • Dynamic Knowledge Distillation for Pre-trained Language Models cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Dynamic Knowledge Distillation for Pre-trained Language Models cites MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers
  • Dynamic Knowledge Distillation for Pre-trained Language Models cites BERT-of-Theseus: Compressing BERT by Progressive Module Replacing
  • f-Divergence Minimization for Sequence-Level Knowledge Distillation cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERT cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERT cites MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Not All Negatives are Equal: Label-Aware Contrastive Loss for Fine-grained Text ClassificationVarsha Suresh, Desmond C. OngEMNLP 2021 · 71 citations
  2. Dynamic Knowledge Distillation for Pre-trained Language ModelsLei Li, Yankai Lin, Shuhuai Ren, Peng Li et al.EMNLP 2021 · 32 citations
  3. f-Divergence Minimization for Sequence-Level Knowledge DistillationYuqiao Wen, Zichao Li, Wenyu Du, Lili MouACL 2023 · 14 citations
  4. Lifting the Curse of Capacity Gap in Distilling Language ModelsChen Zhang, Yang Yang, Jiahao Liu, Jingang Wang et al.ACL 2023 · 9 citations
  5. Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERTJing Zhao, Yifan Wang, Junwei Bao, Youzheng Wu et al.ACL 2022 · 7 citations

Builds on6

  1. MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained TransformersWenhui Wang, Furu Wei, Li Dong, Hangbo Bao et al.NeurIPS 2020 · 2,727 citations
  2. TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang et al.EMNLP Findings 2020 · 1,787 citations
  3. MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited DevicesZhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu et al.ACL 2020 · 660 citations
  4. Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTSheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma et al.AAAI 2020 · 656 citations
  5. BERT-of-Theseus: Compressing BERT by Progressive Module ReplacingCanwen Xu, Wangchunshu Zhou, Tao Ge, Furu Wei et al.EMNLP 2020 · 168 citations

Related papers

  1. One Teacher is Enough? Pre-trained Language Model Distillation from Multiple TeachersChuhan Wu, Fangzhao Wu, Yongfeng HuangACL Findings 2021 · 47 citations
  2. 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 et al.EMNLP Findings 2024
  3. FastBERT: a Self-distilling BERT with Adaptive Inference TimeWeijie Liu, Peng Zhou, Zhiruo Wang, Zhe Zhao et al.ACL 2020 · 257 citations
  4. Accelerating Training of Transformer-Based Language Models with Progressive Layer DroppingMinjia Zhang, Yuxiong HeNeurIPS 2020 · 126 citations
  5. Contrastive Distillation on Intermediate Representations for Language Model CompressionSiqi Sun, Zhe Gan, Yuwei Fang, Yu Cheng et al.EMNLP 2020 · 59 citations
Dusk over the sea between two cliffs drawn in fine vertical lines