Skip to content

Gemini Embedding: Generalizable Embeddings from Gemini

optionalextendedfrontierpaperrubric 8/122025 · ~25 min

Jinhyuk Lee, Feiyang Chen, Sahil Dua, Daniel Cer, et al.

Status

TL;DR. Gemini Embedding is a text embedder initialised from a Gemini LLM with bidirectional attention, mean pooling and a linear projection to 3,072 dimensions (Matryoshka prefixes at 768 and 1,536). It is pre-finetuned on billions of web title–passage pairs, then fine-tuned on a task-diverse mixture whose data Gemini itself generated, filtered and mined for hard negatives, and finally several fine-tuned checkpoints are averaged into a “model soup”. It took first place on MMTEB in March 2025 (68.32 task mean, ahead of the next model by more than 5 points). The model is available only through the Gemini API.

Why it matters now. It reset the MMTEB leaderboard in early 2025 and is the proprietary reference point that Qwen3 Embedding and Llama-Embed-Nemotron measure against. For Nandan it is also directly connected to his own work: its synthetic retrieval data extends SWIM-IR, and its filtering ablation is run on MIRACL.

  1. Gemini as the backbone. A transformer initialised from Gemini, with bidirectional attention, encodes the input; token states are mean-pooled and projected to d=3,072d = 3{,}072. The query is prefixed with a task string tt (for example “question answering”); passages get none.
  2. Loss. InfoNCE with temperature τ\tau, an optional hard negative, and in-batch positives as negatives, with a mask that removes in-batch targets identical to the query’s own positive:
Li=−log⁡esim⁡(qi,pi+)/τesim⁡(qi,pi−)/τ+∑j=1Bmask⁡(i,j) esim⁡(qi,pj+)/τ.\mathcal{L}_i = -\log \frac{e^{\operatorname{sim}(q_i, p_i^+)/\tau}}{e^{\operatorname{sim}(q_i, p_i^-)/\tau} + \sum_{j=1}^{B} \operatorname{mask}(i, j)\, e^{\operatorname{sim}(q_i, p_j^+)/\tau}} .

Same-tower negatives are omitted because they introduce false negatives. The loss is applied at 768, 1,536 and 3,072 dimensions (Matryoshka). 3. Two training stages and a soup. Pre-finetuning uses a very large batch on noisy title–passage pairs with no hard negatives, to adapt the model from generation to encoding. Fine-tuning uses (query, positive, hard negative) triples, batches under 1,024 drawn from a single dataset, and a grid search over mixtures. Checkpoints from several runs are averaged (see Model soups). 4. Gemini improves the data three ways.

  • Synthetic data: retrieval queries for web passages (extending FRet and SWIM-IR) filtered by a Gemini auto-rater, and multi-stage synthetic classification sets.
  • Filtering: few-shot Gemini prompts remove training examples with wrong positives or negatives.
  • Hard negatives: an initial embedder retrieves neighbours, Gemini scores them by graded classification and query likelihood combined with reciprocal rank fusion, and the lowest-scoring of the top kk becomes the hard negative.

Paper Tables 1, 6 and 8 (MMTEB snapshot March 10, 2025; XTREME-UP MRR@10; XOR-Retrieve Recall@5kt).

