H i URE : Hierarchical Exemplar Contrastive Learning for Unsupervised Relation Extraction (2022)

Abstract: Unsupervised relation extraction aims to extract the relationship between entities from natural language sentences without prior information on relational scope or distribution. Existing works either utilize self-supervised schemes to refine relational feature signals by iteratively leveraging adaptive clustering and classification that provoke gradual drift problems, or adopt instance-wise contrastive learning which unreasonably pushes apart those sentence pairs that are semantically similar. To overcome these defects, we propose a novel contrastive learning framework named HiURE, which has the capability to derive hierarchical signals from relational feature space using cross hierarchy attention and effectively optimize relation representation of sentences under exemplar-wise contrastive learning. Experimental results on two public datasets demonstrate the advanced effectiveness and robustness of HiURE on unsupervised relation extraction when compared with state-of-the-art models.

## introduction relation extraction (re) aims to discover the semantic (binary) relation that holds between two entities from plain text. for instance, "kissel head was born in adrian tail ...", we can extract a relation /people/person/place_of_birth between the two head-tail entities. the extracted relations could be used in various downstream applications such as information retrieval @xcite , question answering @xcite , and dialog systems @xcite . existing re methods can achieve decent results with manually annotated data or human-curated knowledge bases. while in practice, human annotation can be labor-intensive to obtain and hard to scale up to newly created relations. lots of efforts are devoted to alleviating the impact of human annotations in relation extraction. unsupervised relation extraction (ure) is especially promising since it does not require any prior information on relation scope and distribution. the main challenge in ure is how to cluster semantic information of sentences in the relational feature space. @xcite adopted skewness and dispersion losses to enforce the relation classifier to be confident in the relational feature prediction and ensure all relation types can be predicted averagely in a minibatch. but it still requires the exact number of relation types in advance, and the relation classifier could not be improved by obtained clustering results. @xcite encoded relational feature space in a self-supervised method that bootstraps relational feature signals by leveraging adaptive clustering and classification iteratively. nonetheless, like other self-training methods, the noisy clustering results will iteratively result in the model deviating from the global minima, which is also known as the gradual drift problem @xcite . @xcite leveraged contrastive learning to obtain a flat metric for sentence similarity in a relational feature space. however, it only considers the relational semantics in the feature space from an instance perspective, which will treat each sentence as an independent data point. as scaling up to a larger corpus with potentially more relations in a contrastive learning framework, it becomes more frequent that sentence pairs sharing similar semantics are undesirably pushed apart in a flat relational feature space. meanwhile, we observe that many relation types can be organized in a hierarchical structure. for example, the relations /people/person/place_of_birth and /people/family/country share the same parent semantic on /people, which means that they belong to the same semantic cluster from @xcite derek bell @xcite was born in [ts] belfast [te] . [hs] derek bell [he] was born in [ts] belfast [te] . …. propulsion encoder 𝑓 ! ! momentum encoder 𝑓 ! hierarchical exemnce back propagation hpc algorithm deep transformer (bert) [cls] [span1] [hs] [entity1] [he] [span2]… …[spank] … … [ts] [entity2] [te] [spanp] [sep] a hierarchical perspective. unfortunately, these two relations will be pushed away from each other in an instance-wise contrastive learning framework. therefore, our intuitive approach is to alleviate the dilemma of similar sentences being pushed apart in contrastive learning by leveraging the hierarchical cluster semantic structure of sentences. nevertheless, traditional hierarchical clustering methods all suffer from the gradual drift problem. thereby, we try to exploit a new approach of hierarchical clustering by combining propagation clustering and attention mechanism. we first define exemplar as a representative instance for a group of semantically similar sentences in certain clustering results. exemplars can be in different granularities and organized in a hierarchical structure. in order to enforce relational features to be more similar to their corresponding exemplars in all parent granularities than others, we propose hiure, a novel contrastive learning framework for ure that combines both the instance-wise and exemplarwise learning strategies, to gather more reasonable relation representations and better classification results. the proposed hiure model is composed of two modules: contextualized relation encoder and hierarchical exemplar contrastive learning. as shown in figure 1 , the encoder module leverages the pre-trained bert model to obtain two augmented entity-level relational features of each sentence for instance-wise contrastive learning, while the learning module retrieves hierarchical exemplars in a top-down fashion for exemplar-wise contrastive learning and updates the features of sentences iteratively according to the hierarchy. these updated features could be utilized to optimize the parameters of encoders by a combined loss function noted as hierarchical exemnce (hince) in this work. to summarize, the main contributions of this paper are as follows: ## proposed model the proposed model hiure consists of two modules: contextualized relation encoder and hierarchical exemplar contrastive learning. as illustrated in figure 1 , the encoder module takes natural language sentences as input, where named entities are recognized and marked in advance, then employs the pre-trained bert @xcite model to output two contextualized entity-level feature sets h and h ′ for each sentence based on random span. the learning module takes these features as input, and aims to retrieve exemplars that represent a group of semantically similar sentences in different granularities, denoted as c. we leverage these exemplars to iteratively update relational features of sentences in a hierarchy and construct an exemplar-wise contrastive learning loss called hierarchical exemnce which enforces the relational feature of a sentence to be more similar to its corresponding exemplars than others. ## experiments we conduct extensive experiments on real-world datasets to prove the effectiveness of our model for unsupervised relation extraction tasks and give a detailed analysis of each module to show the advantages of hiure. implementation details and evaluation metrics are illustrated in appendix a and b respectively. ## related work unsupervised relation extraction has received attention recently @xcite @xcite , due to the ability to discover relational knowledge without access to annotations or external resources. unsupervised models either 1) cluster the relation features extracted from the sentence, or 2) make more assumptions as learning signals to discover better relational representations. among clustering models, an important milestone is the self-supervised learning approach @xcite @xcite , assuming the cluster assignments as pseudolabels and a classification objective is optimized. however, these works heavily rely on a frequently re-initialized linear classification layer which interferes with representation learning. @xcite proposes online deep clustering that performs clustering and network update simultaneously rather than alternatingly to tackle this concern, however, the noisy pseudo labels still affect feature clustering when updating the network @xcite @xcite . inspired by the success of contrastive learning in computer vision tasks @xcite @xcite , instance-wise contrastive learning in information extraction tasks @xcite , and large pre-trained language models that show great potential to encode meaningful semantics for various downstream tasks @xcite @xcite , we proposed a hierarchical exemplar contrastive learning schema for unsupervised relation extraction. it has the advantages of supervised learning to capture high-level semantics in the relational features instead of exploiting base-level sentence differences to strengthen discriminative power and also keeps the advantage of unsupervised learning to handle the cases where the number of relations is unknown in advance. ## conclusion in this paper, we propose a contrastive learning framework model hiure for unsupervised relation extraction. different from conventional selfsupervised models which either endure gradual drift or perform instance-wise contrastive learning without considering hierarchical relation structure, our model leverages hpc to obtain hierarchical exemplars from relational feature space and further utilizes exemplars to hierarchically update relational features of sentences and is optimized by performing both instance and exemplar-wise contrastive learning through hince and propagation clustering iteratively. experiments on two public datasets show the effectiveness of hiure over competitive baselines.