HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings

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

voidism/diffcse
Official
jax
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
semantic-textual-similarity-on-sts12DiffCSE-RoBERTa-base
Spearman Correlation: 0.7005
semantic-textual-similarity-on-sts12DiffCSE-BERT-base
Spearman Correlation: 0.7228
semantic-textual-similarity-on-sts13DiffCSE-BERT-base
Spearman Correlation: 0.8443
semantic-textual-similarity-on-sts13DiffCSE-RoBERTa-base
Spearman Correlation: 0.8343
semantic-textual-similarity-on-sts14DiffCSE-BERT-base
Spearman Correlation: 0.7647
semantic-textual-similarity-on-sts14DiffCSE-RoBERTa-base
Spearman Correlation: 0.7549
semantic-textual-similarity-on-sts15DiffCSE-BERT-base
Spearman Correlation: 0.8390
semantic-textual-similarity-on-sts15DiffCSE-RoBERTa-base
Spearman Correlation: 0.8281
semantic-textual-similarity-on-sts16DiffCSE-RoBERTa-base
Spearman Correlation: 0.8212
semantic-textual-similarity-on-sts16DiffCSE-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.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings | Papers | HyperAI