L_DMI: An Information-theoretic Noise-robust Loss Function

Yilun Xu, Peng Cao, Yuqing Kong, Yizhou Wang

Introduction

Deep neural networks, together with large scale accurately annotated datasets, have achieved remarkable performance in a great many classification tasks in recent years (e.g., 18, 11). However, it is usually money- and time- consuming to find experts to annotate labels for large scale datasets. While collecting labels from crowdsourcing platforms like Amazon Mechanical Turk is a potential way to get annotations cheaper and faster, the collected labels are usually very noisy. The noisy labels hampers the performance of deep neural networks since the commonly used cross entropy loss is not noise-robust. This raises an urgent demand on designing noise-robust loss functions.

Some previous works have proposed several loss functions for training deep neural networks with noisy labels. However, they either use auxiliary information29, 12(e.g., having an additional set of clean data or the noise transition matrix) or steps20, 33(e.g. estimating the noise transition matrix), or make assumptions on the noise 7, 48 and thus can only handle limited kinds of the noise patterns (see perliminaries for definition of different noise patterns).

One reason that the loss functions used in previous works are not robust to a certain noise pattern, say diagonally non-dominant noise, is that they are distance-based, i.e., the loss is the distance between the classifier’s outputs and the labels (e.g. 0-1 loss, cross entropy loss). When datapoints are labeled by a careless annotator who tends to label the a priori popular class (e.g. For medical images, given the prior knowledge is 10%10\% malignant and 90%90\% benign, a careless annotator labels “benign” when the underline true label is “benign” and labels “benign” with 90% probability when the underline true label is “malignant”.), the collected noisy labels have a diagonally non-dominant noise pattern and are extremely biased to one class (“benign”). In this situation, the distanced-based losses will prefer the “meaningless classifier" who always outputs the a priori popular class (“benign”) than the classifier who outputs the true labels.

To address this issue, instead of using distance-based losses, we propose to employ information-theoretic loss such that the classifier, whose outputs have the highest mutual information with the labels, has the lowest loss. The key observation is that the “meaningless classifier" has no information about anything and will be naturally eliminated by the information-theoretic loss. Moreover, the information-monotonicity of the mutual information guarantees that adding noises to a classifier’s output will make this classifier less preferred by the information-theoretic loss.

However, the key observation is not sufficient. In fact, we want an information measure I to satisfy

Unfortunately, the traditional Shannon mutual information (MI) does not satisfy the above formula, while we find that a generalized information measure, namely, DMI (Determinant based Mutual Information), satisfies the above formula. Like MI, DMI measures the correlation between two random variables. It is defined as the determinant of the matrix that describes the joint distribution over the two variables. Intuitively, when two random variables are independent, their joint distribution matrix has low rank and zero determinant. Moreover, DMI is not only information-monotone like MI, but also relatively invariant because of the multiplication property of the determinant. The relative invariance of DMI makes it satisfy the above formula.

Based on DMI, we propose a noise-robust loss function LDMI⁡\mathcal{L}_{\operatorname*{DMI}} which is simply

As shown in theorem 4.1 later, with LDMI⁡\mathcal{L}_{\operatorname*{DMI}}, the following equation holds:

and the noise amount is a constant given the dataset. The equation reveals that with LDMI⁡\mathcal{L}_{\operatorname*{DMI}}, training with the noisy labels is theoretically equivalent with training with the clean labels in the dataset, regardless of the noise patterns, including the noise amounts.

In summary, we propose a novel information theoretic noise-robust loss function LDMI⁡\mathcal{L}_{\operatorname*{DMI}} based on a generalized information measure, DMI. Theoretically we show that LDMI⁡\mathcal{L}_{\operatorname*{DMI}} is robust to instance-independent label noise. As an additional benefit, it can be easily applied to any existing classification neural networks straightforwardly without any auxiliary information. Extensive experiments have been done on both image dataset and natural language dataset including Fashion-MNIST, CIFAR-10, Dogs vs. Cats, MR with a variety of synthesized noise patterns and noise amounts as well as a real-world dataset Clothing1M. The results demonstrate the superior performance of LDMI⁡\mathcal{L}_{\operatorname*{DMI}}.

