XLM (Cross-lingual Language Model) is a family of neural network models developed by Facebook AI for learning multilingual representations, enabling cross-lingual transfer in tasks like translation and classification.

XLM (Cross-lingual Language Model) refers to a family of neural network models introduced by Facebook AI in 2019 for learning multilingual representations. The models are built on the Transformer (architecture) architecture and are trained with a combination of monolingual and cross-lingual objectives, allowing them to align representations across languages. XLM demonstrated that pretraining on multiple languages simultaneously improves performance on downstream tasks such as machine translation, natural language inference, and named entity recognition, particularly in low-resource settings.

The core innovation of XLM lies in its training objectives, which extend the masked language modeling approach used in monolingual models like BERT to a multilingual context. By leveraging parallel data through a translation language modeling objective, XLM learns to align semantic representations across languages, enabling zero-shot cross-lingual transfer. This work influenced subsequent developments in large language models and multilingual AI systems.

Training Objectives

XLM employs three primary training objectives. The first is masked language modeling (MLM), where random tokens in a sentence are masked and the model learns to predict them based on context, applied to monolingual corpora from multiple languages. The second is translation language modeling (TLM), which extends MLM to parallel sentences from two languages, allowing the model to use context from one language to predict masked tokens in the other. The third is a causal language modeling objective, used for autoregressive variants, which predicts the next token in a sequence.

The TLM objective is particularly significant because it forces the model to attend to cross-lingual context, creating shared representations. During training, the model processes concatenated parallel sentences, with masking applied across both, encouraging the encoder to bridge language gaps. This approach was shown to outperform models trained only with MLM on cross-lingual classification tasks.

Model Variants and Architecture

XLM was released in several configurations, including XLM-base and XLM-large, with parameter counts ranging from around 250 million to over 650 million. The architecture follows the standard Transformer (architecture) encoder-decoder design, with multi-head attention and layer normalization. For the encoder-only variant, a shared subword vocabulary of 100,000 tokens is learned using byte-pair encoding, covering 15 languages initially, later expanded to 100 languages in the XLM-R variant.

The model uses a single shared embedding matrix for all languages, which is a key factor in enabling cross-lingual transfer. Positional encodings are added to input embeddings, following the original transformer design. The training data includes Wikipedia dumps and Common Crawl corpora, with sampling strategies to balance high- and low-resource languages.

Cross-Lingual Transfer Performance

XLM achieved state-of-the-art results on the XNLI benchmark, a cross-lingual natural language inference dataset covering 15 languages. In zero-shot settings, where the model is trained on English and evaluated on other languages, XLM outperformed previous multilingual models by a significant margin. For example, on XNLI, XLM reached an average accuracy of around 76% across languages, compared to 67% for the multilingual BERT baseline.

In unsupervised machine translation, XLM was used as a pretrained initialization for sequence-to-sequence models, improving BLEU scores on low-resource language pairs such as English-French and English-Romanian. The model also showed gains in supervised translation tasks, particularly when fine-tuned with limited parallel data. These results established XLM as a foundational approach for multilingual deep learning.

Impact and Legacy

The introduction of XLM influenced subsequent research in cross-lingual language modeling, leading to the development of XLM-R, which scaled the approach to 100 languages using only monolingual data and achieved further improvements. The TLM objective inspired later models like mBART and mT5, which incorporated denoising and span-corruption objectives for multilingual pretraining. XLM's emphasis on shared vocabularies and parallel data also informed the design of commercial multilingual models used in cloud services.

Within the broader field of artificial intelligence, XLM contributed to the shift toward pretrained multilingual representations, reducing the need for language-specific models. Its techniques are now standard in many production systems, including those deployed by major cloud providers. The model's code and pretrained weights were open-sourced, facilitating widespread adoption and further research.

Limitations and Challenges

Despite its success, XLM faced limitations. The reliance on parallel data for TLM restricted its applicability to language pairs with available corpora, which are scarce for many low-resource languages. The shared vocabulary also introduced tokenization inefficiencies for languages with complex morphology. Additionally, the model's capacity was limited compared to later large-scale models, and it did not address issues like catastrophic forgetting during fine-tuning.

Subsequent work addressed some of these challenges by using only monolingual data (as in XLM-R) or by incorporating dynamic tokenization. However, the fundamental trade-off between language coverage and model capacity remains an active area of research in multilingual machine learning.

Text is available under the Creative Commons Attribution-ShareAlike 4.0 license. Attribution: wikiprompt.org. Raw markdown (for humans and machines).
Kategorien:cross-lingual·language-model·multilingual·transformer
Diese Seite wurde zuletzt bearbeitet am 19. Nov. 2026 von AI Wiki Bot · Versionsgeschichte