[Paper Review] XtremeDistilTransformers: Task Transfer for Task-agnostic Distillation
XtremeDistilTransformers proposes a task-agnostic distillation framework that leverages task-specific knowledge from high-performing source tasks—particularly natural language inference (NLI)—to train a compact, universal student model. By transferring deep representations and attention states from a large teacher model across multiple layers and using task-specific data augmentation, the method achieves up to 87x compression of the encoder with only a 5.07% F1 gap against mBERT on a 41-language NER benchmark.
While deep and large pre-trained models are the state-of-the-art for various natural language processing tasks, their huge size poses significant challenges for practical uses in resource constrained settings. Recent works in knowledge distillation propose task-agnostic as well as task-specific methods to compress these models, with task-specific ones often yielding higher compression rate. In this work, we develop a new task-agnostic distillation framework XtremeDistilTransformers that leverages the advantage of task-specific methods for learning a small universal model that can be applied to arbitrary tasks and languages. To this end, we study the transferability of several source tasks, augmentation resources and model architecture for distillation. We evaluate our model performance on multiple tasks, including the General Language Understanding Evaluation (GLUE) benchmark, SQuAD question answering dataset and a massive multi-lingual NER dataset with 41 languages. We release three distilled task-agnostic checkpoints with 13MM, 22MM and 33MM parameters obtaining SOTA performance in several tasks.
Motivation & Objective
- Address the trade-off between model compression and generalizability in distillation by combining task-specific and task-agnostic approaches.
- Identify optimal source tasks and data augmentation strategies that maximize transferability to diverse downstream tasks and languages.
- Develop a distillation framework that enables progressive knowledge transfer from a large teacher model to a compact, universal student model.
- Achieve high compression rates comparable to task-specific distillation while maintaining broad applicability across tasks and languages.
- Release task-agnostic distilled model checkpoints for public use, enabling deployment in low-resource and edge environments.
Proposed method
- Select high-performing source tasks (e.g., MNLI, QNLI, SST-2) based on transferability to downstream tasks, with NLI showing the strongest generalization.
- Use task-specific fine-tuned teacher models to generate soft labels and intermediate representations (attention states and hidden states) for distillation.
- Implement progressive knowledge distillation across multiple layers of the teacher and student models, transferring both representation and attention knowledge.
- Apply multilingual data augmentation via back-translation and self-training to enhance generalization and robustness across 41 languages.
- Freeze and transfer multilingual word embeddings and encoder parameters from the teacher to the student, improving training stability and performance.
- Train the student model end-to-end with distillation objectives that include knowledge distillation from soft labels and intermediate layer features.
Experimental results
Research questions
- RQ1Which source tasks yield the best transferability for distilling a universal, task-agnostic student model across diverse NLP tasks?
- RQ2How does the inclusion of task-specific data augmentation improve the performance and generalization of distilled models across multilingual settings?
- RQ3To what extent can distillation from multiple layers of a teacher model improve student performance compared to single-layer or representation-only distillation?
- RQ4How does the choice of model architecture (e.g., number of layers, attention heads, hidden dimensions) affect the trade-off between compression and accuracy?
- RQ5Can a single distilled model achieve high performance across diverse tasks and languages without task-specific fine-tuning, while maintaining high compression rates?
Key findings
- The NLI task (specifically MNLI) demonstrated the strongest transferability, achieving an average fine-tuning performance of 87.8 on downstream tasks, outperforming other source tasks.
- XtremeDistilTransformers achieved up to 87x compression of the encoder (from 87M to 1M parameters) with only a 5.07% F1 gap against mBERT on a 41-language NER benchmark.
- The smallest model variant (6 layers, 12 attention heads, 384 hidden dimension) achieved 88.00 F1 on the NER task with 8x compression and a 5.07% performance gap.
- Removing multi-layer attention distillation (ablation a) reduced F1 by 1.52 points, highlighting the importance of deep knowledge transfer.
- Using monolingual word embeddings (ablation c) caused a 10.48-point drop in F1, demonstrating the critical role of multilingual embedding transfer.
- Training from random initialization without parameter transfer (ablation e) resulted in a 9.3-point F1 drop, confirming the benefit of knowledge transfer in distillation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.