Cross-lingual Transferring of Pre-trained Contextualized Language Models

Zuchao Li, Kevin Parnow, Hai Zhao, Zhuosheng Zhang, Rui Wang, Masao Utiyama, Eiichiro SumitaarXiv 2021 · arXiv

Introduction

Pre-trained contextualized language models (PrLMs) such as BERT and RoBERTa have set new benchmarks in Natural Language Processing (NLP). However, these models are predominantly trained on English corpora, creating a significant "English tax" for other languages. Training these massive models from scratch for low-resource languages is often computationally prohibitive and data-intensive.

The Challenge of Multilingual Modeling

Existing approaches to cross-lingual NLP face several hurdles. Training from scratch ignores the structural commonalities shared across human languages. Multilingual models (mPrLMs), while effective, typically require retraining the entire architecture when a new language is added—a process that is both slow and expensive. Furthermore, simple vocabulary replacement fails to account for structural mismatches in word order and sequence length between languages.

Comparison of traditional mPrLM retraining versus the efficient TreLM transfer approach.

The TreLM Framework

To address these issues, researchers proposed TreLM (Transferring Language Modeling), a framework designed to "port" high-resource English models to new target languages efficiently. TreLM introduces three primary technical innovations:

  • Adversarial Embedding Aligning: This technique maps target language embeddings into the same vector space as the original English model, providing a foundational word-level alignment.
  • The TRILayer (Transferring Intermediate Layer): Acting as an architectural pivot, this layer reorders hidden representations to match the target language's syntax and sequence length.
  • CdLM (Cross-lingual Language Modeling): A training objective that uses explicit alignment to task the model with generating target-language tokens from source-language inputs.

Efficiency and Performance

The core advantage of TreLM is its economy of scale. Unlike mPrLMs that necessitate repeated large-scale pre-training, TreLM allows the heavy lifting to be done once in English, with subsequent transfers requiring significantly fewer resources.

Empirical results demonstrate TreLM's superiority:

  • Chinese (CLUE): TRI-BERT-base outperformed mBERT-base on nearly all tasks, such as achieving a score of 72.98 on AFQMC compared to mBERT's 70.29.
  • Indonesian: In a lower-resource setting, TRI-RoBERTa-base achieved a 79.95 Labeled Attachment Score (LAS) in dependency parsing, surpassing both mBERT and the language-specific IndoBERT.
  • Computational Cost: Training a TRI-BERT-base model requires approximately 20 TPU-days, a 68% reduction compared to the 64 TPU-days needed for the original BERT-base.

Conclusion

TreLM offers a scalable and cost-effective pathway for extending state-of-the-art NLP capabilities to diverse languages. By leveraging structural transfer rather than brute-force retraining, it democratizes access to high-performance language models. Future research aims to eliminate the dependency on parallel corpora through unsupervised cross-lingual transfer.

Summary updated

Abstract

Though the pre-trained contextualized language model (PrLM) has made a significant impact on NLP, training PrLMs in languages other than English can be impractical for two reasons: other languages often lack corpora sufficient for training powerful PrLMs, and because of the commonalities among human languages, computationally expensive PrLM training for different languages is somewhat redundant. In this work, building upon the recent works connecting cross-lingual model transferring and neural machine translation, we thus propose a novel cross-lingual model transferring framework for PrLMs: TreLM. To handle the symbol order and sequence length differences between languages, we propose an intermediate ``TRILayer" structure that learns from these differences and creates a better transfer in our primary translation direction, as well as a new cross-lingual language modeling objective for transfer training. Additionally, we showcase an embedding aligning that adversarially adapts a PrLM's non-contextualized embedding space and the TRILayer structure to learn a text transformation network across languages, which addresses the vocabulary difference between languages. Experiments on both language understanding and structure parsing tasks show the proposed framework significantly outperforms language models trained from scratch with limited data in both performance and efficiency. Moreover, despite an insignificant performance loss compared to pre-training from scratch in resource-rich scenarios, our cross-lingual model transferring framework is significantly more economical.
BibTeX
@misc{li2021cross,
  author = {Zuchao Li and Kevin Parnow and Hai Zhao and Zhuosheng Zhang and Rui Wang and Masao Utiyama and Eiichiro Sumita},
  title = {{Cross-lingual Transferring of Pre-trained Contextualized Language Models}},
  year = {2021},
  eprint = {2107.12627},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.12627},
}
Figure