W HEN D O C URRICULA W ORK ?
Blueshift, Alphabet edyer@google.
Behnam Neyshabur
Blueshift, Alphabet neyshabur@google.com
A BSTRACT
Inspired by human learning, researchers have proposed ordering examples during training based on their difﬁculty.
Both curriculum learning exposing a network to easier examples early in training, and anti-curriculum learning showing the most difﬁcult examples ﬁrst have been suggested as improvements to the standard i i d training
In this work, we set out to investigate the relative beneﬁts of ordered learning
We ﬁrst investigate the implicit curricula resulting from ar - chitectural and optimization bias and ﬁnd that samples are learned in a highly consistent order
Next, to quantify the beneﬁt of explicit curricula , we conduct extensive experiments over thousands of orderings spanning three kinds of learning: curriculum anti-curriculum, and random-curriculum – in which the size of the training dataset is dynamically increased over time, but the examples are ran domly ordered
We ﬁnd that for standard benchmark datasets curricula have only marginal beneﬁts and that randomly ordered samples perform as well or better than curricula and anti-curricula , suggesting that any beneﬁt is entirely due to the dynamic training set size.
Inspired by common use cases of curriculum learning in practice , we investigate the role of limited training time budget and noisy data in the success of curriculum learning
Our experiments demonstrate that curriculum, but not anti curriculum can indeed improve the performance either with limited training time budget or in existence of noisy data.
INTRODUCTION
Inspired by the importance of properly ordering information when teaching humans (Avrahami et al., 1997), curriculum learning (CL) proposes training models by presenting easier examples earlier during training (Elman, 1993;
Sanger, 1994; Bengio et al., 2009).
Previous empirical studies have shown instances where curriculum learning can improve convergence speed and/or generalization in domains such as natural language processing (Cirik et al., 2016; Platanios et al., 2019), computer vision (Pentina et al., 2015; Saraﬁanos et al., 2017; Guo et al., 2018; Wang et al., 2019), and neural evolutionary computing (Zaremba & Sutskever, 2014).
In contrast to curriculum learning, anticurriculum learning selects the most difﬁcult examples ﬁrst and gradually exposes the model to easier ones.
Though counter-intuitive, empirical experiments have suggested that anti-curriculum learning can be as good as or better than curriculum learning in certain scenarios (Kocmi & Bojar, 2017; Zhang et al., 2018; 2019b).
This is in tension with experiments in other contexts, however, which demonstrate that anti-curricula under perform standard or curriculum training (Bengio et al., 2009; Hacohen & Weinshall, 2019).
As explained above, empirical observations on curricula appear to be in conﬂict.
Moreover, despite a rich literature (see Section A), no ordered learning method is known to improve consistently across contexts, and curricula have not been widely adopted in machine learning.
This suggest ruling out curricula as beneﬁcial for learning.
In certain contexts, however, for large-scale text models such as GPT-3 (Brown et al., 2020) and T5 (Raffel et al., 2019), curricula are standard practice.
These contradicting observations contribute to a confusing picture on the usefulness of curricula.
This work is an attempt to improve our understanding of curricula systematically.
We start by asking a very fundamental question about a phenomenon that we call implicit curricula .
Are examples learned in a consistent order across different runs, architectures, and tasks?
If such a robust notion exists, is it possible to change the order in which the examples are learned by presenting them in a different order?
The answer to this question determines if there exists a robust notion of example difﬁculty that could be used to inﬂuence training.
We then look into different ways of associating difﬁculty to examples using scoring functions and a variety of schedules known as pacing functions for introducing examples to the training procedure.
We investigate if any of these choices can improve over the standard full-data i.i.d.
training procedure commonly used in machine learning.
Inspired by the success of CL in large scale training scenarios, we train in settings intended to emulate these large scale settings.
In particular, we study the effect of curricula when training with a training time budget and training in the presence of noise.
Contributions. In this paper, we systematically design and run extensive experiments to gain a better understanding of curricula.
We train over 25,000 models over four datasets, CIFAR10/100,
FOOD101, and FOOD101N covering a wide range of choices in designing curricula and arrive at the following conclusions:
• Implicit Curricula: Examples are learned in a consistent order (Section 2).
We show that the order in which examples are learned is consistent across runs, similar training methods, and similar architectures.
Furthermore, we show that it is possible to change this order by changing the order in which examples are presented during training.
Finally, we establish that well-known notions of sample difﬁculty are highly correlated with each other.
• Curricula achieve (almost) no improvement in the standard setting (Section 4 and 6).
We show curriculum learning, random, and anti-curriculum learning perform almost equally well in the standard setting.• Curriculum learning improves over standard training when training time is limited (Section 5 and 6) .
Imitating the large data regime, where training for multiple epochs is not feasible, we limit the number of iterations in the training algorithm and compare curriculum, random and anti-curriculum ordering against standard training.
Our experiments reveal a clear advantage of curriculum learning over other methods.
• Curriculum learning improves over standard training in noisy regime (Section 5 and 6).
Finally, we mimic noisy data by adding label noise to CIFAR100 and perform experiment on natural noisy dataset – FOOD101N. Similar to Jiang et al.
; Saxena et al.
; Guo et al.
, our experiments indicate that curriculum learning has a clear advantage over other curricula and standard training.
Related Work.
Bengio et al.
(2009) is perhaps the most prominent work on curriculum learning where the “difﬁculty” of examples is determined by the loss value of a pre-trained model.
Toneva et al.
(2019) instead suggested using the ﬁrst iteration in which an example is learned and remains learned after that.
Finally, Jiang et al.
(2020b) has proposed using a consistency score (c-score) calculated based on the consistency of a model in correctly predicting a particular example’s label trained on i.i.d.
draws of the training set.
When studying curriculum learning, we look into all of the above-suggested measures of sample difﬁculty.
We further follow Hacohen & Weinshall (2019) in deﬁning the notion of pacing function and use it to schedule how examples are introduced to the training procedure.
However, we look into a much more comprehensive set of pacing functions and different tasks in this work.
Please see Section A for a comprehensive review of the literature on curricula.
I MPLICIT C URRICULA
Curriculum learning is predicated on the expectation that we can adjust the course of learning by controlling the order of training examples.
Despite the intuitive appeal, the connection between the order in which examples are shown to a network during training and the order in which a network learns to classify these examples correctly is not apriori obvious.
To better understand this connection, we ﬁrst study the order in which a network learns examples under traditional stochastic gradient descent with i.i.d.
data sampling.
We refer to this ordering – which results from the choice of architecture and optimization procedure – as an implicit curriculum .
To quantify this ordering we deﬁne the learned iteration of a sample for a given model as the epoch for which the model correctly predicts the sample for that and all subsequent epochs.
Explicitly, min t ∗ { t ∗ | ˆ y w ( t ) i =
y i , ∀ t ∗ ≤ t ≤ T } where y i and ˆ y w ( t ) i are the correct label and the predictions of the model for i -th data point (see the detailed mathematical description in Section 3.1).
We study a wide range of model families including fully-connected networks, VGG (Simonyan & Zisserman, 2014), ResNet (He et al., 2016), Wide-ResNet (Zagoruyko & Komodakis, 2016),
DenseNet (Huang et al., 2017) and EfﬁcientNet (Tan & Le, 2019) models with different optimization algorithms such as Adam (Kingma & Ba, 2014) and SGD with momentum (see Section B for details).
The results in Figure 2 for CIFAR10 (Krizhevsky & Hinton, 2009) show that the implicit curricula are broadly consistent within model families.
In particular, the ordering in which images are learned within convolutional networks is much more consistent than between convolutional networks and fully connected networks, 3 and the learned ordering within each sub-type of CNN is even more uniform.
The robustness of this ordering, at least within model types, allows us to talk with less ambiguity about the difﬁculty of a given image without worrying that the notion of difﬁculty is highly model-dependent.
We will see in the next section (and Figure 3) that, as expected, the choice of explicit curriculum can alter the order in which a network learns examples.
The most dramatic manifestation of this is anti-curriculum learning where showing the network images in the reverse order indeed causes the network to learn more difﬁcult images ﬁrst.
Next, we introduce the class of curricula we will consider for the remainder of the paper
P UTTING CURRICULA THROUGH THEIR PACES
Many different approaches have been taken to implement curricula in machine learning.
Here we focus on a particular widely used paradigm introduced in Bengio et al.
and used in Hacohen & Weinshall (2019).
In this setup a curriculum is deﬁned by specifying three ingredients,
• The scoring function : The scoring function is a map from an input example, x , to a numerical score, s ( x ) ∈ R .
This score is typically intended to correspond to a notion of difﬁculty, where a higher score corresponds to a more difﬁcult example.
• The pacing function : The pacing function g ( t ) speciﬁes the size of the training data-set used at each step, t .
The training set at step t consists of the g ( t ) lowest scored examples.
Training batches are then sampled uniformly from this set.
• The order : Additionally we specify an order of either curriculum – ordering examples from lowest score to highest score, anti-curriculum – ordering examples from highest score to lowest, or random .
Though technically redundant with redeﬁning the scoring function, we maintain the convention that the score is ordered from easiest to hardest.
This procedure is summarized in Algorithm 1.
It is worth emphasizing that due to the pacing function, using a random ordering in Algorithm 1 is not the same as traditional i.i.d.
training on the full training dataset, but rather corresponds to i.i.d.
training on a training dataset with dynamic size.
We stress that the scoring and pacing function paradigm for curriculum learning is inherently limited.
In this setup, the scoring function is computed before training over all of the data and thus the algorithm cannot implement a self-paced and training-dependent curriculum as has been considered in Kumar et al.
; Jiang et al.
; Platanios et al.
Additionally, the dynamic training dataset is built by including all examples within a ﬁxed score window (from lowest score up in curricula and highest score down in anti-curricula) and does not accommodate more ﬂexible subsets.
Furthermore, the form of curriculum discussed here only involves ordering examples from a ﬁxed training dataset, rather than more drastic modiﬁcations of the training procedure, such as gradually increasing image resolution (Vogelsang et al., 2018) or the classes (Weinshall et al., 2018).
Nonetheless, it is commonly studied and serves as a useful framework and control study to empirically investigate the relative beneﬁts of training orderings.
Next, we describe scoring and pacing functions that will be used in our empirical investigation.
3. S CORING F UNCTIONS : D IFFICULTY SCORES ARE BROADLY CONSISTENT
In this section, we investigate three families of scoring functions.
As discussed above, we deﬁne the scoring function s ( x , y ) ∈ R to return a measure of an example’s difﬁculty.
We say that an example x j is more difﬁcult than an example x i if s ( x j , y j ) > s ( x i , y i ) .
In this work, we consider three scoring functions:
• Loss function.
In this case samples are scored using the real-valued loss of a reference model that is trained on the same training data,e.g. given a trained model
f w : X → Y , we set s ( x i , y i ) =
(cid:96) ( f w ( x i ) , y i ) .
• Learned epoch/iteration.
This metric has been introduced in Section 2.
We let s ( x i , y i ) =
min t ∗ { t ∗ | ˆ y w ( t ) i =
y i , ∀ t ∗ ≤ t ≤ T } (see Algorithm 3 and Figure 11 for an example).
• Estimated c-score.
c-score (Jiang et al., 2020b) is designed to capture the consistency of a reference model correctly predicting a particular example’s label when trained on independent i.i.d.
draws of a ﬁxed sized dataset not containing that example.
Formally, s ( x i , y i ) =
− E D n ∼ ˆ D\{ ( x i ,y i ) }
[ P (ˆ y w ,i =
y i | D )] where D , with | D | = n , is a training data set sampled from the data pool without the instance ( x i , y i ) and ˆ y w ,i is the reference model prediction.
We also consider a loss based c-score, s ( x i , y i ) =
E rD n ∼ ˆ D\{ ( x i ,y i ) } [ (cid:96) ( x i , y i ) | D ] , where (cid:96) is the loss function.
The pseudo-code is described in Algorithm 4.
To better understand these three scoring functions, we evaluate their consistency in CIFAR10 images.
In particular, for VGG-11 and ResNet-18, we averaged the learned epoch over ﬁve random seeds and recorded the loss at epochs 2 , 10 , 30 , 60 , 90 , 120 , 150 , 180 , 200 .
We also compute the c-score using multiple independently trained ResNet-18 models and compare it to the reference cscores reported in (Jiang et al., 2020b).
The main results of these evaluations are reported in the left and middle panels of Figure 3.
We see that all six scores presented have high Spearman’s rank correlation suggesting a consistent notion of difﬁculty across these three scores and two models.
For this reason, we use only the c-score scoring function in the remainder of this paper.
Additional model seeds and training times are presented in Figure 12 and 13 in the appendix.
Among all cases, we found one notable outlier.
For ResNet-18 after 180 epochs, the training loss no longer correlates with the other scoring functions.
We speculate that this is perhaps due to the model memorizing the training data and achieving near-zero loss on all training images.
3. P ACING F UNCTIONS : F ORCING EXPLICIT CURRICULA
The pacing function determines the size of training data to be used at iteration t (see Algorithm 1).
We consider six function families: logarithmic, exponential, step, linear, quadratic, and root.
Table 2 illustrates the pacing functions used for our experiments which is parameterized by ( a, b ) .
Here a is the fraction of training needed for the pacing function to reach the size of the full training set, and b is the fraction of the training set used at the start of training, thus any pacing function with a =or b = 1 is equivalent to standard training.
We denote the full training set size by N and the total number of training steps by T .
Explicit expressions for the pacing functions we use, g ( a,b ) ( t ) , and examples are shown in Figure 4.
In order to cover many possible choices of pacing function, in all remaining experiments, we select b ∈ { 0 .
0025 , 0 . 1 , 0 . 2 , 0 . 4 , 0 . 8 } and a ∈ { 0 . 01 , 0 . 1 , 0 . 2 , 0 .
8 , 1 . 6 } for our empirical study.
Pacing functions with these parameters are plotted in Figure 14.
Given these pacing functions, we now ask if the explicit curricula enforced by them can change the order in which examples are learned.
The right panel in Figure 3 indicates what is the impact of using curriculum, anti-curriculum or random ordering on the order in which examples are learned.
All curricula use the step pacing functions with a = 0 .
8 and b = 0 .
The result indicates that curriculum and random ordering do not change the order compared to c-score but anti-curriculum could indeed force the model to learn more difﬁcult examples sooner.
This is also demonstrated clearly in the Spearman’s correlation of anti-curriculum with other methods shown in the middle panel of Figure 3.
[Figure]
[Equation]
[Figure]
[Equation]
P ACING FUNCTIONS GIVE MARGINAL BENEFIT , CURRICULA GIVE NONE
[Figure]
Equipped with the ingredients described in the previous sections, we investigated the relative beneﬁts of (random-/anti-) curriculum learning.
As discussed above, we used the c-score as our scoring function and performed a hyper-parameter sweep over the 180 pacing functions and three orderings described in Section 3.
We replicated this procedure over three random seeds and the standard benchmark datasets, CIFAR10 and CIFAR
For each experiment in this sweep, we trained a
ResNet-50 model for 35200 total training steps 4 .
We selected the best conﬁguration and stopping time using the validation accuracy and recorded the corresponding test accuracy.
The results of these runs for CIFAR10/100 are shown in Figure 5.
To understand whether (anti-) curriculum, or random learning provides any beneﬁt over ordinary training, we ran 540 standard training runs.
From these 540 runs, we created three baselines.
The standard1 baseline is the mean performance over all 540 runs.
The standard2 baseline splits the runs into 180 groups of 3; the mean is taken over each group of 3 and the maximum is taken over the 180 means.
This setup is intended as a stand in for the hyperparameter search of the 30 choices of pacing parameters ( a, b ) each with three seeds.
Lastly, standard3 is the mean value of the top three values over all 540 runs.
Marginal value of ordered learning.
When comparing our full search of pacing functions to the naive mean, standard1 , all three sample orderings have many pacing functions that outperform the baseline.
We ﬁnd, however, that this is consistent with being an artifact of the large search space.
When comparing the performance of all three methods to a less crippled baseline, which considers the massive hyperparameter sweep, we ﬁnd that none of the pacing functions or orderings statistically signiﬁcantly outperforms additional sampling of ordinary SGD training runs.
Perhaps most striking is that performance shows no dependence on the three different orderings (and thus scoring function).
For example, in the CIFAR10 runs, the best mean accuracy is achieved via random ordering, while in CIFAR100, the best single run has a random ordering.
This suggests that for these benchmark datasets, with standard training limitations, any marginal beneﬁt of ordered learning is due entirely to the dynamic dataset size (pacing function).
C URRICULA FOR SHORT - TIME TRAINING AND NOISY DATA
In the previous section, we found little evidence for statistically signiﬁcant beneﬁts from curricula or pacing.
This observation is consistent with the fact that curricula have not become a standard part of supervised image classiﬁcation.
In other contexts, however, curricula are standard.
Notably, in practice, many large scale text models are trained using curricula (Brown et al., 2020; Raffel et al., 2019).
These models are typically trained in a data-rich setting where multiple epochs of training is not feasible.
Furthermore, the data for training is far less clean than standard image benchmarks.
To emulate these characteristics and investigate whether curricula are beneﬁcial in such contexts, we applied the same empirical analysis used in Section 4 to training with a limited computational budget and training on noisy data.
It should be noted that the beneﬁts of curricula for noisy data have been studied previously, for example, in (Jiang et al., 2018; Saxena et al., 2019; Guo et al., 2018).
Limited training time budget.
For shorter time training, we follow the same experiment setup described in Section 4 but modify the total number of steps, T .
Instead of using 35200 steps, we consider training with T = 352 , 1760 or 17600 steps.
We use cosine learning rate decay, decreasing monotonically to zero over the T steps.
The results are given in Figure 6, and in supplementary
Figures 19 and 20 for CIFAR10/100.
We see that curricula are still no better than standard training for 17600 iterations.
However, when drastically limiting the training time to 1760 or 352 steps, curriculum-learning, but not anticurriculum can indeed improve performance, with increasing performance gains as the the training time budget is decreased.
Surprisingly, at the smallest time budget, 352 steps, we also see randomlearning consistently outperforms the baseline, suggesting that the dynamic pacing function on its own helps improve performance.
We depict the best pacing functions for 1760 and 352 steps in
Figure 8.
In the 2nd plot of Fig 8 (352 steps), we see many pacing functions start with a relatively small dataset size and maintain a small dataset for a large fraction of the total training time.
Data with noisy labels.
To study curricula in the context of noisy data, we adopted a common procedure of generating artiﬁcial label noise by randomly permuting the labels (Zhang et al., 2017;
Saxena et al., 2019; Jiang et al., 2020b).
We considered CIFAR100 datasets with 20% , 40% , 60% , and 80% label noise and otherwise use the same experimental setup described in Section 4.
As the training data has been modiﬁed, we must recompute the c-score.
The results are shown in Figure 9.
Equipped with the new ordering, we repeat the same set of experiments and obtain the results shown in Figure 7 and supplementary Figure 21.
Figure 7 shows that curriculum learning outperforms other methods by a large margin across all noise levels considered.
The best pacing function in each family is shown in Figure 8.
We see that the best overall pacing functions for both 20% and 60% noise are the step and exponential pacing functions corresponding to simply ignoring all noisy data during training.
For 40% noisy labels, this strategy was not contained in our sweep of a and b values.
To understand why the reduced training time and label noise beneﬁt from curricula, we plot in
Figure 9 the loss-based c-score distributions for CIFAR10/100 trained with 30, 5 and 1 epochs and
CIFAR100 trained with noise 20% , 40% , 60% , and 80% .
For the distribution of clean CIFAR100/ with 30 epochs (see title), a signiﬁcant number of images concentrate around zero.
However, the concentration slowly shifts to larger values as the the total training epoch decreases or the label noise increases.
This suggests that both label noise and reduced time training induce a more difﬁcult c-score distribution and curricula can help by focusing ﬁrst on the easier examples.
C URRICULA IN THE LARGE DATA REGIME
In this section, we are interested in investigating whether the previous conclusions we made for
CIFAR10/100 generalize to larger scale datasets.
We conduct experiments on FOOD101 (Bossard et al., 2014) which consists of 75 , 000 training and 25 , 000 validation images and FOOD101N (Lee
[Figure]
et al., 2018) which consists 310 , 000 training images and the same validation images as FOOD101.
The maximum length of the image dimensions are 512 pixels.
We train the ResNet-50 model by resizing these images to be 250 and applying random horizontal ﬂips and random crops with size 224 as in the PyTorch example for ImageNet.
See Section B for more experiment details.
Standard Training Time.
For standard-time training, the total number of training steps is 296 × 100 , which corresponds to 100 epochs of standard i.i.d. training.
Similar to Section 4, we train 180 ×models respectively for standard i.i d., curriculum, anti-curriculum and random-curriculum learning over three random seeds.
The result is presented in Figure 10.
Again, we observe none of the orderings or pacing functions signiﬁcantly outperforms standard i.i.d.
SGD learning.
Limited time Training and Noisy Labels Training.
For FOOD101 short-time training, models are trained for 296 × 5 steps.
We do not search over 180 pacing functions.
Instead, we consider 72 pacing functions with a ∈ { 0 . 1 , 0 . 4 , 0 . 8 , 1 . 6 } and b ∈ { 0 . 1 , 0 . 4 , 0 . 8 } over the six pacing function families.
For FOOD101N training, models are trained for 121 , 100 steps with a single ﬁxed random seedand the same reduced pacing function search space as FOOD101.
Although the hyper-parameter search space for both FOOD101 and FOOD101N training is smaller than the one used in Section 5, the conclusion is similar – Figure 10 shows curriculum still perform better than anti-curriculum, random curriculum and standard SGD training.
In summary, the observations on CIFAR10 and CIFAR100 in three training regime – standard-time, short-time and noisy training – generalize to larger-scale data like FOOD101 and FOOD101N.
D ISCUSSION
In this work, we established the phenomena of implicit curricula , which suggests that examples are learned in a consistent order.
We further ran extensive experiments over four datasets, CIFAR10,
CIFAR100, FOOD101 and FOOD101N and showed that while curricula are not helpful in standard training settings, easy-to-difﬁcult ordering can be beneﬁcial when training with a limited time budget or noisy labels.
We acknowledge that despite training more than 25,000 models on CIFAR-like and FOOD101(N) datasets, our empirical investigation is still limited by the computing budget.
That limitation forced us to choose between diversity in the choice of orderings and pacing functions as opposed to diversity in the tasks type, task scale, and model scale.
Our strategic choice of limiting the datasets to CIFAR10/100 and FOOD-101(N) allowed us to focus on a wide range of curricula and pacing functions, which was very informative.
As a result, our general statements are more robust with respect to the choice of curricula – which is the main object of study in this paper – but one should be careful about generalizing them to tasks/training regimes that are not similar to those included in this work.
A CKNOWLEDGEMENTS
We would like to thank for the discussions with the teammates at Google.
We owe particular gratitude to Vaishnavh Nagarajan, Mike Mozer, Preetum Nakkiran, Hanie Sedghi, and Chiyuan Zhang.
We appreciate the help with the experiments from Zachary Cain, Sam Ritchie, Ambrose Slone and
Vaibhav Singh.
Lastly, XW would like to thank the team for all of the hospitality
A L ITERATURE ON C URRICULUM L EARNING
The related work can be divided into the following four main subparts.
With the best of our efforts, we mainly cover the recent ones among the numerous papers.
Understanding the learning dynamics of individual samples.
It is critical to understand the learning dynamics of a model and so bridge the gap between human learning and curriculum learning (Khan et al., 2011).
An interesting phenomenon for the standard i.i d. training algorithm is observed and termed “catastrophic forgetting” – neural networks cannot learn in a sequence manner and suffer a signiﬁcant drop in generalization on earlier tasks (French, 1999; Goodfellow et al., 2014;
Kirkpatrick et al., 2017; Ritter et al., 2018;
Nguyen et al., 2019; Ramasesh et al., 2020).
Even for a single task, forgetting events occur with high frequency to some examples, which could lie in the subset of “hard” samples (Toneva et al., 2019).
To further understand how the forgettable examples are related to “hard” examples and unforgettable examples to “easy” ones, we select a commonly used metric, loss functions, to deﬁne the difﬁculty (Bengio et al., 2009; Hacohen & Weinshall, 2019).
One criticism of using loss functions as a metric is that over-parameterized neural networks can memorize and completely overﬁt the training data reaching the interpretation region if trained long enough (Arpit et al., 2017; Zhang et al., 2017), which has triggered plenty of theoretical and empirical analysis (Chatterjee, 2018;
Yun et al., 2019;
Ge et al., 2019; Gu & Tresp, 2019; Zhang et al., 2020).
Thus, in addition to loss functions, we measure the difﬁculty of examples with a consistency score (c-score) metric proposed in Jiang et al.
(2020b), in which the model should never see the estimated instances, and the estimation should be accurate, close to full expectation.
Improved methods of curriculum learning.
Fruitful methods have been proposed to improve scoring functions and pacing functions in various applications.
One signiﬁcant improvement is about dynamically updating the ordering and pacing based on the current models or a learned teacher model.
This idea can be positively related to importance sampling methods for empirical risk minimization (Gretton et al., 2009; Shimodaira, 2000;
Needell et al., 2014; Johnson & Guestrin, 2018; Byrd &
Lipton, 2019; Khim et al., 2020).
CL in the earlier or short-time training assigns the accessible instances with higher weight than difﬁcult ones.
Self-paced curriculum learning (Jiang et al., 2015; 2018), based on self-paced learning (Kumar et al., 2010), formulate a concise optimization problem that considers knowledge before and during training.
Huang et al.
(2020) adapts CL to deﬁne a new loss function such that the relative importance of easy and hard samples are adjusted during different training stages, and demonstrated its effectiveness on popular facial benchmarks.
The curriculum of teacher’s guidance (Graves et al., 2017) or teacher-student collaboration (Matiisen et al., 2019) have been empirically proven useful in reinforcement learning for addressing sequential decision tasks.
A comprehensive survey on curriculum reinforcement learning can be found in Weng (2020) and Platanios et al.
Our work is not about proposing a method to improve CL training but empirically exploring CL’s performance to clear the pictures when curricula help and when not.
1: Input: Initial weights w 0 , training set { x 1 , . . .
, x N } 2: for t = 1 , . . .
, T do 3: w ( t ) ← train-one-epoch ( w ( t − 1) , { x 1 , . . .
, x N } ) 4: end for 5: for i = 1 , . . .
, N do 6: s ( i ) ← (cid:96) ( f w ( T ) ( x i ) , y i ) 7: end for
1: Input: Initial weights w 0 , training set { x 1 , . . .
, x N } 2: for i = 1 , . . .
, N do 3: s ( i )
←4:
c ( i ) ← ( T + 1) (cid:96) 0 / 1 ( f w (0) ( x i ) , y i ) 5: end for 6: for t = 1 , . .
, T do 7: w ( t ) ← train-one-epoch ( w ( t − 1) , { x 1 , . . .
, x N } ) 8: for i = 1 , . . .
, N do 9: if (cid:96) 0 / 1 ( f w ( t ) ( x i ) , y i )
=
then 10: c ( i ) ← min( c ( i ) , t ) 11: else 12: c ( i ) ← T +13: end if 14: s ( i ) ← s ( i ) + (cid:96) ( f w ( t ) ( x i ) , y i ) /T 15: end for 16: end for 17: for i = 1 , . . .
, N do 18: s ( i ) ← s ( i )
+ c ( i ) 19: end for
Curriculum Learning with label noise.
CL has been widely adopted with new methods to attain positive results in the learning region with artiﬁcial or natural label noises (Natarajan et al., 2013;
Sukhbaatar & Fergus, 2014; Zhang et al., 2017; Jiang et al., 2020a).
Guo et al.
(2018) splits the data into three subsets according to noisy level and applies different weights for each subset during different training phases, which achieved the state-of-the-art result in the WebVision data set (Li et al., 2017).
Ren et al.
(2018) uses meta-learning to learn the weights for training examples based on their gradient directions.
Saxena et al.
(2019) obtains signiﬁcant improvement by equipping each instance with a learnable parameter governing their importance in the learning process.
Shen &
Sanghavi (2019) and Shah et al.
(2020) suggest iteratively discards those high current losses to make the optimization robust to noisy labels.
Lyu & Tsang (2020) presents a (noise pruned) curriculum loss function with theoretical guarantees and empirical validation for robust learning.
Given these success cases, empirical investigation with label noise for CL is within our scope.
Anti-curriculum v.s. large current loss minimization.
Although both anti-curriculum learning and large current loss minimization focus on “difﬁcult” examples, the two ideas could be orthogonal, particularly in longer training time.
The former relies on a static pre-deﬁned ordering while the latter requires the order iteratively updated.
For a short time learning, the two could be similar.
Among much work on minimizing large current loss (i.e., Fan et al.
; Zhang et al. (2019a); Jiang et al.
; Ortego et al.
and reference therein), Kawaguchi & Lu (2020) introduced ordered stochastic gradient descent (SGD), which purposely biased toward those instances with higher current losses.
They empirically show that the ordered SGD outperforms the standard SGD (Bottou et al., 2018) when decreasing the learning rate, even though it is not better initially.
Supported with big loss minimization (short-time training), hard data-mining methods, and some empirical success of anti-curriculum (mentioned in the introduction), we investigate anti-curriculum.
1: Input: training set S = { x 1 , . . .
, x N } , ratio α , number of repeated experiments r 2: for k = 1 , 2 , . . .
r do 3: for j = 1 , . . .
(cid:100) 1 /α (cid:101) do 4:
S test =
{ x (cid:100) ( j − 1) αN
(cid:101) +1 , . . .
, x (cid:100) jαN (cid:101) } 5: w ← train ( S / S test ) 6: for x i ∈ S test do 7: s ( i ) ← s ( i ) + (cid:96) ( f w ( x i ) , y i ) /r 8: end for 9: end for 10: end for
B E XPERIMENT D ETAILS
We summarize the common experimental setup ﬁrst and give details for each ﬁgure.
We ﬁrst clarify standard training that appears in most of the ﬁgures (such as Figure 1, 5 and 7), where we are based on the code in PyTorch and use ResNet50 model with default initialization.
The data augmentation includes random horizontal ﬂip and normalization, and the random training seeds are ﬁxed to be { 111 , 222 , 333 } .
We choose a batch size to be 128 and use one NVIDIA Tesla V100 GPU for each experiment.
We use Caliban (Ritchie et al., 2020) and Google cloud AI platform to submit the jobs.
The optimizer is SGD with 0.9 momentum, weight decay 5 × 10 − 5 , and a learning rate scheduler - cosine decay – with an initial value of 0 . 1 .
We use half-precision for training.
In most of our cases, when using “standard training setup”, we will implicitly mean the total training epoch is 100 .
For the ﬁgures in Section 2 and 3, we use the full training samples 50000.
For ﬁgures in Section 4 and 5, we use training samples 45000 and validation samples 5000.
We look for the best test error of these 5000 validation samples and plot the corresponding test error/prediction.
For other ﬁgures such as Figure 3, 12 and 13.
We vary the optimizers by either completely switching to Adam, or using different learning rate schedulers such as step-size decay every 30 epochs.
The batch size are chosen to be 128 and 256 , and weight decay 5 × 10 − 5 , 1 × 10 − 5 , 1 × 10 − 6 , or 0 .
When using fully-connected nets, VGG, and other networks, we pick the learning rates 0 .
01 among grid search in { 0 . 5 , 0 . 1 , 0 . 01 , 0 . 001 } .
For (anti-/random-) curriculum learning, we move the torch.utils.data.
DataLoader in the training loop so that to update the size of training data dynamically.
We also refer to the code in Hacohen & Weinshall (2019).
6 In particular, each time we load data, we make class balance a priority, which means we do not completely follow the exact ordered examples.
However, our ordering does imply the ordering within a class.
In the following subparts, we give details for each ﬁgure.
Figure 2 in Section 3. Algorithm 3 illustrate the main steps we take to measure the order.
We now present the conﬁguration for each experiment that translates to the ordering.
We design three layers for the architecture in fully connected networks (with hidden unites 5120 for the ﬁrst layer and 500 or 1000 for the second one).
ReLU activation function is used between the layers.
For VGG networks, we use VGG11 and VGG19.
For both networks, we use a learning rate of 0 .
01 and weight-decay 0 . 0005 .
We vary the random seeds and the optimizers, as mentioned above.
For the Adam optimizer, we set epoch to be 100 and initialize the learning rate 0 .
001 decaying by a factor of 10 after 50 epochs.
For SGD with 0 .
9 momentum (100 epochs), we use cosine learning rate schedules or a decaying schedule with a factor of 10 after 100 // 3 epochs.
Moreover, we widen the choice of convolutional networks including VGG11(19)-BN denoted by VGG11(19) with batch normalization,
ResNet18, ResNet50, WideResNet28-10, WideResNet48-10 DenseNet121, EfﬁcientNet B0.
We set the learning rate for standard SGD training – 0 . 1 .
Finally, we vary the training epochs and choose a longer one, 200 epochs, to check the consistency.
In summary, we present all the experiments in
Figure 15 where we have seed # − arc # − scheduler # with # indicating the conﬁguration for
SGD with 0.9 momentum training, and seed # − arc # − adam for Adam.
We add .
1 to indicate those longer 200 -epoch training.
Figure 3, 12 and 13. We mainly focus on ﬁlling the details on how to train the models since Algorithm 2 and 4 are straightforward to implement.
For VGG11 and ResNet18, we use the “standard training setup” (the random seed is 111 ) but with epoch to be 200 to record more orderings.
Here, we use two data loaders to the same training data – one is augmented for training, while the other is clean for ordering.
In this way, we minimize the effect caused by other factors.
For c-score.loss, we separate the training data into four parts and use 3 / 4 of the data to train a new random initialized model – ResNet18, and record the value for the remainder 1 / 4 data.
A shorter epoch of 30 is used for each training with cosine decaying learning rate (reaching zero after 30 epoch).
For (anti-/random-)curriculum learning, we use the order c-score.loss right above.
We follow the standard setup with step-type pacing.
The hyper-parameters are b = 0 .
2 and a = 0 . 8 .
Algorithmand 3 are used to measure the ordering during training.
Figures in Section 4 and 5. The experiments are explained partially in the main text.
Due to the nature of the (anti-/random-) curriculum learning that has different iterations in an epoch (as we update the size of training data dynamically), we use the notation “iteration/step” instead of “epoch”.
We want to emphasize that when we decrease the number of training steps from 35200 in Figureto 17600, 1760 and 352 in Figure 6, we implicitly accelerate the decrease in the learning rate as it eventually drops to zero within the steps we set.
For a fair comparison, we set the conﬁguration for each run the same as “standard training setup” (mentioned at the beginning of this section), including the data-augmentation, batch-size, optimizer (weight-decay and learning rate), and random seeds.
Figure 10. For FOOD101 and FOOD101N, we choose a batch size to be 256 and use NVIDIA Tesla 8 × V100 GPU for each experiment.
The data augmentation is the same as the ImageNet training in PyTorch example (see Footnote 5).
The optimizer is SGD with 0.9 momentum, weight decay 1 × 10 − 5 , and a learning rate scheduler – cosine decay – with an initial value of 0 . 1 .
We use half-precision for training.
C F IGURES