Distilling Efficient Language-Specific Models for Cross-Lingual Transfer

Alan Ansell, Edoardo Maria Ponti, Anna Korhonen, Ivan Vulic

Introduction

Massively Multilingual Transformers (MMTs) like mBERT and XLM-R have revolutionized cross-lingual transfer, enabling knowledge sharing from high-resource languages (e.g., English) to low-resource ones. However, these "Swiss Army knives" of NLP come with significant computational overhead. Supporting 100+ languages is often unnecessary for specific target-language deployments and leads to the "curse of multilinguality," where representing too many languages within a fixed parameter budget degrades individual language performance. This paper introduces BISTILLATION, a method to distill these giants into lean, bilingual student models that are 2–3x faster and significantly smaller.

Methodology: BISTILLATION

The proposed BISTILLATION (Bilingual Distillation) framework operates in two stages:

  1. General Bilingual Distillation: A student model is initialized by selecting a subset of layers from a teacher MMT (e.g., every second or third layer). A critical step is Vocabulary Reduction, which removes embeddings for tokens not present in the source-target language pair. The student is then trained on unlabeled data to replicate the teacher's hidden states and attention patterns.
  2. Task-Specific Distillation: The student is fine-tuned using Lottery-Ticket Sparse Fine-Tuning (LT-SFT). By updating only a small fraction (e.g., 8%) of parameters, the model can support multiple tasks with minimal storage overhead.
Model configurations and parameter counts for various distillation setups.

Unlike monolingual distillation, which may lose cross-lingual alignment, BISTILLATION preserves the source language (English), maintaining the ability to transfer knowledge to the target language.

Experimental Setup

The method was evaluated across 44 typologically diverse languages using four major benchmarks:

  • Dependency Parsing (DP): Universal Dependencies (UD 2.7).
  • Named Entity Recognition (NER): MasakhaNER (African languages).
  • Natural Language Inference (NLI): AmericasNLI (Indigenous American languages).
  • Question Answering (QA): XQuAD (High-resource languages).

Key Results and Discussion

Bistilled models achieve 2x to 3x speedups in inference while drastically reducing parameter counts—for instance, shrinking mBERT from 178M to approximately 67M parameters.

Performance vs. Relative FLOPS across four NLP tasks, comparing BISTILLATION (BiStil) with baselines.

As shown in the performance analysis, degradation is minimal, typically within 1–3 points of the full-sized teacher. Notably, bilingual students often outperform general compressed models like DistilmBERT, despite being trained on less data. This suggests that narrowing the linguistic focus effectively mitigates the "curse of multilinguality." The success of distillation is attributed to the student inheriting the pre-existing cross-lingual alignment from the teacher MMT.

Conclusion and Future Work

BISTILLATION provides a path toward efficient, language-specific NLP deployment. While English currently serves as the primary source language, future work could explore multi-source distillation to further aid extremely low-resource targets. Additionally, reducing the model's hidden dimension (width) could yield even greater speedups. While 4-layer transformers show some limitations in complex reasoning tasks like Question Answering, the overall efficiency gains make them highly suitable for edge deployment.

Summary updated

BibTeX
@inproceedings{ansell2023distilling,
  author = {Alan Ansell and Edoardo Maria Ponti and Anna Korhonen and Ivan Vulic},
  title = {{Distilling Efficient Language-Specific Models for Cross-Lingual Transfer}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.517},
}
Figure