datarekha

Multilingual NLP

Most NLP research is English, but there are thousands of languages. The key idea is a shared multilingual embedding space where translations land near each other — which lets a model trained on a high-resource language transfer to a low-resource one with no labelled data. The promise, and the disparities that remain.

7 min read Intermediate NLP & Transformers Lesson 11 of 44

What you'll learn

  • The shared multilingual embedding space and why translations cluster
  • Cross-lingual transfer — train high-resource, apply low-resource
  • mBERT and XLM-R, and the challenges of low-resource languages
  • The tokenizer tax and the curse of multilinguality

Before you start

Almost everything in this course is implicitly about English — but there are roughly 7,000 languages, most with a tiny fraction of English’s labelled data. Multilingual NLP asks: can one model serve many languages, and — crucially — can we transfer what we learn from a high-resource language to a low-resource one? The enabling idea is a shared embedding space.

A shared space where translations meet

Train embeddings so that words meaning the same thing in different languages land in the same region of the vector space. Then “dog,” “chien,” and “perro” are neighbors — and a model that learned to do something with the English vectors works on the others, because they’re in the same place:

import numpy as np

emb = {"dog": [1.0, 0.1], "chien": [0.9, 0.2], "perro": [1.0, 0.0],     # 'dog' across languages
       "cat": [0.1, 1.0], "chat":  [0.2, 0.9], "gato":  [0.0, 1.0]}     # 'cat' across languages

def cos(a, b):
    a, b = np.array(a), np.array(b)
    return a @ b / (np.linalg.norm(a) * np.linalg.norm(b))

q = "dog"
for w in sorted((w for w in emb if w != q), key=lambda w: cos(emb[q], emb[w]), reverse=True)[:3]:
    print(f"nearest to 'dog': {w:<6} cos={cos(emb[q], emb[w]):.2f}")
nearest to 'dog': perro  cos=1.00
nearest to 'dog': chien  cos=0.99
nearest to 'dog': chat   cos=0.31

The nearest neighbors of dog are its translations perro and chien — not the (English) word cat. That alignment is the whole trick: meaning, not language, decides position.

One shared space — words cluster by meaning, not language”dog” clusterdogchienperro”cat” clustercatchatgatoa model trained on the English points transfers to the others — they’re in the same place
Aligned multilingual embeddings group translations together, so learning on one language carries to the rest.

Cross-lingual transfer

This is what makes zero-shot cross-lingual transfer possible. Fine-tune a multilingual model on an English task with English labels (say, named-entity recognition), then run it on Swahili or Hindi text it was never trained on — and it often works, because the multilingual encoder maps both languages into the shared space. The workhorses are mBERT (BERT pretrained on 104 languages’ Wikipedia) and XLM-R (trained on 100 languages of web text), which learn this aligned space from raw multilingual text without parallel translations.

In one breath

  • Multilingual NLP serves many of the world’s ~7,000 languages and aims to transfer from high-resource (English) to low-resource ones.
  • The key idea is a shared embedding space where translations cluster (dog/chien/perro are neighbors) — position encodes meaning, not language.
  • That enables zero-shot cross-lingual transfer: fine-tune on an English task, then apply to a language with no labelled data, via models like mBERT and XLM-R (100+ languages from raw text).
  • Disparities persist: the tokenizer tax (low-resource languages split into many more subword tokens) and the curse of multilinguality (fixed capacity dilutes per-language quality).
  • LLMs are multilingual by default but English-skewed; the shared-space idea explains both the reach and the inequity.

Quick check

Quick check

0/4
Q1What is the central idea that makes multilingual NLP work?
Q2What is zero-shot cross-lingual transfer?
Q3What is the 'tokenizer tax' for low-resource languages?
Q4What is the curse of multilinguality?

Next

The shared space builds on word embeddings and subword units; the multilingual encoders are BERT-family models (mBERT, XLM-R). Modern LLMs inherit both the reach and the English skew.

Sign in to track your progress

Completed lessons, your XP, level, and streak save to your account — it's free and takes a few seconds.

Related lessons

Explore further

Skip to content