Detecting Noisy Training Data with Loss Curves

1 INTRODUCTION . The success of supervised machine learning is inherently dependent on the reliability of the labels in the training data . Most algorithms assume that the training labels are clean and can be trusted blindly . However , creating real-world data sets that do not suffer from substantial label noise is extremely challenging . Human annotators , especially on crowdsourced platforms , can be prone to making labeling mistakes . “ Weakly-labeled ” datasets ( Xiao et al. , 2015 ; Joulin et al. , 2016 ; Li et al. , 2017a ) , which collect labels through proxy variables or web scraping , are especially likely to mislabeled samples . In fact , even the celebrated MNIST ( LeCun & Cortes , 2005 ) and ImageNet ( Deng et al. , 2009 ) data sets famously contain multiple mislabeled images ( see Figure 1 for suspicious examples detected by our proposed method ) . In practice , it is often too costly to perform manual curation or quality control to remove such examples on large datasets . In this paper we develop a framework that provides multiple ways to handle label noise . Our method exploits the recent paradigm of training deep neural networks via stochastic gradient descent ( SGD ) ( Huang et al. , 2019 ; He et al. , 2016 ) . These overparameterized networks can achieve zero training error even when labels are assigned randomly ( Zhang et al. , 2017 ) — essentially memorizing the entire data set . Contrary to classical machine learning wisdom , subsequent empirical and theoretical analyses ( Arpit et al. , 2017 ; Allen-Zhu et al. , 2019 ; Arora et al. , 2019 ) show that despite their capacity to overfit , these models can achieve impressive generalization performance . The implicit regularization of SGD permits memorization only if it is necessary to classify a particular training point correctly . We refer to this ( latent ) variable as the memorization need of a sample . Although prior works often attempt to detect label noise through various methods involving validation loss on rotating hold-out sets ( Chen et al. , 2019 ) , training auxiliary neural networks ( Xiao et al. , 2015 ; Jiang et al. , 2017 ) , or meta-learning ( Ren et al. , 2018 ) , we argue that the model ’ s training dynamics can be far more revealing . For example , data points with high memorization need will exhibit noticeably different loss trajectories than those with low memorization need ( see Figure 2 ) . We capture these differences in loss trajectories by introducing a simple , informative training statistic : the Area Under the Loss Curve ( AUL ) . As its name suggests , the AUL can be trivially computed for a whole training set or any single training sample . It smooths the loss trajectory across all training epochs , capturing the general learning behavior of the samples for which it is computed . We observe that in the presence of label noise , the distribution of AUL scores tends to be bimodal and can be estimated with a 1-dimensional , 2-component Gaussian mixture model ( GMM ) . This provides us with three useful ways to manage label noise : a ) the mixing coefficients naturally estimate the fraction of noisy samples in the training data set ; b ) the membership likelihood of the highermean Gaussian estimates the probability that a sample is mislabeled ; c ) the clean-label probabilities can be used to weight samples in order to mitigate the influence of label noise in training . Despite its compelling simplicity ( the AUL score and GMM fit require only a few lines of Python ) , it is currently by far the most reliable and accurate estimator of label noise . We evaluate our method on standard benchmark datasets with 2 models of synthetic label uncertainty . We demonstrate empirically that our method well-approximates the overall percentage of noisy data and detects mislabeled points with high recall across a wide range of noise levels . Furthermore , we use AUL to achieve state-of-the-art results of 11.1 % and 40.2 % classification error with 40 % class-dependent label noise on CIFAR10 and CIFAR100 , respectively . Finally , we show that the AUL statistic is consistent across network architectures and training runs . 2 RELATED WORK . Learning with Weak or Noisy Labels . One popular approach to mitigate the effects of label noise is to design more robust training objectives . Zhang & Sabuncu ( 2018 ) propose a novel loss function by generalizing the cross entropy loss . Others interpolate target labels with predicted labels ( Reed et al. , 2014 ; Ma et al. , 2018 ) or modify the loss term with an estimated noise transition matrix ( Sukhbaatar et al. , 2015 ; Patrini et al. , 2016 ; Hendrycks et al. , 2018 ) . Li et al . ( 2017b ) train a network on a small set of trusted data and guide learning through knowledge distillation . Another line of work either reweights or filters training samples to discourage learning from mislabeled examples . Attempted metrics to select training data includes training loss ( Han et al. , 2018 ; Shen & Sanghavi , 2019 ) , test/validation loss ( Chen et al. , 2019 ) , and gradient information on clean samples ( Ren et al. , 2018 ) . MentorNet ( Jiang et al. , 2017 ) learns a meta-network to output example weights . Malach & Shalev-Shwartz ( 2017 ) train two networks and identify examples with prediction discrepancies . Our work also mitigates the effects of mislabeled samples through sample weights ; however , in contrast to most prior work we extract these weights from the training dynamics . Analysis of Neural Network Training . Recently , Neyshabur et al . ( 2019 ) and Allen-Zhu et al . ( 2019 ) both bound the generalization error of overparameterized neural networks assuming uncorrupted labels . Another line of work analyzes the training dynamics of SGD under various assumptions on the loss and network architecture ( Mandt et al. , 2017 ; Zou et al. , 2019 ; Li & Liang , 2018 ) . Several recent works attempt to explain the observation that deep networks can overfit to random training labels ( Zhang et al. , 2017 ) . For example , Arpit et al . ( 2017 ) measure the gradient norms across epochs and empirically show that the number of clean data points with high loss sensitivity decreases throughout training . Arora et al . ( 2019 ) prove generalization bounds and convergence rates of GD for two-layer ReLU networks as a function of the training data and labels . Other recent papers prove that GD combined with either early stopping ( Li et al. , 2019 ) or regularization ( Hu et al. , 2019 ) generalizes robustly in the presence of label noise . These analyses provide both the- oretical and empirical evidence that deep networks follow a two-stage training procedure : models first learn generalizable parameters on the clean data before memorizing the noisy samples . 3 THE LOSS CURVE AND MEMORIZATION NEED . In this section we demonstrate that training loss dynamics can be used to identify data points with high memorization need . We generate classification datasets with various amounts of memorization need by changing the labels of a subset of data points . We then introduce a metric – Area Under the Loss Curve ( AUL ) – to identify these mislabeled ( i.e . high memorization need ) points . The AUL metric exhibits several desirable properties : high detection accuracy , stability over the course of training , and invariance to model architecture . Rate of loss reduction indicates memorization need . To illustrate the training dynamics of high memorization need data , we train a ResNet-20 on the CIFAR10 dataset where 40 % of the training labels have been replaced with random labels . Following standard practice Huang et al . ( 2017 ) , we use data augmentation , which is why the training loss does not diminish to zero for all samples . The learning rate is initialized to 0.1 and reduced by a factor of 10 at epochs 150 and 225 . Since there is no relation between the incorrect labels and their corresponding images , these data points by design have a high memorization need . In Figure 2 ( top ) we plot histograms of the training loss at various stages of training for both the correctly and incorrectly labeled data points . We make several observations . First , after the network has converged ( epoch 300 , top right histogram ) , most data points ( both correctly and incorrectly labeled ) have low training loss . This result is consistent with the observations of Zhang et al . ( 2017 ) , suggesting that the network is memorizing these incorrectly labeled points . More notably however are the loss curves at earlier stages of training . At 75 and 150 epochs ( top middle-left and top middle histograms ) the training loss for mislabeled points is much higher than that of the correctly labeled points . In fact , the incorrectly labeled points tend to have a larger loss than at the beginning of training ( epoch 1 , top left histogram ) . Consistent with Arpit et al . ( 2017 ) ; Arora et al . ( 2019 ) ; Li et al . ( 2019 ) , this suggests that although all points achieve low loss , samples with high memorization need require more training iterations to achieve low loss . Capturing rate of loss change through AUL . Given that loss dynamics are indicative of the memorization need , our goal is to capture this signal with a robust metric . One challenge is that loss curves for individual samples are rather noisy as a result of stochastic optimization . In Figure 3 ( left ) we plot loss curves for two example training points – one clean and one mislabeled . The variance of the loss is quite high , and there are several training epochs where the mislabeled point achieves lower loss than the correctly labeled point . The second challenge is that training loss becomes less indicative of memorization need in later epochs . In Figure 2 we observe that all samples have low training loss by epoch 300 . To assess the discriminating ability of the loss , we compute the Area under the ROC Curve ( AUC ) at various training stages . Although the final training loss still separates clean and mislabeled samples with an AUC of 81 % , it is far less separable than at earlier epochs . In other words , the signal in the training loss varies throughout and becomes weaker over time . One simple way to improve the signal to noise ratio is to integrate training loss over time . As seen in Figure 3 , the losses of correctly-labeled samples decay early during training while the mislabeled samples ’ losses do not decay until later epochs . Therefore , clean samples will in expectation have a lower loss than mislabeled samples at any given epoch . We formalize this intuition in a metric which we refer to as Area Under the Loss Curve , or AUL . Formally , for a given sample ( x , y ) , AULx , y = T∑ i=1 L ( φi ( x ) , y ) , where T is the total number of epochs , L ( · , · ) is the loss function , and φi is the model at epoch i . In Figure 3 ( center , right ) we observe that the AUL dynamics are far less noisy than loss dynamics . The clean sample achieves a lower AUL than the mislabeld sample at every epoch . Moreover , the curves remain separable even after the loss signal decays in later epochs . Figure 2 ( bottom row ) shows the AUL histograms of clean and mislabeled samples at several stages of training . The AUC score of the AUL is 94 % at epoch 75 and remains this high through epoch 300 . This contrasts with the loss , which reaches its best predictive accuracy at epoch 75 ( AUC=0.91 ) and decreases thereafter . While AUL remains a separable metric throughout the whole training cycle ( including learning rate drops ) , in practice we find it sufficient to compute the AUL before the first scheduled learning rate drop . Stability and consistency of AUL and training dynamics . Unlike test-time predictions , which vary with network architecture and even with network initialization , training dynamics are relatively RN-14 RN-32 RN-50 RN-110 DN-10 DN-40 DN-100 1 0.99 0.98 0.98 0.94 0.99 0.98 0.99 1 0.99 0.99 0.92 0.98 0.99 0.98 0.99 1 0.99 0.92 0.99 0.99 0.98 0.99 0.99 1 0.91 0.98 0.98 0.94 0.92 0.92 0.91 1 0.94 0.92 0.99 0.98 0.99 0.98 0.94 1 0.99 0.98 0.99 0.99 0.98 0.92 0.99 1 Metric = AUL ( Train Points ) 1 0.93 0.93 0.91 0.84 0.94 0.92 0.93 1 0.94 0.93 0.79 0.93 0.92 0.93 0.94 1 0.93 0.78 0.92 0.93 0.91 0.93 0.93 1 0.76 0.9 0.91 0.84 0.79 0.78 0.76 1 0.85 0.79 0.94 0.93 0.92 0.9 0.85 1 0.95 0.92 0.92 0.93 0.91 0.79 0.95 1 1 0.84 0.84 0.81 0.81 0.85 0.83 0.84 1 0.84 0.81 0.78 0.85 0.83 0.84 0.84 1 0.81 0.79 0.85 0.84 0.81 0.81 0.81 1 0.75 0.81 0.8 0.81 0.78 0.79 0.75 1 0.81 0.78 0.85 0.85 0.85 0.81 0.81 1 0.85 0.83 0.83 0.84 0.8 0.78 0.85 1 Metric = Loss ( Train Points ) 1 0.55 0.45 0.45 0.53 0.55 0.52 0.55 1 0.54 0.5 0.51 0.56 0.54 0.45 0.54 1 0.52 0.46 0.5 0.54 0.45 0.5 0.52 1 0.42 0.45 0.46 0.53 0.51 0.46 0.42 1 0.59 0.46 0.55 0.56 0.5 0.45 0.59 1 0.57 0.52 0.54 0.54 0.46 0.46 0.57 1 Metric = Loss ( Valid . Points ) 0.5 0.6 0.7 0.8 0.9 1.0 Metric = Avg . Valid . Loss consistent across networks . In Figure 4 we plot the AUL distribution after training ResNet and DenseNet models of various depth ( up to the first learning rate drop ) . Each network is trained on the CIFAR10 dataset with standard data augmentation , where the same 40 % of samples are mislabeled . The AUL distributions are remarkably similar for networks of different depths . The modes are more sharply peaked for deeper networks , yet the modes are around roughly the same AUL values . To further demonstrate the consistency of training dynamics , we compute the Pearson ’ s correlation coefficient of the dataset ’ s AUL scores computed between different network architectures ( Figure 5 , left ) . Most pairs of networks achieve a correlation of 0.98 or 0.99 . These results suggest that the AUL metric captures properties that are dataset-dependent rather than model-dependent . Conversely , the testing predictions of different models are less correlated than training dynamics . In Figure 5 ( middle left ) we measure the inter-network correlation of loss validation set samples . We average each sample ’ s loss over all training epochs which – similarly to AUL – reduces the impact of noise from any one epoch . The averaged validation loss achieves correlations between 0.8 and 0.95 . While this is still a high correlation , we note that it is not as consistent as AUL . Finally , we observe that integrating loss values over time improves the consistency of the metric . Figure 5 ( middle right ) plots the inter-network correlation training loss at epoch 150 ( the last epoch before the learning rate is dropped ) . Most networks achieve a correlation between 0.79 and 0.85 – roughly 10 percentage points less than training AUL . There is even less inter-network correlation for validation loss ( Figure 5 , right ) . At epoch 150 the correlation is on average 0.55 , which is roughly 40 percentage points less than averaged validation loss . The loss of an individual sample at any given epoch is likely impacted by stochastic training noise , and integrating reduces this noise .

Summary: In this paper, the authors proposed methodologies to identify mislabeled training examples. Specifically, the authors proposed to examine the training loss of each example to identify examples with high training losses. To mitigate the randomness in the training loss, the authors proposed an AUL (area under the loss) metric, which is less noisy that directly examining the loss. The authors proposed to use Gaussian mixture to approximate the AUL distribution, and then estimate the probability of mislabeling. The authors proposed to downweight training examples with high likelihood of being mislabeled. The proposal is examined in numerical studies.