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

Xiang Chen,Ningyu Zhang,Xin Xie,Shumin Deng,Yunzhi Yao,Chuanqi Tan,Fei Huang,Luo Si,Huajun Chen
DOI: https://doi.org/10.1145/3485447.3511998
2023-09-19
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. 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 <a class="link-external link-https" href="https://github.com/zjunlp/KnowPrompt" rel="external noopener nofollow">this https URL</a> for reproducibility.
Computation and Language,Artificial Intelligence,Information Retrieval,Machine Learning
What problem does this paper attempt to address?
The paper primarily addresses the challenges present in the task of Relation Extraction (RE) and proposes a new method called KnowPrompt. Specifically, the paper attempts to solve the following issues: 1. **Difficulty in Template Construction**: Determining appropriate prompt templates suitable for the relation extraction task requires domain expertise, and constructing high-performance prompts often incurs additional computational costs. 2. **High Complexity in Label Word Search**: When the length of relation labels varies, finding target label words in the vocabulary to represent specific relation labels is very complex, especially when the number of categories is large. 3. **Ignoring Semantic Knowledge**: There is rich semantic and structural knowledge among relation labels, which is overlooked in traditional prompt tuning methods. To address the above issues, the authors propose a method called **KnowPrompt**, which is a knowledge-injected prompt tuning method that introduces a collaborative optimization strategy. Specifically, it includes the following aspects: - **Knowledge Injection**: Prompts are constructed through learnable virtual answer words and virtual type words to alleviate the cumbersome manual prompt engineering. Virtual answer words are used to represent relation labels, while virtual type words hold role information around entities, similar to a weakened version of type markers. - **Collaborative Optimization**: To ensure that virtual type words and answer words are associated with the surrounding context, a collaborative optimization method is introduced. This method uses implicit structural constraints to optimize these virtual words, thereby better reflecting the semantic information of entity types and relations. Experimental results show that KnowPrompt not only performs excellently on standard datasets but also demonstrates significant advantages in low-resource settings, particularly in cases with fewer samples, compared to other baseline methods. This indicates that KnowPrompt can effectively utilize limited data to enhance the model's performance.