Related Work

A series of works have attempted to design noise-robust loss functions. In the context of binary classification, some loss functions (e.g., 0-1 loss22, ramp loss3, unhinged loss40, savage loss23) have been proved to be robust to uniform or symmetric noise and Natarajan et al. 26 presented a general way to modify any given surrogate loss function. Ghosh et al. 7 generalized the existing results for binary classification problem to multi-class classification problem and proved that MAE (Mean Absolute Error) is robust to diagonally dominant noise. Zhang et al. 48 showed MAE performs poorly with deep neural network and they combined MAE and cross entropy loss to obtain a new loss function. Patrini et al. 29 provided two kinds of loss correction methods with knowing the noise transition matrix. The noise transition matrix sometimes can be estimated from the noisy data 33, 20, 30. Hendrycks et al. 12 proposed another loss correction technique with an additional set of clean data. To the best of our knowledge, we are the first to provide a loss function that is provably robust to instance-independent label noise without knowing the transition matrix, regardless of noise pattern and noise amount.

Instead of designing an inherently noise-robust function, several works used special architectures to deal with the problem of training deep neural networks with noisy labels. Some of them focused on estimating the noise transition matrix to handle the label noise and proposed a variety of ways to constrain the optimization 37, 43, 8, 39, 9, 44. Some of them focused on finding ways to distinguish noisy labels from clean labels and used example re-weighting strategies to give the noisy labels less weights 31, 32, 21. While these methods seem to perform well in practice, they cannot guarantee the robustness to label noise theoretically and are also outperformed by our method empirically.

On the other hand, Zhang et al. 46 have shown that deep neural networks can easily memorize completely random labels, thus several works propose frameworks to prevent this overfitting issue empirically in the setting of deep learning from noisy labels. For example, teacher-student curriculum learning framework 14 and co-teaching framework 10 have been shown to be helpful. Multi-task frameworks that jointly estimates true labels and learns to classify images are also introduced 41, 19, 38, 45. Explicit and implicit regularization methods can also be applied 47, 25. We consider a different perspective from them and focus on designing an inherently noise-robust function.

In this paper, we only consider instance-independent noise. There are also some works that investigate instance-dependent noise model (e.g. 5, 24). They focus on the binary setting and assume that the noisy and true labels agree on average.

Preliminaries

We denote the set of classes by C\mathcal{C} and the size of C\mathcal{C} by CC. We also denote the domain of datapoints by X\mathcal{X}. A classifier is denoted by h:X↦ΔCh:\mathcal{X}\mapsto\Delta_{\mathcal{C}}, where ΔC\Delta_{\mathcal{C}} is the set of all possible distributions over C\mathcal{C}. hh represents a randomized classifier such that given x∈Xx\in\mathcal{X}, h(x)ch(x)_{c} is the probability that hh maps xx into class cc. Note that fixing the input xx, the randomness of a classifier is independent of everything else.

There are NN datapoints {xi}i=1N\{x_{i}\}_{i=1}^{N}. For each datapoint xix_{i}, there is an unknown ground truth yi∈Cy_{i}\in\mathcal{C}. We assume that there is an unknown prior distribution QX,YQ_{X,Y} over X×C\mathcal{X}\times\mathcal{C} such that {(xi,yi)}i=1N\{(x_{i},y_{i})\}_{i=1}^{N} are i.i.d. samples drawn from QX,YQ_{X,Y} and

Note that here we allow the datapoints to be “imperfect” instances, i.e., there still exists uncertainty for YY conditioning on fully knowing XX.

We assume that the noise is independent of the datapoints conditioning on the ground truth, which is commonly assumed in the literature 29, 7, 48, i.e.,

2 Information theory concepts

