Resolving Training Biases via Influence-based Data Relabeling

1 INTRODUCTION . Training data plays an inevitably important role in delivering the model ’ s final performance . It has been well recognized that the training bias issue will compromise model performance to a large extent ( Arpit et al. , 2017 ) . Specifically , there are two major scenarios where training biases show up . The first and most common scenario is that training samples involve corrupted labels that could be originated at possibly every step of the data lifecycle ( Anderson & McGrew , 2017 ; Dolatshah et al. , 2018 ; Pei et al. , 2020 ; Yu & Qin , 2020 ) . The second scenario is that the training and test sets are sampled from the respective distributions Ptrain ( x , y ) and Ptest ( x , y ) , but Ptrain is different from Ptest ( Guo et al. , 2020 ; He & Garcia , 2009 ; Zou et al. , 2019 ) . Both corrupted labels and distribution mismatch will hurt the generalization ability of a trained model ( Fang et al. , 2020 ; Zhang et al. , 2017 ) . We generally refer to training samples with corrupted labels or those inducing distribution mismatch as harmful samples . Data resampling is a widely used strategy to deal with harmful training samples . Existing resampling approaches ( Chawla et al. , 2002 ; Mahmoody et al. , 2016 ; Malach & Shalev-Shwartz , 2017 ; Ren et al. , 2018 ) propose to assign different weights to training samples , which aim to mitigate the negative impacts of harmful samples on model ’ s generalization ability . Among them , most resampling approaches ( Arazo et al. , 2019 ; Han et al. , 2018 ; Li et al. , 2020 ; Wang et al. , 2020a ) rely on training loss to identify harmful samples from the whole training set . They follow the insight that the samples with higher training losses are very likely to have corrupted labels , and hence it is often beneficial to downweight them during the process of model training . However , such loss-based resampling methods have two limitations . First , they are only able to deal with the training biases caused by training samples with corrupted labels ( aka noisy samples ) . Second , the small-loss trick typically holds true for deep models but not for any predictive models ( Zhang et al. , 2017 ) . To address the limitations , one recent work ( Wang et al. , 2020b ) proposes a new resampling scheme based on influence functions ( Cook & Weisberg , 1980 ) . The idea is to estimate the influence of each training sample on model ’ s predictions over the test set . Any training samples that would cause an increase in the test loss are considered as harmful and will be downweighted afterwards . It is worth mentioning that the influence functions have been proved to deal with two forms of training biases effectively , and it is agnostic to a specific model or data type ( Koh & Liang , 2017 ; Koh et al. , 2019 ) . Inspired by the success of influence-based data resampling , in this paper , we would like to ask the following question : what would happen if we relabel harmful training data based on influence analysis results ? Our motivations on performing data relabeling via influence analysis are twofold . ( i ) Relabeling noisy samples is able to prevent the model from memorizing the corrupted labels . ( ii ) Relabeling clean but biased samples is helpful to improve model ’ s robustness to harmful samples . Despite the potential benefits of data relabeling , it is still challenging to develop an influence-based relabeling approach that has a theoretical guarantee on the model ’ s performance improvement after training with relabeled data . To answer the question , we first follow ( Koh et al. , 2019 ) to measure the influence of each training sample on model ’ s predictions and identify the harmful training samples which would cause an increase in the test loss . Next , we investigate whether relabeling the identified harmful samples rather than discarding them can improve the test performance . To achieve this , we start from binary classification tasks where relabeling a training sample is to convert its binary label from y to 1− y . We theoretically prove that relabeling harmful training data via influence analysis can achieve lower test loss than simply discarding them for binary classification . Furthermore , we design a novel relabeling function R for multi-class classification tasks and prove that the advantage of relabeling the identified harmful samples using R in reducing model ’ s test loss still holds . Following the influence-based resampling approaches ( Wang et al. , 2018 ; Ting & Brochu , 2018 ; Ren et al. , 2020 ; Wang et al. , 2020b ) , we only use the test loss for theoretical analysis and empirically calculate influence function with a small but unbiased validation set by assuming the validation set is sampled from the same distribution as the test set . In this way , using the validation loss to calculate the influence function is an unbiased estimation of the true influence function . Otherwise , the problem may lie in the category of transfer learning which is beyond the scope of this work . To summarize , this work makes the following contributions . First , we propose to combine influence functions with data relabeling for reducing training biases and we develop an end-to-end influencebased relabeling framework named RDIA that reuses harmful training samples toward better model performance . Second , we design a novel relabeling function R and theoretically prove that applying R over harmful training samples identified by influence functions is able to achieve lower test loss for any classification tasks using cross-entropy loss function . Third , we conduct extensive experiments on real datasets in different domains . The results demonstrate that ( i ) RDIA is effective in reusing harmful training samples towards higher model performance , surpassing the existing influence-based resampling approaches , and ( ii ) RDIA improves model ’ s robustness to label noise , outperforming the current resampling methods by large margins . 2 BACKGROUND . Let D = { ( xi , yi ) ∈ X × Y | 1 ≤ i ≤ N } be the training set which are sampled from Ptrain ( x , y ) . Let zi = ( xi , yi ) where xi ∈ Rd and yi ∈ RK . Let ϕ ( x , θ ) be a model ’ s prediction for x , where θ ∈ Rp is the parameter set of the model . We denote the loss of sample zi by l ( zi , θ ) = L ( yi , ϕ ( xi , θ ) ) and use li ( θ ) to represent l ( zi , θ ) . We consider the standard empirical risk minimization ( ERM ) as the optimization objective . Formally , the empirical risk over D is defined as : L ( D ; θ ) = 1N ∑N i=1 li ( θ ) . Since our relabeling function is dependent to the loss function , we focus on the most effective and versatile loss , i.e. , Cross Entropy loss for any classification tasks . Influence functions . Influence functions , stemming from Robust Statistics ( Huber , 2004 ) , have provided an efficient way to estimate how a small perturbation of a training sample would change the model ’ s predictions ( Koh & Liang , 2017 ; Koh et al. , 2019 ; Yu et al. , 2020 ) . Let θ̂ = arg minθ 1 N ∑N n=1 ln ( θ ) be the optimal model parameters on convergence . When upweighting a training sample zi on its loss term by an infinitesimal step i , we obtain the new optimal parameters θ̂ i on convergence as : θ̂ i = arg min θ 1 N ∑N n=1 ln ( θi ) + ili ( θ ) . Based on influence functions ( Cook & Weisberg , 1980 ; Koh & Liang , 2017 ) , we have the following closed-form expression to estimate the change in model parameters when upweighting zi by i : ψθ ( zi ) , dθ̂ i d i | i=0= −H −1 θ̂ Oθli ( θ̂ ) , ( 1 ) whereHθ̂ , 1 N ∑N n=1 O 2 θln ( θ̂ ) is the Hessian matrix and O 2 θln ( θ ) is the second derivative of the loss at training point zn with respect to θ . Using the chain rule , we can estimate the change of model ’ s prediction at a test data zcj sampled from the given test distribution Ptest ( Koh & Liang , 2017 ) : Φθ ( zi , z c j ) , dlj ( θ̂ i ) d i | i=0= −Oθlj ( θ̂ ) H −1 θ̂ Oθli ( θ̂ ) . ( 2 ) At a fine-grained level , we can measure the influence of perturbing training sample zi from ( xi , yi ) to ( xi , yi + δ ) . Let ziδ = ( xi , yi + δ ) and the new loss li ( ziδ , θ ) = L ( yi + δ , ϕ ( xi , θ ) ) . According to ( Koh & Liang , 2017 ) , the optimal parameters θ̂ iδi after performing perturbation on zi is θ̂ iδi = arg min θ 1 N ∑N n=1 ln ( θ ) + ili ( ziδ , θ ) − ili ( θ ) . This allows us to estimate the change in model parameters after the fine-grained data perturbation using influence functions as : dθ̂ iδi d i | i=0 = ψθ ( ziδ ) − ψθ ( zi ) = −H−1 θ̂ ( Oθli ( ziδ , θ̂ ) − Oθli ( θ̂ ) ) . ( 3 ) Further , the influence of perturbing zi by ziδ on model ’ s prediction at test sample zcj is the following : ηθδ ( zi , z c j ) , dlj ( θ̂ iδi ) d i | i=0 = −Oθlj ( θ̂ ) H−1θ̂ ( Oθli ( ziδ , θ̂ ) − Oθli ( θ̂ ) ) . ( 4 ) It is important to notice that Eq . ( 4 ) holds for arbitrary δ when i is approaching 0 . This provides the feasibility of measuring how relabeling a training samples could influence the model ’ s predictions . Influence-based resampling approaches . Previous researches ( Koh & Liang , 2017 ; Wang et al. , 2020b ) have shown that influence functions have strong ability to identify harmful samples from the whole training set , which is agnostic to the specific model or data structure . Inspired by this , many influence-based resampling approaches ( Ting & Brochu , 2018 ; Wang et al. , 2018 ; 2020b ) proposed to discard or downweight the identified harmful samples to reduce the test loss . However , different from previous works which focus on estimating the influence of each training sample on the test performance using Eq . ( 1 ) - ( 2 ) , we perform the fine-grained perturbation on a training sample ’ s label and evaluate its influence using Eq . ( 3 ) - ( 4 ) . Further , our work tries to build an end-to-end influence-based relabeling framework to reuse the harmful samples with a theoretical guarantee on the final model performance for any classification tasks . To be specific , we demonstrate that harmful training instances after being relabeled properly do make contributions to improve the final model performance , which provides a novel viewpoint on handling biased training data .

