Curriculum Learning by Transfer Learning: Theory and Experiments with Deep Networks

Daphna Weinshall, Gad Cohen, Dan Amir

Introduction

Biological organisms can learn to perform tasks (and often do) by observing a sequence of labeled events, just like supervised machine learning. But unlike machine learning, in human learning supervision is often accompanied by a curriculum. Thus the order of presented examples is rarely random when a human teacher teaches another human. Likewise, the task may be divided by the teacher into smaller sub-tasks, a process sometimes called shaping (Krueger & Dayan, 2009) and typically studied in the context of reinforcement learning (e.g. Graves et al., 2017). Although it remained for the most part in the fringes of machine learning research, curriculum learning has been identified as a key challenge for machine learning throughout (e.g., Mitchell, 1980, 2006; Wang & Cottrell, 2015).

We focus here on curriculum learning based on ranking (or weighting as in (Bengio et al., 2009)) of the training examples, which is used to guide the order of presentation of examples to the learner. Risking over simplification, the idea is to first present the learner primarily with examples of higher weight or rank, later to be followed by examples with lower weight or rank. Ranking may be based on the difficulty of each training example as evaluated by the teacher, from easiest to the most difficult.

In Section 2 we investigate this strict definition of curriculum learning theoretically, in the context of stochastic gradient descent used to optimize the convex linear regression loss function. We first define the (ideal) difficulty of a training point as its loss with respect to the optimal classifier. We then prove that curriculum learning, when given the ranking of training points by their difficulty thus defined, is expected (probabilistically) to significantly speed up learning especially at the beginning of training. This theoretical result is supported by empirical evidence obtained in the deep learning scenario of curriculum learning described in Section 3, where similar behavior is observed. We also show that when the difficulty of the sampled training points is fixed, convergence is faster when sampling points that incur higher loss with respect to the current hypothesis as suggested in (Shrivastava et al., 2016). This result is not always true when the difficulty of the sampled training points is not fixed.

But such ideal ranking is rarely available. In fact, the need for such supervision has rendered curriculum learning less useful in machine learning, since ranking by difficulty is hard to obtain. Moreover, even when it is provided by a human teacher, it may not reflect the true difficulty as it affects the machine learner. For example, in visual object recognition it has been demonstrated that what makes an image difficult to a neural network classifier may not always match whatever makes it difficult to a human observer, an observation that has been taken advantage of in the recent work on adversarial examples (Szegedy et al., 2013). Possibly, this is one of the reasons why curriculum learning is rarely used in practice (but see, e.g., Zaremba & Sutskever, 2014; Amodei et al., 2016; Jesson et al., 2017).

In the second part of this paper we focus on this question - how to rank (or weight) the training examples without the aid of a human teacher. This is paramount when a human teacher cannot provide a reliable difficulty score for the task at hand, or when obtaining such a score by human teachers is too costly. This question is also closely related to transfer learning: here we investigate the use of another classifier to provide the ranking of the training examples by their presumed difficulty. This form of transfer should not be confused with the notion of transfer discussed in (Bengio et al., 2009) in the context of multi-task and life-long learning (Thrun & Pratt, 2012), where knowledge is transferred from earlier tasks (e.g. the discrimination of easy examples) to later tasks (e.g. the discrimination of difficult examples). Rather, we investigate the transfer of knowledge from one classifier to another, as in teacher classifier to student classifier. In this form curriculum learning has not been studied in the context of deep learning, and hardly ever in the context of other classification paradigms.

