Sentence Embeddings using Supervised Contrastive Learning

06/09/2021
by   Danqi Liao, et al.
0

Sentence embeddings encode sentences in fixed dense vectors and have played an important role in various NLP tasks and systems. Methods for building sentence embeddings include unsupervised learning such as Quick-Thoughts and supervised learning such as InferSent. With the success of pretrained NLP models, recent research shows that fine-tuning pretrained BERT on SNLI and Multi-NLI data creates state-of-the-art sentence embeddings, outperforming previous sentence embeddings methods on various evaluation benchmarks. In this paper, we propose a new method to build sentence embeddings by doing supervised contrastive learning. Specifically our method fine-tunes pretrained BERT on SNLI data, incorporating both supervised crossentropy loss and supervised contrastive loss. Compared with baseline where fine-tuning is only done with supervised cross-entropy loss similar to current state-of-the-art method SBERT, our supervised contrastive method improves 2.8 Similarity (STS) benchmarks and 1.05 tasks.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/18/2023

D2CSE: Difference-aware Deep continuous prompts for Contrastive Sentence Embeddings

This paper describes Difference-aware Deep continuous prompt for Contras...
research
05/26/2023

Three Towers: Flexible Contrastive Learning with Pretrained Image Models

We introduce Three Towers (3T), a flexible method to improve the contras...
research
05/10/2023

LACoS-BLOOM: Low-rank Adaptation with Contrastive objective on 8 bits Siamese-BLOOM

Text embeddings are useful features for several NLP applications, such a...
research
03/10/2023

Contrastive Language-Image Pretrained (CLIP) Models are Powerful Out-of-Distribution Detectors

We present a comprehensive experimental study on pretrained feature extr...
research
10/20/2022

Apple of Sodom: Hidden Backdoors in Superior Sentence Embeddings via Contrastive Learning

This paper finds that contrastive learning can produce superior sentence...
research
10/27/2022

Dictionary-Assisted Supervised Contrastive Learning

Text analysis in the social sciences often involves using specialized di...
research
03/25/2021

BERT4SO: Neural Sentence Ordering by Fine-tuning BERT

Sentence ordering aims to arrange the sentences of a given text in the c...

Please sign up or login with your details

Forgot password? Click here to reset