Since Shannon’s seminal work 35, information theory has shown its powerful impact in various of fields, including several recent deep learning works 13, 4, 17. Our work is also inspired by information theory. This section introduces several basic information theory concepts.

Information theory is commonly related to random variables. For every random variable W1W_{1}, Shannon’s entropy H(W1):=∑w1Pr⁡[W=w1]log⁡Pr⁡[W=w1]\text{H}(W_{1}):=\sum_{w_{1}}\Pr[W=w_{1}]\log\Pr[W=w_{1}] measures the uncertainty of W1W_{1}. For example, deterministic W1W_{1} has lowest entropy. For every two random variables W1W_{1} and W2W_{2}, Shannon mutual information MI(W1,W2):=∑w1,w2Pr⁡[W1=w1,W2=w2]log⁡Pr⁡[W=w1,W=w2]Pr⁡[W1=w1]Pr⁡[W2=w2]\text{MI}(W_{1},W_{2}):=\sum_{w_{1},w_{2}}\Pr[W_{1}=w_{1},W_{2}=w_{2}]\log\frac{\Pr[W=w_{1},W=w_{2}]}{\Pr[W_{1}=w_{1}]\Pr[W_{2}=w_{2}]} measures the amount of relevance between W1W_{1} and W2W_{2}. For example, when W1W_{1} and W2W_{2} are independent, they have the lowest Shannon mutual information, zero.

Shannon mutual information is non-negative, symmetric, i.e., MI(W1,W2)=MI(W2,W1)\text{MI}(W_{1},W_{2})=\text{MI}(W_{2},W_{1}), and also satisfies a desired property, information-monotonicity, i.e., the mutual information between W1W_{1} and W2W_{2} will always decrease if either W1W_{1} or W2W_{2} has been “processed”.

For all random variables W1,W2,W3W_{1},W_{2},W_{3}, when W3W_{3} is less informative for W2W_{2} than W1W_{1}, i.e., W3W_{3} is independent of W2W_{2} conditioning W1W_{1},

This property naturally induces that for all random variables W1,W2W_{1},W_{2},

since W2W_{2} is always the most informative random variable for itself.

Based on Shannon mutual information, a performance measure for a classifier hh can be naturally defined. High quality classifier’s output h(X)h(X) should have high mutual information with the ground truth category YY. Thus, a classifier hh’s performance can be measured by MI(h(X),Y)\text{MI}(h(X),Y).

Thus, we cannot use Shannon mutual information as the performance measure for classifiers. Here we find that, a generalized mutual information, Determinant based Mutual Information (DMI) 16, satisfies the above formula such that under the performance measure based on DMI, the measurement based on noisy labels is consistent with the measurement based on true labels.

Given two discrete random variables W1,W2W_{1},W_{2}, we define the Determinant based Mutual Information between W1W_{1} and W2W_{2} as

where QW1,W2\mathbf{Q}_{W_{1},W_{2}} is the matrix format of the joint distribution over W1W_{1} and W2W_{2}.

DMI is a generalized version of Shannon’s mutual information: it preserves all properties of Shannon mutual information, including non-negativity, symmetry and information-monotonicity and it is additionally relatively invariant. DMI is initially proposed to address a mechanism design problem 16.

DMI is non-negative, symmetric and information-monotone. Moreover, it is relatively invariant: for all random variables W1,W2,W3W_{1},W_{2},W_{3}, when W3W_{3} is less informative for W2W_{2} than W1W_{1}, i.e., W3W_{3} is independent of W2W_{2} conditioning W1W_{1},

where TW1→W3\mathbf{T}_{W_{1}\rightarrow W_{3}} is the matrix format of

The non-negativity and symmetry follow directly from the definition, so we only need to prove the relatively invariance. Note that

as W3W_{3} is independent of W2W_{2} conditioning on W1W_{1}. Thus,

where QW2,W3\mathbf{Q}_{W_{2},W_{3}}, QW2,W1\mathbf{Q}_{W_{2},W_{1}}, TW1→W3\mathbf{T}_{W_{1}\rightarrow W_{3}} are the matrix formats of QW2,W3Q_{W_{2},W_{3}}, QW2,W1Q_{W_{2},W_{1}}, TW1→W3T_{W_{1}\rightarrow W_{3}}, respectively. We have