There are a number of issues to be addressed in order to design a method for transfer curriculum learning. First, what determines the difficulty of an example? Second, which classifier should be used to compute the curriculum? Should it be a more powerful network pre-trained to do a different task (e.g. szegedygoing), or a smaller network that can be quickly trained on the final task? Should we use the same network to continuously rank the training set in order to achieve an adaptive curriculum (as in self-paced learning: kumar2010self; jiang2015self)? In Section 3 we investigate the first two possibilities, leaving the incorporation of self-paced learning into the scheme for later work. We focus primarily on transfer from a big network pre-trained on a different task. Differently from previous work, it is not the instance representation which is being transferred but rather the ranking of training examples. Why is this a good idea? This kind of transfer assumes that a powerful pre-trained network is only available at train time, and cannot be used at test time even for the computation of a test point’s representation. This may be the case, for example, when the powerful network is too big to run on the target device. One can no longer expect to have access to the transferred representation at test time, while ranking can be used at train time in order to improve the learning of the target smaller network (see related discussion of network compression in (Chen et al., 2015; Kim et al., 2015), for example).

In Section 3 we describe our method, an algorithm which uses the ranking to construct a schedule for the order of presentation of training examples. In subsequent empirical evaluations we compare the performance of the method when using a curriculum which is based on different scheduling options, including 2 control conditions where difficult examples are presented first or when using arbitrary scheduling. The main results of this empirical study can be summarized as follows: (i) Learning rate is always faster with curriculum learning, especially at the beginning of training. (ii) Final generalization is sometimes improved with curriculum learning, especially when the conditions for learning are hard: the task is difficult, the network is small, or when strong regularization is enforced. These results are consistent with prior art (see e.g. Bengio et al., 2009).

Theoretical analysis

We start with some notations in Section 2.1, followed in Sections 2.2 by the rigorous analysis of curriculum learning when used to optimize the linear regression loss. In Section 2.3 we report supporting empirical evidence for the main theoretical results, obtained using the deep learning setup described later in Section 3.

The difficulty of point x{\mathbf{x}} is measured by its minimal loss with respect to the set of optimal hypotheses {L(hˉ(xi),yi)}\{L(\bar{h}({\mathbf{x}}_{i}),y_{i})\}.

SCL is a variation on Stochastic Gradient Descent (SGD), where the learner is exposed to the data gradually based on the difficulty score of the training points.

In practice, an SCL algorithm should solve two problems: (i) Score the training points by difficulty; in prior art this score was typically provided by the teacher in a supervised manner. (ii) Define the scheduling procedure.

2 The linear regression loss

The risk function of the regression model is the following

Recall that SCL computes a sequence of estimators {wt}t=1T\{{\mathbf{w}}_{t}\}_{t=1}^{T} for the parameters of the optimal hypothesis wˉ\bar{\mathbf{w}}. This is based on a sequence of training points {Xt=[xt,yt]}t=1T\{{\mathbf{X}}_{t}=[{\mathbf{x}}_{t},y_{t}]\}_{t=1}^{T}, sampled from the training data while favoring easy points at the beginning of training. Other than sampling probability, the update step at time tt follows SGD:

The main theorem in this sub-section states that the expected rate of convergence of gradient descent is monotonically decreasing with the Difficulty Score of the sample Xt{\mathbf{X}}_{t}. We prove it below for the gradient step as defined in (2). If the size of the gradient step is fixed at η\eta, a somewhat stronger theorem can be obtained where the constraint on the step size being small is not required.

We first derive the gradient step at time tt:

Let Ωi\Omega_{i} denote the hyperplane on which this gradient vanishes ∂L(Xi,w)∂w=0\frac{\partial L({\mathbf{X}}_{i},{\mathbf{w}})}{\partial{\mathbf{w}}}=0. This hyperplane is defined by xitw=yi{\mathbf{x}}_{i}^{t}{\mathbf{w}}=y_{i}, namely, xi{\mathbf{x}}_{i} defines its normal direction. Thus (3) implies that the gradient step at time tt is perpendicular to Ωi\Omega_{i}\comment as illustrated in Fig. 1. Let zˉ\bar{\mathbf{z}} denote the projection of wˉ\bar{\mathbf{w}} on Ωi\Omega_{i}. Let Ψ2=L(Xi,wˉ)\Psi^{2}=L({\mathbf{X}}_{i},\bar{\mathbf{w}}) denote the Difficulty Score of Xi{\mathbf{X}}_{i}.

