[Paper Review] Improving Contrastive Learning of Sentence Embeddings from AI Feedback
This paper proposes CLAIF, a method that improves contrastive learning of sentence embeddings by leveraging fine-grained semantic similarity scores from large language models (LLMs) as AI feedback. By generating diverse sentence pairs with controlled semantic similarity via masked reconstruction and using LLMs to assign continuous similarity scores, CLAIF achieves state-of-the-art performance on STS and transfer learning tasks, outperforming both unsupervised and supervised baselines.
Contrastive learning has become a popular approach in natural language processing, particularly for the learning of sentence embeddings. However, the discrete nature of natural language makes it difficult to ensure the quality of positive and negative sample pairs generated through data augmentation methods. Although supervised contrastive learning can produce more accurate sample pairs with human feedback labels, it still lacks fine-grained training signals. In this paper, we propose to improve extbf{C}ontrastive extbf{L}earning of sentence embeddings from extbf{AI} extbf{F}eedback extbf{(CLAIF)}. Our method utilizes AI feedback from large pre-trained language models (LLMs) to construct sample pairs with fine-grained sample similarity scores to improve contrastive learning. Besides, we combine human feedback and AI feedback to provide better supervision signals for supervised contrastive learning of sentence embeddings. Experimental results show that our method achieves state-of-the-art performance on several semantic textual similarity (STS) and transfer learning tasks compared to other unsupervised and supervised contrastive learning methods.
Motivation & Objective
- To address the limitations of unsupervised contrastive learning, where data augmentation may introduce bias and poor-quality positive/negative pairs.
- To overcome the coarse-grained supervision in supervised contrastive learning, which relies on discrete labels and lacks fine-grained semantic signals.
- To explore the feasibility and effectiveness of using AI feedback from large pre-trained language models as a source of continuous, high-quality supervision for sentence embedding training.
- To combine human feedback and AI feedback to further improve supervised contrastive learning through soft labels derived from LLM-generated similarity scores.
Proposed method
- A two-step sample pair generation process: first, mask words in a sentence at varying rates, then use GPT-3 to generate new sentences based on the masked input, creating pairs with controlled semantic similarity.
- Use GPT-3 to generate continuous semantic similarity scores (0–1) for each sentence pair, serving as fine-grained AI feedback on their semantic relatedness.
- Train sentence encoders using contrastive learning with these AI-generated similarity scores via a Soft InfoNCE loss, replacing one-hot labels with soft supervision.
- Integrate AI feedback into supervised contrastive learning by using LLM-generated scores as soft labels for positive pairs, forming the CLHAIF framework.
- Leverage the linguistic knowledge of LLMs to ensure diversity and quality in both generated sentences and similarity scores.
- Conduct human evaluation to verify fluency of generated sentences and consistency of similarity scores with human judgments.
Experimental results
Research questions
- RQ1Can AI feedback from large language models improve the quality of positive and negative sample pairs in contrastive sentence embedding learning?
- RQ2How does using continuous, fine-grained similarity scores from LLMs compare to discrete labels in supervised contrastive learning?
- RQ3Can combining human feedback and AI feedback lead to better performance than using either alone in sentence embedding training?
- RQ4Does the use of AI-generated, diverse sentence pairs and similarity scores improve generalization on semantic textual similarity and transfer learning tasks?
- RQ5To what extent does CLAIF enhance cross-encoder models for sentence-pair modeling compared to existing baselines?
Key findings
- CLAIF achieves state-of-the-art performance on multiple semantic textual similarity (STS) benchmark tasks, outperforming both unsupervised and supervised contrastive learning methods.
- The method significantly improves cross-encoder performance on sentence-pair modeling, with CLAIF${}_{\textrm{cross}}$ outperforming the prior Trans-Encoder model.
- Human evaluation shows that 92% of generated sentences are fluent and 90% of similarity scores are consistent with human judgments, confirming high-quality data generation.
- The use of AI feedback as soft labels in Soft InfoNCE loss leads to better supervision than one-hot labels in standard InfoNCE.
- Combining human and AI feedback in CLHAIF further enhances performance, demonstrating the complementary value of both supervision signals.
- The approach is cost-effective compared to human-annotated data, as AI feedback from LLMs is scalable and less expensive than human labeling.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.