D ISTILLATION ≈ E ARLY S TOPPING ? H ARVESTING D ARK K NOWLEDGE U TILIZING A NISOTROPIC I NFORMATION R ETRIEVAL F OR O VERPARAMETERIZED N EURAL N ETWORK
Anonymous authors
Paper under double-blind review
A BSTRACT
Distillation is a method to transfer knowledge from one model to another and often achieves higher accuracy with the same capacity.
In this paper, we aim to provide a theoretical understanding on what mainly helps with the distillation.
Our answer is "early stopping".
Assuming that the teacher network is overparameterized, we argue that the teacher network is essentially harvesting dark knowledge from the data via early stopping.
This can be justiﬁed by a new concept, Anisotropic Information
Retrieval (AIR), which means that the neural network tends to ﬁt the informative information ﬁrst and the non-informative information (including noise) later.
Motivated by the recent development on theoretically analyzing overparameterized neural networks, we can characterize AIR by the eigenspace of the Neural Tangent
Kernel(NTK).
AIR facilities a new understanding of distillation.
With that, we further utilize distillation to reﬁne noisy labels.
We propose a self-distillation algorithm to sequentially distill knowledge from the network in the previous training epoch to avoid memorizing the wrong labels.
We also demonstrate, both theoretically and empirically, that self-distillation can beneﬁt from more than just early stopping.
Theoretically, we prove convergence of the proposed algorithm to the ground truth labels for randomly initialized overparameterized neural networks in terms of (cid:96) 2 distance, while the previous result was on convergence in 0 - 1 loss.
The theoretical result ensures the learned neural network enjoy a margin on the training data which leads to better generalization.
Empirically, we achieve better testing accuracy and entirely avoid early stopping which makes the algorithm more user-friendly.
I NTRODUCTION
Deep learning achieves state-of-the-art results in many tasks in computer vision and natural language processing LeCun et al.
Among these tasks, image classiﬁcation is considered as one of the fundamental tasks since classiﬁcation networks are commonly used as base networks for other problems.
In order to achieve higher accuracy using a network with similar complexity as the base network, distillation has been proposed, which aims to utilize the prediction of one ( teacher ) network to guide the training of another ( student ) network.
In Hinton et al.
, the authors suggested to generate a soft target by a heavy-duty teacher network to guide the training of a light-weighted student network.
More interestingly, Furlanello et al.
; Bagherinezhad et al.
(2018) proposed to train a student network parameterized identically as the teacher network.
Surprisingly, the student network signiﬁcantly outperforms the teacher network.
Later, it was suggested by Zagoruyko & Komodakis (2016a); Huang & Wang (2017); Czarnecki et al.
(2017) to transfer knowledge of representations, such as attention maps and gradients of the classiﬁer, to help with the training of the student network.
In this work, we focus on the distillation utilizing the network outputs Hinton et al.
; Furlanello et al.
; Yang et al.
(2018a); Bagherinezhad et al.
; Yang et al.
(2018b).
To explain the effectiveness of distillation, Hinton et al.
(2015) suggested that instead of the hard labels ( i.e one-hot vectors), the soft labels generated by the pre-trained teacher network provide extra information, which is called the "Dark Knowledge".
The "Dark knowledge" is the knowledge encoded by the relative probabilities of the incorrect outputs.
In Hinton et al.
; Furlanello et al.
; Yang et al.
(2018a)
, the authors pointed out that secondary information, i.e the semantic similarity between different classes, is part of the "Dark Knowledge", and Bagherinezhad et al.
(2018) observed that the "Dark Knowledge" can help to reﬁne noisy labels.
In this paper, we would like to answer the following question: can we theoretically explain how neural networks learn the
Dark Knowledge?
Answering this question will help us to understand the regularization effect of distillation.
In this work, we assume that the teacher network is overparameterized, which means that it can memorize all the labels via gradient descent training Du et al.
(2018b;a); Oymak & Soltanolkotabi (2018); Allen-Zhu et al.
In this case, if we train the overparameterized teacher network until convergence, the network’s output coincides exactly with the ground truth hard labels.
This is because the logits corresponding to the incorrect classes are all zero, and hence no "Dark knowledge" can be extracted.
Thus, we claim that the core factor that enables an overparameterized network to learn "Dark knowledge" is early stopping .
What’s more, Arpit et al.
; Rahaman et al.
Xu et al.
(2019) observed that "Dark knowledge" represents the discrepancy of convergence speed of different types of information during the training of the neural network.
Neural network tends to ﬁt informative information, such as simple pattern, faster than non-informative and unwanted information such as noise.
Similar phenomenon was observed in the inverse scale space theory for image restoration Scherzer & Groetsch (2001);
Burger et al.
; Xu & Osher (2007); Shi & Osher (2008).
In our paper, we call this effect
Anisotropic Information Retrieval (AIR).
With the aforementioned interpretation of distillation, We further utilize AIR to reﬁne noisy labels by introducing a new self-distillation algorithm.
To extract anisotropic information, we sequentially extract knowledge from the output of the network in the previous epoch to supervise the training in the next epoch.
By dynamically adjusting the strength of the supervision, we can theoretically prove that the proposed self-distillation algorithm can recover the correct labels, and empirically the algorithm achieves the state-of-the-art results on Fashion MNIST and CIFAR10.
The beneﬁt brought by our theoretical study is twofold.
Firstly, the existing approach using large networks Li et al.
; Zhang & Sabuncu (2018) often requires a validation set to early terminate the network training.
However, our analysis shows that our algorithm can sustain long training without overﬁtting the noise which makes the proposed algorithm more user-friendly.
Secondly, our analysis is based on an (cid:96) 2 -loss of the clean labels which enables the algorithm to generate a trained network with a bigger margin and hence generalize better.
1. C ONTRIBUTIONS
We summarize our contributions as follows
• This paper aims to understand distillation theoretically ( i
e. understand the regularization effect of distillation).
Distillation works due to the soft targets generated by the teacher network.
Based on the observation that the overparameterized network can exactly ﬁt the one-hot labels which contain no dark knowledge, we theoretically justify that early stopping is essential for an overparameterized teacher network to extract dark knowledge from the hard labels.
This provides a new understanding of the regularization effect of distillation.
• This is the ﬁrst attempt to theoretically understand the role of distillation in noisy label reﬁnery using overparameterized neural networks.
Inspired by Li et al.
(2019), we utilize distillation to propose a self-distillation algorithm to train a neural network under label corruption.
The algorithm is theoretically guaranteed to recover the unknown correct labels in terms of the (cid:96) 2 -loss rather than the previous 0 - 1 -loss.
This enables the algorithm to generate a trained network whose output has a bigger margin and hence generalizes better.
Furthermore, our algorithm does not need a validation set to early stop during training, which makes it more hyperparameter friendly.
The theoretical understanding of the overparameterized networks encourages us to use large models which empirically produce
better results.
D ISTILLATION ≈ E ARLY S TOPPING ? 2. N O E ARLY S TOPPING , N O D ARK K NOWLEDGE
As mentioned in the introduction, an overparameterized teacher network is able to extract dark knowledge from the on-hot hard labels because of early stopping.
In this section we present an experiment to verify this effect of early stopping, where we use a big model as a teacher to teach a smaller model as the student.
In this experiment, we train a WRN-28 Zagoruyko & Komodakis (2016b) on CIFAR100 Krizhevsky & Hinton (2009) as the teacher model, and a 5-layers CNN as the student.
The experimental details are in the supplementary material.
The teacher model was trained by 40, 80, 120, 160 and 200 epochs respectively.
The results of knowledge distillation by the student model is shown in Fig.
S t ud e n t t e s t a cc u r a c y
T e a c
h e r t e s t a cc u r a c y
[Figure]
As we can see, the teacher model does not suffer from overﬁtting during the training, while it does not always educate a good student model either.
As suggested by Yang et al.
(2018a), a more tolerant teacher educates better students.
The teacher model trained with 80 epochs produces the best result which indicates that early stopping of the bigger model can extract more informative information for distillation.
2. A NISOTROPIC I NFORMATION R ETRIEVAL
In this paper, we introduce a new concept called Anisotropic Information Retrieval (AIR) , which means to exploit the discrepancy of the convergence speed of different types of information during the training of an overparameterized neural network.
An important observation of AIR is that informative information tends to converge faster than non-informative and unwanted information such as noise.
Selective bias of an iterative algorithm to approximate a function has long been discovered in different areas.
For example, Xu (1992) observed that iterative linear equation solver ﬁts the low frequency component ﬁrst, and they proposed a multigrid algorithm to exploit this property.
In image processing,
Scherzer & Groetsch (2001); Burger et al.
; Xu & Osher (2007); Shi & Osher (2008) proposed inverse scale space methods that recover image features earlier in the iteration and noise comes back later.
In kernel learning, early stopping of gradient descent is equivalent to the ridge regression Smale & Zhou (2007);
Yao et al.
; Vito et al.
(2005), which means that bias from the eigenspace corresponding to the larger eigenvalues is reduced quicker by the gradient descent.
Under the neural network setting, Rahaman et al.
Xu et al.
(2019) observed that neural networks ﬁnd low frequency patterns more easily.
Cicek et al.
(2018) discovered that noisy labels can slow down the training.
Arpit et al.
Rolnick et al.
(2017) studied the memorization effects of the deep networks, and revealed that, during training, neural networks ﬁrst memorize the data with clean labels and later with the wrong labels.
In the next subsection, we will characterize AIR of overparametrized neural networks using the Neural Tangent Kernel Jacot et al.
2. AIR AND N EURAL T ANGENT K ERNEL
In Jacot et al.
(2018), the authors introduced the Neural Tangent Kernel to characterize the trajectory of gradient descent algorithm learning inﬁnitely wide neural networks.
Denote f ( θ, x ) ∈ R as the output of neural network with θ ∈ R n being the trainable parameter and x ∈ R p the input.
Consider training the neural network using the (cid:96) 2 -loss on the dataset { ( x i , y i ) } ni =1 ∈ R p × R :
[Equation]
We use the gradient descent θ t +
=
θ t − η ∇ l ( θ t ) to train the neural network.
Let u t
=
( f ( θ t , x i ))
i ∈ [ n ] ∈ R n be the network outputs on all the data { x i } at iteration t and y =
( y i ) i ∈ [ n ] .
It was shown by Du et al.
(2018b); Oymak & Soltanolkotabi (2018)
; Li et al.
(2019) that the evolution of the error u t − y can be formulated in a quasi-linear form,
[Equation]
where ˆ
[Equation]
It is known that ˆ H t − H t = o (1) with respect to d , where H t = (cid:16)(cid:68)
∂f
( θ t ,x i ) ∂θ ,
[Equation]
∂θ (cid:69)(cid:17) i,j is an n × n positive semi-deﬁnite Gram matrix and d is the width of the neural network Oymak &
Soltanolkotabi (2018); Li et al.
This means that ˆ H t =
H t when the neural network is inﬁnitely wide.
It was further shown by Oymak & Soltanolkotabi (2018);
Li et al.
Du et al.
(2018a) that when the neural network is inﬁnitely wide, the Gram matrix is static, i.e. H t = H ∗ .
The static Gram matrix H ∗ is referred to as the Neural Tangent Kernel (NTK)Jacot et al.
Note that H ∗ is a symmetric positive semi-deﬁnite matrix.
Assume that λ 1 > · · · > λ n ≥ 0 are its n eigenvalues and e 1 , e 2 , · · · , e n are the corresponding eigenvectors.
The eigenvectors are orthogonal <
e i , e j > =
and H ∗ =
(cid:80) ni
=
λ i e i e Ti .
Consider the evolution of the projection of the loss function in different eigenspaces
[Equation]
We can see that the component lies in the eigenspace with a larger eigenvalue converges faster.
Therefore, AIR describes the phenomenon that the gradient descent algorithm searches for information components corresponding to different eigenspaces at different rates.
Rahaman et al.
; Arpit et al.
; Arora et al.
; Zhang & Sabuncu (2018) has shown that that one possible reason of neural network’s good generalization property is that neural network ﬁts useful information faster.
Thus in our paper, we regard informative information as the eigenspaces associated with the largest few eigenvalues of NTK.
[Figure]
the largest ﬁve eigensapces of NTK are decreasing.
We denote the projection of supervision signal to the eigenspace with a larger eigenvalue as useful information.
In Figure 2, We calculate the ratio of the172norm of the label vector provided by the self-distillation algorithm lies in the top-5 eigenspace as a representative of informative information.
We can see that the informative information decreases when the noise level increases.
This motivates us to further explore how "Dark Knowledge" helps with label reﬁnery.
N OISY L ABEL R EFINERY
Supervised learning requires high quality labels.
However, due to noisy crowd-sourcing platforms
Khetan et al.
and data augmentation pipeline Bagherinezhad et al.
(2018), it is hard to acquire entirely clean labels for training.
On the other hand, successive deep models often have huge capacities with millions or even billions of parameters.
Such huge capacity enables the network to memorize all the labels, right or wrong Zhang et al.
(2016), which makes learning deep neural networks with noisy labels a challenging task.
Arpit et al.
Rolnick et al.
Han et al.
(2018) pointed out that neural networks often ﬁt the clean labels before the noisy ones during training.
Recently, Li et al.
(2019) theoretically showed that early stopping can clean up label noise with overparametrized neural networks.
This, together with our understanding of distillation with AIR, inspired us to use distillation for noisy label reﬁnery.
We shall introduce a new self-distillation algorithm with theoretically guaranteed recovery of the clean labels under suitable assumptions.
3. R ELATED W ORKS
Training deep models on datasets with label corruption is an important and challenging problem that has attracted much attention lately.
In Ma et al.
(2018), the authors proposed to regularize the
Local Intrinsic Dimensionality of deep representations to detect label noise.
Tanaka et al.
(2018) proposed a joint optimization framework to simultaneously optimize the network parameters and output labels.
Zhang & Sabuncu (2018) introduced a loss function generalizing the cross entropy for robust learning.
The approach that is most relevant to ours is called learning with a mentor.
For example, Jiang et al.
(2017) used a mentor network to learn the curriculum for the student network.
Han et al.
Yu et al.
(2019) introduced two networks that can teach each other to reject wrong labels.
Hu et al.
(2019) designed a new regularizer to restrict every weight vector to be close to its initialization for all iterations thus enforcing the same regularization effect as early stopping.
In the literature of distillation, Bagherinezhad et al.
ﬁrst utilized distillation to reﬁne noisy labels of ImageNet, while Yang et al.
(2018b) introduced a distillation method to complete teacherstudent training in one generation.
The latter is most related to our proposed self-distillation algorithm.
However, the difference is that their model aims to ensemble diverse models in one training trajectory but ours aims to utilize AIR to reﬁne noisy labels during the training.
3. T HE S ELF - DISTILLATION A LGORITHM
It is known that the label noise lies in the eigenspaces associated to small eigenvalues Arora et al.
; Li et al.
Thus, Li et al.
(2019) used early stopping to remove label noise.
However, early stopping is hard to tune and sometimes leads to unsatisfactory results.
In this section, we proposed a self-distillation algorithm with an excellent empirical performance and a theoretical guarantee to recover the correct labels under certain conditions but without the requirement of early stopping.
From the perspective of AIR, we observe that the knowledge learned in early epochs is informative information ( i.e. the eigenspaces associated with the largest few eigenvalues of NTK) and can be used to reﬁne the training for later epochs.
In other words, the algorithm distills knowledge sequentially to guide the training of the model in later epochs by the knowledge distilled by the model from earlier epochs.
The informative information learned during early epochs is, in some sense, “low frequency information", which is the core factor to enable the model to generalize well.
A nice property of the self-distillation algorithm is that it generates the ﬁnal model in one generation ( i.e. single-round training), which has almost no additional computational cost compared to normal training.
The proposed self-distillation algorithm is given by Algorithm 1.
Here, the function h ( · ) in the algorithm is the label function.
It can either be a hard label function such as hardmax , or a soft label function such as softmax with a certain temperature.
The choice of h ( · ) and interpolation coefﬁcient α t depends on the usage of the self-distillation algorithm.
If
[Figure]
Algorithm 1 Self-Distillation
Randomly initialize the network.
t =repeat
Fetch data ( x 1 , y 1 ) , · · · , ( x n , y n ) from training set.
Set the label ˆ y i,t = α t y i + (1 − α t ) h ( N ( x i , ω t ))
Detach ˆ y i from the computational graph
Update
[Equation]
until training converged =
we want to clean up label noise, we normally choose h ( · ) to be hardmax or softmax with a low temperature.
The weight α t is chosen to be adaptively decreasing corresponding to the increase of our conﬁdence on the learned model at current epoch.
The introduction of h ( · ) helps to boost AIR and the information gained from the previous epoch.
3. T HEORETICAL F OUNDATION OF S ELF -D ISTILLATION
In this section, we provide a theoretical justiﬁcation of the performance of the self-distillation algorithm with overparameterized neural networks.
Here, we only consider binary classiﬁcation task with label ∈ {− 1 , +1 } .
Deﬁnition 1.
( Noisy Clusterable Dataset Descriptions Li et al.
• We consider a dataset with n data: { ( x i , y i , ˜ y
i ) }
ni =1 ∈ R d ×{− 1 , +1 }×{− 1 , +1 } .
( x i , y i ) are the input data and its associated label seen by the model while ˜ y
i is the unobserved ground truth label.
The pair ( x i , y i ) with y i = ˜
y i is called a clean data, otherwise it is called a corrupted data.
• We assume that { x i } i ∈ [ n ] contains points with unit Euclidean norm and has K clusters.
The data is randomly i.i.d sampled from a distribution P .
Let n l be the number of points in the l th cluster.
In our analysis, we ssume that number of data in each cluster is balanced in the sense that n l ≥ c low nK for constant c low > 0 and all of the data is bounded, i.e. (cid:107) x
i (cid:107) 2 2 ≤ R, ∀ i ∈ [ n ] .
• For each of the K clusters, we assume that all the input data lie within the Euclidean ball B ( c l , (cid:15) ) , where c l is the center with unit Euclidean norm and (cid:15) > 0 is the radius.
• Assume that the data in the same cluster has the same ground truth label ˜
y .
For the l th cluster, we denote ρ l the proportion of the data with wrong labels.
Let ρ = max { ρ i : i ∈
[ K ] } and assume that ρ < 12 .
• A dataset satisfying the above assumptions is called an ( (cid:15), ρ ) dataset.
The above deﬁnition of dataset follows that of the previous work Li et al.
; Li & Liang (2018).
It is reasonable to assume that ρ < 12 in order to ensure the correct labels dominate each cluster.
In this work, we consider two-layers neural networks.
For input data x ∈ R d , the output of the neural network f is:
[Equation]
where W ∈ R k × d is the weight matrix and φ is the activation function applied to Wx entry-wise.
We suppose k is even and ﬁx the output layer by assigning half of the entries 1 √ k and the others − 1 √ k .
Given a data matrix X =
[ x 1 , x 2 , . . .
, x n ] T , we simply denote the output vector on the data matrix as [Equation] [Equation] , x
[Equation]
T ∈ R .
Following the previous work on training overparameterized neural network Du et al.
(2018b), we consider the MSE loss
[Equation]
Deﬁnition 2.
For a data matrix D ∈ m × d , we denote λ ( D ) the small eigenvalue of the neural network covariance matrix
[Equation]
The above deﬁnition reveals the matching score of the model and data.
We denote C =
[ c 1 , c 2 , . .
, c K ] T the matrix composed by the center of the cluster.
We denote Λ =
min( λ ( C ) , λ ( X )) for simpliﬁcation.
We are now ready to present our main theorem that establishes the convergence of the proposed self-distillation algorithm to the ground truth labels under certain conditions.
Theorem 1.
Assume that | φ (0) | , | φ (cid:48) ( · ) | and | φ (cid:48)(cid:48) ( · ) | are bounded with upper bound Γ ≥ 1 .
We ﬁx a learning rate η = 1 2Γ 2 n for the gradient descent.
Assume that the sequence α t monotonically decreases to 0 .
Furthermore, we have two slow-decay conditions on α t
[Equation]
• α T 1 ≥ max(1 − c low λ ( C )
128Γ 2 K (1 − 2 ρ
[Equation]
, 74 − 32 ρ 2 − 2 ρ )
[Equation]
where T 1 = (cid:100) 80Γ
2 K c low λ ( C ) log( Γ √ 32 n log [Equation] 1 − 2 ρ ) (cid:101) and T 2 = inf { t : α t < 1 24 √ n } .
We choose the following label function h ( · )
[Equation]
For the self-distillation algorithm, if the following two conditions for the radius (cid:15) and the width k are satisﬁed
[Equation]
then for random initialization W 0 ∼ N (0 , 1)
k
× d , with probability 1 − δ , we have:
[Equation]
where W t is the parameter generated by the full-batch self-distillation algorithm at iteration t . Theorem 2.
Combining Theorem 1. with Neyshabur et al.
(2018), with failure probability δ ∈ (0 , 1) , using the self-distillation algorithm described in Theorem 1.
using a neural network with width k =
[Equation] we can have [Equation] Compared to previous result on noisy label Li et al.
(2019), our results made the following improvements.
Firstly, our algorithm ﬁts the ground truth labels without the help of early stopping as long as a mild condition on α t is satisﬁed.
Secondly, while previous work only ensures the algorithm to yield correct class labels on training set, our results state the (cid:96) 2 convergence of the outputs to the ground truth labels.
As a result, the solution that our algorithm ﬁnds tends to have larger margin which leads to better generalization Mohri et al.
This is shown in Theorem 2.
and will be supported by our empirical studies in the next subsection.
[Figure]
The normal training suffers from over-ﬁtting, while selfdistillation does not.
(Note that we are conducting cosine learning rate scheduling.
The learning rate is extremely small at the end of learning.)
In this section, we conduct experiments on the self-distillation algorithm.
In the experiments, we applied our algorithm on corrupted Fashion MNIST and CIFAR10.
At noise level p , every data in the original training dataset is chosen and assigned a symmetric noisy label with probability p .
We test our algorithm for p = 0 .
6 and 0 . 8 .
The test accuracy is calculated with respect to the ground truth labels.
We adopted the shake-shake network of
Gastaldi (2017) with 32 channels and cross entropy loss.
We trained the network by momentum stochastic gradient descent (SGD) with batch size 128, momentum 0.9 and a weight decay of 1e-4.
We schedule the learning rate following cosine learning rate Loshchilov & Hutter (2017) with a maximum learning rate 0 .
2 and minimum learning rate 0 .
In order to ensure convergence, we trained the models for 600 epochs.
Following
Lee et al. (2015), mean subtraction, horizontal random ﬂip, 32 × 32 random crops after padding with 4 pixels on each side from the padded image is performed as the data augmentation process.
For testing, We only do evaluation on the original 32 × 32 image.
In self-distillation, we adaptively adjust α t by setting 1 − α t = λ ∗ accuracy , where accuracy is the accuracy calculated on the current batch.
The direct ratio λ is the only tuning parameter.
For CIFAR10, We simply set λ as 1 when the noisy level is low, such as p = 0 , 0 . 2 and 0 .
When the noisy level p = 0 .
6 and 0 .
8 , we take λ = 1 . 5 .
For Fashion MNIST, We simply set λ as 0 . 6 , 1 , 1 , 1 . 4 , 1 . 6 respectively when p = 0 , 0 . 2 , 0 . 4 , 0 . 6 , 0 . 8 .
We report the average ﬁnal test accuracy of 3 runs for Fashion MNIST and CIFAR10 in Table 1.
[Table]
3. D ISTILLATION (cid:39) E ARLY S TOPPING
Distillation can beneﬁt from more than just early stopping.
Distillation has the ability to enhance the AIR and thus can extract more dark knowledge from the data via early stopping.
For example, Hinton et al.
(2015) enhanced AIR by adjusting the temperature in the softmax layer.
In self-distillation, the label function h ( · ) is proposed to amplify the information gained in the earlier epochs so that the knowledge gained in the earlier epochs is preserved.
Thus, self-distillation does not require early stopping which makes the algorithm more user-friendly.
On the other hand, the selfdistillation algorithm dynamically enhances
AIR which enables it to achieve (cid:96) 2 convergence and thus better generalization.
Again, we use the ratio of the norm of the label vector which lies in the top-5 eigenspace as a representative of informative information.
We call the subtraction of informative information corresponding to the label vector provided by self-distillation algorithm and original label vector as information gain.
From 5 we can see that the information gain is mostly larger than zero during the training of self-distillation algorithm.
This phenomenon indicates that the supervision signal of self-distillation algorithm gains more information than directly using the noisy label.
To sum up, a well-designed distillation algorithm can enjoy a regularization effect beyond early stopping and is able to gain more knowledge from the data.
C ONCLUSION AND D ISCUSSION
This paper provided an understanding of distillation using overparameterized neural networks.
We observed that such neural networks posses the property of Anisotropic Information Retrieval (AIR), which means the neural network tends to ﬁt the infomrative information ( i.e. the eigenspaces associated with the largest few eigenvalues of NTK)
ﬁrst and the non-informative information later.
Through AIR, we further observed that distillation of the Dark Knowledge is mainly due to early stopping.
Based on this new understanding, we proposed a new self-distillation algorithm for noisy label reﬁnery.
Both theoretical and empirical justiﬁcations of the performance of the new algorithm were provided.
Our analysis is based on the assumption that the teacher neural network is overparameterized.
When the teacher network is not overparameterized, the network will be biased towards the label even without early stopping.
It is still an interesting and unclear problem that whether the bias can provide us with more information.
For label reﬁnery, our analysis is mostly based on the symmetric noise setting.
We are interested in extending our analysis to the asymmetric setting.
A P ROOF D ETAILS A. N EURAL N ETWORK P ROPERTIES
As preliminaries, we ﬁrst discuss some properties of the neural network.
We begin with the jacobian of the one layer neural network x → v (cid:124) φ ( Wx ) , the Jacobian matrix with respect to W takes the form
[Equation]
Thus
[Equation]
First we borrow Lemma 6.6, 6.7, 6.8 from Oymak & Soltanolkotabi (2018) and Theorem 6.7, 6.
from Li et al.
Lemma 1.
Let X =
[ x 1 , x 2 , . . .
, x n ] T be a data matrix made up of data with unit Euclidean norm.
Assuming that λ ( X ) > 0 , the following properties hold.
• (cid:107) J
( W, X ) − J ( ˜ W, X ) (cid:107) ≤ Γ √ n √ k (cid:107) W − ˜ W (cid:107) F
[Equation]
• (cid:107) J
( W, X ) (cid:107) ≤ Γ √ n , •
As long as k ≥ 20Γ 2 n log nδ λ ( X ) , at
random Gaussian
initialization W 0 ∼ N (0 , 1) k
× d , with probability at least 1 − δ , we have
[Equation]
Lemma 2.
Let X =
[ x 1 , x 2 , . . .
, x n ] T be the data matrix of a (cid:15) -clusterable dataset.
Set ˜ X
=
[˜ x 1 , ˜ x 2 , . .
. , ˜ x n ] T in which ˜ x
i corresponds to the center of cluster including x i .
What’s more, we deﬁne the matrix of cluster center C =
[ c 1 , c 2 , . .
, c K ] T .
Assuming that λ ( C ) > 0 , the following properties hold.
• (cid:107) J ( W, ˜ X ) −
[Equation]
( ˜ W, ˜ X ) (cid:107)
[Equation]
• (cid:107) J
( W, X ) (cid:107) ≤ Γ √ c up n ≤ Γ √ n , • As long as k ≥
20Γ 2 K log
Kδ
λ
( C ) , at random Gaussian initialization W 0 ∼ N
[Equation] [Equation]
k × d , with probability at least 1 − δ , we have
[Equation]
• range ( J ( W, ˜ X ))
⊂ S + for any parameter matrix W .
Then, we gives out the perturbation analysis of the Jacobian matrix.
Lemma 3.
Let X be a (cid:15) -clusterable
data matrix with its center matrix ˜ X .
For parameter matrices
W, ˜ W , we have
[Equation]
Proof.
We bound (cid:107) J ( W, X ) − J ( ˜ W, ˜ X ) (cid:107) by (cid:107)
[Equation]
( W, X ) −
[Equation]
( ˜ W, ˜ X )
[Equation]
≤
[Equation]
The ﬁrst term is bounded by Lemma 1.
As to the second term, we bound it by
[Equation]
Combining the inequality above
[Equation]
we get
[Equation]
Lemma 4.
Let X be a (cid:15) -clusterable
data matrix with its center matrix ˜ X .
We assume (cid:107) ˜ W 1 (cid:107) , (cid:107) ˜
W 2 (cid:107) have a upper bound c √ k .
Then for parameter matrices W 1 , W 2 , ˜ W 1 , ˜ W 2 , we have
[Equation]
Proof.
By the deﬁnition of average Jacobian
[Equation]
we have
[Equation]
A. P ROVE OF THE THEOREM
First, we introduce the proof idea of our theorem.
Our proof of the theorem divides the learning process into two stages.
During the ﬁrst stage, we aim to prove that the neural network will give out the right classiﬁcation, i.e. the 0 - 1 -loss converges to 0.
The proof in this part is modiﬁed from Li et al.
Furthermore, we proved that training 0 - 1 -loss will keep 0 until the second stage starts and the margin at the ﬁrst stage will larger than 1 − 2 ρ 2 .
During the second stage, we prove that the neural networks start to further enlarge the margin and ﬁnally the (cid:96) 2 loss starts to converge to zero.
Following Oymak & Soltanolkotabi (2018); Li et al.
Du et al.
(2018b), we directly analysis the dynamics of each individual prediction f
( W, x i ) for i
= 1 , 2 , · · · , n .
Oymak & Soltanolkotabi (2018); Li et al.
(2019) has shown that this dynamic can be illustrated by the average Jacobian.
Deﬁnition 3.
We deﬁne the average Jacobian for two parameters W 1 and W 2 and data matrix X as
[Equation]
Lemma 5.
(Li et al.
Lemma 6.2)
Given gradient descent iterate ˆ θ = θ − η ∇ L ( θ ) , deﬁne
[Equation]
The residual ˆ r = f
(ˆ θ ) − y, r = f ( θ ) − y obey the following equation
[Equation]
In our proof, we project the residual to the following subspace
Deﬁnition 4.
Let { x i } ni =1 be a (cid:15) -clusterable
dataset and { ˜ x i } ni =1 be the associated cluster centers, that is, ˜ x i =
c l iff x i is from l th cluster.
We deﬁne the support subspace S + as a subspace of dimension K , dictated by the cluster membership as follows.
Let Λ l ⊂ { 1 , 2 , · · · , n } be the set of coordinates i such that =
c l .
Then S + is characterized by
[Equation]
Deﬁnition 5.
We deﬁne the minimum eigenvalue of a matrix B on a subspace S
[Equation]
where P S is the projection to the space S .
Recall the generation process of the dataset
Deﬁnition 6.
( Clusterable Dataset Descriptions )
• We assume that { x i } i ∈ [ n ] contains points with unit Euclidean norm and has K clusters.
Let n l be the number of points in the l th cluster.
Assume that number of data in each cluster is balanced in the sense that n l ≥ c low nK for constant c low > 0 .
• For each of the K clusters, we assume that all the input data lie within the Euclidean ball B ( c l , (cid:15) ) , where c l is the center with unit Euclidean norm and (cid:15) > 0 is the radius.
• A dataset satisfying the above assumptions is called an (cid:15) -clusterable
dataset.
A.2. T HE F IRST S TAGE : F ITTING THE LABEL
First, we reduct the dataset to its cluster center, i.e. (cid:15) = 0 for (cid:15) -clusterable dataset.
Lemma 6.
We ﬁx the label function
[Equation]
Let { x i } ni =1 be a (cid:15) -clusterable
dataset and { ˜ x i } ni =1 be the associated cluster centers, that is, ˜ x i =
c l iff x i is from l th cluster.
We denote the data matrix X and ˜ X .
We denote α = (cid:113) c low nλ ( C ) 8 K , β = Γ √ n and L = Γ √ n √ k .
We set the learning rate η = min( 12 β 2 , αLβ Θ ) , where Θ is maximum of the residual norm during the optimization.
We suppose along the optimization path we have α ≤ (cid:107) J ( W, ˜ X ) v (cid:107) ≤ β for all v ∈ S + .
We set T 1 = (cid:100) log 1 − ηα
[Equation] [Equation]
where ¯ r 0 = P S + ( f ( W 0 , ˜ X ) − y 0 ) is the projected residual on the space S + .
Then ∀ t ≥ T 1 , we have
• The neural network can learn the true label sgn ( f )
[Equation]
W
[Equation]
˜ X
[Equation]
= ˜ y. • The weight vector will be close to its initialization for all iterations
[Equation]
Proof.
We denote C 1 (cid:44) max t ≥ 0 2 √ n ( α t − α t +1 ) .
We denote J t =
J ( W t , ˜ X ) .
Follow the step of gradient descent, we have
[Equation]
We denote G t =
J ( W t +1 , W t , ˜ X )
J ( W t , ˜ X ) T .
Then the dynamic of gradient descent can be written by
[Equation]
We consider the dynamic of the residual r t
[Equation]
We project the residual on S +
[Equation]
r t
[Equation]
Thus, the norm of the residual can be bounded by
[Equation]
Utilizing the following lemma
Lemma 7.
(Claim2.
Li et al.
Let P S
+ be the projection matrix to S
+ , then the following inequality holds
[Equation]
on the condition that η ≤
[Equation]
Therefore, as long as η ≤ α Lβ
[Equation]
r t (cid:107) 2 holds, we have
[Equation]
When α t ≥ 1 − α 2 4 β 2 L
[Equation]
, we have
[Equation]
By simple calculation, we have
[Equation]
After T 1 = log 1 − ηα 21 − 2 ρ 8 (cid:107) ¯ r 0 (cid:107) 2 iterations, we have
[Equation]
as long as C 1 ≤ ηα 2 32 (1 − 2 ρ ) .
On the condition that α T 1 ≥ 1 − 74 − 32 ρ 2 − 2 ρ , we have
[Equation]
As a result, all the data have been classiﬁed correctly at iteration T 1 and the following inequality holds
[Equation]
For the next step, we use induction to prove that
[Equation]
For t = T 1 , it has already been proved.
We assume the claim is correct for arbitrary t , we establish the induction for t
+ 1 .
By applying projection to S + on equation 7, we have
[Equation]
By applying lemma 7, we have
[Equation]
Given that h ( f t ) =
˜ y , we have
[Equation]
Thus, for f t +1 we have
[Equation]
By the deﬁnition of h ( · )
[Equation]
we deduce that h ( f t +1 ) =
˜
y .
Back to equation
[Equation]
we have
[Equation]
Finally, we estimate the total variation of the parameter.
Combining equation 11 and 12, we can conclude that inequality
[Equation]
holds for all t ≥ 0 .
After taking sum on both sides for t = 0 , 1 , 2 , . . .
, we have
[Equation]
By simple calculation
[Equation]
we get
[Equation]
Combining equation 6, we have
[Equation]
A.2. S ECOND S TAGE : E NLARGE T HE M ARGIN
Then we further to adapt the above theorem to the (cid:15) -clusterable dataset by a pertubation analysis.
Since we have a simple inequality α a ≥ α b , in the following discussion
[Equation]
we simply replace the α a in the previous conclusion by α b , the conclusion also holds.
Lemma 8.
Let { x i } ni =1 be a (cid:15) -clusterable
dataset and { ˜ x i } ni =1 be the associated cluster centers, that is, ˜ x i =
c l iff x i is from l th cluster.
We denote the data matrix X and ˜ X .
For the same initialization
W 0 =
˜ W 0 , we run the self-distillation algorithm on X and tX respectively.
We denote the parameter matrix W t and ˜ W t for t ≥ 0 .
We denote α = (cid:113) c low n Λ 8 K , β = Γ √ n and L = Γ √ n √ k .
We set the learning rate η = min( 12 β 2 , αLβ Θ ) , where Θ is maximum of the residual norm during the optimization.
We denote c √ k the upper bound of the Frobenius norm of the parameter matrxi and we set M = c
+ 1 .
We set T 2 = inf { t : α t < 1 24 √ n } .
Then if the following conditions hold
[Equation]
we have
[Equation]
for all t ≤ T 2 .
Proof.
We introduce the following notations.
[Equation]
We can conclude the following inequalities from lemma 3 and lemma
[Equation]
Thus the parameters are updated by gradient descent
[Equation]
we have
[Equation]
Also
[Equation]
we have
[Equation]
f
[Equation]
W t , X )
[Equation]
f (
[Equation]
W t , ˜ X )
[Equation]
η ˜ J t +1 ,t ˜ J T t ( r t
[Equation]
Tr t )
[Equation]
+ ηβ
[Equation]
) ≤(cid:107)
(1 − η ˜ J t +1 ,t ˜ J T t )( f (
[Equation]
t , X )
[Equation]
f ( ˜ W t ,
[Equation]
X ))
(cid:107) 2 + η (cid:107) ˜
J t +1 ,t ˜ J T t ( y t − ˜ y t )
(cid:107)+
[Equation]
r t
[Equation]
t
[Equation]
d
[Equation]
[Equation] [Equation]
[Equation] [Equation]
+ ηβ
[Equation]
t (cid:107)
[Equation]
t
[Equation]
d t
[Equation] [Equation]
n(cid:15) )
If p t ≤ 1 − 2 ρholds for t ≤ T 2 , then for T 1 ≤ t ≤ T 2 , we have f ( W t , X ) =
˜ y .
Under such circumstance, we have (cid:107) h
( f ( W t , X ))
− h
( f ( ˜ W t , ˜ X ))
(cid:107)
=
For t < T 1 , we have
[Equation]
To sum up, if we can guarantee that p t ≤ 1 − 2 ρholds for t ≤ T 2 , we have
[Equation]
For (cid:107) r t (cid:107) 2 , we have
[Equation]
Thus we have the following inequality for p t
[Equation]
We claim that if the following conditions for (cid:15) and k hold
[Equation]
one can show that
[Equation]
for t ≤ T 2 by induction.
It is obviously when t = 0 .
We further suppose the inequalities hold for an arbitrary t satisfying t < T 2 , we have
[Equation]
because of the condition on k ensures that L Θ d t ≤ M ΓΘ √ n(cid:15) .
When it comes to p t +
[Equation]
we have
[Equation]
because of the conditions on (cid:15) and k ensure that Ld T 2 ≤ M Γ √ n(cid:15) and p t ≤ Θ .
Now we are ready to ﬁnalize the proof of our main theorem.
Proof.
We denote C 2 (cid:44) max s ≥ T 2 2 √ n ( α s − α s +1 ) .
We take Θ =
( C 3 Γ (cid:113) log 8 δ + 1) √ n .
C 3 is the constant in Hoeffding’s inequality.
By lemma 6, we have Θ ≥ max t ≥ 0 (cid:107) ¯Tr t (cid:107) 2 with probability 1 − δ 4 .
Combining lemma 6 and 8, we have f ( W t , X ) =
˜
y for T 1 ≤ t ≤ T 2 and
[Equation]
Similar to the proof in 6, we consider the gradient descent on original dataset X after T 2 .
We proof the following claim by induction
[Equation]
For s = T 2 , it has already been proved.
We assume the claim is correct for arbitrary s , we establish the induction for s + 1 .
By equation 7, we have
[Equation]
By applying lemma 7, we have
[Equation]
Given that h ( f ( W s , X )) =
˜ y , we have
[Equation]
Thus, for f ( W s +1 , x i ) we have
[Equation]
As a result, we have f ( W s +1 , X ) =
˜
y .
Furthermore, we can bound (cid:107) r s +1 (cid:107) 2 by
[Equation]
To sum up, we have the following inequality holds for all s ≥ T
[Equation]
After taking sum on both sides for s ≥ T 2 , we have
[Equation]
Furthermore
[Equation]
we have
[Equation]
Finally, we check all the conditions for α and η .
For η , we require η ≤ 12 β 2 and η ≤ αLβ min t ≥ 0 ,s ≥ T 2 ( 1 (cid:107) ¯Tr
[Equation]
1 (cid:107) r s (cid:107) 2 ) .
For k ≥
[Equation]
low
[Equation]
O ( nK log 1 δ c low Λ ) , we have
[Equation]
On such condition, we can choose η = 12 β 2 = 1 2Γ 2 n .
The distance between the intermediate parameter matrix and the initial parameter matrix can be bounded by
[Equation]
By lemma 1 and lemma 2, as long as k ≥ 20Γ 2 n log 4 nδ Λ , with probability 1 − δ 2 , we have
[Equation]
To ensure α lower bounding the eigenvalue of the gram matrix, we need to verify that
[Equation]
That is to say
[Equation] [Equation]
Another condition related to R is the condition on M .
We require
[Equation]
By Bernstein’s inequality, we have
[Equation]
with probability 1 − δ/ 4 .
On the condition that k ≥ R 2 (acutually one can show that 8 K Γ 2 R 2 c low Λ ≥ R 2 ), we can choose M = (cid:113)
d + C 4 log 8 δ
+ 2 .
We take these constants to the lemma 8.
Firstly, for (cid:15) we have
[Equation]
For k we have
[Equation]
We point out that
[Equation]
Secondly we bound d T 2 by
[Equation]
We combine equation 20, 21 and
[Equation]
we deduce the last condition for k
[Equation]
To sum up
[Equation]
we require k to satisfy k
[Equation]
Ω
[Equation]
and require (cid:15) to satisfy
[Equation]
We substitute C 1 and C 2 by the value of α in lemma 6 and lemma 8 respectively and then get the condition for α t
• max t<T 2√ n ( α t − α t +1 )
≤ c low λ ( C )
512Γ 2 K (1 − 2 ρ ) , max s ≥ T 2 2 √ n ( α s − α s +1 ) ≤ c low Λ
[Equation]
2 K (1 − 2 ρ )
[Equation]
• α T
[Equation]
Also
[Equation]
we substitute T 1 by the value of α in lemma
[Equation]
and combine the fact that ηα
[Equation]
4 =
[Equation]
2 ≤ 18 , we have
[Equation]
B E XPERIMENT D ETIALS
Experiment In Section2.1 The network structure of the small student network is demonstrated in
Table 2.
[Table]
Experiment In Section2.3 and Section3.5 For these two experiments, we modify CIFAR10 to a binary classiﬁcation task.
We choose class 2 , 7 to be the positive class and the others to be negative.
We train resnet56 with MSE loss.
We set batch size 128 , momentum 0 .
9 , weight decay 5 e − 4 and learning rate 0 .
In the experiment in section2.3, we fetch a batch of data (batch size= 128 ) from the testset and randomly corrupted the label by noise level 0 , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 .
We plot the ratio of the norm of the label vector which lies in the subspaces corresponding to top-5 eigenvalues of NTK.
In the experiment in section2.3, we calculate the ratio of the norm of the label vector which lies in the subspaces corresponding to top-5 eigenvalues of NTK ﬁrstly.
We calculate the ratio of the norm of the label vector provided by the self-distillation algorithm lies in the top-5 eigenspace.
We calculate the difference of the latter ratio and the former ratio and called it information gain.
We plot the information gain of the ﬁrst 1500 iterations.