Fix the training point Xi{\mathbf{X}}_{i}. The Difficulty Score of Xi{\mathbf{X}}_{i} is Ψ2=r2∥wˉ−zˉ∥2\Psi^{2}=r^{2}\|\bar{\mathbf{w}}-\bar{\mathbf{z}}\|^{2}.

The first transition in the last line follows from zˉ∈Ωi  ⟹  xitzˉ−yi=0\bar{\mathbf{z}}\in\Omega_{i}\implies{\mathbf{x}}_{i}^{t}\bar{\mathbf{z}}-y_{i}=0. The second transition follows from the fact that both xi{\mathbf{x}}_{i} and (wˉ−zˉ)(\bar{\mathbf{w}}-\bar{\mathbf{z}}) are perpendicular to Ωi\Omega_{i}, and therefore parallel to each other. ∎

To illustrate, Fig. 2 shows a planar section of the parameter space, the 2D2D plane formed by the two intersecting lines O⃗\vec{\mathcal{O}} and zˉ−wˉ\bar{\mathbf{z}}-\bar{\mathbf{w}}. The gradient step s{\mathbf{s}} points from wt{\mathbf{w}}_{t} towards Ωi\Omega_{i}. Ωi\Omega_{i} is perpendicular to xi{\mathbf{x}}_{i}, which is parallel to zˉ−wˉ\bar{\mathbf{z}}-\bar{\mathbf{w}} and to s{\mathbf{s}}, and therefore Ωi\Omega_{i} is projected onto a line in this plane. We introduce the notation λ=∥wˉ−wt∥\lambda=\|\bar{\mathbf{w}}-{\mathbf{w}}_{t}\|.

Let sO{\mathbf{s}}_{{\mathcal{O}}} denote the projection of the gradient vector s{\mathbf{s}} on the polar axis O⃗\vec{\mathcal{O}}, and let s⊥{\mathbf{s}}_{\perp} denote the perpendicular component. From (3) and the definition of Ψ\Psi

Let Δ(Ψ)\Delta(\Psi) denote the expected convergence rate at time tt, given fixed difficulty score Ψ\Psi.

We can now state the main theorem of this section.

which proves the first statement. In addition,

Convergence rate increases with current loss

The main theorem in this sub-section states that for a fixed difficulty score Ψ\Psi, when the gradient step is small enough, convergence is monotonically increasing with the loss of the point with respect to the current hypothesis. This is not true in general. The second theorem in this section shows that when the difficulty score is not fixed, there exist hypotheses w∈H{\mathbf{w}}\in\mathcal{H} for which the convergence rate is decreasing with the current loss.

the marginal distribution of [ϑ,r][\vartheta,r].

Let Υ2=L(Xi,wt)\Upsilon^{2}=L({\mathbf{X}}_{i},{\mathbf{w}}_{t}) denote the loss of Xi{\mathbf{X}}_{i} with respect to the current hypothesis wt{\mathbf{w}}_{t}. Define the angle β∈[0,π2)\beta\in[0,\frac{\pi}{2}) as follows (see Fig. 2)

The relation between Υ,Ψ,r,ϑ\Upsilon,\Psi,r,\vartheta can be written separately in 4 regions as follows (see Fig. 2):

0≤ϑ≤π−β, yi=xitwˉ+Ψ  ⟹  yi=xitwt+Υ,λrcos⁡ϑ=xit(wˉ−wt)=−Ψ+Υ0\leq\vartheta\leq\pi-\beta,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}+{\Psi}\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+\Upsilon,\\ \lambda r\cos\vartheta={\mathbf{x}}_{i}^{t}(\bar{\mathbf{w}}-{\mathbf{w}}_{t})=-\Psi+\Upsilon

π−β≤ϑ≤π, yi=xitwˉ+Ψ  ⟹  yi=xitwt−Υ,λrcos⁡ϑ=−Ψ−Υ\pi-\beta\leq\vartheta\leq\pi,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}+{\Psi}\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon},\\ \lambda r\cos\vartheta=-{\Psi}-{\Upsilon}

