---
title: 'LaBSE: Multilingual Sentence Embeddings'
url: https://www.emergentmind.com/topics/language-agnostic-bert-sentence-embedding-labse
type: topic
---

# LaBSE: Multilingual Sentence Embeddings

Language-agnostic BERT Sentence Embedding (LaBSE) is a multilingual dual-encoder model that produces language-independent, semantically meaningful sentence representations for over 100 languages. LaBSE leverages large-scale masked language modeling (MLM), translation language modeling (TLM), and a bidirectional translation ranking objective with additive margin softmax to deliver state-of-the-art bi-text retrieval and robust cross-lingual transfer, while also exhibiting nontrivial capabilities for fine-grained lexical alignment and word/phrase vector extraction. LaBSE is widely deployed in parallel data mining, semantic search, and as a backbone for multilingual NLP tasks, with publicly available checkpoints and evaluation results.

## 1. Architecture and Training Paradigm

LaBSE follows a dual-encoder (Siamese) architecture built upon the BERT Transformer backbone. Each encoder processes input from a shared, multilingual WordPiece vocabulary—either the public mBERT vocabulary (|V|=119,547) or a custom vocabulary (|V|=501,153 tokens)—supporting 109+ languages. Source and target sentences are encoded separately by weight-tied BERT towers (either a 12-layer "base" variant or a 24-layer "large" variant), extracting the final [CLS] token representation from each to serve as the sentence embedding [2007.01852][2301.12140].

Model structure highlights:

- **BERT-base**: 12× 768-dimensional Transformer blocks, 12 attention heads, 128 token max sequence length during fine-tuning [2007.01852].
- **BERT-large**: 24 layers, hidden size 1,024, 16 heads, 471M parameters [2301.12140].
- **Input format**: [CLS] … sentence … [SEP], shared multilingual tokenizer.
- **Pooling**: L₂-normalization of the [CLS] embedding for downstream similarity tasks.
- **Parameter sharing**: Source and target encoders share parameters for both MLM/TLM pretraining and dual-encoder ranking.

## 2. Pre-training and Supervised Objectives

LaBSE training occurs in two main stages:

1. **Multilingual Pre-training**:
    - **MLM**: Standard masked language modeling on 17B monolingual sentences from CommonCrawl and Wikipedia.
    - **TLM**: Translation language modeling over 6B bitext sentences (20% random masking across joint [x;y] pairs).

    Formally, the MLM loss is:
    $$
    L_{MLM}(\theta) = -\mathbb{E}_x\left[\sum_{i\in M} \log P_\theta(w_i|x\backslash M)\right]
    $$
    For TLM:
    $$
    L_{TLM}(\theta) = -\mathbb{E}_{(x,y)}\left[\sum_{i\in M} \log P_\theta(z_i|z\backslash M)\right], ~ z = [x;y]
    $$

    Pretraining is performed using a progressive stacking (pBERT) schedule from 3 to 12 layers, facilitating efficient depth scaling and domain generalization [2007.01852].

2. **Dual-Encoder Ranking with Additive Margin Softmax**:
    - Contrastive, bidirectional loss: Each batch contains $N$ parallel sentence pairs $(x_i, y_i)$. LaBSE maximizes similarity between true translation pairs and minimizes similarity to in-batch negatives.
    - **Objective**:
    $$
    L_{AMS} = -\frac{1}{N} \sum_{i=1}^N \log \frac{\exp[\phi(x_i, y_i) - m]}{\exp[\phi(x_i, y_i) - m] + \sum_{j \neq i} \exp[\phi(x_i, y_j)]} + [\text{sym. for}~y \to x]
    $$
    where $m$ is the margin hyperparameter ($m=0.3$), and $\phi(x, y) = x \cdot y^\top$ for L₂-normalized [CLS] embeddings.

    This two-phase process dramatically reduces the required amount of parallel training data; with MLM/TLM initialization, LaBSE attains peak UN performance with ~200M bitext examples versus ~1B for models without such pretraining (an 80% reduction) [2007.01852].

## 3. Multilingual Embedding Extraction and Evaluation

LaBSE produces a single, language-agnostic embedding space such that semantically similar sentences in different languages map to proximate vectors:

- **Sentence encoding**:
    1. Tokenize using shared vocabulary.
    2. Pass through the encoder, extract [CLS] from last layer.
    3. L₂-normalize to unit length.
    4. Compute similarity via dot-product (cosine) for retrieval or clustering.

#### Bi-text and Parallel Data Mining

LaBSE achieves strong results on major retrieval benchmarks:
- **Tatoeba (112 languages)**: 83.7% average retrieval accuracy (P@1), compared to 65.5% for LASER [2007.01852].
- **XTREME (36 languages)**: 95.0% (LaBSE) vs 84.4% (LASER).
- **United Nations bi-text retrieval**: >89% P@1 across five languages.
- **BUCC Mining F₁**: Outperforms prior systems by 2–4 F₁ on all tested pairs [2007.01852].

LaBSE-mined CommonCrawl parallel data enables competitive neural machine translation (NMT):
- **en→zh**: 715M pairs, News BLEU 36.3, TED 15.2.
- **en→de**: 302M pairs, News BLEU 28.1, TED 31.3.

