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. 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.
翻译:近期,提示调优在特定少样本分类任务中取得了令人瞩目的成果。其核心思想是在输入中插入文本片段(即模板),将分类任务转化为掩码语言建模问题。然而,对于关系抽取而言,确定合适的提示模板需要领域专业知识,且获取恰当的标注词既繁琐又耗时。此外,关系标签间存在不可忽视的丰富语义与先验知识。为此,我们聚焦于将关系标签间的知识融入提示调优,提出一种协同优化的知识感知提示调优方法(KnowPrompt)。具体而言,我们通过可学习的虚拟类型词和答案词,将关系标签中蕴含的潜在知识注入提示构建过程,并借助结构化约束协同优化其表征。在标准设置与低资源设置下的五个数据集上的大量实验结果表明了本方法的有效性。为保障可复现性,我们的代码与数据集已开源至 https://github.com/zjunlp/KnowPrompt。