Cross-Lingual Ability of Multilingual BERT: An Empirical Study

Karthikeyan K, Zihan Wang, Stephen Mayhew, Dan Roth

TL;DR

Multilingual BERT (M-BERT) possesses a surprising ability to transfer knowledge across languages despite never being trained on parallel data. This study reveals that this success isn't driven by shared vocabulary (lexical overlap), but rather by the model's ability to capture deep structural similarities between languages and the sheer depth of the transformer network.

The Mystery of M-BERT's Zero-Shot Transfer

When M-BERT was released, researchers were baffled by its "zero-shot" cross-lingual performance. A classifier trained on English data using M-BERT could work reasonably well on Hindi or Russian, even though the model was never exposed to a translation dictionary or parallel corpora.

The prevailing hypothesis was that M-BERT succeeded because languages often share "word-pieces"—such as numbers, URLs, or shared roots in European languages. This paper investigates whether that hypothesis holds true. The authors set out to dissect M-BERT to understand which components—linguistic properties, network architecture, or learning objectives—actually facilitate this cross-lingual transfer.

Experimental Design: B-BERT and "Fake-English"

To isolate variables, the authors used a bilingual version of the model they call B-BERT. Their most novel methodological approach involves the creation of "Fake-English" (enfake).

By shifting the Unicode values of every character in English Wikipedia text by a large constant, they created a "new" language that is syntactically identical to English but shares absolutely zero character or word-piece overlap with any other language. If B-BERT could still transfer knowledge from "Fake-English" to a target language like Spanish, it would definitively prove that shared vocabulary is not a prerequisite for cross-lingual ability.

The study evaluates performance on two distinct NLP tasks:

  1. XNLI (Cross-lingual Natural Language Inference): A task requiring global text understanding to determine if a premise entails or contradicts a hypothesis.
  2. LORELEI (Named Entity Recognition): A token-level task requiring local context to identify names, locations, and organizations.

The models were pre-trained on 1GB subsets of Wikipedia for English, Spanish, Hindi, and Russian. The authors also conducted extensive ablation studies, varying network depth (1 to 24 layers), attention heads (1 to 24 heads), learning objectives (like Next Sentence Prediction), and tokenization strategies.

Key Findings

Lexical Overlap is a Myth

The most striking finding is that word-piece overlap plays a negligible role in cross-lingual transfer. B-BERT transfers almost as well from "Fake-English" to other languages as it does from real English.

Performance comparison between real and Fake-English (enfake) showing negligible word-piece contribution.

In English-Spanish tests, eliminating all word-piece overlap only resulted in a minor 1.4-point drop in XNLI accuracy. The "anchor" that aligns languages isn't shared words; it's shared structure.

Structure is the Secret Sauce

The model relies heavily on structural similarities, such as word order. When the authors randomly permuted word order during training, cross-lingual performance plummeted. This confirms that syntactic structure is the primary vehicle for M-BERT's transferability.

Depth Over Breadth

Deep networks are essential for cross-lingual transfer. As the model gets deeper, the performance gap between the source and target languages shrinks significantly.

Impact of network depth on cross-lingual transfer, showing the performance gap shrinking as depth increases.

For a 1-layer model, the accuracy gap ($\Delta$) between the source (Fake-English) and target language (Russian) was 21.6 points. In a 24-layer model, that gap narrowed to 11.3 points, demonstrating that deeper layers are better at creating language-agnostic representations. Conversely, the number of attention heads matters very little—a model with a single attention head can still perform well cross-lingually.

Additional Architectural Insights

  • NSP is Counter-Productive: The Next Sentence Prediction (NSP) objective, a standard part of the original BERT training, actually hurts cross-lingual performance. Removing it consistently improved results.
  • Tokenization Matters: Word-piece tokenization significantly outperformed both character-level and full-word-level tokenization for cross-lingual transfer.

Limitations and Future Work

The authors acknowledge that "structural similarity" is a broad term. While they proved it is more important than vocabulary, they haven't yet fully dissected which specific structural features (e.g., morphology vs. syntax) are the primary drivers of transfer.

Additionally, they observed a drastic drop in performance when the premise and hypothesis in an inference task were in different languages (e.g., an English premise with a Spanish hypothesis). This suggests that while the model aligns languages well in isolated representations, it may still rely on superficial matching strategies that fail when the input is mixed-language. Future work is needed to understand how M-BERT handles interactions between more than two languages simultaneously.

Summary updated

BibTeX
@inproceedings{k2020cross,
  author = {Karthikeyan K and Zihan Wang and Stephen Mayhew and Dan Roth},
  title = {{Cross-Lingual Ability of Multilingual BERT: An Empirical Study}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=Pa1icVaF0yf},
}
Figure