LaBSE also provides competitive monolingual transfer performance on English sentence classification tasks (SentEval, accuracy 74–92%) and STS-B (Pearson's r=0.728) [2007.01852].

## 4. Lexical and Word Alignment Capabilities

Despite being trained exclusively at the sentence level, LaBSE’s intermediate Transformer layers encode surprisingly fine-grained, language-agnostic word representations [2301.12140][2205.00267]:

- **Word Alignment**: By extracting the 6th-layer outputs for tokenized word pairs, constructing similarity matrices, and applying symmetrized softmax extraction, LaBSE achieves an average Alignment Error Rate (AER) of 18.8%—outperforming mBERT (22.3%) and XLM-R (27.9%) as an “off-the-shelf” aligner. Adapter-based fine-tuning on small word-alignment corpora further reduces AER to 16.1% (state-of-the-art), while requiring updates to less than 1% of parameters [2301.12140].

- **Lexical Embedding Extraction**: Subword token mean-pooling over the final layer yields off-the-shelf word or phrase embeddings [2205.00267]. Lightweight contrastive fine-tuning on a “seed dictionary” of translation pairs improves bilingual lexicon induction (BLI) by 6–12 P@1 points (up to +20 on low-resource pairs). Interpolating with static CLWEs (e.g. fastText, via orthogonal Procrustes) further improves BLI and cross-lingual semantic similarity.

#### Table: Lexical Induction Results (P@1, GT-BLI, 28 pairs, [2205.00267])

| Method                       | P@1     |
|------------------------------|---------|
| LaBSE (off-the-shelf, λ=1.0) | 21.4    |
| + Contrastive FT (λ=1.0)      | 30.8    |
| + Interpolation (λ=0.3)       | 45.7    |
| + Both (CL+Interp, λ=0.3)     | 49.1    |
| mBERT baseline (best)         | 44.3    |

LaBSE's "covert" lexical cross-lingual knowledge is thus made explicit, enabling plug-and-play word alignment and robust lexical transfer.

## 5. Cross-lingual Alignment, Linguistic Predictors, and Isomorphism

LaBSE's embedding space exhibits substantial structural alignment across languages [2109.06324]. Metrics for analyzing cross-linguality include:

- **Bitext Retrieval F₁** (across 5,050 language pairs, Bible corpus): LaBSE 0.72 ± 0.18, LASER 0.58 ± 0.20.
- **Singular-Value Gap (SVG)**: Lower for LaBSE (5.2) than LASER (6.1), indicating closer subspace isomorphism.
- **Effective Condition Number (ECOND_HM)**: LaBSE 0.14, LASER 0.19.

Performance depends strongly on typological features:
- **Language family**: In-family data significantly improves alignment (Pearson’s r=+0.49 with F₁).
- **Morphological complexity**: Analytic languages yield higher alignment (F₁ ≈ 0.78) than agglutinative (0.67) or polysynthetic (0.28).
- **Word order**: Pairs with matching canonical (SVO/SOV) orders yield ΔF₁ ≈ 0.12 points higher than mismatched pairs.
- **Case studies**: Morphological segmentation improves English–Inuktitut alignment from F₁=0.06 (raw) to 0.35 (segmented, +29 points).

These findings suggest explicit leveraging of in-family data and morphological harmonization techniques can further improve cross-lingual transfer [2109.06324].

## 6. Applications, Practical Usage, and Resources

LaBSE is primarily used for:

- **Large-scale bitext mining**: Efficient nearest-neighbor mining with cosine similarity in the shared embedding space.
- **NMT pipeline**: Filtering massive internet-mined bitexts for NMT.
- **Semantic search**: Multilingual retrieval, cross-language duplicate detection.
- **Word alignment and lexical transfer**: Plug-and-play word alignment, bilingual lexicon induction, and entity linking via lightweight fine-tuning [2301.12140][2205.00267].

Resources:

- **Pretrained models**: Publicly released via [https://tfhub.dev/google/LaBSE](https://tfhub.dev/google/LaBSE) [2007.01852], [https://github.com/google-research/LaBSE](https://github.com/google-research/LaBSE)
- **Evaluation code and multilingual datasets**: [https://github.com/AlexJonesNLP/XLAnalysis5K](https://github.com/AlexJonesNLP/XLAnalysis5K), superparallel Bible, Nunavut Hansard
- **Benchmark datasets**: Tatoeba, UN corpus, XTREME, BUCC, SentEval, BLI (GT-BLI, PanLex-BLI), Multi-SimLex, XL-BEL

## 7. Limitations and Open Directions

While LaBSE demonstrates broad multilinguality and robust transfer capabilities, certain typologically distant or morphologically rich languages present challenges, as indicated by lower alignment metrics for polysynthetic languages (F₁=0.28 on average) and pronounced sensitivity to word order mismatch [2109.06324]. The entanglement of lexical and sentential knowledge necessitates probing or targeted fine-tuning to unlock optimal sub-sentence transfer [2205.00267]. Further research may explore hybrid static/encoder interpolation, training on deeper context-dependent features, and model specialization for low-resource and typologically divergent languages.

LaBSE remains foundational for scalable cross-lingual representation learning, providing state-of-the-art performance for sentence and lexical alignment, data mining, and multilingual semantic tasks across a diverse global spectrum [2007.01852][2109.06324][2205.00267][2301.12140].

Source: https://www.emergentmind.com/topics/language-agnostic-bert-sentence-embedding-labse