Knowledgeable Prompt-tuning: Incorporating Knowledge into Prompt Verbalizer for Text Classification

Shengding Hu, Ning Ding, Huadong Wang, Zhiyuan Liu, Jingang Wang +3 more
8/4/2021
460 citations
cs.CL
lora-peft-merging

Official code: thunlp/KnowledgeablePromptTuning (207 stars, Python, last commit 2023-04-16).

Abstract

Tuning pre-trained language models (PLMs) with task-specific prompts has been a promising approach for text classification. Particularly, previous studies suggest that prompt-tuning has remarkable superiority in the low-data scenario over the generic fine-tuning methods with extra classifiers.

Show full abstract

The core idea of prompt-tuning is to insert text pieces, i.e., template, to the input and transform a classification problem into a masked language modeling problem, where a crucial step is to construct a projection, i.e., verbalizer, between a label space and a label word space. A verbalizer is usually handcrafted or searched by gradient descent, which may lack coverage and bring considerable bias and high variances to the results. In this work, we focus on incorporating external knowledge into the verbalizer, forming a knowledgeable prompt-tuning (KPT), to improve and stabilize prompt-tuning. Specifically, we expand the label word space of the verbalizer using external knowledge bases (KBs) and refine the expanded label word space with the PLM itself before predicting with the expanded label word space. Extensive experiments on zero and few-shot text classification tasks demonstrate the effectiveness of knowledgeable prompt-tuning.

View on arXivView PDF

Code Implementations(1)

kpt code

20724Python, ShellSep 13, 20213 years ago

Similar Papers

Cite this paper

@article{hu2021knowledgeable,
  title  = {Knowledgeable Prompt-tuning: Incorporating Knowledge into Prompt Verbalizer for Text Classification},
  author = {Shengding Hu and Ning Ding and Huadong Wang and Zhiyuan Liu and Jingang Wang and Juanzi Li and Wei Wu and Maosong Sun},
  year   = {2021},
  eprint = {2108.02035},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.02035}
}

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

Discussion