Improving Contrastive Learning of Sentence Embeddings with
Case-Augmented Positives and Retrieved Negatives
- URL: http://arxiv.org/abs/2206.02457v1
- Date: Mon, 6 Jun 2022 09:46:12 GMT
- Title: Improving Contrastive Learning of Sentence Embeddings with
Case-Augmented Positives and Retrieved Negatives
- Authors: Wei Wang, Liangzhu Ge, Jingqiao Zhang, Cheng Yang
- Abstract summary: Unsupervised contrastive learning methods still lag far behind the supervised counterparts.
We propose switch-case augmentation to flip the case of the first letter of randomly selected words in a sentence.
For negative samples, we sample hard negatives from the whole dataset based on a pre-trained language model.
- Score: 17.90820242798732
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: Following SimCSE, contrastive learning based methods have achieved the
state-of-the-art (SOTA) performance in learning sentence embeddings. However,
the unsupervised contrastive learning methods still lag far behind the
supervised counterparts. We attribute this to the quality of positive and
negative samples, and aim to improve both. Specifically, for positive samples,
we propose switch-case augmentation to flip the case of the first letter of
randomly selected words in a sentence. This is to counteract the intrinsic bias
of pre-trained token embeddings to frequency, word cases and subwords. For
negative samples, we sample hard negatives from the whole dataset based on a
pre-trained language model. Combining the above two methods with SimCSE, our
proposed Contrastive learning with Augmented and Retrieved Data for Sentence
embedding (CARDS) method significantly surpasses the current SOTA on STS
benchmarks in the unsupervised setting.
Related papers
- Contrastive Learning with Negative Sampling Correction [52.990001829393506]
We propose a novel contrastive learning method named Positive-Unlabeled Contrastive Learning (PUCL)
PUCL treats the generated negative samples as unlabeled samples and uses information from positive samples to correct bias in contrastive loss.
PUCL can be applied to general contrastive learning problems and outperforms state-of-the-art methods on various image and graph classification tasks.
arXiv Detail & Related papers (2024-01-13T11:18:18Z) - Clustering-Aware Negative Sampling for Unsupervised Sentence
Representation [24.15096466098421]
ClusterNS is a novel method that incorporates cluster information into contrastive learning for unsupervised sentence representation learning.
We apply a modified K-means clustering algorithm to supply hard negatives and recognize in-batch false negatives during training.
arXiv Detail & Related papers (2023-05-17T02:06:47Z) - Alleviating Over-smoothing for Unsupervised Sentence Representation [96.19497378628594]
We present a Simple method named Self-Contrastive Learning (SSCL) to alleviate this issue.
Our proposed method is quite simple and can be easily extended to various state-of-the-art models for performance boosting.
arXiv Detail & Related papers (2023-05-09T11:00:02Z) - Improving Contrastive Learning of Sentence Embeddings from AI Feedback [43.56070504980024]
Supervised contrastive learning can produce more accurate sample pairs with human feedback labels.
Our method utilizes AI feedback from large pre-trained language models to construct sample pairs with fine-grained sample similarity scores.
Experimental results show that our method achieves state-of-the-art performance on several semantic textual similarity tasks.
arXiv Detail & Related papers (2023-05-03T06:26:13Z) - Language Model Pre-training on True Negatives [109.73819321246062]
Discriminative pre-trained language models (PLMs) learn to predict original texts from intentionally corrupted ones.
Existing PLMs simply treat all corrupted texts as equal negative without any examination.
We design enhanced pre-training methods to counteract false negative predictions and encourage pre-training language models on true negatives.
arXiv Detail & Related papers (2022-12-01T12:24:19Z) - SNCSE: Contrastive Learning for Unsupervised Sentence Embedding with
Soft Negative Samples [36.08601841321196]
We propose contrastive learning for unsupervised sentence embedding with soft negative samples.
We show that SNCSE can obtain state-of-the-art performance on semantic textual similarity task.
arXiv Detail & Related papers (2022-01-16T06:15:43Z) - Sentence Embeddings using Supervised Contrastive Learning [0.0]
We propose a new method to build sentence embeddings by doing supervised contrastive learning.
Our method fine-tunes pretrained BERT on SNLI data, incorporating both supervised crossentropy loss and supervised contrastive loss.
arXiv Detail & Related papers (2021-06-09T03:30:29Z) - Incremental False Negative Detection for Contrastive Learning [95.68120675114878]
We introduce a novel incremental false negative detection for self-supervised contrastive learning.
During contrastive learning, we discuss two strategies to explicitly remove the detected false negatives.
Our proposed method outperforms other self-supervised contrastive learning frameworks on multiple benchmarks within a limited compute.
arXiv Detail & Related papers (2021-06-07T15:29:14Z) - SimCSE: Simple Contrastive Learning of Sentence Embeddings [10.33373737281907]
This paper presents SimCSE, a contrastive learning framework for embeddings.
We first describe an unsupervised approach, which takes an input sentence and predicts itself in a contrastive objective.
We then incorporate annotated pairs from NLI datasets into contrastive learning by using "entailment" pairs as positives and "contradiction" pairs as hard negatives.
arXiv Detail & Related papers (2021-04-18T11:27:08Z) - Doubly Contrastive Deep Clustering [135.7001508427597]
We present a novel Doubly Contrastive Deep Clustering (DCDC) framework, which constructs contrastive loss over both sample and class views.
Specifically, for the sample view, we set the class distribution of the original sample and its augmented version as positive sample pairs.
For the class view, we build the positive and negative pairs from the sample distribution of the class.
In this way, two contrastive losses successfully constrain the clustering results of mini-batch samples in both sample and class level.
arXiv Detail & Related papers (2021-03-09T15:15:32Z) - Contrastive Learning with Hard Negative Samples [80.12117639845678]
We develop a new family of unsupervised sampling methods for selecting hard negative samples.
A limiting case of this sampling results in a representation that tightly clusters each class, and pushes different classes as far apart as possible.
The proposed method improves downstream performance across multiple modalities, requires only few additional lines of code to implement, and introduces no computational overhead.
arXiv Detail & Related papers (2020-10-09T14:18:53Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.