Skip to main content
QUICK REVIEW

[Paper Review] Text Embeddings by Weakly-Supervised Contrastive Pre-training

Liang Wang, Nan Yang|arXiv (Cornell University)|Dec 7, 2022
Topic ModelingComputer Science112 citations
TL;DR

E5 learns general-purpose text embeddings via weakly supervised contrastive pre-training on CCPairs, achieving strong zero-shot retrieval and superior fine-tuned results with far fewer parameters than prior large embedding models.

ABSTRACT

This paper presents E5, a family of state-of-the-art text embeddings that transfer well to a wide range of tasks. The model is trained in a contrastive manner with weak supervision signals from our curated large-scale text pair dataset (called CCPairs). E5 can be readily used as a general-purpose embedding model for any tasks requiring a single-vector representation of texts such as retrieval, clustering, and classification, achieving strong performance in both zero-shot and fine-tuned settings. We conduct extensive evaluations on 56 datasets from the BEIR and MTEB benchmarks. For zero-shot settings, E5 is the first model that outperforms the strong BM25 baseline on the BEIR retrieval benchmark without using any labeled data. When fine-tuned, E5 obtains the best results on the MTEB benchmark, beating existing embedding models with 40x more parameters.

Motivation & Objective

  • Motivate the need for high-quality, single-vector text embeddings for retrieval, clustering, and classification.
  • Propose a weakly supervised, contrastive pre-training framework to learn general-purpose embeddings.
  • Curate a large, high-quality text-pair dataset CCPairs and demonstrate strong zero-shot and fine-tuned performance.
  • Show that embeddings transfer well across diverse tasks and benchmarks with limited labeled data.

Proposed method

  • Use a biencoder architecture with a shared Transformer encoder to produce fixed-size embeddings for queries and passages.
  • Train with InfoNCE contrastive loss using in-batch negatives and large batch sizes.
  • Curate CCPairs from semi-structured web sources and apply a consistency-based filter to retain ~270M high-quality text pairs.
  • Optionally fine-tune with labeled data (MS-MARCO, NQ, NLI) using a combination of hard negatives and knowledge distillation from a cross-encoder teacher.
  • Evaluate embeddings on BEIR (zero-shot) and MTEB (56 English tasks) to demonstrate transferability and robustness.

Experimental results

Research questions

  • RQ1Can high-quality general-purpose text embeddings be learned from weakly supervised contrastive pre-training on a curated web-scale text-pair dataset?
  • RQ2How does CCPairs-based training compare to synthetic/noisy data and labeled-data fine-tuning in zero-shot and fine-tuned retrieval tasks?
  • RQ3What impact do data quality, batch size, and negative sampling have on embedding quality and benchmark performance?
  • RQ4To what extent can small- to medium-sized E5 models compete with much larger embedding models after supervised fine-tuning?],
  • RQ5key_findings:[

Key findings

  • E5 achieves state-of-the-art or competitive results on BEIR in zero-shot retrieval, outperforming BM25 without any labeled data for some datasets.
  • E5-base and E5-large reach competitive or superior performance on MTEB, outperforming embedding models with up to 40× more parameters.
  • Zero-shot SST-2-style prompts for text classification show strong performance with embeddings alone, illustrating broad applicability.
  • Fine-tuning with labeled data (MS-MARCO, NQ, NLI) yields substantial gains across retrieval, clustering, and STS tasks, and the gains are amplified when combining diverse data sources.
  • Larger batch sizes (more in-batch negatives) consistently improve retrieval performance across multiple datasets.
  • Data filtering of CCPairs provides notable gains; using filtered data with 1M pairs outperforms unfiltered data with the same scale on several tasks.
  • In-batch negatives outperform MoCo and pre-batch negative strategies under their setup, highlighting the effectiveness of simple in-batch negatives for large-scale contrastive pre-training.
  • Compared to BM25, dense retrievers like E5 still complement lexical methods, especially in long-tail or lexical-matching scenarios, indicating room for hybrid approaches.

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.