Conan-embedding: General Text Embedding with More and Better Negative Samples

Shiyu Li, Yang Tang, Shizhe Chen, Xi Chen
8/28/2024
cs.CL

No confident code implementation found for this paper.

Abstract

With the growing popularity of RAG, the capabilities of embedding models are gaining increasing attention. Embedding models are primarily trained through contrastive loss learning, with negative examples being a key component. Previous work has proposed various hard negative mining strategies, but these strategies are typically employed as preprocessing steps. In this paper, we propose the conan-embedding model, which maximizes the utilization of more and higher-quality negative examples. Specifically, since the model's ability to handle preprocessed negative examples evolves during training, we propose dynamic hard negative mining method to expose the model to more challenging negative examples throughout the training process. Secondly, contrastive learning requires as many negative examples as possible but is limited by GPU memory constraints. Therefore, we use a Cross-GPU balancing Loss to provide more negative examples for embedding training and balance the batch size across multiple tasks. Moreover, we also discovered that the prompt-response pairs from LLMs can be used for embedding training. Our approach effectively enhances the capabilities of embedding models, currently ranking first on the Chinese leaderboard of Massive text embedding benchmark

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2024conanembedding,
  title  = {Conan-embedding: General Text Embedding with More and Better Negative Samples},
  author = {Shiyu Li and Yang Tang and Shizhe Chen and Xi Chen},
  year   = {2024},
  eprint = {2408.15710},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.15710v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.15710.svg)](https://codeofpaper.com/paper/2408.15710)

Discussion