CLLGSep 29, 2020

Contrastive Distillation on Intermediate Representations for Language Model Compression

arXiv:2009.14167v11023 citations
Originality Highly original
AI Analysis

This work addresses the need for efficient compression of large language models, offering a novel approach that enhances distillation efficacy for researchers and practitioners in NLP.

The paper tackles the problem of language model compression by proposing CoDIR, a contrastive distillation method that improves knowledge transfer from teacher to student models, achieving state-of-the-art performance on the GLUE benchmark.

Existing language model compression methods mostly use a simple L2 loss to distill knowledge in the intermediate representations of a large BERT model to a smaller one. Although widely used, this objective by design assumes that all the dimensions of hidden representations are independent, failing to capture important structural knowledge in the intermediate layers of the teacher network. To achieve better distillation efficacy, we propose Contrastive Distillation on Intermediate Representations (CoDIR), a principled knowledge distillation framework where the student is trained to distill knowledge through intermediate layers of the teacher via a contrastive objective. By learning to distinguish positive sample from a large set of negative samples, CoDIR facilitates the student's exploitation of rich information in teacher's hidden layers. CoDIR can be readily applied to compress large-scale language models in both pre-training and finetuning stages, and achieves superb performance on the GLUE benchmark, outperforming state-of-the-art compression methods.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes