Skip to main content
QUICK REVIEW

[Paper Review] Gecko: Versatile Text Embeddings Distilled from Large Language Models

Jinhyuk Lee, Zhuyun Dai|arXiv (Cornell University)|Mar 29, 2024
Topic ModelingComputer Science9 citations
TL;DR

Gecko is a compact text embedding model distilled from LLMs via a two-step data distillation (FRet) to produce versatile embeddings that excel on MTEB benchmarks with small dimensionality and competitive model sizes.

ABSTRACT

We present Gecko, a compact and versatile text embedding model. Gecko achieves strong retrieval performance by leveraging a key idea: distilling knowledge from large language models (LLMs) into a retriever. Our two-step distillation process begins with generating diverse, synthetic paired data using an LLM. Next, we further refine the data quality by retrieving a set of candidate passages for each query, and relabeling the positive and hard negative passages using the same LLM. The effectiveness of our approach is demonstrated by the compactness of the Gecko. On the Massive Text Embedding Benchmark (MTEB), Gecko with 256 embedding dimensions outperforms all existing entries with 768 embedding size. Gecko with 768 embedding dimensions achieves an average score of 66.31, competing with 7x larger models and 5x higher dimensional embeddings.

Motivation & Objective

  • Motivate the creation of a general-purpose, compact text embedding model that leverages LLM knowledge.
  • Develop a two-step LLM distillation to generate diverse, high-quality training data for embedding models.
  • Combine synthetic LRet data with human-annotated data to train a versatile encoder applicable across tasks.

Proposed method

  • Generate synthetic task-query pairs for web passages using few-shot prompted LLMs to form the FRet dataset.
  • For each generated query, retrieve nearest passages using an initial embedding model and relabel positives/negatives with the LLM (LLM-based ranking).
  • Train Gecko with a two-tower contrastive objective on a unified mix of FRet and academic datasets, including in-batch negatives and same-tower negatives.
  • Incorporate classification data via a contrastive objective with carefully constructed positives/negatives to improve semantic similarity and classification performance.
  • Use the multi-task mixture loss with a terminal MRL (mixed-rank learning) component to support multiple embedding dimensions (e.g., 256 and 768).
  • Evaluate on MTEB across tasks (Classification, Clustering, Pair Classification, Reranking, Retrieval, STS, Summary) and report average performance.
Figure 1: Overview of Gecko. Gecko is a versatile text embedding model trained on a variety of tasks including document retrieval, semantic similarity, and classification. To train Gecko, we utilize FRet where queries are generated from LLMs, and their positive and negative passages are mined by LLM
Figure 1: Overview of Gecko. Gecko is a versatile text embedding model trained on a variety of tasks including document retrieval, semantic similarity, and classification. To train Gecko, we utilize FRet where queries are generated from LLMs, and their positive and negative passages are mined by LLM

Experimental results

Research questions

  • RQ1Can LLM-generated synthetic data plus LLM-driven relabeling improve zero-shot and few-shot text embedding performance across diverse tasks?
  • RQ2Does combining LLM-generated data (FRet) with human-annotated datasets yield a versatile embedding that outperforms similarly-sized baselines on MTEB?
  • RQ3How does the diversity and task mixture in FRet affect generalization to multilingual and multimodal-style retrieval tasks?
  • RQ4What is the impact of LLM-based positive/negative relabeling on retrieval and semantic similarity benchmarks?
  • RQ5Can a compact Gecko model (e.g., 1B parameters, 768-dim) rival larger embedding systems in retrieval and STS tasks?

Key findings

  • Gecko with 1.2B parameters and 768-dimensional embeddings achieves 66.31 average on MTEB, outperforming many larger models with higher dimensions.
  • Gecko-1b-256 improves over notable baselines with 256-dim embeddings and comparable parameter budgets.
  • Zero-shot Gecko (FRet-only) already provides strong MTEB performance, approaching or surpassing some baselines.
  • LLM-based relabeling of positives (p+) different from seed passages improves performance in several tasks; using the top-LLM-ranked positive yields better results than seed passage.
  • Diversity of FRet and unified formatting significantly boost downstream performance, with full FRet mixture achieving the best overall results.
  • Gecko multilingual variant (gecko-multilingual-1b) achieves strong multilingual retrieval performance using English-generated FRet data, outperforming several multilingual baselines.
Figure 2: Overview of FRet. Given a sampled passage from the web, FRet first utilizes LLMs to generate a relevant task and a query for the passage (top). Then, each query and task is fed into a pre-trained embedding model to obtain nearest neighbor passages, which are then scored by the LLM to mine
Figure 2: Overview of FRet. Given a sampled passage from the web, FRet first utilizes LLMs to generate a relevant task and a query for the passage (top). Then, each query and task is fed into a pre-trained embedding model to obtain nearest neighbor passages, which are then scored by the LLM to mine

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.