0≤ϑ≤β, yi=xitwˉ−Ψ  ⟹  yi=xitwt+Υ,λrcos⁡ϑ=Ψ+Υ0\leq\vartheta\leq\beta,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-{\Psi}\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon},\\ \lambda r\cos\vartheta={\Psi}+{\Upsilon}

β≤ϑ≤π, yi=xitwˉ−Ψ  ⟹  yi=xitwt−Υ,λrcos⁡ϑ=Ψ−Υ\beta\leq\vartheta\leq\pi,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-{\Psi}\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon},\\ \lambda r\cos\vartheta={\Psi}-{\Upsilon}

We keep in mind that ∀xi\forall{\mathbf{x}}_{i} and Ψ\Psi, there are 2 possible yiy_{i} with equal probability. Recall that zˉ\bar{\mathbf{z}} denotes the projection of wˉ\bar{\mathbf{w}} on Ωi\Omega_{i}. In the planar section shown in Fig. 2,

zˉ\bar{\mathbf{z}} lies in the upper half space   ⟺  \iff yi=xitwˉ+Ψy_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}+{\Psi}

zˉ\bar{\mathbf{z}} lies in the lower half space   ⟺  \iff yi=xitwˉ−Ψy_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-{\Psi}

This follows from 3 observations: xˉi\bar{\mathbf{x}}_{i} lies in the upper half space by the definition of the polar coordinate system, xitwˉ−yi=±Ψ{\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-y_{i}=\pm\Psi, and

Next, let zt{\mathbf{z}}_{t} denote the projection of wt{\mathbf{w}}_{t} on Ωi\Omega_{i}. Then

When zˉ\bar{\mathbf{z}} lies in the upper half space, the following can be verified geometrically from Fig. 2:

0≤ϑ≤π−β ⇒ xit(zt−wt)≥0 ⇒ yi=xitwt+Υ0\leq\vartheta\leq\pi-\beta~{}\Rightarrow~{}{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\geq 0~{}\Rightarrow~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon}

π−β≤ϑ≤π ⇒ xit(zt−wt)≤0 ⇒ yi=xitwt−Υ\pi-\beta\leq\vartheta\leq\pi~{}\Rightarrow~{}{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\leq 0~{}\Rightarrow~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon}

When zˉ\bar{\mathbf{z}} lies in the lower half space

0≤ϑ≤β  ⟹  xit(zt−wt)≥0  ⟹  yi=xitwt+Υ0\leq\vartheta\leq\beta\implies{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\geq 0\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon}

β≤ϑ≤π  ⟹  xit(zt−wt)≤0  ⟹  yi=xitwt−Υ\beta\leq\vartheta\leq\pi\implies{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\leq 0\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon}

It is easier to analyze Δ(Ψ,Υ)\Delta(\Psi,\Upsilon) when using the Cartesian coordinates, rather than polar, in the 2D2D plane defined by the vectors O⃗=wˉ−wt\vec{\mathcal{O}}=\bar{\mathbf{w}}-{\mathbf{w}}_{t} and zˉ−wˉ\bar{\mathbf{z}}-\bar{\mathbf{w}} (see Fig. 2); thus we define u=rcos⁡ϑ, v=rsin⁡ϑu=r\cos\vartheta,~{}v=r\sin\vartheta. The 4 cases listed in Lemma 4 can be readily transformed to this coordinate system as follows {0≤ϑ≤β}⇔{λu≥Ψ}\{0\leq\vartheta\leq\beta\}\Leftrightarrow\{\lambda u\geq\Psi\}, {β≤ϑ≤π−β}⇔{−Ψ≤λu≤Ψ}\{\beta\leq\vartheta\leq\pi-\beta\}\Leftrightarrow\{-\Psi\leq\lambda u\leq\Psi\}, and {π−β≤ϑ≤π}⇔{λu≤−Ψ}\{\pi-\beta\leq\vartheta\leq\pi\}\Leftrightarrow\{\lambda u\leq-\Psi\}:

λu≥−Ψ:  λu=−Ψ+Υ\lambda u\geq-\Psi:~{}~{}\lambda u=-{\Psi}+{\Upsilon}

λu≤−Ψ:  λu=−Ψ−Υ\lambda u\leq-\Psi:~{}~{}\lambda u=-{\Psi}-{\Upsilon}

λu≥Ψ:     λu=Ψ+Υ\lambda u\geq\Psi:~{}~{}~{}~{}~{}\lambda u={\Psi}+{\Upsilon}

λu≤Ψ:     λu=Ψ−Υ\lambda u\leq\Psi:~{}~{}~{}~{}~{}\lambda u={\Psi}-{\Upsilon}

Assume that the gradient step size is small enough so that we can neglect second order terms O(η2)O(\eta^{2}), and that ∂∇∂Υ≥ψΥ−Υψ ∀Υ\frac{\partial\nabla}{\partial\Upsilon}\geq\frac{\psi}{\Upsilon}-\frac{\Upsilon}{\psi}~{}\forall\Upsilon. Fix the difficulty score at Ψ\Psi. At time tt the expected convergence rate is monotonically increasing with the loss Υ\Upsilon of the training point x{\mathbf{x}}.

where f(u)f(u) denotes the marginal distribution of uu.

Let uiu_{i} denote the value of uu corresponding to loss Υ\Upsilon in each region A1-A4, and 12f(ui)\frac{1}{2}f(u_{i}) its density. Δ(Ψ,Υ)\Delta(\Psi,\Upsilon) takes 4 discrete values, one in each region, and its expected value is therefore Δ(Ψ,Υ)=4η∑i=14λ2ui2f(ui)∑i=14f(ui)\Delta(\Psi,\Upsilon)=4\eta\sum_{i=1}^{4}\lambda^{2}u_{i}^{2}\frac{f(u_{i})}{\sum_{i=1}^{4}f(u_{i})}. It can readily be shown that

Using the assumption that ∂∇∂Υ≥ψΥ−Υψ ∀Υ\frac{\partial\nabla}{\partial\Upsilon}\geq\frac{\psi}{\Upsilon}-\frac{\Upsilon}{\psi}~{}\forall\Upsilon, we have that

Let Δ(Υ)\Delta(\Upsilon) denote the expected convergence rate at time tt, given a fixed loss Υ\Upsilon. From Lemma 2

3 Deep learning: simulation results

While the corollaries above apply to a rather simple situation, when using the Difficulty Score to guide SGD while minimizing the convex regression loss, their predictions can be empirically tested with the deep learning architecture and loss which are described in Section 3. There an additional challenge is posed by the fact that the empirical ranking is not based on the ideal definition given in Def. 1, but rather on an estimate derived from another classifier.

Still, the empirical results as shown in Fig. 3 demonstrate agreement with the theoretical analysis of the linear regression loss. Specifically, in epoch 0 there is a big difference between the average errors in estimating the gradient direction, which is smallest for the easiest examples and highest for the most difficult examples as predicted by Corollary 1. This difference in significantly reduced after 10 epochs, and becomes insignificant after 20 epochs, in agreement with Corollary 2.

Fig. 3 shows that the variance in the direction of the gradient step defined by easier points is significantly smaller than that defined by difficult points, especially at the beginning of training. This is advantageous when the initial point w0{\mathbf{w}}_{0} does not lie in the basin of attraction of the desired global minimum wˉ\bar{\mathbf{w}}, and if, in agreement with Lemma 1, the pronounced shared component of the easy gradient steps points in the direction of the global minimum, or a more favorable local minimum; then the likelihood of escaping the local minimum decreases with a point’s Difficulty Score. This scenario suggests another possible advantage for curriculum learning at the initial stages of training.

Curriculum learning in deep networks

As discussed in the introduction, a practical curriculum learning method should address two main questions: how to rank the training examples, and how to modify the sampling procedure based on this ranking. Solutions to these issues are discussed in Section 3.1. In Section 3.2 we discuss the empirical evaluation of our method.

The main novelty of our proposed method lies in this step, where we rank the training examples by estimated difficulty in the absence of human supervision. Difficulty is estimated based on knowledge transfer from another classifier. Here we investigate transfer from a more powerful learner.

It is a common practice now to treat one of the upstream layers of a pre-trained network as a representation (or embedding) layer. This layer activation is then used for representing similar objects and train a simpler classifier (such as SVM, or shallower NNs) to perform a different task, related but not identical to the original task the network had been trained on. In computer vision such embeddings are commonly obtained by training a deep network on the recognition of a very large database such as ImageNet (Deng et al., 2009). These embeddings have been shown to provide better semantic representations of images (as compared to more traditional image features) in a number of related tasks, including the classification of small datasets (Sharif Razavian et al., 2014), image annotation (Donahue et al., 2015) and structured predictions (Hu et al., 2016).

Following this practice, the activation in the penultimate layer of a large and powerful pre-trained network is the loci of knowledge transfer from one network to another. Repeatedly, as in (Sharif Razavian et al., 2014), it has been shown that competitive performance can be obtained by training a shallow classifier on this representation in a new related task. Here we propose to use the confidence of such a classifier, e.g. the margin of an SVM classifier, as the estimator for the difficulty of each training example. This measure is then used to sort the training data. We note that unlike the traditional practice of reusing a pre-trained network, here we only transfer information from one learner to another. The goal is to achieve a smaller classifier that can conceivably be used with simpler hardware, without depending on access to the powerful learner at test time.

Scheduling the appearance of training examples

In agreement with prior art, e.g. the definition of curriculum in (Bengio et al., 2009), we investigate curriculum learning where the scheduling of examples changes with time, giving priority to easier examples at the beginning of training. We explored two variants of the basic scheduling idea:

Fixed. The distribution used to sample examples from the training data is gradually changed in fixed steps. Initially all the weight is put on the easiest examples. In subsequent steps the weight of more difficult examples is gradually increased, until the final step in which the training data is sampled uniformly (or based on some prior distribution on the training set).

Adaptive. Similar to the previous mode, but where the length of each step is not fixed, but is being determined adaptively based on the current loss of the training data.

2 Empirical evaluation

Datasets. For evaluation we used 2 data sets: CIFAR-100 (Krizhevsky & Hinton, 2009) and STL-10 (Coates et al., 2010). In all cases, as is commonly done, the data was pre-processed using global contrast normalization; cropping and flipping were used for STL-10.

Network architecture. We used convolutional Neural Networks (CNN) which excel at image classification tasks. Specifically, we used two architectures which are henceforth denoted Large and Small, in accordance with the number of parameters. The Large network is comprised of four blocks, each with two convolutional layers, ELU activation, and max-pooling. This is followed by a fully connected layer, for a total of 1,208,101 parameters. The Small network consists of only three hidden layers, for a total of 4,557 parameters. During training, we applied dropout and l2l2 regularization on the weights, and used either SGD or ADAM to optimize the cross-entropy loss.

Scheduling mechanisms: control. As described above, our method is based on a scheduling design which favors the presentation of easier examples at the beginning of training. In order to isolate the contribution of scheduling by increasing level of difficulty as against other spurious consequences of data scheduling, we compared performance with the following control conditions: control-curriculum, identical scheduling mechanism but where the underlying ranking of the training examples is random and unrelated to estimated difficulty; and anti-curriculum, identical scheduling mechanism but favoring the more difficult examples at the beginning of training.

Controlling for Task difficulty

Evidence from prior art is conflicting regarding where the benefits of curriculum learning lie, which is to be expected given the variability in the unknown sources of the curriculum supervision information and its quality. We observed in our empirical study that the benefits depended to a large extent on the difficulty of the task. We always saw faster learning at the beginning of the training process, while lower generalization error was seen only when the task was relatively difficult. We therefore employed controls for the following 3 sources of task difficulty:

Inherent task difficulty. To investigate this factor, we take advantage of the fact that CIFAR-100 is a hierarchical dataset with 100 classes and 20 super-classes, each including 5 member classes. We therefore trained a network to discriminate the 5 member classes of 2 super-classes as 2 separate tasks: ‘small mammals’ (task 1) and ‘aquatic mammals’ (task 2). These are expected to be relatively hard learning tasks. We also trained a network to discriminate 5 random well separated classes: ‘camel’, ‘clock’, ‘bus’, ‘dolphin’ and ‘orchid’ (task 3). This task is expected to be relatively easy.

Size of classification network. For a given task, classification performance is significantly affected by the size of the network and its architecture. We assume, of course, that we operate in the domain where the number of model parameters is smaller than can be justified by the training data (i.e., there is no overfit). We therefore used networks of different sizes in order to evaluate how curriculum learning is affected by task difficulty as determined by the network’s strength (see Fig. 4a-b). In this comparative evaluation, the smaller the network is, the more difficult the task is likely to be (clearly, many other factors participate in the determination of task difficulty).

Regularization and optimization. Regularization is used to constrain the family of hypotheses, or models, so that they possess such desirable properties as smoothness. Regularization effectively decreases the number of degrees of freedom in the model. In fact, most optimization methods, other then vanilla stochastic gradient descent, incorporate some form of regularization and smoothing, among other inherent properties. Therefore the selection of optimization method also plays a role in determining the effective size of the final network.

Results

Fig. 4a shows typical results when training the Large CNN (see network’s details above) to classify a subset of 5 CIFAR100 images (task 1 as defined above), using slow learning rate and Adam optimization. In this setup we see that curriculum learning speeds up the learning rate at the beginning of the training, but converges to the same performance as regular training. When we make learning more difficulty by using the Small network, performance naturally decreases, but now we see that curriculum learning also improves the final generalization performance (Fig. 4b). Similar results are shown for the STL-10 dataset (Fig. 4c).

Fig. 5 shows comparative results when controlling for inherent task difficulty in the 3 tasks described above, using faster learning rate and SGD optimization. Task difficulty can be evaluated in retrospect from the final performance seen in each plot. As can be clearly seen in the figure, the improvement in final accuracy with curriculum learning is larger when the task is more difficult. When manipulating the level of regularization, we see that while too much regularization always harms performance, curriculum learning is least affected by this degradation (results are omitted).

Summary and Discussion

We investigated curriculum learning, an extension of stochastic gradient descent in which easy examples are more frequently sampled at the beginning of training. We started with the theoretical investigation of this strict definition in the context of linear regression, showing that curriculum learning accelerates the learning rate in agreement with prior empirical evidence. While not shedding light on its affect on the classifier’s final performance, our analysis suggests that the direction of a gradient step based on ”easy” examples may be more effective in traversing the input space towards the ideal minimum of the loss function. Specifically, we have empirically shown that the variance in the gradient direction of points increases with their difficulty when optimizing a non-convex loss function. Over-sampling the more coherent easier examples may therefore increase the likelihood to escape the basin of attraction of a low quality local minimum in favor of higher quality local minima even in the general non-convex case.

We also showed theoretically that when the difficulty score of the training points is fixed, convergence is faster if the loss with respect to the current hypothesis is higher. This seems to be a very intuitive result, an intuition that underlies the boosting method for example. However, as intuitive as it might be, this is not always true when the prior data density is assumed to be continuous and when the optimal hypothesis is realizable. Thus the requirement that the difficulty score is fixed is necessary.

In the second part of this paper we described a curriculum learning method for deep networks. The method relies on knowledge transfer from other (pre-trained) networks in order to rank the training examples by difficulty. We described extensive experiments where we evaluated our proposed method under different task difficulty conditions and against a variety of control conditions. In all cases curriculum learning has been shown to increase the rate of convergence at the beginning of training, in agreement with the theoretical results. With more difficult tasks, curriculum learning improved generalization performance.

Acknowledgements

This work was supported in part by a grant from the Israel Science Foundation (ISF) and by the Gatsby Charitable Foundations.

References

Appendix

Appendix A Details for omitted proofs

Lemma 4. The relation between Υ,Ψ,r,ϑ\Upsilon,\Psi,r,\vartheta can be written separately in 4 regions as follows (see Fig. 2):

0≤ϑ≤π−β, yi=xitwˉ+Ψ, yi=xitwt+Υ  ⟹  λrcos⁡ϑ=xit(wˉ−wt)=−Ψ+Υ0\leq\vartheta\leq\pi-\beta,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}+{\Psi},~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon}\implies\lambda r\cos\vartheta={\mathbf{x}}_{i}^{t}(\bar{\mathbf{w}}-{\mathbf{w}}_{t})=-\Psi+\Upsilon

