Relation Extraction with Explanation (2020)

Abstract: Recent neural models for relation extraction with distant supervision alleviate the impact of irrelevant sentences in a bag by learning importance weights for the sentences. Efforts thus far have focused on improving extraction accuracy but little is known about their explanability. In this work we annotate a test set with ground-truth sentence-level explanations to evaluate the quality of explanations afforded by the relation extraction models. We demonstrate that replacing the entity mentions in the sentences with their fine-grained entity types not only enhances extraction accuracy but also improves explanation. We also propose to automatically generate “distractor” sentences to augment the bags and train the model to ignore the distractors. Evaluations on the widely used FB-NYT dataset show that our methods achieve new state-of-the-art accuracy while improving model explanability.

## introduction relation extraction with distant supervision associates a pair of entities with a bag of sentences, each containing mentions of both entities. the bag is tagged with relations between the pair in a knowledge base (kb), without explicitly indicating which sentence(s) support the relation(s). this method avoids the burden of manual annotations, but presents inherent ambiguity, creating challenges for learning. to alleviate the impact of the irrelevant sentences many approaches have been proposed including models based on attention @xcite @xcite @xcite @xcite , approaches that use additional resources @xcite and methods that utilize supervision data @xcite @xcite . these studies primarily focus on improving relation extraction accuracy and little is known about whether the models are making right decision for the right reason or because of some irrelevant biases @xcite @xcite . this paper examines two strong baseline relation extraction models with several explanation mechanisms. we manually annotated a test set from the widely used fb-nyt dataset with ground truth explanations to evaluate the quality of the explanation afforded by these models. we also introduce two different methods for improving relation extraction. first, we demonstrate that replacing the entity mentions with their fine-grained entity types for sentence representation leads to improvement in both the extract accuracy and model explainability. second, we augment the bags with automatically generated "distractor" sentences (i.e., sentences that contain no supporting information for the relation) and train the model to appropriately ignore the irrelevant information. our evaluation on the widely used fb-nyt dataset verifies that the proposed methods achieve the new state of the art for the extraction performance along with improved model explainability. ## problem setup given entity pair (e i , e j ), we form a bag b i,@xmath0, . . . s n ij } with n ij sentences that contain mentions of both entities and label it by the set of relations between e i and e j from the kb. neural models for relation extraction encode each sentences into a vector representation and a bag b i,j is thus represented by {x 1 , . . . x n ij } where given a set of bags and the associated labels, the training objective is to learn a model that predicts the probability p (@xmath1,j ) that relation k exists between e i and e j based on b i,j , where @xmath2. . . k and k is the total number of relations in the kb. there are zero to multiple possible relation labels for each bag. importantly, only some sentences in the bag express any of the relations and the others are irrelevant (provide no information regarding the relations), but such sentences are not labeled. ## baseline models we consider two baselines. the first is directsup, a recent model achieving the state-of-the-art performance by utilizing auxiliary supervision @xcite . the second baseline (cnns+att) revamps the classic attention based method by @xcite but adopts the same sentence encoder as directsup for ease of comparisons. in this work, we add a relu at the end of the sentence encoder @xcite to produce positive sentence representations. see @xcite ) for detailed information regarding the sentence encoder. directsup. given a bag of sentences, directsup encodes each sentence using cnns with different filter sizes. the outputs of the cnns with different filter sizes are concatenated to produce the encoding of the sentence. given a bag b and the encoding of its sentences {x 1 , x 2 , ..., x n }, directsup assigns an importance weight for each sentence based on the output of a binary classifier learned from an additional direct supervision data in a multi-task manner. given a sentence encoding x n , the binary classifier provides a weight α @xmath3, 1] indicating the likelihood that x n expresses some form of relations in the kb. as a result, for a bag b i,j , we have importance weights {α 1 , . . . , α n }. it then produces a single bag representation as follows: cnns+att. this model uses the same sentence encoder as directsup but differs in the attention mechanism used to decide sentence importance. specifically, it follows @xcite and computes the importance weights of the sentences in bag b with encodings {x 1 , . . . , x n } as follows: ## explanation mechanisms the importance weights (α's, aka attention), generated by the models can be interpreted as explanations. however, recent studies @xcite @xcite have questioned the validity of attention as a faithful explanation of model's behavior. thus we consider the following additional explanation mechanisms: saliency. recent works show that a model's prediction can be explained by examining the input saliency, based on the gradient of the output w.r.t. the inputs @xcite @xcite . we define the saliency of sentence n for relation k, denoted by s xn,k , as the l1 norm of the gradient of relation k logit o k with respect to x n .(appendix. a.1). gradient × input. this is a commonly used measure for input attributions @xcite . we will refer to this measure as gi xn,k , computed as i x n [i] × ∂o k ∂xn [i]. leave one out (loo). this measures the sensitivity of o k to the removal of a sentence. we refer to this measure as loo xn,@xmath4,-n ), where o k,-n is the new logit of relation k after removing sentence x n from its bag. ## proposed methods we propose two different approaches for improving relation extraction. the first method we propose, introduces a subtle change to the representation of the sentences, which lead to higher performance and better explanation quality. we further propose to automatically generate "distractor" sentences and train the model to appropriately ignore them. sentence representation. each sentence in a bag contains entity mentions m i and m j for entities e i and e j respectively. in prior work m i and m j are kept unchanged @xcite . we argue that when entity mentions are used to compute the sentence representation, they provide such rich information that the model may not need to look at the rest of the sentence to deduce a relation. to ensure that our predictions are supported by appropriate sentences, we need to remove this effect. we propose to replace the entity mentions with their fine-grained entity types (fget) @xcite to force the model to identify the relations through the sentences. learning from distractors. prior work studied learning from human provided rationales @xcite @xcite in order to improve model explainability. however, human rationales are expensive to acquire. in this work we propose to learn from automatically generated "distractor" sentences. let b i,j be a positive training bag (contains at least one relation) with entities (e i , e j ) of fget (t i , t j ). let r ij (|r ij | > 1) be the set of annotated relations for b i,j . for each k in r ij , we sample a "distractor" sentence s k from the set of sentences in the training set such that 1) it belongs to a bag whose fget is (t i , t j ) 2) the bag is not annotated with relation label k. if s k is not found this way, we simply choose a random sentence from a random negative bag (bag with no relation). given s k , we replace its entity mentions with e i and e j (or t i and t j for fget-based sentence representation) of a sentence in b i,j and add it to the bag, resulting in an augmented bag b i,j for relation k. to learn from the augmented bags, we feed b i,j into the model and the goal is to lower the contribution of the distractor sentence in relation to the original sentences in the bag. specifically, we use gi to measure the sentence-level contribution and define the distractor loss for relation k as follows: we hence update the loss in eq. 6 with: ## experiments in this section, we empirically evaluate our proposed methods both in terms of their relation extraction performance and their explainability. ## conclusion in this work we provided an annotated test set with ground-truth sentence-level explanations to evaluate the explanation quality of relation extraction models with distant supervision. our examination of two baselines show that a model with lower relation extraction accuracy could have higher explanation quality. we proposed methods to improve both the accuracy and explainability. our proposed methods are based on changing the representation of the sentences and learning from distractor to teach the model to ignore irrelevant information in a bag. our evaluation on the widely used fb-nyt dataset show the effectiveness of our method in achieving state-of-the art performance in both accuracy and explanation quality.