Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

SimCSE: Simple Contrastive Learning of Sentence Embeddings

About

This paper presents SimCSE, a simple contrastive learning framework that greatly advances state-of-the-art sentence embeddings. We first describe an unsupervised approach, which takes an input sentence and predicts itself in a contrastive objective, with only standard dropout used as noise. This simple method works surprisingly well, performing on par with previous supervised counterparts. We find that dropout acts as minimal data augmentation, and removing it leads to a representation collapse. Then, we propose a supervised approach, which incorporates annotated pairs from natural language inference datasets into our contrastive learning framework by using "entailment" pairs as positives and "contradiction" pairs as hard negatives. We evaluate SimCSE on standard semantic textual similarity (STS) tasks, and our unsupervised and supervised models using BERT base achieve an average of 76.3% and 81.6% Spearman's correlation respectively, a 4.2% and 2.2% improvement compared to the previous best results. We also show -- both theoretically and empirically -- that the contrastive learning objective regularizes pre-trained embeddings' anisotropic space to be more uniform, and it better aligns positive pairs when supervised signals are available.

Tianyu Gao, Xingcheng Yao, Danqi Chen• 2021

Related benchmarks

TaskDatasetResultRank
Semantic Textual SimilaritySTS tasks (STS12, STS13, STS14, STS15, STS16, STS-B, SICK-R) various (test)
STS12 Score82.4
393
Machine TranslationWMT En-De 2014 (test)
BLEU27.34
379
Subjectivity ClassificationSubj
Accuracy99.6
266
Question ClassificationTREC
Accuracy86.2
205
Semantic Textual SimilaritySTS tasks (STS12, STS13, STS14, STS15, STS16, STS-B, SICK-R)
STS12 Score77.46
195
Opinion Polarity DetectionMPQA
Accuracy88.6
154
Sentiment ClassificationMR
Accuracy80.74
148
Machine TranslationIWSLT De-En 2014 (test)
BLEU34.41
146
Sentiment ClassificationCR
Accuracy87.28
142
SummarizationXsum
ROUGE-214.93
108
Showing 10 of 167 rows
...

Other info

Code

Follow for update