BenchmarkGemini EmbeddingBest non-Gemini in paper
MTEB(Multilingual), task mean68.3263.23 (multilingual-e5-large-instruct)
MTEB(Multilingual), Retrieval67.7160.08 (gte-Qwen2-7B-instruct)
MTEB(Eng, v2), task mean73.3070.72 (gte-Qwen2-7B-instruct)
MTEB(Code), 7-task mean74.6665.40 (Gecko)
XOR-Retrieve90.4268.76 (text-embedding-3-large)
XTREME-UP64.3339.2 (voyage-3-large, Table 5)
  • Ablation (Table 6, no souping): no training 30.55; pre-finetuning only 48.89; English-only fine-tuning 66.75; full model 68.32 on MTEB(Multilingual).
  • Synthetic classification data raises four MTEB classification tasks from 57.57 to 75.17 on average (Table 7).
  • Access. Weights, size and dimension of the backbone are not released; results depend on an API that can change.
  • Evidence. Data volumes, step counts, batch sizes and the soup recipe are not given; ablations are single runs.
  • Benchmark overlap. MIRACL training data is used (filtered) and MIRACL is evaluated; the list of excluded MTEB datasets is not given.
  • Cost. No latency or price analysis for 3,072-d vectors from a large backbone.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Mechanism

    Gemini Embedding's loss uses in-batch positives and an optional hard negative, but masks any in-batch target equal to the query's own positive, and drops same-tower (query–query) negatives. (a) A classification batch has six examples whose positives are the label strings [pos, neg, pos, neutral, neg, pos]. Without the mask, how many copies of "pos" sit in the denominator for example 1, and what is the lowest loss reachable even by a perfect model? With the mask? (b) Why would same-tower negatives hurt here, and why does the paper restrict each fine-tuning batch to one dataset?

    What a strong answer covers
    • (a) Without the mask, "pos" appears three times among the in-batch targets (examples 1, 3 and 6), each with the same embedding and score as the positive. Even if all other terms vanish, the softmax gives the positive at most 1/3, so the loss is at least log 3 ≈ 1.10.
    • With the mask, the duplicates (examples 3 and 6) are removed; only "neg" and "neutral" remain as negatives, and the loss can approach 0.
    • (b) Same-tower negatives push different queries apart. Two queries with the same label or about the same topic should be close, so they act as false negatives; the authors report that dropping them helps most tasks.
    • One dataset per batch makes in-batch targets come from the same task, so they are informative negatives; a classification label is trivially different from a retrieval passage and gives little signal.
    • The same loss is applied at several Matryoshka prefixes (768, 1,536 and the full 3,072 dimensions), so one model serves three vector sizes.
  2. What if…

    Table 6 fine-tunes from the pre-finetuned checkpoint on different mixtures, without model souping. Using its numbers, what do you conclude about (i) the value of pre-finetuning, (ii) task diversity vs. language diversity and (iii) cross-lingual transfer to low-resource languages? Give one reason each conclusion might not hold for an open model.

    What a strong answer covers
    • (i) MTEB(Multilingual) task mean: no training 30.55, pre-finetuning only on title–passage pairs 48.89, full model 68.32. Pre-finetuning more than halves the gap but most of the gain comes from fine-tuning and souping.
    • (ii) English-only diverse-task mixture reaches 66.75 on MTEB(Multilingual); a multilingual retrieval-only mixture reaches 58.24. The authors conclude task diversity matters more than language diversity.
    • (iii) On XTREME-UP (20 low-resource languages, MRR@10), English-only fine-tuning gives 49.34 versus 64.33 for the full model and 65.06 for multilingual retrieval-only, so language-specific data still matters for the long tail even though English-only already beats all non-Gemini models (best 39.2).
    • Caveat for open models: the transfer rests on the Gemini backbone's multilingual pretraining, whose size and data are undisclosed; a weaker multilingual backbone may need more multilingual fine-tuning data, as in BGE-M3 or SWIM-IR.
  3. Critique

    You want to cite Gemini Embedding as the state of the art in a paper and use it as a baseline. List the access and evidence limits of the report that affect (i) reproducibility, (ii) the MIRACL and MMTEB numbers and (iii) comparing it with later models, and say how you would report it responsibly.

    What a strong answer covers
    • (i) The model is API-only. Backbone size, model dimension, data volumes, batch sizes, step counts and the soup recipe ("manual checkpoint selection") are not disclosed, so the result cannot be reproduced or ablated independently, and the served model may change.
    • (ii) Training includes LLM-filtered MIRACL training data, and Table 8 then reports MIRACL (70.1 average), so MIRACL is in-domain. The paper says it excluded many in-domain MTEB datasets but gives no list or zero-shot percentage.
    • Hard negatives and filtering use Gemini itself, so part of the gain is distillation from a much larger model that open baselines lack.
    • (iii) Version names differ across reports: the paper reports 68.32 on MMTEB (snapshot March 10, 2025); later papers list gemini-embedding-001 at 68.37 and Qwen3's appendix lists gemini-embedding-exp-03-07. State the exact model name, API date and dimension used.
    • Responsible reporting: run it yourself via the API on your own held-out data, report date and version, mark which evaluation sets overlap its training data, and include an open-weights baseline of similar quality, such as Qwen3-Embedding-8B or Llama-Embed-Nemotron-8B.

Done with this page?

Status