Abstract
This study presents the first systematic investigation of structured pruning on multilingual pre-trained models such as XLM-R. By evaluating settings, algorithms, and hardware efficiency, the authors challenge common monolingual pruning intuitions. They introduce Dynamic Sparsification, a novel technique enabling a single model to adapt to various sparsity levels at inference time without retraining.
Introduction
Large-scale multilingual models like XLM-R have set new benchmarks in NLP but impose significant computational costs. While structured pruning—the removal of entire components like attention heads or neurons—is effective for English-only models, its application to multilingual contexts is less understood. This research addresses a "trilemma" of questions:
- Settings: Is a universal pruned model better than language-specific sub-networks?
- Algorithms: How do simple gradient-based methods compare to complex regularization?
- Efficiency: Does parameter reduction translate directly into real-world speedups?
Methods
The researchers explored two primary pruning strategies: gradient-based importance scoring and an improved $L_0$ regularization method that incorporates a "diversity loss" to manage language-specific component usage.
A key innovation is Dynamic Sparsification (DS). Unlike standard pruning, which requires training a new model for every target sparsity level, DS parameterizes pruning gates. This allows the model's size to be adjusted dynamically at inference time, providing a range of efficiency-performance trade-offs from a single training run.
Models were pruned and fine-tuned using the CC-100 corpus (2.2TB of text across 100 languages) and evaluated on the XTREME benchmark, covering tasks like cross-lingual inference (XNLI) and question answering.
Key Insights
- The "Non-shared" Surprise: Contrary to expectations from machine translation, specialized language-specific sub-networks did not consistently outperform a shared universal structure, particularly for low-resource languages.
- Criticality of Attention Heads: Multilingual models rely more heavily on attention heads than monolingual models, likely due to their role in aligning diverse languages into a shared representation.
- The Size-Speed Paradox: Parameter reduction does not guarantee linear speedups. GPU throughput is often limited by memory access patterns, making "shorter" models (fewer layers) more effective for speed than "thinner" ones.
- Pyramid Sparsity: Models naturally retain more parameters in lower layers while pruning more aggressively in higher layers.
Key Results
Gradient-based pruning successfully compressed XLM-R to 50% sparsity with manageable accuracy loss (70.4 on XNLI vs. 74.8 for the full model). Notably, these pruned models outperformed mMiniLMv1, a model compressed via expensive knowledge distillation.
Dynamic Sparsification achieved results comparable to static pruning, offering a highly flexible "train once, use anywhere" deployment strategy.
Conclusion and Future Work
While structured pruning significantly reduces model size, a "hardware gap" remains where mathematical sparsity does not always yield proportional GPU speedups. Future research should focus on hardware-aware pruning that targets structures GPUs can skip more efficiently, such as entire blocks or layers. The balance between language-specific capacity and cross-lingual interference also remains a critical area for further linguistic exploration.
Summary updated