Multilingual E5 Text Embeddings: A Technical Report

Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu WeiarXiv 2024 · DOI

Introduction

Text embeddings serve as the foundational component for modern Information Retrieval (IR) and Retrieval-Augmented Generation (RAG) systems. Historically, high-performance embedding models have been predominantly "English-centric," leading to a significant performance disparity in global or cross-lingual applications. This technical report introduces the multilingual E5 (mE5) family, a suite of models designed to bridge this gap. By scaling the successful E5 training recipe to a global context, Microsoft Research provides models that not only excel in multilingual tasks but also challenge the dominance of English-only models on standard benchmarks.

Methodology

The mE5 models (small, base, and large) are developed using a rigorous two-stage training pipeline:

  1. Weakly-supervised Contrastive Pre-training: Initialized from multilingual encoders like XLM-RoBERTa, the models are trained on a massive corpus of approximately 1 billion text pairs. Utilizing a large batch size of 32k and the InfoNCE contrastive loss, the models learn to align related text pairs in the vector space.
  2. Supervised Fine-tuning (SFT): The models are further refined on a high-quality dataset of 1.6 million labeled pairs. This stage incorporates "hard negatives" and knowledge distillation from powerful cross-encoders to improve discriminative boundaries.

A key innovation is the mE5-large-instruct variant. This model is trained to follow natural language instructions, allowing it to dynamically adapt its embedding strategy based on specific task requirements (e.g., distinguishing between symmetric semantic similarity and asymmetric web search retrieval).

Data Mixture

The training process leverages a diverse data mixture to ensure broad linguistic and task coverage:

  • Pre-training: Sources include Wikipedia, Reddit, NLLB translation pairs, and S2ORC citation data.
  • Fine-tuning: High-quality IR datasets such as MS-MARCO, NQ, and MIRACL.
  • Synthetic Data: For the instruction-tuned model, 500k synthetic pairs were generated using GPT-3.5/4, covering 93 languages and 150k unique instructions.

Evaluation and Results

The mE5 models were evaluated against several industry-standard benchmarks, including MTEB for English tasks and MIRACL for multilingual retrieval.

English Performance (MTEB)

A standout result is the performance of mE5-large-instruct on the English MTEB benchmark. Despite its multilingual training, it achieved an average score of 64.4, outperforming top-tier English-only models like BGE-large-en-v1.5. This suggests that instruction tuning effectively prevents the "dilution" of performance typically seen when expanding model scope to multiple languages.

Performance comparison on the MTEB benchmark (56 datasets).

Multilingual Retrieval (MIRACL)

On the MIRACL benchmark, which spans 16 languages, the mE5 family demonstrated substantial improvements over traditional baselines. The mE5-large model achieved an nDCG@10 of 66.5, significantly higher than the mDPR baseline of 41.5.

Multilingual retrieval performance on the MIRACL benchmark.

Bitext Mining

On the Tatoeba benchmark (112 languages), mE5-large-instruct reached a score of 83.8, surpassing LaBSE (81.1), which was specifically designed for translation-based tasks.

Conclusion

The multilingual E5 models demonstrate that a combination of large-scale contrastive pre-training, high-quality supervised fine-tuning, and instruction tuning can produce state-of-the-art embeddings for both English and multilingual contexts. Future work will focus on extending the context window beyond the current 512-token limit and further improving performance for extremely low-resource languages.

Summary updated

BibTeX
@misc{wang2024multilingual,
  author = {Liang Wang and Nan Yang and Xiaolong Huang and Linjun Yang and Rangan Majumder and Furu Wei},
  title = {{Multilingual E5 Text Embeddings: A Technical Report}},
  year = {2024},
  eprint = {2402.05672},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.05672},
}
Figure