Summary: This paper proposes a data relabeling technique using influence function. The authors first derived the influence function for data relabeling as follows.  $$ \eta_{\theta \delta}\left(z\_i, z\_j^{c}\right) \left. \triangleq \frac{d l\_j^c \left(\hat{\theta}\_{\epsilon\_i \delta\_j}\right)}{d \epsilon\_i}\right|_{c\_i=0} =-\nabla\_{\theta} l\_j^c(\hat{\theta}) H\_{\hat{\theta}}^{-1}\left(\nabla\_\theta l\_i\left(z\_{i \delta}, \hat{\theta}\right)-\nabla\_\theta l\_i(\hat{\theta})\right) $$  The authors then derived the specific expression for the cross-entropy loss: $$ \eta_{\theta R}\left(z_{i}, z_{j}^{c}\right)=-\nabla_{\theta} l_{j}(\hat{\theta}) H_{\hat{\theta}}^{-1} w\left(z_{i}, \hat{\theta}\right)=-\nabla_{\theta} l_{j}(\hat{\theta}) H_{\hat{\theta}}^{-1}\left(-\frac{\nabla_{\theta} l_{i}(\hat{\theta})}{1-\varphi\left(x_{i}, \hat{\theta}\right)}\right)=\frac{-\Phi_{\theta}\left(z_{i}, z_{j}^{c}\right)}{1-\varphi\left(x_{i}, \hat{\theta}\right)} $$ The authors experimentally demonstrated that data relabeling is more effective than the standard sampling/data reweighting-based approach for model improvement.