Debiased Contrastive Learning of Unsupervised Sentence Representations

Kun Zhou, Beichen Zhang, Wayne Xin Zhao, Ji-Rong Wen
5/2/2022
cs.CL
contrastive-ssl

Official code: RUCAIBox/DCLR (32 stars, Python, last commit 2022-03-16).

Abstract

Recently, contrastive learning has been shown to be effective in improving pre-trained language models (PLM) to derive high-quality sentence representations. It aims to pull close positive examples to enhance the alignment while push apart irrelevant negatives for the uniformity of the whole representation space.

Show full abstract

However, previous works mostly adopt in-batch negatives or sample from training data at random. Such a way may cause the sampling bias that improper negatives (e.g. false negatives and anisotropy representations) are used to learn sentence representations, which will hurt the uniformity of the representation space. To address it, we present a new framework \textbf{DCLR} (\underline{D}ebiased \underline{C}ontrastive \underline{L}earning of unsupervised sentence \underline{R}epresentations) to alleviate the influence of these improper negatives. In DCLR, we design an instance weighting method to punish false negatives and generate noise-based negatives to guarantee the uniformity of the representation space. Experiments on seven semantic textual similarity tasks show that our approach is more effective than competitive baselines. Our code and data are publicly available at the link: \textcolor{blue}{\url{https://github.com/RUCAIBox/DCLR}}.

View on arXivView PDF

Code Implementations(1)

RUCAIBox/DCLROfficial100%

Code of ACL 2022 paper Debiased Contrastive Learning of Unsupervised Sentence Representations

325Python, ShellMay 2, 20224 years ago

Similar Papers

Cite this paper

@article{zhou2022debiased,
  title  = {Debiased Contrastive Learning of Unsupervised Sentence Representations},
  author = {Kun Zhou and Beichen Zhang and Wayne Xin Zhao and Ji-Rong Wen},
  year   = {2022},
  eprint = {2205.00656},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.00656}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.00656.svg)](https://codeofpaper.com/paper/2205.00656)

Discussion