Weakly-Supervised Questions for Zero-Shot Relation Extraction (2023)

Abstract: Zero-Shot Relation Extraction (ZRE) is the task of Relation Extraction where the training and test sets have no shared relation types. This very challenging domain is a good test of a model’s ability to generalize. Previous approaches to ZRE reframed relation extraction as Question Answering (QA), allowing for the use of pre-trained QA models. However, this method required manually creating gold question templates for each new relation. Here, we do away with these gold templates and instead learn a model that can generate questions for unseen relations. Our technique can successfully translate relation descriptions into relevant questions, which are then leveraged to generate the correct tail entity. On tail entity extraction, we outperform the previous state-of-the-art by more than 16 F1 points without using gold question templates. On the RE-QA dataset where no previous baseline for relation extraction exists, our proposed algorithm comes within 0.7 F1 points of a system that uses gold question templates. Our model also outperforms the state-of-the-art ZRE baselines on the FewRel and WikiZSL datasets, showing that QA models no longer need template questions to match the performance of models specifically tailored to the ZRE task. Our implementation is available at https://github.com/fyshelab/QA-ZRE .

## introduction building models that capture abstract knowledge rather than just memorizing data is one of the inspirations for zero-shot benchmarks @xcite . in order to test a model's ability to extract higher-level knowledge, these benchmarks measure performance on data unlike what is seen during training. for example, in zero-shot relation extraction (zre), a model trained to extract the name of a company's ceo should be able to extract the name of a country's political leader at test time. in zre, the test relations do not appear in the training data, so one cannot apply typical relation classification approaches. one method for zre is to reframe the task as a question-answering (qa) problem by manually creating question templates for each relation type. extracting the tail entity is accomplished by finding the answer span for the corresponding question template @xcite . however, this method requires gold question templates ahead of time. here we ask, is it possible to leverage qa systems without annotating relations with gold question templates? we treat zre as a tail entity generation task for which we consider the dual training of question and answer generators. we create question and answer generators by pre-training the publicly available t5 models @xcite on qa corpora, and then fine-tune for zre within our proposed learning framework. we investigate four training objectives based on marginal maximum likelihood (mml) optimization, and suggest an off-policy sampling technique to avoid ungrammatical spurious questions in the search space. our experiments show that our off-policy sampling technique is critical for creating semantically relevant questions. for zre, we show that our weakly-supervised questions produce a model with competitive f1 score of 65.4 compared to the f1 score of 66.1 achieved by using gold question templates. our contributions can be summarized as the following: ## problem formulation in this work, we train models to extract facts from unstructured text. facts are represented as triplets (e 1 , r, e 2 ) where e 1 is the head entity, e 2 is the tail entity, and r is the relation keywords. we explore relation extraction @xcite , which is the task of predicting r when e 1 and e 2 are known, and tail entity extraction (te), which is the task of predicting e 2 when e 1 and r are known. we begin with te, for which we learn p (e 2 |c, e 1 , r): the distribution of the tail entity conditioned on an unstructured text context c, head entity, and the relation keywords. we investigate how to transfer models pre-trained on qa corpora to the task of te by estimating p (e2|c, e1, r). with a gold natural question q * , which semantically includes the information about both of the head entity e 1 and the relation words r, we can optimize p (e2|c, q * ) to fine-tune any answer generation model on re datasets foot_0 . in cases where we do not have gold question templates, we can define a simple baseline using a pseudo question q pseudo , which is the string concatenation of the head entity e 1 and the relation words r. we then can fine-tune a pre-trained qa model on re datasets by directly optimizing the objective p (e2|c, q pseudo ). to transfer the models pre-trained on qa corpora to the task of te, we can provide a natural question for the given head entity and the relation keywords. however, providing question templates for every relation type is infeasible. we explore the idea of generating questions semantically relevant to the given input context, relation and the head entity. therefore, we marginalize the joint distribution p (e 2 , q|c, e 1 , r) with respect to the unobserved questions q to learn the tail entity generator: p (e 2 |c, e 1 , r) = q p (e 2 , q|c, e 1 , r). as illustrated by figure 1 , we factorize p (e 2 , q|c, e 1 , r) as the following equation where θ q and θ a are respectively the parameters of the question and answer generation modules: for example, given a context biography about the person "donald trump" and the relation keywords "place of birth," we would use p θ q to first generate the question "where was donald trump born?" and then the answer module p θ a can generate the response "new york." we then re-purpose this te model for the task of re. whether we train the tail entity generator p (e 2 |c, e 1 , r) with gold, pseudo, or generated questions, we perform the re task by scoring every possible relation of the test data and choosing the highest scoring relation: @xmath0, e 1 , r) ## methods in this section we discuss the pre-training steps for the question and answer modules and then explore combinations of four training objectives based on maximizing the marginal likelihood of equation 1. finally, we introduce off-policy sampling and summarize the search algorithms used during training and test phases. ## conclusion this work introduces the offmml-g training objective to fine-tune the question and answer generators for re. our method generates semantically relevant questions for the answer module given the head entity and the relationship keywords. we demonstrated that with these weakly-supervised questions, one could fine-tune qa models on the re corpora, achieving competitive results in detecting unseen relations. our future direction would deploy the technique on document-level entityrelation extraction, further exploiting the inference capabilities of qa models.