FPC : Fine-tuning with Prompt Curriculum for Relation Extraction (2022)

Abstract: The current classification methods for relation extraction (RE) generally utilize pre-trained language models (PLMs) and have achieved superior results. However, such methods directly treat relation labels as class numbers, therefore they ignore the semantics of relation labels. Recently, prompt-based fine-tuning has been proposed and attracted much attention. This kind of methods insert templates into the input and convert the classification task to a (masked) language modeling problem. With this inspiration, we propose a novel method Fine-tuning with Prompt Curriculum (FPC) for RE, with two distinctive characteristics: the relation prompt learning, introducing an auxiliary prompt-based fine-tuning task to make the model capture the semantics of relation labels; the prompt learning curriculum, a fine-tuning procedure including an increasingly difficult task to adapt the model to the difficult multi-task setting. We have conducted extensive experiments on four widely used RE benchmarks under fully supervised and low-resource settings. The experimental results show that FPC can significantly outperform the existing methods and obtain the new state-of-the-art results.

## introduction as one of the essential tasks in natural language processing (nlp), relation extraction (re) intends to extract relational facts hidden in text. figure 1 shows the typical re setting: a sentence with two marked entities ("tesla" and "elon musk") is input into a model to classify the relation (founded by) between the entities. structured knowledge captured by re can benefit many downstream applications such as knowledge graph completion @xcite , dialogue systems @xcite and question answering @xcite . as the mainstream of re, the classification methods extract semantic features from text to form * corresponding author sentence: elon musk is known for co-founding tesla . on the contrary, the reformulation methods can improve the deficiency by intuitively transform re into other tasks such as question answering (qa) @xcite . for example, some questions are designed based on relational semantics and a qa model is utilized to produce answers. promptbased fine-tuning @xcite is a new kind of reformulation method which is originated from gpt-3 @xcite and has attracted much attention. this kind of methods insert templates into the input and convert the classification task to a (masked) language modeling problem. for example, in a binary sentiment classification task, we use a template t (•) = "• it is @xcite ." and a set of label words @xmath0, "terrible"...}. each instance is modified by the template and then input into the plm to produce the probability of the label words to fill the masked token(s). there is a mapping function (verbalizer) that links the label words to the specific classes m : @xmath1. therefore the probability distribution over y can be formalized with the probability distribution over v. inspired by this, we propose a novel method fine-tuning with prompt curriculum (fpc) for re, with the following two distinctive characteristics: the relation prompt learning introduces an auxiliary prompt-based fine-tuning task to the classification model, aiming to make the model capture the semantics of relation labels. we manually design a template with language words and consecutive mask tokens ([mask]), which can "enquire" the relation expressed by the input. the words of relation labels are directly used with a little modification to form the prediction targets for the mask tokens. we insert the template into each instance to bring a cloze-style auxiliary task to the model. provided the new input, the model is fine-tuned to classify relation labels and fill the mask tokens with the target word tokens through masked language modeling (mlm) simultaneously. the prompt learning curriculum is a fine-tuning procedure including an increasingly difficult task. this task-level curriculum helps the model to build the connections between class numbers and the prediction targets of the cloze-style auxiliary task. we design an "easy" sub-task where a part of instances directly shows the prediction targets. all instances are divided into two types: "mask" and "unmask". while "mask" instances are in the original input format as described above, "unmask" instances are formed by replacing the mask tokens with the corresponding prediction targets. during fine-tuning, the proportion of "mask" instances gradually increases, which should be low at the beginning and become 100% before the end. as the number of instances showing the prediction targets decreases, the sub-task gradually becomes "harder" and finally turns into the target task, which adapts the model to the multi-task setting. in summary, the contributions of our work are concluded as follows: ## method this section presents the common way to fine-tune plms for re and describes our proposed method fine-tuning with prompt curriculum (fpc). ## conclusion in this paper, we propose a novel method finetuning with prompt curriculum (fpc) for re. the relation prompt learning introduces the cloze-style auxiliary task, through which the model can capture the semantics of relation labels. the prompt learning curriculum makes the model adapt to the multi-task setting by learning the increasingly difficult sub-task, which makes the model build the connection between the targets of classification and mlm. extensive experiments have been conducted on four popular re benchmarks. the results show that fpc achieves the new state-of-the-art performance for fully supervised re and the competitive or best performance for low-resource re.