Language Agnostic Multilingual Information Retrieval with Contrastive Learning

Xiyang Hu, Xinchi Chen, Peng Qi, Deguang Kong, Kunlun Liu, William Yang Wang, Zhiheng Huang

Introduction

Developing effective Information Retrieval (IR) systems—the technology behind search engines and question-answering—is a significant challenge for the majority of the world's languages. While high-quality IR models exist for English, building similar systems for languages like Swahili or Telugu is often hindered by a "data bottleneck." Annotating the necessary query-passage pairs in these languages is prohibitively expensive and slow.

Traditional solutions rely on massive multilingual pre-training (e.g., mBERT or XLM-R), but these models frequently suffer from "language bias," representing the same concept differently across languages. While models like LaBSE attempt to resolve this using massive parallel corpora, they require immense computational resources. This paper proposes a novel "co-training" approach that aligns languages for IR tasks using minimal data and compute.

Methodology: Co-training with Contrastive Losses

The researchers utilized the Dense Passage Retriever (DPR) framework, a dual-encoder system that transforms queries and documents into vector embeddings. The core innovation lies in two contrastive losses integrated into the fine-tuning phase, allowing the model to learn from English-only IR data and limited parallel text simultaneously.

The proposed dual-encoder architecture integrating Semantic and Language Contrastive Losses alongside the standard Information Retrieval task.

1. Semantic Contrastive Loss ($L_{semaCL}$)

This loss functions as a "pull-together" mechanism. When presented with a sentence in English and its translation in another language (e.g., Arabic), the model is forced to map them to nearly identical positions in the vector space. Simultaneously, it pushes away "negative" samples—sentences with unrelated meanings—to ensure distinct semantic boundaries.

2. Language Contrastive Loss ($L_{langCL}$)

This is the paper's most significant contribution, specifically designed for the "zero-parallel-data" scenario. If a language has no direct parallel pairs, the model uses a "bridge" language. It ensures that the distance from a sentence in the target language to both sides of a known parallel pair (e.g., English-French) remains equal. This effectively strips away language-specific noise, forcing the encoder to focus on universal semantic meaning.

Crucially, these losses are applied as a co-training module. Rather than requiring a separate, expensive pre-training stage, these alignment losses are calculated alongside the primary IR task.

Performance and Efficiency

A primary highlight of this research is its extreme computational efficiency. Traditional alignment models like LaBSE require millions of training steps and massive batch sizes. In contrast, this model achieves superior IR results in just 24.5k steps with a batch size of 48.

Comparison of training requirements and compute efficiency between the proposed model and existing state-of-the-art multilingual models.

As shown in the table above, the proposed method is between 347x and 12,518x more efficient in terms of training compute than existing state-of-the-art models like InfoXLM and LaBSE. Furthermore, the researchers found that even a tiny amount of data—as few as 500 parallel sentences—provided a substantial boost in retrieval performance compared to the baseline.

Key Results

The model was evaluated using MRR@100 (Mean Reciprocal Rank) on the Mr.TyDi benchmark, which covers 11 typologically diverse languages.

  • State-of-the-Art Retrieval: The XLM-R + Semantic Loss model achieved an average MRR of 0.396, significantly outperforming the base XLM-R (0.308) and larger models like LaBSE (0.365).
  • Zero-Parallel Success: In tests where four languages had no parallel data available, the Language Contrastive Loss successfully boosted the average MRR from 0.358 to 0.385.
  • Bitext Mining: On the BUCC task, adding the semantic loss to a basic XLM-R model increased the F1 score from 16.73 to 70.42, demonstrating that the model effectively learned to align disparate languages.

Conclusion

This work demonstrates that massive compute and data are not always prerequisites for high-performance multilingual IR. By leveraging clever geometric constraints through contrastive losses, models can achieve language-agnostic representations efficiently. Future work may explore how specific linguistic characteristics affect generalization and how these modules can be applied to other NLP tasks beyond retrieval.

Summary updated

BibTeX
@inproceedings{hu2023language,
  author = {Xiyang Hu and Xinchi Chen and Peng Qi and Deguang Kong and Kunlun Liu and William Yang Wang and Zhiheng Huang},
  title = {{Language Agnostic Multilingual Information Retrieval with Contrastive Learning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.581},
}
Figure