because of the multiplication property of the determinant (i.e. det⁡(AB)=det⁡(A)det⁡(B)\det(\mathbf{AB})=\det(\mathbf{A})\det(\mathbf{B}) for every two matrices A,B\mathbf{A},\mathbf{B}). Therefore, DMI⁡(W2,W3)=DMI⁡(W2,W1)∣det⁡(TW1→W3)∣\operatorname*{DMI}(W_{2},W_{3})=\operatorname*{DMI}(W_{2},W_{1})|\det(\mathbf{T}_{W_{1}\rightarrow W_{3}})|.

The relative invariance and the symmetry imply the information-monotonicity of DMI. When W3W_{3} is less informative for W2W_{2} than W1W_{1}, i.e., W3W_{3} is independent of W2W_{2} conditioning on W1W_{1},

because of the fact that for every square transition matrix T\mathbf{T}, det⁡(T)≤1\det(\mathbf{T})\leq 1 34. ∎

We define U:=1NOL\mathbf{U}:=\frac{1}{N}\mathbf{O}\mathbf{L}, i.e.,

as the empirical loss function. Our formal training process is shown in Supplementary Material A.

2 Theoretical justification

With Assumption 3.1 and Assumption 3.2, LDMI⁡\mathcal{L}_{\operatorname*{DMI}} is

if there exists a ground truth classifier h∗h^{*} such that h∗(X)=Yh^{*}(X)=Y, then it must have the lowest loss, i.e., for all classifier hh,

and the inequality is strict when h(X)h(X) is not a permutation of h∗(X)h^{*}(X), i.e., there does not exist a permutation π:C↦C\pi:\mathcal{C}\mapsto\mathcal{C} s.t. h(x)=π(h∗(x)),∀x∈Xh(x)=\pi(h^{*}(x)),\forall x\in\mathcal{X};

for the set of all possible classifiers H\mathcal{H},

and in fact, training using noisy labels is the same as training using clean labels in the dataset except a constant shift,

for every two classifiers h,h′h,h^{\prime}, if h′(X)h^{\prime}(X) is less informative for YY than h(X)h(X), i.e. h′(X)h^{\prime}(X) is independent of YY conditioning on h(X)h(X), then

The relatively invariance of DMI⁡\operatorname*{DMI} (Lemma 3.5) implies

The legal property follows from the information-monotonicity of LDMI⁡\mathcal{L}_{\operatorname*{DMI}} as h∗(X)=Yh^{*}(X)=Y is the most informative random variable for YY itself and the fact that for every square transition matrix TT, det⁡(T)=1\det(T)=1 if and only if TT is a permutation matrix 34. ∎

Experiments

We evaluate our method on both synthesized and real-world noisy datasets with different deep neural networks to demonstrate that our method is independent of both architecture and data domain. We call our method DMI and compare it with: CE (the cross entropy loss), FW (the forward loss 29), GCE (the generalized cross entropy loss 48), LCCN (the latent class-conditional noise model 44). For the synthesized data, noises are added to the training and validation sets, and test accuracy is computed with respect to true labels. For our method, we pick the best learning rate from {1.0×10−4,1.0×10−5,1.0×10−6}\{1.0\times 10^{-4},1.0\times 10^{-5},1.0\times 10^{-6}\} and the best batch size from {128,256}\{128,256\} based on the minimum validation loss. For other methods, we use the best hyperparameters they provided in similar settings. The classifiers are pretrained with cross entropy loss first. All reported experiments were repeated five times. We implement all networks and training procedures in Pytorch 28 and conduct all experiments on NVIDIA TITAN Xp GPUs.Source codes are available at https://github.com/Newbeeer/L_DMI. The explicit noise transition matrices are shown in Supplementary Material C. Due to space limit, we defer some additional experiments to Supplementary Material D.

