Skip to main navigation Skip to search Skip to main content

PromptBERT: Improving BERT Sentence Embeddings with Prompts

  • Ting Jiang
  • , Jian Jiao
  • , Shaohan Huang
  • , Zihan Zhang
  • , Deqing Wang*
  • , Fuzhen Zhuang
  • , Furu Wei
  • , Haizhen Huang
  • , Denvy Deng
  • , Qi Zhang
  • *Corresponding author for this work
  • Beihang University
  • Microsoft USA
  • Zhongguancun Laboratory

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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. 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. Our code is available at https://github.com/kongds/Prompt-BERT.

Original languageEnglish
Title of host publicationProceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022
EditorsYoav Goldberg, Zornitsa Kozareva, Yue Zhang
PublisherAssociation for Computational Linguistics (ACL)
Pages8826-8837
Number of pages12
ISBN (Electronic)9781959429401
DOIs
StatePublished - 2022
Event2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022 - Hybrid, Abu Dhabi, United Arab Emirates
Duration: 7 Dec 202211 Dec 2022

Publication series

NameProceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022

Conference

Conference2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022
Country/TerritoryUnited Arab Emirates
CityHybrid, Abu Dhabi
Period7/12/2211/12/22

Fingerprint

Dive into the research topics of 'PromptBERT: Improving BERT Sentence Embeddings with Prompts'. Together they form a unique fingerprint.

Cite this