Self-Guided Contrastive Learning for BERT Sentence Representations

Taeuk Kim, Kang Min Yoo, Sang-goo Lee
6/3/2021
cs.CLcs.AI
contrastive-ssl

Official code: galsang/SG-BERT (27 stars, Python, last commit 2022-06-09).

Abstract

Although BERT and its variants have reshaped the NLP landscape, it still remains unclear how best to derive sentence embeddings from such pre-trained Transformers. In this work, we propose a contrastive learning method that utilizes self-guidance for improving the quality of BERT sentence representations.

Show full abstract

Our method fine-tunes BERT in a self-supervised fashion, does not rely on data augmentation, and enables the usual [CLS] token embeddings to function as sentence vectors. Moreover, we redesign the contrastive learning objective (NT-Xent) and apply it to sentence representation learning. We demonstrate with extensive experiments that our approach is more effective than competitive baselines on diverse sentence-related tasks. We also show it is efficient at inference and robust to domain shifts.

View on arXivView PDF

Code Implementations(1)

galsang/SG-BERTOfficial100%

Official Implementation for "Self-Gudied Contrastive Learning for BERT Sentence Representations (ACL 2021)"

275PythonMay 11, 20214 years ago

Similar Papers

Cite this paper

@article{kim2021selfguided,
  title  = {Self-Guided Contrastive Learning for BERT Sentence Representations},
  author = {Taeuk Kim and Kang Min Yoo and Sang-goo Lee},
  year   = {2021},
  eprint = {2106.07345},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.07345}
}

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/2106.07345.svg)](https://codeofpaper.com/paper/2106.07345)

Discussion