To compare distance-based and information-theoretic loss functions as we mentioned in the third paragraph in introduction, we conducted experiments on Fashion-MNIST 42. It consists of 70,000 28×2828\times 28 grayscale fashion product image from 1010 classes, which is split into a 50,00050,000-image training set, a 10,00010,000-image valiadation set and a 10,00010,000-image test set. For clean presentation, we only compare our information-theoretic loss function DMI with the distance-based loss function CE here and convert the labels in the dataset to two classes, bags and clothes, to synthesize a highly imbalanced dataset (10%10\% bags, 90%90\% clothes). We use a simple two-layer convolutional neural network as the classifier. Adam with default parameters and a learning rate of 1.0×10−41.0\times 10^{-4} is used as the optimizer during training. Batch size is set to 128128.

We synthesize three cases of noise patterns: (1) with probability rr, a true label is substituted by a random label through uniform sampling. (2) with probability rr, bags →\to clothes, that is, a true label of the a priori less popular class, “bags”, is flipped to the popular one, “clothes”. This happens in real world when the annotators are lazy. (e.g., a careless medical image annotator may be more likely to label “benign” since most images are in the “benign” category.) (3) with probability rr, clothes →\to bags, that is, the a priori more popular class, “clothes”, is flipped to the other one, “bags”. This happens in real world when the annotators are risk-avoid and there will be smaller adverse effects if the annotators label the image to a certain class. (e.g. a risk-avoid medical image annotator may be more likely to label “malignant” since it is usually safer when the annotator is not confident, even if it is less likely a priori.) Note that the parameter 0≤r≤10\leq r\leq 1 in the above three cases also represents the amount of noise. When r=0r=0, the labels are clean and when r=1r=1, the labels are totally uninformative. Moreover, in case (2) and (3), as rr increases, the noise pattern changes from diagonally dominant to diagonally non-dominant.

As we mentioned in the introduction, distance-based loss functions will perform badly when the noise is non-diagonally dominant and the labels are biased to one class since they prefer the meaningless classifier h0h_{0} who always outputs the class who is the majority in the labels. (∀x,h0(x)=\forall x,h_{0}(x)= “clothes” and has accuracy 90%90\% in case (2) and ∀x,h0(x)=\forall x,h_{0}(x)= “bags” and has accuracy 10%10\% in case (3)). The experiment results match our expectation. CE performs similarly with our DMI for diagonally dominant noises. For non-diagonally dominant noises, however, CE only obtains the meaningless classifier h0h_{0} while DMI still performs pretty well.

2 Experiments on CIFAR-10, Dogs vs. Cats and MR

CIFAR-10 1 consists of 60,000 32×3232\times 32 color images from 1010 classes, which is split into a 40,00040,000-image training set, a 10,00010,000-image validation set and a 10,00010,000-image test set. Dogs vs. Cats 2 consists of 25,00025,000 images from 22 classes, dogs and cats, which is split into a 12,50012,500-image training set, a 6,2506,250-image validation set and a 6,2506,250-image test set. MR 27 consist of 10,66210,662 one-sentence movie reviews from 22 classes, positive and negative, which is split into a 7,6767,676-sentence training set, a 1,9191,919-sentence validation set and a 1,0671,067-sentence test set. We use ResNet-3411, VGG-1636, WordCNN15 as the classifier for CIFAR-10, Dogs vs. Cats, MR, respectively. SGD with a momentum of 0.90.9, a weight decay of 1.0×10−41.0\times 10^{-4} and a learning rate of 1.0×10−51.0\times 10^{-5} is used as the optimizer during training for CIFAR-10 and Dogs vs. Cats. Adam with default parameters and a learning rate of 1.0×10−41.0\times 10^{-4} is used as the optimizer during training for MR. Batch size is set to 128128. We use per-pixel normalization, horizontal random flip and 32×3232\times 32 random crops after padding with 44 pixels on each side as data augmentation for images in CIFAR-10 and Dogs vs Cats. We use the same pre-processing pipeline in 15 for sentences in MR. Following 44, the noise for CIFAR-10 is added between the similar classes, i.e. truck →\to automobile, bird →\to airplane, deer →\to horse, cat →\to dog, with probability rr. The noise for Dogs vs. Cats is added as cat →\to dog with probability rr. The noise for MR is added as positive →\to negative with probability rr.

