Eliciting Knowledge from Pretrained Language Models for Prototypical Prompt Verbalizer

Yinyi Wei, Tong Mo, Yongtao Jiang, Weiping Li, Wen Zhao
1/14/2022
cs.CL
lora-peft-merging

Official code: Ydongd/prototypical-prompt-verbalizer (19 stars, Python, last commit 2022-01-13).

Abstract

Recent advances on prompt-tuning cast few-shot classification tasks as a masked language modeling problem. By wrapping input into a template and using a verbalizer which constructs a mapping between label space and label word space, prompt-tuning can achieve excellent results in zero-shot and few-shot scenarios.

Show full abstract

However, typical prompt-tuning needs a manually designed verbalizer which requires domain expertise and human efforts. And the insufficient label space may introduce considerable bias into the results. In this paper, we focus on eliciting knowledge from pretrained language models and propose a prototypical prompt verbalizer for prompt-tuning. Labels are represented by prototypical embeddings in the feature space rather than by discrete words. The distances between the embedding at the masked position of input and prototypical embeddings are used as classification criterion. For zero-shot settings, knowledge is elicited from pretrained language models by a manually designed template to form initial prototypical embeddings. For few-shot settings, models are tuned to learn meaningful and interpretable prototypical embeddings. Our method optimizes models by contrastive learning. Extensive experimental results on several many-class text classification datasets with low-resource settings demonstrate the effectiveness of our approach compared with other verbalizer construction methods. Our implementation is available at https://github.com/Ydongd/prototypical-prompt-verbalizer.

View on arXivView PDF

Code Implementations(1)

193PythonJan 13, 20224 years ago

Similar Papers

Cite this paper

@article{wei2022eliciting,
  title  = {Eliciting Knowledge from Pretrained Language Models for Prototypical Prompt Verbalizer},
  author = {Yinyi Wei and Tong Mo and Yongtao Jiang and Weiping Li and Wen Zhao},
  year   = {2022},
  eprint = {2201.05411},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.05411}
}

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

Discussion