Command Palette
Search for a command to run...
DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings
Yung-Sung Chuang Rumen Dangovski Hongyin Luo Yang Zhang Shiyu Chang Marin Soljačić Shang-Wen Li Wen-tau Yih Yoon Kim James Glass

Abstract
We propose DiffCSE, an unsupervised contrastive learning framework for learning sentence embeddings. DiffCSE learns sentence embeddings that are sensitive to the difference between the original sentence and an edited sentence, where the edited sentence is obtained by stochastically masking out the original sentence and then sampling from a masked language model. We show that DiffSCE is an instance of equivariant contrastive learning (Dangovski et al., 2021), which generalizes contrastive learning and learns representations that are insensitive to certain types of augmentations and sensitive to other "harmful" types of augmentations. Our experiments show that DiffCSE achieves state-of-the-art results among unsupervised sentence representation learning methods, outperforming unsupervised SimCSE by 2.3 absolute points on semantic textual similarity tasks.
Code Repositories
Benchmarks
| Benchmark | Methodology | Metrics |
|---|---|---|
| semantic-textual-similarity-on-sts12 | DiffCSE-RoBERTa-base | Spearman Correlation: 0.7005 |
| semantic-textual-similarity-on-sts12 | DiffCSE-BERT-base | Spearman Correlation: 0.7228 |
| semantic-textual-similarity-on-sts13 | DiffCSE-BERT-base | Spearman Correlation: 0.8443 |
| semantic-textual-similarity-on-sts13 | DiffCSE-RoBERTa-base | Spearman Correlation: 0.8343 |
| semantic-textual-similarity-on-sts14 | DiffCSE-BERT-base | Spearman Correlation: 0.7647 |
| semantic-textual-similarity-on-sts14 | DiffCSE-RoBERTa-base | Spearman Correlation: 0.7549 |
| semantic-textual-similarity-on-sts15 | DiffCSE-BERT-base | Spearman Correlation: 0.8390 |
| semantic-textual-similarity-on-sts15 | DiffCSE-RoBERTa-base | Spearman Correlation: 0.8281 |
| semantic-textual-similarity-on-sts16 | DiffCSE-RoBERTa-base | Spearman Correlation: 0.8212 |
| semantic-textual-similarity-on-sts16 | DiffCSE-BERT-base | Spearman Correlation: 0.8054 |
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.