Beyond Contrastive Learning: A Variational Generative Model for Multilingual Retrieval

John Wieting, Jonathan H. Clark, William W. Cohen, Graham Neubig, Taylor Berg-Kirkpatrick

Multilingual retrieval systems are essential for global information access, yet they have historically relied almost exclusively on contrastive learning objectives. While effective, contrastive methods often struggle with language-specific "noise"—syntactic or stylistic features that are irrelevant to semantic meaning. This paper introduces the Variational Multilingual Source-Separation Transformer (VMSST), a generative approach that explicitly decouples shared semantic content from language-specific variation.

The VMSST Framework

The core innovation of VMSST is treating multilingual retrieval as a source-separation problem. In a standard contrastive setup, the model is trained to minimize the distance between translations in a shared vector space. VMSST, however, employs a probabilistic latent variable model. It assumes that any given sentence $x_{l_i}$ in language $l_i$ is generated from two independent latent factors: a common semantic vector $z_{sem}$ (shared across all translations of the same content) and a language-specific latent vector $z_{l_i}$ (capturing the unique "style" or syntax of that language).

The VMSST architecture showing the inference networks for semantic and language-specific latent variables, the latent space, and the generative reconstruction process.

The model is trained using the Evidence Lower Bound (ELBO), which includes a reconstruction loss and a KL-divergence penalty. This penalty encourages the model to be information-efficient, naturally pushing shared information into $z_{sem}$ and language-specific "fluff" into $z_{l_i}$. Architecturally, VMSST utilizes a Transformer encoder-decoder setup. A key modification is the removal of cross-attention between the encoder and decoder, forcing the encoder to compress the entire sentence's meaning into a fixed-length embedding—a prerequisite for efficient retrieval.

Experimental Setup and Results

VMSST was trained on a massive corpus of 216 million parallel sentences spanning 92 languages, sourced from diverse datasets like Europarl, OpenSubtitles, and Global Voices. Evaluation spanned several benchmarks, including Semantic Textual Similarity (STS), bitext mining (Tatoeba, BUCC), and a new cross-lingual question retrieval task using the "Probably Asked Questions" (PAQ) dataset.

Performance comparison of VMSST against contrastive and bitranslation baselines across various model depths and evaluation tasks.

As shown in the results table, VMSST consistently outperforms traditional contrastive baselines. A particularly striking finding is the scaling behavior: while contrastive models often see diminishing returns or even performance degradation as depth increases (e.g., from 6 to 24 layers), VMSST continues to improve. For instance, the 24-layer VMSST achieved a consolidated score of 58.1, compared to 52.4 for the contrastive equivalent. In the difficult MKQA task, VMSST achieved an accuracy of 22.3% compared to the contrastive model's 16.0%.

Key Insights

Beyond raw metrics, the generative approach offers two critical advantages for retrieval:

  1. Mitigating Hubness: High-dimensional retrieval spaces often suffer from "hubs"—vectors that are erroneously close to many unrelated points, ruining accuracy. VMSST produces a smoother embedding space that significantly reduces this phenomenon compared to contrastive models.
  2. Semantic Purity: By explicitly modeling language-specific variation, the $z_{sem}$ vector becomes a "purer" representation of meaning. This makes it more robust for cross-lingual tasks where language-specific syntax might otherwise confuse the model's understanding of semantic similarity.

Conclusion and Future Directions

VMSST demonstrates that generative models are not only viable but potentially superior to contrastive models for large-scale multilingual retrieval. While the computational cost of the decoder during training remains a hurdle, the gains in robustness and scalability are significant. Future work may explore hybrid objectives that combine the strengths of both generative source separation and contrastive losses, as well as methods to incorporate monolingual data to further expand the model's linguistic reach.

Summary updated

BibTeX
@inproceedings{wieting2023beyond,
  author = {John Wieting and Jonathan H. Clark and William W. Cohen and Graham Neubig and Taylor Berg-Kirkpatrick},
  title = {{Beyond Contrastive Learning: A Variational Generative Model for Multilingual Retrieval}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.673},
}
Figure