As shown in Figure 3, our method DMI almost outperforms all other methods in every experiment and its accuracy drops slowly as the noise amount increases. GCE has great performance in diagonally dominant noises but it fails in diagonally non-dominant noises. This phenomenon matches its theory: it assumes that the label noise is diagonally dominant. FW needs to pre-estimate a noise transition matrix before training and LCCN uses the output of the model to estimate the true labels. These tasks become harder as the noise amount grows larger, so their performance also drop quickly as the noise amount increases.

3 Experiments on Clothing1M

Clothing1M 43 is a large-scale real world dataset, which consists of 1 million images of clothes collected from shopping websites with noisy labels from 14 classes assigned by the surrounding text provided by the sellers. It has additional 14k and 10k clean data respectively for validation and test. We use ResNet-5011 as the classifier and apply random crop of 224×224224\times 224, random flip, brightness and saturation as data augmentation. SGD with a momentum of 0.90.9, a weight decay of 1.0×10−31.0\times 10^{-3} is used as the optimizer during training. We train the classifier with learning rates of 1.0×10−61.0\times 10^{-6} in the first 55 epochs and 0.5×10−60.5\times 10^{-6} in the second 55 epochs. Batch size is set to 256256.

As shown in Table 5, DMI also outperforms other methods in the real-world setting.

Conclusion and Discussion

We propose a simple yet powerful loss function, LDMI⁡\mathcal{L}_{\operatorname*{DMI}}, for training deep neural networks robust to label noise. It is based on a generalized version of mutual information, DMI. We provide theoretical validation to our approach and compare our approach experimentally with previous methods on both synthesized and real-world datasets. To the best of our knowledge, LDMI⁡\mathcal{L}_{\operatorname*{DMI}} is the first loss function that is provably robust to instance-independent label noise, regardless of noise pattern and noise amount, and it can be applied to any existing classification neural networks straightforwardly without any auxiliary information.

In the experiment, sometimes DMI does not have advantage when the data is clean and is outperformed by GCE. GCE does a training optimization on MAE with some hyperparameters while sacrifices the robustness a little bit theoretically. A possible future direction is to employ some training optimizations in our method to improve the performance.

We would like to express our thanks for support from the following research grants: 2018AAA0102004, NSFC-61625201, NSFC-61527804.

References

Appendix A Training Process

Appendix B Other Proofs

Recall that the randomness of h(X)h(X) comes from both hh and XX and the randomness of hh is independent of everything else.

If we use Shannon mutual information as the performance measure,

Appendix C Noise Transition Matrices

Here we list the explicit noise transition matrices.

For Fashion-MNIST case (1), r=0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0,9r=0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0,9 are diagonally dominant noises. For other cases, r=0.0,0.1,0.2,0.3,0.4r=0.0,0.1,0.2,0.3,0.4 are diagonally dominant noises and r=0.5,0.6,0.7,0.8,0,9r=0.5,0.6,0.7,0.8,0,9 are diagonally non-dominant noises.

Appendix D Additional Experiments

For clean presentation, we only include the comparison between CE and DMI in section 5.1 and attach comparisons with other methods here. In the experiments in section 5.2, noise patterns are divided into two main cases, diagonally dominant and diagonally non-dominant and uniform noise is a special case of diagonally dominant noise. Thus, we did not emphasize the uniform noise results in section 5.2 and attach them here.

We also compared our method to MentorNet (the sample reweighting loss 14) and VAT (the regularization loss 25). For clean presentation, we only attach them here. Our method still outperforms these two additional baselines in most of the cases. VAT can not be applied to MR dataset.