Few Clean Instances Help Denoising Distant Supervision (2022)

Abstract: Existing distantly supervised relation extractors usually rely on noisy data for both model training and evaluation, which may lead to garbage-in-garbage-out systems. To alleviate the problem, we study whether a small clean dataset could help improve the quality of distantly supervised models. We show that besides getting a more convincing evaluation of models, a small clean dataset also helps us to build more robust denoising models. Specifically, we propose a new criterion for clean instance selection based on influence functions. It collects sample-level evidence for recognizing good instances (which is more informative than loss-level evidence). We also propose a teacher-student mechanism for controlling purity of intermediate results when bootstrapping the clean set. The whole approach is model-agnostic and demonstrates strong performances on both denoising real (NYT) and synthetic noisy datasets.

## introduction distant supervision was introduced to tackle the lacking training data problem in information extraction tasks @xcite . by aligning relation triples in knowledge bases (kb) with free texts, it automatically builds labelled sentence instances and easily extends the scale of training set to hundreds of thousands samples. due to this great scalability, distantly supervised entity relation extractors have been extensively studied in the past decade. like other weak signals, the major problem about these automatically generated datasets is label noise: not all aligned sentences carry the same semantic of a kb triple (e.g., not all sentences containing "obama" and "united states" express a "born in" relation). some applications (e.g., slot filling of the tac kbp track @xcite ) could be less affected with the help of instance bags, which only needs to seek one correct instance among a bag of aligned sentences. for a more general setting which aims to correctly detect relations on individual sentences @xcite @xcite , however, the noisy labels make both learning and evaluation of models vulnerable: we may draw a flawed conclusion by using a dirty test set for a model learned with a dirty training set. many methods have been proposed to reduce noise labels (denoise) in distant supervision. for bag-level applications, models often rely on attention scores to either filter bad instances inside a bag (intra-bag attentions, @xcite or filter bags full of noisy instances (inter-bag attentions, @xcite . the dilemma there is that, while we expect attention scores to indicate correct labels, we have to train them to fit noisy labels since ground truth labels are noisy. the same difficulty also exists in recent instance-level denoising methods @xcite where the reward of denoising an instance is obtained by querying noisy labels. therefore, not only the extraction models but also denoising models are questionable if only noisy labels are given. in this paper, we would like to restate the importance of trustful data (clean dataset) in building large-scale information extraction systems. specifically, if a small clean dataset (≈ 10 2 samples) is available, we ask whether the robustness of both the denoising model and final extraction model could be improved. we start from training a relation classifier on the clean set and propose a new criterion to select good instances from the dirty set. the main idea is that if a testing instance is correctly labelled by distant supervision, some instances in the clean set should support it, and if we remove those support instances, prediction error of the testing instance will increase. comparing with previous work, the criterion is based on perturbation analyses of classifiers instead of directly using output probabilities (scores) of classifiers. our tool is influence function (if; @xcite which can effectively approximate how a classifier's parameters change when removing a training point. next, to incrementally explore the dirty set, we compile our instance selection algorithm into a bootstrapping process: training a classifier on the current clean set, selecting new clean instances using the classifier and retraining the classifier on the updated clean set. the key challenge is how to control purity of those intermediate datasets: one noisy instance may bring more noisy instances. existing works are either lack of such strategy, or use heuristic thresholds on classifiers or dataset size @xcite . here, we propose a teacherstudent style update for learning intermediate classifiers. it gradually controls the distance between the current model and history models by regularizing discrepancy of their predictions. our whole system could be deemed as a data preprocessing method. comparing with in-model denoising method (e.g., attention scores), it outputs a new clean set which can be applied to any information extraction models (model-agnostic). we conduct experiments on both real distantly supervised datasets (nyt) and synthetic datasets (built on ace05). the results demonstrate that besides effectively selecting good instances, the influencefunction-based criterion can stratify noisy instances according their difficulties for prediction (or importances for a better extractor). we also find that the teacher-student update especially helps when the proportion of incorrectly labelled instances is large. finally, when learned with clean sets built by our methods, we are able to achieve competitive extraction performances on manually labelled testing set. ## preliminary distantly supervised relation classification given an entity pair (e h , e t ) and a sentence s containing the pair, we consider the task of determining whether the entity pair expresses certain relation @xmath0, where r is the set of relation types (none indicates no relation). denote @xmath1, e h , e t , r) to be an instance, @xmath2, 1} to indicate whether x is positive or negative, and @xmath3, y i )} |d| @xmath4. for simplicity, we also define @xmath5, y). in the distant supervision setting, instances in d are automatically obtained by aligning plain text and knowledge bases: for a kb triple (e h , e t , r), every sentence containing (e h , e t ) is labelled with r. obviously, d is a dirty set with both false positives (sentences don't match the semantic of r) and false negatives (sentences expressing relation r while been labelled with none due to incompleteness of kb). here, we focus on false positives (much more serious in current datasets) and don't consider false negatives for its very low quantity. the denoising task is thus to find d ′ ⊂ d containing correctly labelled instances (especially, positive instances). influence function (cook and @xcite provides a way to estimate how individual training instances influence a model. typically, for a testing instance (x ′ , y ′ ), it efficiently answers the question that if a training instance (x, y) is removed how the model's prediction on (x ′ , y ′ ) changes. denote l(z, θ) to be a convex loss function of z with parameter θ, and θ ≜ arg min θ 1 n n @xmath6, θ) to be the optimal model parameter learned on a training set (n is the set size). to study a training instance z's influence on θ, influence function considers an ϵ up-weight on z. define θϵ,z ≜ arg min θ 1 n n @xmath7, θ)+ϵl(z, θ). therefore, when ϵ = -1 n , θϵ,z is the new model parameter after removing z from the training set. the key idea of influence function is that, when ϵ is small (or training set size n is large), with the first order taylor approximation, we can measure the difference between θ and θϵ,z without retraining the model, we say z supports (or is helpful to) z ′ if removing z increases the testing loss of z ′ , that is s(z, z ′ ) > 0, where we will see in the next section that the group of supporting instances is a key part in our denoising algorithms. ## utilities of clean sets we study the task of picking out correct instances (d ′ ) from a distantly supervised dataset d (the dirty set). as discussed above, it is not easy for the denoising model to either correctly evaluate its results or receive the right learning signals if we only know noisy labels in d. therefore, departing from previous works, we additionally require a small clean set c (c ∩ @xmath8, |d| ≫ |c|) which contains trustful annotations of instances (e.g., manually labelled). in our experiments, |c| = 10 is enough to bring significant improvement. we build our denoising model based on a binary classifier θ, which aims to recognize truly labelled instances from d. 3 the classifier could be learned on d or c. for example, for an instance z, to test whether it is correctly labelled or not, a broadly applied principle is to query the classifier's confidence on predicting z's label: the lower loss l(z, θ), the more possible z being correctly labelled. here, we go one step deeper: besides looking at the loss function, we could first seek high impact training samples on the classifier's drawing of l(z, θ), and then collect evidence from them. for example, the more clean instances support z, the more possible z being correctly labelled. we are going to demonstrate that by probing the black-box classification process, we could build more explainable (yet effective) criteria for selecting instances. first, from the computation of influence function, we can obtain a training instance's influence on a testing instances (equation 1 ). then, for a instance z @xmath9, we mainly focus on positive z @xmath10, y) where @xmath11, we have two possible directions to derive a selection criterion. given the limited budget of clean instances c, the two methods are different in their way of using them. when taking c as the testing set (criterion 1), we emphasize a valid feedback signal for evaluating the denoising model. on the other hand, when taking c as the training set (criterion 2), we emphasize a clean learning signal for building the denoising model. we would like to discuss more on their pros and cons. 4 for criterion 1, as d is usually large enough, we could obtain a sufficiently learned classifier for denoising. more importantly, a large training set makes the estimation of influence function more reliable (taylor expansion works on small ϵ). however, a good fitting of the dirty set could be a double-edged sword, especially when the proportion of wrongly labelled instances is large: we do get the influence function estimation right but it may not be applicable to our goal of denoising. we can first consider an ideal setting where all instances in d are true. in this case, equation 2 is trustable since the ideal parameter θ′ is trustable, and it encodes the right information for detecting supporting relationship between the training and testing set. however, if a large part of d is false, the classifier θ can diverge from the ideal θ′ severely, thus makes equation 2 no longer true (e.g., a negative z d could also satisfy the criterion as θ is learned with noise). lemma 1. let @xmath12, y) ∈ d, z ′ = (x, y ′ ) be a relabelled z, and θz,z ′ be the optimal model parameter after replacing z with z ′ . denote τ x to be the smallest singular value of ∇ φ h(x, φ). then for any therefore, if the classifier θ fits well on the dirty set (in the sense of a large ∥ ŵ0 -ŵ1 ∥), s(z d , z c ) calculated with θ could be far away from its value being calculated with a clean training set (i.e., with θ′ ). for the case of multiple updates, since the group version of influence function may not faithfully reflect the change of parameters (koh et al., 2019), we are not able to obtain similar results with lemma 1. however, our empirical evaluations will show that performances of criterion 1 is highly related to the proportion of clean instances in d. for criterion 2, comparing with training with dirty d, c contains trustful data, thus the implication relation in equation 3 is clear after training on c. however, since the clean set is usually small, criterion 2 takes the risk of under-fitting, which makes the prediction on z @xmath13. moreover, the estimation of influence function also becomes unstable on small datasets (i.e., ε is larger). in summary, instead of measuring a wrong s(z d , z c ) with good accuracy (like criterion 1), criterion 2 may struggle with measuring the right s(z c , z d ) with poor accuracy. in the following section, we investigate bootstrapping methods to enlarge c incrementally. we hope that when the number of clean instances becomes larger, we could alleviate both under-fitting and poor estimation of influence function gradually. ## bootstrapping the clean set given a initial small clean set c 0 and a dirty set d 0 , foot_3 our bootstrapping framework incrementally updates a denoising classifier θ. at iteration t, we first collect a fixed-size clean set c by sampling from c t . second, a denoising classifier θ is trained on the sampled set c, from which we can use influence-function-based scores (equation 1 ) to evaluate each instance in d t and choosing new clean instances d c from d t . third, we update c t and d t by merging and excluding instances in d c and retraining the denoising model again. as discussed above, how to control the purity of those intermediate clean sets is important (otherwise, we will face the same challenge as criterion 1). we propose teacher-student style update for learning intermediate classifiers. it gradually controls the distance between the current model and history models by regularizing discrepancy of their predictions. we summarize the whole process in algorithm 1. it is worth noting that the output of the bootstrapping process is a new clean set, on which we could build any relation classifier (i.e., model-agnostic denoising). denoising classifier our denoising model is a binary classification model. for each @xmath14, e h , e t , r), it predicts @xmath15, 1}. here, we simply apply a softmax layer on a cnn encoder (the same setting of lemma 1). 6 specifically, h(x, φ) = cnn(s, p), where s contains embeddings of words in sentence s, and p contains position embeddings which indicates two entities e h , e t in the sentence @xcite . sampling to obtain a fixed-size clean set c, we randomly sample instances from c t with replacement. we keep | c| = 200 so that the influence function calculation is more efficient. fitting to fit the relation classifier on the sampled set c, our objective is to minimize the parameters θ are applied in calculating if. evaluating after obtaining the parameters θ, to evaluate each instance z @xmath16, we define a score function by criterion 2 as follows, the score s(⋄, z d ) is the average of clean training instances' influence on the test instance z d . ## analysis and discussion validating influence function. the calculation of influence function is the key step of our method. here we show the high correlation between the real influence (calculated by leave-one-out retraining) and estimated influence. from the experimental results (see appendix e), we find that the correlation among high influential instances is 0.79, and 0.65 in all instances. the high correlation validate that influence function is reliable in perform instance perturbation analyses. bootstrapping process in detail. in this section, we study the performance change of four selecting strategies during the bootstrapping procedure, as show in figure 1 . conf, which suggests that the effectiveness of criterion 2. as expected, cr1 fails in the later period, which is even inferior to training with original noisy data. the impact of noise ratio. we conduct experiments with different ratio of noise data to verify the denoising ability of our method (figure 2 ). the impact of initial clean set size. our method starts with an initial clean set, so we study the impact of the set size in reference:jeffrey katzenberg, chief executive of dreamworks animation, said. . . sentence tp/fp score obvious tp . . . richard c.notebaert, the cheif excutive of qwest. . . tp 3.46e-3 . . . and bruce wassertein,the chairman and cheif excutive of lazard tp 1.73e-3 hard instances . . . last october, ray ozzie, chief technical officer, who joined microsoft last year . . . tp 3.39e-5 . . . richard c.noteaert, the company's chief executive, said qwest spent.. fp 4.91e-5 potential fp eric foner is the de witt clinton professor of history at columbia university and the author. . . tp -2.36e-3 as bruce wasserstein left st. regis hotel in manhattan on tuesday afternoon after presenting lazard's plan . . . fp -4.37e-3 ## related work we focus on distant supervision relation extraction via influence function in this paper. for relation extraction, various neural networks like cnn @xcite , rnn @xcite and tree-gru @xcite . distant supervision provides a method to automatically label massive training data @xcite , meanwhile, bringing excessive wrong label instances, so called noise, which stems the training. to solve the noisy problem, people first take a multi-instance learning methods @xcite @xcite , which puts instances with same entity pair into bags, to alleviate the impact of noisy instances. then, to make training process closer to real-world application, people focus on instance-level denoising method. an instance-selector is utilized to pick out trustable instance, which is trained by reinforcement learning @xcite and adversarial learning @xcite . the bootstrapping framework @xcite is also utilized to promote the ability of classification model gradually from a small seed. for influence function, which is commonly used in robust statistics @xcite , koh and liang (2017) introduce it in machine learning area. as a technology that is aiming to analyse the every training points' influence on model prediction, influence function is widely applied. @xcite apply influence function on weighting unlabeled data to promote semi-supervised learning. @xcite utilize influence function to designed an efficient strategy for active learning. ## conclusion in this paper, we propose a model-agnostic denoise method for distant supervision relation extraction. we start from training a relation classifier on the clean set and propose a new criterion to select good instances from the noisy data. we leverage the criterion in a bootstrapping learning to extent the clean set iteratively. further, we propose a teacherstudent to control the update. our method has a strong performance on nyt dataset and shows robustness under the high noise ratio circumstance or very limited size of initial clean set on the synthetic ace05-n dataset. let @xmath17, we get the lower bound.