π−β≤ϑ≤π, yi=xitwˉ+Ψ, yi=xitwt−Υ  ⟹  λrcos⁡ϑ=−Ψ−Υ\pi-\beta\leq\vartheta\leq\pi,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}+{\Psi},~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon}\implies\lambda r\cos\vartheta=-{\Psi}-{\Upsilon}

0≤ϑ≤β, yi=xitwˉ−Ψ, yi=xitwt+Υ  ⟹  λrcos⁡ϑ=Ψ+Υ0\leq\vartheta\leq\beta,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-{\Psi},~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon}\implies\lambda r\cos\vartheta={\Psi}+{\Upsilon}

β≤ϑ≤π, yi=xitwˉ−Ψ, yi=xitwt−Υ  ⟹  λrcos⁡ϑ=Ψ−Υ\beta\leq\vartheta\leq\pi,~{}y_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-{\Psi},~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon}\implies\lambda r\cos\vartheta={\Psi}-{\Upsilon}

We keep in mind that ∀xi\forall{\mathbf{x}}_{i} and Ψ\Psi, there are 2 possible yiy_{i} with equal probability. Recall that zˉ\bar{\mathbf{z}} denotes the projection of wˉ\bar{\mathbf{w}} on Ωi\Omega_{i}. In the planar section shown in Fig. 2,

