techlist.io
OpenAI2022-01-231 min read

Curated summary

Text and code embeddings by contrastive pre-training

Read original(opens in new tab)

Contrastive pre-training on large amounts of unsupervised data produces high-quality vector representations of both text and code, replacing the use-case-specific models that earlier work relied on. The same unsupervised text embeddings set new state-of-the-art results on linear-probe classification and perform strongly on semantic search, sometimes competing with fine-tuned models. The same approach applied to (text, code) pairs also improves code search.

Unsupervised Text Embeddings for Classification

  • Averaged across 7 linear-probe classification tasks, the best unsupervised model improves on the previous best unsupervised text embeddings by 4% (relative).
  • It also improves on the previous best supervised text embedding models by 1.8% (relative).

Large-Scale Semantic Search

  • On MS MARCO, the embeddings improve on the previous best unsupervised methods by 23.4% (relative).
  • On Natural Questions, the improvement is 14.7% (relative).
  • On TriviaQA, the improvement is 10.6% (relative).

Code Embeddings

  • Code embedding models are trained on (text, code) pairs using the same contrastive approach as the text models.
  • They achieve a 20.8% (relative) improvement over the prior best work on code search.

Continue with another curated summary.