Learning to Decouple Relations: Few-Shot Relation Classification with Entity-Guided Attention and Confusion-Aware Training (2020)

Abstract: This paper aims to enhance the few-shot relation classification especially for sentences that jointly describe multiple relations. Due to the fact that some relations usually keep high co-occurrence in the same context, previous few-shot relation classifiers struggle to distinguish them with few annotated instances. To alleviate the above relation confusion problem, we propose CTEG, a model equipped with two novel mechanisms to learn to decouple these easily-confused relations. On the one hand, an Entity -Guided Attention (EGA) mechanism, which leverages the syntactic relations and relative positions between each word and the specified entity pair, is introduced to guide the attention to filter out information causing confusion. On the other hand, a Confusion-Aware Training (CAT) method is proposed to explicitly learn to distinguish relations by playing a pushing-away game between classifying a sentence into a true relation and its confusing relation. Extensive experiments are conducted on the FewRel dataset, and the results show that our proposed model achieves comparable and even much better results to strong baselines in terms of accuracy. Furthermore, the ablation test and case study verify the effectiveness of our proposed EGA and CAT, especially in addressing the relation confusion problem.

## introduction relation classification (rc) aims to identify the relation between two specified entities in a sentence. previous supervised approaches on this task heavily depend on human-annotated data, which limit their performance on classifying the relations with insufficient instances. therefore, making the rc models capable of identifying relations with few training instances becomes a crucial challenge. inspired by the success of few-shot learning methods in the computer vision community @xcite @xcite and some other natural language processing tasks @xcite @xcite , @xcite first introduce the few-shot learning to rc task and propose the fewrel dataset. recently, many works focus on this task and achieve remarkable performance @xcite @xcite . previous few-shot relation classifiers perform well on sentences with only one relation of a single entity pair. however, in real natural language, a sentence usually jointly describes multiple relations of different entity pairs. since these relations usually keep high co-occurrence in the same context, previous few-shot rc models struggle to distinguish them with few annotated instances. for example, true relation confusing relation instance parents-child husband-wife she was a daughter of prince wilhelm of baden and his wife princess maria of lichtenberg, as well as an elder sister of prince maximilian. to address the relation confusion problem, it is crucial for a model to be aware of which nl expressions cause confusion and learn to avoid mapping the instance into its easily-confused relation. from these perspectives, we propose two assumptions. firstly, in a sentence, words that keep high relevance to the given entities are more important in expressing the true relation. secondly, explicitly learning of mapping an instance into its confusing relation with augmented data in turn boosts a few-shot rc model on identifying the true relation. based on these assumptions, we propose cteg, a few-shot rc model with two novel mechanisms: (1) an entity-guided attention (ega) encoder, which leverages the syntactic relations and relative positions between each word and the specified entity pair to softly select important information of words expressing the true relation and filter out the information causing confusion. (2) a confusion-aware training (cat) method, which explicitly learns to distinguish relations by playing a pushing-away game between classifying a sentence into a true relation and its confusing relation. in addition, inspired by the success of pre-trained language models, our approaches are based on bert @xcite , which has been proved effective especially for few-shot learning tasks. specifically, the backbone of the encoder of our model is a transformer equipped with the proposed ega which guides the calculation of self-attention distributions by weighting the attention logits with entity-guided gates. the gates are used to measure the relevance between each word and the given two entities. two types of information for each word are used to calculate its gate. one is the relative position @xcite ) information, which is the relative distance between a word and an entity in the input sequence. the other is syntactic relation which is proposed in this paper, defined as the dependency relations between each word and the entities. based on these information, the entity-guided gates in ega are able to select those important words and control the contribution of each word in self-attention. we also propose cat to explicitly force the model to asynchronously learn the classification from an instance to its true relation and its confusing relation. after each training step, the cat first selects those misclassified sentences, and regards the relations they are misclassified into as the confusing relations. after that, the cat uses these misclassified instances and their confusing relations as augmented data to conduct an additional training process, which aims to learn the mapping between these instances into the confusing relations. afterwards, the cat adopts the kl divergence @xcite to teach the model to distinguish the difference between the true and confusing relations, which benefits the true relation classification from the confusing relation identification. the contributions of this paper are summarized as follows: (1) we propose an entity-guided attention encoder, which can select crucial words and filter out nl expressions causing confusion based on their relevance to the specified entities. (2) we propose a confusion-aware training process to enhance the model with the ability of distinguishing true and confusing relations. (3) we conduct extensive experiments on few-shot rc dataset fewrel, ans the results show that our model achieves comparable and even much better results to strong baselines. furthermore, ablation and case studies verify the effectiveness of the proposed ega and cat, especially in addressing the relation confusion problem. ## experiments in this section, we report our experiment results from the following four aspects. we first show the comparison results of our model cteg and baselines on fewrel dataset in section 3.3. we then demonstrate the effectiveness of the proposed entity-gated attention (ega) and confusion-aware training (cat) through the ablation studies in section 3.4. in order to more intuitively and clearly show the role of ega and cat, we show their visualized examples in case study in section 3.5. furthermore, we verify that our model is capable of addressing the relation confusion problem to some extent in section 3.6. ## conclusions in this paper, we propose cteg equipped with two novel mechanisms, namely the entity-guided attention (ega) and the confusion-aware training (cat), to address the relation confusion problem in few-shot relation classification (rc). we conduct extensive experiments on benchmark dataset fewrel, and experiment results shows that our model achieves significant improvements on few-shot rc. ablation studies verify the effectiveness of the proposed ega and cat mechanisms. case study and further analysis demonstrate that our model has the ability of decoupling easily-confused relations.