zˉ\bar{\mathbf{z}} lies in the upper half space   ⟺  \iff yi=xitwˉ+Ψy_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}+{\Psi}

zˉ\bar{\mathbf{z}} lies in the lower half space   ⟺  \iff yi=xitwˉ−Ψy_{i}={\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-{\Psi}

This follows from 3 observations: xˉi\bar{\mathbf{x}}_{i} lies in the upper half space by the definition of the polar coordinate system, xitwˉ−yi=±Ψ{\mathbf{x}}_{i}^{t}\bar{\mathbf{w}}-y_{i}=\pm\Psi, and

Next, let zt{\mathbf{z}}_{t} denote the projection of wt{\mathbf{w}}_{t} on Ωi\Omega_{i}. Then

When zˉ\bar{\mathbf{z}} lies in the upper half space, the following can be verified geometrically from Fig. 2:

0≤ϑ≤π−β ⇒ xit(zt−wt)≥0 ⇒ yi=xitwt+Υ0\leq\vartheta\leq\pi-\beta~{}\Rightarrow~{}{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\geq 0~{}\Rightarrow~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon}

π−β≤ϑ≤π ⇒ xit(zt−wt)≤0 ⇒ yi=xitwt−Υ\pi-\beta\leq\vartheta\leq\pi~{}\Rightarrow~{}{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\leq 0~{}\Rightarrow~{}y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon}

When zˉ\bar{\mathbf{z}} lies in the lower half space

0≤ϑ≤β  ⟹  xit(zt−wt)≥0  ⟹  yi=xitwt+Υ0\leq\vartheta\leq\beta\implies{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\geq 0\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}+{\Upsilon}

β≤ϑ≤π  ⟹  xit(zt−wt)≤0  ⟹  yi=xitwt−Υ\beta\leq\vartheta\leq\pi\implies{\mathbf{x}}_{i}^{t}({\mathbf{z}}_{t}-{\mathbf{w}}_{t})\leq 0\implies y_{i}={\mathbf{x}}_{i}^{t}{\mathbf{w}}_{t}-{\Upsilon}