English

DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings

Computation and Language 2022-04-22 v1

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.

Keywords

Cite

@article{arxiv.2204.10298,
  title  = {DiffCSE: Difference-based Contrastive Learning for Sentence Embeddings},
  author = {Yung-Sung Chuang and Rumen Dangovski and Hongyin Luo and Yang Zhang and Shiyu Chang and Marin Soljačić and Shang-Wen Li and Wen-tau Yih and Yoon Kim and James Glass},
  journal= {arXiv preprint arXiv:2204.10298},
  year   = {2022}
}

Comments

NAACL 2022 main conference (Long paper). Pretrained models and code are available at https://github.com/voidism/DiffCSE

R2 v1 2026-06-24T10:55:05.342Z