KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction

Xiang Chen, Ningyu Zhang, Xin Xie, Shumin Deng, Yunzhi Yao +4 more
4/15/2021
cs.CLcs.AIcs.IR
lora-peft-merging

Official code: zjunlp/KnowPrompt (207 stars, Python, MIT, PyTorch, last commit 2023-06-20).

Abstract

Recently, prompt-tuning has achieved promising results for specific few-shot classification tasks. The core idea of prompt-tuning is to insert text pieces (i.e., templates) into the input and transform a classification task into a masked language modeling problem.

Show full abstract

However, for relation extraction, determining an appropriate prompt template requires domain expertise, and it is cumbersome and time-consuming to obtain a suitable label word. Furthermore, there exists abundant semantic and prior knowledge among the relation labels that cannot be ignored. To this end, we focus on incorporating knowledge among relation labels into prompt-tuning for relation extraction and propose a Knowledge-aware Prompt-tuning approach with synergistic optimization (KnowPrompt). Specifically, we inject latent knowledge contained in relation labels into prompt construction with learnable virtual type words and answer words. Then, we synergistically optimize their representation with structured constraints. Extensive experimental results on five datasets with standard and low-resource settings demonstrate the effectiveness of our approach. Our code and datasets are available in https://github.com/zjunlp/KnowPrompt for reproducibility.

View on arXivView PDF

Code Implementations(1)

zjunlp/KnowPromptOfficial100%
PyTorchMIT

[WWW 2022] KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction

20735Python, ShellOct 21, 20213 years agoMIT
datasetdialogrefew-shot-learningknowledge-informed-prompt-learningknowprompt+9 more

Similar Papers

Cite this paper

@article{chen2021knowprompt,
  title  = {KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction},
  author = {Xiang Chen and Ningyu Zhang and Xin Xie and Shumin Deng and Yunzhi Yao and Chuanqi Tan and Fei Huang and Luo Si and Huajun Chen},
  year   = {2021},
  eprint = {2104.07650},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.07650}
}

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

Discussion