Embeddings & Representations advanced 8 min read 12 flashcards

Cross-Lingual Embedding Alignment

Putting a hundred languages into one vector space so that a Hindi query retrieves an English document requires an explicit alignment signal, and the way you supply it determines exactly how the space fails.

A multilingual model that scores well per language is not the same thing as a model whose languages share a space. The first lets a Hindi query find Hindi documents. The second lets a Hindi query find an English document, which is what most enterprise corpora actually require, because the documentation is in English and the users are not.

Getting the second property is an explicit design decision with an explicit cost.

Why multilingual pretraining alone is insufficient

Masked language modelling on a hundred languages produces representations that are multilingual in the weak sense: the model handles each language competently, and shared subword vocabulary plus incidental parallel content creates some alignment by accident. But nothing in the objective requires that "dog" and "chien" land near each other. The training signal is per-token prediction within a language, and the model is free to allocate each language its own region of the space.

Empirically that is what happens: representations cluster by language before they cluster by meaning. Retrieval across the language boundary then fails in the worst possible way, by returning fluent, topically plausible documents in the query's own language while ignoring the correct answer in another.

Supplying an alignment signal

Post-hoc mapping. The classical approach learns a linear map \(W\) between two monolingual spaces so that \(W x_{\text{src}} \approx x_{\text{tgt}}\) for a seed dictionary, constraining \(W\) to be orthogonal (Procrustes). It is cheap and interpretable, but it assumes the two spaces are isomorphic up to rotation, which holds poorly for typologically distant or low-resource languages.

Dual-encoder translation ranking. Train with parallel sentences as positives in a contrastive objective, so alignment is the training signal rather than a post-processing step. LaBSE combines masked LM, translation LM, dual-encoder translation ranking and additive-margin softmax, reaching 83.7% bitext retrieval accuracy on Tatoeba across 112 languages against a prior best of 65.5%, and supports 109+ languages (Feng et al., 2020, Language-agnostic BERT Sentence Embedding, arXiv:2007.01852). The paper's most useful engineering result is that starting from a pretrained multilingual LM cut the parallel data required by about 80%.

Weakly-supervised contrastive scaling. The multilingual E5 family extends the contrastive-pretraining recipe across languages, and it is a multilingual-e5 checkpoint at 560M parameters that tops MMTEB's 500+ tasks and 250+ languages, ahead of far larger models (Enevoldsen et al., 2025, MMTEB, arXiv:2502.13595).

The capacity tension

One model, one space, a hundred languages. The parameters are shared, so improving a language usually costs another something, an effect usually called the curse of multilinguality: past some number of languages, adding more degrades per-language quality at fixed capacity.

The distribution is also brutally uneven. Web corpora are dominated by a handful of high-resource languages, so contrastive training sees orders of magnitude more English pairs than Swahili pairs, and the aligned space is correspondingly sharper in English. See multilingual data balancing and token fertility, which compounds this: a language that tokenises into more tokens per word gets less content per context window and costs more per query.

When it breaks

Translation ranking teaches translation equivalence, not relevance. A model trained on parallel sentences learns that a sentence and its translation are close. That is a narrower relation than "this passage answers this question", and cross-lingual retrieval quality can lag cross-lingual bitext mining quality substantially on the same model.

Language identity leaks into the geometry anyway. Even in well-aligned models, a residual language component survives, so nearest neighbours skew toward the query's language. Centring per language, or per-language mean subtraction on the index, measurably helps and is rarely done.

Script and domain shift together are the hard case. Alignment quality is usually reported on clean parallel corpora such as Tatoeba. A transliterated, code-mixed customer support message in Hinglish is off-distribution for both the language identification and the alignment, and behaves far worse than the headline number.

Evaluation is thin outside the top languages. MMTEB's 250+ languages are a real advance, but per-language task counts drop sharply in the tail, so a low-resource language's score can rest on a single dataset. Treat those numbers as directional; see embedding benchmarks and the zero-shot problem.

Check yourself

12 flashcards for this concept

Click a card to reveal the answer.

Drill the whole track