PromptBERT: Improving BERT Sentence Embeddings with Prompts

Ting Jiang, Jian Jiao, Shaohan Huang, Zihan Zhang, Deqing Wang +5 more
1/12/2022
cs.CL

Official code: kongds/Prompt-BERT (342 stars, Python, last commit 2023-11-22).

Abstract

We propose PromptBERT, a novel contrastive learning method for learning better sentence representation. We firstly analyze the drawback of current sentence embedding from original BERT and find that it is mainly due to the static token embedding bias and ineffective BERT layers.

Show full abstract

Then we propose the first prompt-based sentence embeddings method and discuss two prompt representing methods and three prompt searching methods to make BERT achieve better sentence embeddings. Moreover, we propose a novel unsupervised training objective by the technology of template denoising, which substantially shortens the performance gap between the supervised and unsupervised settings. Extensive experiments show the effectiveness of our method. Compared to SimCSE, PromptBert achieves 2.29 and 2.58 points of improvement based on BERT and RoBERTa in the unsupervised setting.

View on arXivView PDF

Code Implementations(1)

kongds/Prompt-BERTOfficial100%

PromptBERT: Improving BERT Sentence Embeddings with Prompts

34235Python, ShellSep 6, 20213 years ago

Similar Papers

Cite this paper

@article{jiang2022promptbert,
  title  = {PromptBERT: Improving BERT Sentence Embeddings with Prompts},
  author = {Ting Jiang and Jian Jiao and Shaohan Huang and Zihan Zhang and Deqing Wang and Fuzhen Zhuang and Furu Wei and Haizhen Huang and Denvy Deng and Qi Zhang},
  year   = {2022},
  eprint = {2201.04337},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.04337}
}

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

Discussion