M atch P rompt: Prompt-based Open Relation Extraction with Semantic Consistency Guided Clustering (2022)

Abstract: Relation clustering is a general approach for open relation extraction (OpenRE). Current methods have two major problems. One is that their good performance relies on large amounts of labeled and pre-defined relational instances for pre-training, which are costly to acquire in reality. The other is that they only focus on learning a high-dimensional metric space to measure the similarity of novel relations and ignore the specific relational representations of clusters. In this work, we propose a new prompt-based framework named MatchPrompt, which can realize OpenRE with efficient knowledge transfer from only a few pre-defined relational instances as well as mine the specific meanings for cluster interpretability. To our best knowledge, we are the first to introduce a prompt-based framework for unlabeled clustering. Experimental results on different datasets show that MatchPrompt achieves the new SOTA results for OpenRE.

## introduction relation extraction (re) is one of the most essential technology for knowledge graph construction @xcite . it aims to detect the relation between two entities in a sentence. for example, when given the entity pair (san diego, the united states) in the sentence san diego is located in the united states, a relation extraction model should predict the relation located in between these two entities. despite traditional re models having achieved great success @xcite , they are designed based on pre-defined relations and are incapable of extracting novel relations in the real world. therefore, open relation extraction (openre) has been proposed to extract relations without pre-defined types from the open-domain corpus. methods for openre can be divided into emma has been married to polanski for years. mlm head emma emperor wu polanski labeled sentences unlabeled sentences template template spouse relation type spouse relation type label words married partner ... label words married partner ... [mask] her sister yang yan was emperor wu's wife yang yan emperor wu template unlabeled sentences [mask] her sister yang yan was emperor wu's wife yang yan emperor wu template unlabeled sentences match mlm head mlm head match mlm head mlm head two categories based on the form of extracted novel relations. the former is called open information extraction (oie) @xcite , which requires the relational information to appear explicitly and extracts relation-related phrases from sentences based on structure and syntactic analysis. the latter is unsupervised relation discovery, which generally clusters sentences into collections based on their semantic similarities, and regards each cluster as a relation. considering that relations are usually implicit in sentences and it is difficult to align different phrases that have the same meaning, thus much attention has been paid to the latter category. specifically, @xcite proposes an adaptive clustering method for novel relation discovery. @xcite introduces a discriminative training scheme to extract novel relations. however, these methods @xcite @xcite @xcite are totally trained in unsupervised settings that ignore the transferable knowledge in existing pre-defined relations and have limited performance @xcite . to this end, @xcite and @xcite learn transferable knowledge from pre-defined relations for novel relation clustering and achieve relatively good performance. but they rely on large amounts of labeled and pre-defined relational instances for pre-training which are costly to acquire in reality. in addition, all these clustering-based methods have a major problem of poor interpretability, that is, they only focus on learning a highdimensional metric space to measure the similarity of novel relations and do not care about relation specifics (e.g., words or phrases related to the relation). actually, we prefer clusters to have specific relational meanings to satisfy the purpose of re better. therefore, it is expected to realize openre with efficient knowledge transfer from a few pre-defined relational instances and to mine the specific meanings of clusters as much as possible. prompt-based learning @xcite @xcite has been proposed as a new paradigm with the potential to solve the above problems. as shown in fig. 1(a) , for traditional re, a typical prompt-based method first wraps sentence s 1 into a template (e.g., "< s 1 >yang yan [mask] emperor wu") and construct a set of label words (e.g., "married" and "partner"). then it utilizes pre-trained language models (plms) to predict the probability of each word filling the [mask] token and maps the word with maximum probability back to relation categories. this process can achieve good performance with a few labeled data @xcite and provides the natural conditions for transforming high-dimensional features into words with specific meanings. this motivated us to formalize openre as a form of prompt-based learning. in this paper, we propose a prompt-based framework, matchprompt, for openre. different from the prompt-based traditional re paradigm, there are no pre-defined relations in the open domain, thus we cannot construct label words set for openre directly. inspired by the underlying assumptions of openre are that relational instances can form clusters and instances from the same cluster should have similar semantics and share the same relation label @xcite , as illustrated in fig. 1 (b), we devise a matching strategy to drive prompt learning in the open domain, i.e., if different entity pairs from two sentences express the same relation, the semantic features of @xcite in their templates should be matching. additionally, three modules are designed to enable match-prompt generate efficient relational representations during training. first, the pre-training and knowledge transfer module leverages a few pre-defined relational instances to activate templates to produce relation-aware representations in [mask] tokens. second, the semantic consistency guided clustering module selects reliable pseudo-labels for clustering loss computation of unlabeled instances. third, the semantic consistency regularization module encourages matchprompt to maintain the robustness of feature predictions in [mask] tokens. on the one hand, matchprompt can achieve better knowledge transfer with only a few pre-defined relational instances for novel relation clustering, which reduces the cost of pre-training with large amounts of predefined and labeled data. on the other hand, it obtains representations of novel relations by [mask] tokens, which are easily converted into the specific meanings of relations, making clusters more comprehensible. to summarize, the main contributions of our work are as follows: (1) we develop a novel prompt-based framework matchprompt which enables the model to learn clustering novel relational instances. to our best knowledge, we are the first to introduce a prompt-based framework for unlabeled clustering. (2) the proposed model can generate efficient representations for instances in the open domain. these representations can also provide a basis for judging the specific relational words of clusters. (3) experimental results show that match-prompt has a competitive performance with only 10% of pre-defined relational instances for model pre-training compared to the current sota method, which requires 100% of these data for pre-training. ## background define a relational example as a tuple: w, h, t , where