Curriculum Learning of Multiple Tasks

Anastasia Pentina, Viktoriia Sharmanska, Christoph H. Lampert

Introduction

Multi-task learning studies the problem of solving several prediction tasks. While traditional machine learning algorithms can be applied to solve each task independently, they usually need significant amounts of labelled data to achieve generalization of reasonable quality. However, in many cases it is expensive and time consuming to annotate large amounts of data, especially in computer vision applications such as object categorization. An alternative approach is to share information between several related learning tasks and this has been shown experimentally to allow better generalization from fewer training points per task .

In this work we focus on the parameter transfer approach to multi-task learning that rests on the idea that models corresponding to related tasks are similar to each other in terms of their parameter representations. We concentrate on the case of linear predictors and assume that similarity between the models is measured by the Euclidean distance between the corresponding weight vectors . In a multi-task setting this idea was introduced by Evgeniou and Pontil in . There the authors propose an SVM-based algorithm that enforces the weight vectors corresponding to different tasks to lie close to some common prototype, and they show its effectiveness on several datasets. However, this algorithm treats all the tasks symmetrically, which might not be optimal in more realistic scenarios. There might be some outlier tasks or groups of tasks such that there is no similarity between the tasks from different groups. Hence, more flexible models are needed that are able to exploit the structure underlying tasks relations and avoid negative consequences of transferring information between unrelated tasks.

The idea of regularizing by Euclidean distance between the weight vectors of different tasks is also commonly used in domain adaptation scenario where the learner has access to two or more prediction tasks but is interested in performing well only on one of them. All other tasks serve only as sources of additional information. This setup has been shown to lead to effective algorithms in various computer vision applications: object detection , personalized image search , hand prosthetics and image categorization . Though the domain adaptation scenario is noticeably different from the multi-task one, as it concentrates on solving only one task instead of all of them, the two research areas are closely related in term of their methodology and therefore can benefit from each other. In particular, the learning algorithm we propose can be seen as a way to decompose a multi-task problem into a set of domain adaptation problems.

Our approach is motivated by the human educational process. If we consider students at school, they, similarly to a multi-task learner, are supposed to learn many concepts. However, they learn them not all simultaneously, but in a sequence. By processing tasks in a meaningful order, students are able to gradually increase their knowledge and reuse previously accumulated information to learn new concepts more effectively. Inspired by this example we propose to solve tasks in a sequential manner by transferring information from a previously learned task to the next one instead of solving all of them simultaneously. This approach makes learning more flexible in terms of variability between the tasks and memory efficient as it does not require processing all training data at the same time.

As for students at school, the order in which tasks are solved may crucially affect the overall performance of the learner. We study this question by using PAC-Bayesian theory to prove a generalization bound that depends on the data representation and algorithm used to solve the tasks. The bound quantifies the effectiveness of the order in which tasks are solved and therefore can be used to find a beneficial order. Based on the bound we propose a theoretically justified algorithm that automatically chooses a favourable sequence for learning. Our experimental results on two real-world image datasets show that learning tasks in a sequence can be superior to independent learning as well as to the standard multi-task approach of solving them jointly, and that our algorithm is able to reliably discover an advantageous order.

Related Work

While our work is based on the idea of transferring information through weight vectors, other approaches to multi-task learning have been proposed as well. A popular idea in the machine learning literature is that parameters of related tasks can be represented as linear combinations of a small number of common latent basis vectors. Argyriou et al. proposed a method to learn such representations using sparsity regularization in . This method was later extended to allow partial overlap between groups of tasks in . It was also adapted to the lifelong setting in , where Ruvolo and Eaton proposed a way to sequentially update the model as new tasks arrive. In , the same authors further extended it to the case when the learner is allowed to choose which task to solve next and they proposed using different heuristics for making this choice. Experimentally, subspace-based methods have shown good performance in situations where many tasks are available and the underlying feature representations are low-dimensional. When the feature dimensionality gets larger, however, their computational cost grows quickly, and this makes them not applicable for the type of computer vision problems we are interested in.In preliminary experiments we tried to use ELLA , as one of the fastest exiting methods, but found the experiments intractable to do at full size. A simplified setup produced results clearly below that of other baselines. An exception is , where Jayaraman et al. apply subspace-based method to jointly learn multiple attribute predictors. However, even there, dimensionality reduction was required.

Methods based on the sharing of weight vector have also been generalized since their original introduction in , in particular to relax the assumption that all tasks have to be related. In , Evgeniou et al. achieved this by introducing a graph regularization. Alternatively, Chen et al. proposed to penalize deviations in weight vectors for highly correlated tasks. However, these methods require prior knowledge about the amount of similarities between tasks. In contrast, the algorithm we present in this work does not assume all tasks to be related, yet does not need a priori information regarding their similarities, either.

The question how to order a sequence of learning steps to achieve best performance has previously been studied mainly in the context of single task learning, where the question is in which order one should process the training examples. In Bengio et al. showed experimentally that choosing training examples in an order of gradually increasing difficulty can lead to faster training and higher prediction quality. Similarly, Kumar et al. introduced the self-paced learning algorithm, which automatically chooses the order in which training examples are processed for solving a non-convex learning problem. In the context of learning multiple tasks, the question in which order to learn them was introduced in , where Lad et al. proposed an algorithm for optimizing the task order based on pairwise preferences. However, they considered only the setting in which tasks are performed in a sequence through user interaction and therefore their approach is not applicable in the standard multi-task scenario. In the setting of multi-label classification, the idea of decomposing a multi-target problem into a sequence of single-target ones was proposed by Read et al. in . However, there the sharing of information occurs through augmentations of the feature vectors, not through a regularization term.

Method

Note that this approach does not rely on the assumption that all the tasks t1,…,tnt_{1},\dots,t_{n} are equally related. However its performance will depend on the order π\pi as it needs subsequent tasks to be related. In the next section we study this question using statistical learning theory and introduce an algorithm for automatically defining a beneficial data-dependent order.

2 Learning a data-dependent order

Here we examine the role of the order π\pi in terms of the average expected error (1) of the resulting solutions. However, we do not limit our theoretical analysis to the case of using Adaptive SVMs as described earlier. Specifically, we only assume that the learning algorithm used for solving each individual task tπ(i)t_{\pi(i)} is the same for all tasks and deterministic. This algorithm, A(wπ(i−1),Sπ(i))\mathcal{A}(w_{\pi(i-1)},S_{\pi(i)}), returns wπ(i)w_{\pi(i)} based on the solution wπ(i−1)w_{\pi(i-1)} obtained for a previously solved task and training data Sπ(i)S_{\pi(i)}. The following theorem provides an upper-bound on the average expected error (1) of the obtained predictors (the proof can be found in the Appendix A).

For any deterministic learning algorithm A\mathcal{A} and any δ>0\delta>0, the following inequality holds with probability at least 1−δ1-\delta (over sampling the training sets S1,…,SnS_{1},\dots,S_{n}) uniformly for any order π∈Sn\pi\in\mathcal{S}_{n}:

where mˉ\bar{m} is the harmonic mean of the sample sizes m1,…,mnm_{1},\dots,m_{n}, Φˉ(z)=12(1−erf⁡(z2))\bar{\Phi}(z)=\frac{1}{2}\left(1-\operatorname{erf}\left(\frac{z}{\sqrt{2}}\right)\right), erf⁡(z)\operatorname{erf}(z) is the Gauss error function , π(0)=0\pi(0)=0, w0=0w_{0}=\mathbf{0} and wπ(i)=A(wπ(i−1),Sπ(i))w_{\pi(i)}=\mathcal{A}(w_{\pi(i-1)},S_{\pi(i)}).

The left hand side of the inequality (19) is one half of the average expected error on tasks t1,…,tnt_{1},\dots,t_{n}. This is the quantity of interest that the learner would like to minimize. However, since the underlying data distributions D1,…,DnD_{1},\dots,D_{n} are unknown, it is not computable. In contrast, its upper bound given by the right hand side of (19) contains only computable quantities. It is an average of nn terms (up to constants which do not depend on π\pi), where each term corresponds to one task. If we consider the term corresponding to the task tπ(i)t_{\pi(i)}, its first part is an analogue of the training error. Each term Φˉ(yjπ(i)⟨wπ(i),xjπ(i)⟩∣∣xjπ(i)∣∣−1)\bar{\Phi}\left(y^{\pi(i)}_{j}\langle w_{\pi(i)},x^{\pi(i)}_{j}\rangle||x^{\pi(i)}_{j}||^{-1}\right) has a value between and 11 and is a monotonically decreasing function of the distance between the training point xkπ(i)x^{\pi(i)}_{k} and the hyperplane defined by wπ(i)w_{\pi(i)}. Specifically, it is close to when xjπ(i)x^{\pi(i)}_{j} is correctly classified and has large distance from the separating hyperplane, it is close to 11 when the point is in the wrong halfspace far from the hyperplane and is 0.50.5 when xjπ(i)x^{\pi(i)}_{j} lies on the hyperplane. Therefore it captures the confidence of the predictions on the training set. The second part of the term corresponding to the task tπ(i)t_{\pi(i)} is a complexity term. It measures the similarity between subsequent tasks tπ(i−1)t_{\pi(i-1)} and tπ(i)t_{\pi(i)} by the L2L_{2}-distance between the obtained weight vectors. As a result the value of the right-hand side of (19) depends on π\pi and captures the influence that the task tπ(i)t_{\pi(i)} may have on the subsequent tasks tπ(i+1),…,tπ(n)t_{\pi(i+1)},\dots,t_{\pi(n)}. Therefore it can be seen as a quality measure of order π\pi: a low value of the right hand side of (19) ensures a low expected error (1). It leads to an algorithm for obtaining an order π\pi that is adjusted to the tasks t1,…,tnt_{1},\dots,t_{n} by minimizing the right hand side of (19) based on the data S1,…,SnS_{1},\dots,S_{n}. Because (19) holds uniformly in π\pi, its guarantees also hold for the learned orderNote that, in contrast, algorithm A\mathcal{A} is assumed to be fixed in advance. Therefore the order π\pi is the only parameter that can be adjusted by minimizing (19) with preservation of the performance guarantees given by Theorem 1..

Minimizing the right hand side of (19) is an expensive combinatorial problem, because it requires searching over all possible permutations π∈Sn\pi\in\mathcal{S}_{n}. We propose an incremental procedure for performing this search approximately. We successively determine π(i)\pi(i) by minimizing the corresponding term of the upper bound (19) with respect to yet unsolved tasks. Specifically, at the ii-th step, when π(1),…,π(i−1)\pi(1),\dots,\pi(i-1) are already defined, we search for a task tkt_{k} that minimizes the following objective function and is not included in the order π\pi yet:

where wk=A(wπ(i−1),Sk)w_{k}=\mathcal{A}(w_{\pi(i-1)},S_{k}). We let π(i)\pi(i) be the index of the task that minimizes (4). Suchwise at every step we choose the task that is easy (has low empirical error) and similar to the previous one (the corresponding weight vectors are close in terms of L2L_{2} norm). Therefore this optimization process well fits humans intuitive concept of starting with the simplest task and proceeding with most similar ones. The resulting procedure in the case of using Adaptive SVM (2) for solving every task is summarized in Algorithm 1 and we refer to it as SeqMT.

3 Learning with multiple subsequences

The proposed algorithm, SeqMT, relies on the idea that all tasks can be ordered in a sequence, where each task is related to the previous one. In practice, this is not always the case, since we can have outlier tasks that are not related to any other tasks, or we can have several groups of tasks, in which case it is beneficial to form subsequences within the groups, but it is disadvantageous to join them into one single sequence.

Therefore, we propose an extension of the SeqMT model, that allows tasks to form subsequences, where the information is transferred only between the tasks within the subsequence. Our multiple subsequences version, MultiSeqMT, also chooses tasks iteratively, but at any stage it allows the learner to choose whether to continue one of the existing subsequences or to start a new one. In order to decide which task to solve next and which subsequence to continue with it, the learner performs a two-stage optimization. First, for each of the exiting subsequences ss (including empty one that corresponds to the no transfer case) the learner finds the task tst_{s} that is the most promising to continue with. This is done in the same way as how the next task is chosen in the SeqMT algorithm. Afterwards, the learner compares the values of criterion (4) for every pair (s,ts)(s,t_{s}) and chooses the subsequence s∗s^{*} with the minimal value and continues it with the task ts∗t_{s^{*}}. Please, refer to the Appendix B for exact formulation.

Experiments

In this section we verify our two main claims: 1) learning multiple tasks in a sequential manner can be more effective than learning them jointly; 2) we can find automatically a favourable order in terms of average classification accuracy. We use two publicly available datasets: Animals with Attributes (AwA)http://attributes.kyb.tuebingen.mpg.de/ and Shoeshttp://tamaraberg.com/attributesDataset/index.html augmented with attributeshttp://vision.cs.utexas.edu/whittlesearch/ . In the first experiment, we study the case when each task has a certain level of difficulty for learning the object class, which is defined by human annotation in a range from easiest to hardest. We show the advantage of a sequential learning model over learning multiple tasks jointly and learning each task independently. We also study the automatically determined orders in more detail, comparing them with the orders when learning goes from easiest to hardest tasks in the spirit of human learning. In the second experiment, we study the scenario of learning visual attributes that characterize shoes across different shoe models. In this setting, some tasks are clearly related such as high heel and shiny, and some tasks are not, such as high heel and sporty. Therefore, we also apply the variant of our algorithm that allows multiple subsequences, showing that it better captures the task structure and is therefore the favourable learning strategy.

We focus on eight classes from the AwA dataset: chimpanzee, giant panda, leopard, persian cat, hippopotamus, raccoon, rat, seal, for which human annotation is available, whether an object is easy or hard to recognize in an image . For each class the annotation specifies ranking scores of its images from easiest to hardest. To create easy-hard tasks, we split the data in each class into five equal parts with respect to their easy-hard ranking and use these parts to create five tasks per class. Each part has on average 120120 samples except the class rat, for which AwA contains few images, so there are only approximately 6060 samples per part. Each task is a binary one-versus-rest classification of one of the parts against the remaining seven classes. For each task we balance 2121 vs 2121 training images and 7777 vs 7777 test images (3535 vs 3535 in case of class rat) with equal amount of samples from each of the classes acting as negative examples. The data between different tasks does not overlap. As our feature representation, we use 20002000 dimensional bag-of-words histograms obtained from SURF descriptors provided together with the dataset. We L2L_{2}-normalize the features and augment them with a unit element to act as a bias term.

Evaluation metric. To evaluate the performance of the methods we use the classification error rate. We repeat each of the experiments 2020 times with different random data splits and measure the average error rate across the tasks. We report mean and standard error of the mean of this value over all repeats.

Baselines. We compare our sequential learning model (SeqMT) with the multi-task algorithm from , that treats all tasks symmetrically (MT). Specifically, MT regularizes the weight vectors for all tasks to be similar to a prototype w0w_{0} that is learned jointly with the task weight vectors by solving the following optimization problem:

In order to study how relevant the knowledge transfer actually is, we compare SeqMT with a linear SVM baseline that solves each task independently (IndSVM). As a reference, we also provide the performance of a linear SVM trained on data that is merged from all tasks (MergedSVM).

To understand the impact that the task order has on the classification accuracy we compare the performance of SeqMT with baselines that learn tasks in random order (Random), and in order from easiest to hardest (Semantic) according to the human annotation as if it was given to us. Another baseline we found related is inspired by the diversity heuristic from . It defines the next task to be solved by maximizing (4) instead of minimizing it. We refer to it as Diversity.

Model selection. We perform a cross validation model selection approach for choosing the regularization trade-off parameter CC for each of the methods. In all our experiment, we select CC over 88 parameter values {10−2,10−1…,105}\{10^{-2},10^{-1}\dots,10^{5}\} using 5×55\times 5 fold cross-validation.

Results. We present the results of this experiment in Figure 2 and Figure 3. As we can see from Figure 2, the proposed SeqMT method outperforms MT and IndSVM algorithms in all 88 cases. This shows that knowledge transfer between the tasks is clearly advantageous in this scenario, and it supports our claims that learning tasks sequentially is more effective than learning them jointly if not all tasks are equally related. As expected, the reference baseline MergedSVM improves over single-task baseline IndSVM in all but one case, as training with more data has better generalization ability. In some cases, the MergedSVM performs on par or even better than SeqMT and MT methods, as for example, in cases of chimpanzee and giant panda. We expect that this happens when tasks are so similar that a single hyperplane can explain most of them. In this case, MergedSVM benefits from the amount of data that is available to find this hyperplane. When the tasks are different enough, MergedSVM is unable to explain all of them with one shared hyperplane and loses to SeqMT and MT models, that learn one hyperplane per task. This can be see, e.g. in the cases of hippopotamus and seal, and particularly much in the case of leopard, where the MergedSVM does not improve even over independent training.

Next we examine the importance of the order in which the tasks are being solved, reporting our findings in Figure 3. All methods in this study use a sequence of Adaptive SVMs as a learning algorithm for solving the next task and differ only by how the order of tasks is defined. In all 88 cases the proposed SeqMT algorithm outperforms the Random order baseline, which learns the tasks in a random orderA different random order is taken for each class for each of the 2020 repeats.. The Diversity algorithm is much worse than other baselines, presumably because the max heuristic of choosing the next task is not effective in this setting. As a reference, we also check the Semantic baseline when the tasks are being solved from easiest to hardest (as if we had prior information about the easy-hard order of the tasksThis order is fixed for each class for each of the 2020 repeats.). In 66 out of 88 classes, the order learned by our SeqMT model (yellow rhombus) is better or on par with the Semantic (green square), except for classes chimpanzee and giant panda, where we did not manage to learn the best order. Interestingly, for some classes following the strategy of semantic order is worse or on par with learning them in a random order (cases with seal and hippopotamus). We credit this to the fact that human perception of easiness and hardness does not always coincide with what is easy and hard to learn for a machine learning algorithm. In fact, in cases of seal and hippopotamus, the human and machine understanding are rather opposite: the hardest task for human is the easiest from machine learning perspective, and the easiest task for human is hardest or medium hard for the learning algorithm. Hence, learning these classes in random order leads to better results than learning in a fixed unfavourable order. We check this by computing the error rates of single SVMs trained per each task: easiest, easy, medium, hard and hardest as defined by human studies and visualize the results in Figure 4.

Finally, for each class we compute the performance of all possible orders to learn 55 tasks, which result in 120120 baselinesOne baseline defines one fixed order across all 2020 repeats. In SeqMT, we learn an adaptive order that can differ across the repeats.. We visualize the performance of all orders as a violin plot , where one horizontal slice of the shaded area reflects how many different orders achieve this error rate (performance stated on the vertical axis). Overall, SeqMT is highly competitive with best possible fixed orders, clearly outperforming them in two cases of rat and seal (rhombus is lower than the yellow area), and loosing in chimpanzee, which we have observed before. Thus, learning the adaptive order of tasks based on the training sets is advantageous to solving them in a fixed order.

We also study the importance of the two terms in the objective function (4) for choosing the next task. For this, we compare our algorithm to two simplifications: choosing the next task based on the training error only (Error) and choosing the next task based on the complexity term only (Compl). The results in Table 1 suggest that the complexity term, i.e. the similarity between tasks, is the more important component, but that its combination with the error term achieves never worse and sometimes even better results.

To conclude, our proposed algorithm orders the tasks into a learning sequence to achieve the best performance results, and is beneficial to all other strategies including the order annotated for human learning.

2 Learning subsequences of related attributes

We focus on 1010 attributes that describe shoe models : pointy at the front, open, bright in color, covered with ornaments, shiny, high at the heel, long on the leg, formal, sporty, feminine and 1010 classes from the Shoes dataset: athletic, boots, clogs, flats, heels, pumps, rain boots, sneakers, stiletto, wedding shoes. Attribute description comes in form of class ranking from 11 to 1010, with 1010 denoting class that “has it the most” and 11 denoting class that “has it the least”. We form 1010 binary classification tasks, one for each attribute, using samples from top-2 classes as positive (classes with 1010 and 99 ranks) and samples from bottom-2 classes as negative (classes with 11 and 22 ranks). For more clarifications on attribute-class description, see the Appendix C. For each task we balance 5050 vs 5050 training images and 300300 vs 300300 test images, randomly sampled from each class in equal amount. The data between different tasks does not overlap. As feature representation, we use 960960 dimensional GIST descriptor concatenated with L1L_{1}-normalized 3030 dimensional color descriptor, augmented with a unit element as bias term.

Baselines. In addition to all baselines described in the previous section, we add the MultiSeqMT method that allows to learn multiple subsequences of attributes (with the information transfer within a subsequence). Additionally we include a baseline RandomMultiSeq that learns attributes in random order with an option to randomly start a new subsequence.

Results. We present the main results of this experiment in Table 2. As we can see from it, the proposed MultiSeqMT method outperforms all other baselines and is a favourable strategy in this scenario. It is better than the SeqMT model which confirms that learning multiple subsequences is advantageous, when not all given tasks are equally related. The single-task learning baseline IndSVM is rather strong and performs on par with the Multi-task learning MT baseline, possibly because multi-task learning is negatively affected by it forcing transfer between unrelated tasks. As expected, MergedSVM is unable to explain all tasks with one hyperplane and performs very poorly in this case.

Similarly to the previous experiment, we examine the importance of sequences and subsequences in which the tasks are being solved. First, we compare the performance of the MultiSeqMT and SeqMT methods with the baselines that learn tasks in certain order (last three rows in the Table 2), and then we will share our findings about the learned subsequences of attributes.

As we can see from Table 2, MultiSeqMT is able to order the tasks into subsequences in the most effective way. Learning multiple random subsequences as RandomMultiSeq does is better than learning a single sequence of all tasks, as SeqMT, Random and Diversity baselines do. However since SeqMT performs on par with RandomMultiSeq and clearly better than Random baseline, we conclude, that even with one sequence we are able to learn a good order of tasks that is discretely affected by transfer between unrelated tasks. The Diversity baseline is worse than other baselines also in this setting.

Finally, we analyze the subsequences that MultiSeqMT has learned, finding some relatively stable patterns across the repeats. There are six attributes, shiny, high at the heel, pointy at front, feminine, open and formal, that can benefit from each other and often form a subsequence of related tasks. Inside the group, the attributes shiny and high at the heel frequently start the subsequence and transfer happens between both of interchangeably. The next attributes that often follow the previous two are pointy at front and feminine; they are also closely related and interchangeable in order. The attribute open is not always in the subsequence, but once it is included, this attribute transfers to formal, which often ends the subsequence.

The remaining four attributes, bright in color, covered with ornaments, long on the leg and sporty, either form smaller subsequences, sometimes of two tasks only, or they appear as separate tasks. Occasionally there is transfer from long on the leg attribute to covered with ornaments, which we credit to the fact the shoe class boots shares a high rank for both of those attributes. In half of the cases, the attributes sporty and bright in color are not related to the other tasks and form their own subsequences.

Conclusion

In this work, we proposed to solve multiple tasks in a sequential manner and studied the question if and how the order in which a learner solves a set of tasks influences its overall performance. First, we provide a theoretical result: a generalization bound that can be used to access the quality of the learning order. Secondly, we proposed a principled algorithm for choosing an advantageous order based on the theoretical result. Finally, we tested our algorithm on two datasets and showed that: 1) learning multiple tasks sequentially can be more effective than learning them jointly; 2) the order in which tasks are solved effects the overall classification performance; 3) our method is able to automatically discover a beneficial order.

A limitation of our model is that currently it allows to transfer only from the previous task to solve the current one, hence it outputs a sequence of related tasks or multiple task subsequences. In future work, we plan to extend our model by relaxing this condition and allowing the tasks to be organized in a tree, or a more general graph structure.

Appendix A Proof of Theorem 1

We apply PAC-Bayesian theory to prove a generalization bound for the case of sequential task solving. For more details on it see .

Assume that the learner observes a sequence of tasks in a fixed order, t1,...,tnt_{1},...,t_{n}, with corresponding training sets, S1,...,SnS_{1},...,S_{n}, where Si={(x1i,y1i),...,(xmii,ymii)}S_{i}=\{(x^{i}_{1},y^{i}_{1}),...,(x^{i}_{m_{i}},y^{i}_{m_{i}})\} consists of mim_{i} i.i.d. samples from a task-specific data distribution DiD_{i}. We assume that all tasks share the same input set X\mathcal{X} and output set Y\mathcal{Y} and that the learner uses the same loss function l:Y×Y→l:\mathcal{Y}\times\mathcal{Y}\rightarrow and hypothesis set H⊂{h:X→Y}H\subset\{h:\mathcal{X}\rightarrow\mathcal{Y}\} for solving these tasks. The learner solves only one task at a time by using some arbitrary but fixed deterministic algorithm A\mathcal{A} that produces a posterior distribution QiQ_{i} over HH based on training data SiS_{i} and some prior knowledge PiP_{i}, which is also expressed in form of probability distribution over the hypothesis set. Moreover, we assume that the solution QiQ_{i} plays the role of a prior for the next task, i.e. Pi+1=QiP_{i+1}=Q_{i} (P1P_{1} is just some fixed distribution, Q0Q_{0}). For making predictions for task tit_{i} the learner uses the Gibbs predictor, associated with the corresponding posterior distribution QiQ_{i}. For an input x∈Xx\in\mathcal{X} this randomized predictor samples h∈Hh\in H according to QiQ_{i} and returns h(x)h(x). The goal of the learner is to perform well on all tasks, t1,...,tnt_{1},...,t_{n}, i.e. to minimize the average expected error of the Gibbs classifiers defined by Q1,…,QnQ_{1},\dots,Q_{n}:

Since the data distributions of the tasks t1,...,tnt_{1},...,t_{n} are unknown, one can not directly compute (6). However, it can be approximated by the empirical error based on the observed data:

The following theorem provides an upper bound on the difference between the two quantities (6) and (7):

For any fixed distribution Q0Q_{0}, learning algorithm A\mathcal{A} and any δ>0\delta>0 the following inequality holds with probability at least 1−δ1-\delta (over sampling the training sets S1,...,SnS_{1},...,S_{n}):

where Qi=A(Qi−1,Si)Q_{i}=\mathcal{A}(Q_{i-1},S_{i}) is a posterior distribution for the task tit_{i} learned by A\mathcal{A} based on Qi−1Q_{i-1} and SiS_{i}, mˉ=(1n∑i=1n1mi)−1\bar{m}=\left(\frac{1}{n}\sum_{i=1}^{n}\frac{1}{m_{i}}\right)^{-1} is the harmonic mean of the sample sizes and KL⁡\operatorname{KL} denotes Kullback-Leibler divergence.

First we use Donsker-Varadhan’s variational formula to change the expectation over posteriors (Q1,...,Qn)(Q_{1},...,Q_{n}) to the expectation over priors (Q0,Q1,...,Qn−1)(Q_{0},Q_{1},...,Q_{n-1}):

where er⁡i(h)\operatorname{er}_{i}(h) is the expected loss of a hypothesis hh computed with respect to the data distribution of task tit_{i} and er⁡^i(h)\widehat{\operatorname{er}}_{i}(h) is the corresponding empirical loss, computed on SiS_{i}. This inequality holds for any λ>0\lambda>0.

Note, that QiQ_{i} may depend on S1,...,SiS_{1},...,S_{i}, but does not depend on Si+1,...,SnS_{i+1},...,S_{n}. Therefore:

We fix hn∈Hh_{n}\in H. Then we can rewrite the last term of (10) in the following way:

Since the data points in SnS_{n} are i.i.d., all terms in this product are independent and take values between λ(er⁡n(hn)−1)nmn\frac{\lambda(\operatorname{er}_{n}(h_{n})-1)}{nm_{n}} and λer⁡n(hn)nmn\frac{\lambda\operatorname{er}_{n}(h_{n})}{nm_{n}}. Therefore, by Hoeffding’s lemma , we obtain that the last term of (10) is bounded by a constant:

We repeat the same procedure for all other tasks and obtain that:

where mˉ=(1n∑i=1n1mi)−1\bar{m}=\left(\frac{1}{n}\sum_{i=1}^{n}\frac{1}{m_{i}}\right)^{-1}. Therefore, by Markov’s inequality, with probability at least 1−δ1-\delta:

By setting λ=nmˉ\lambda=n\sqrt{\bar{m}} we obtain the final result. ∎

Theorem 2 holds only for tasks that are given to the learner in an arbitrary but fixed order, which must be chosen before observing the sample sets S1,…,SnS_{1},\dots,S_{n}. We can, however, extend it to hold uniformly for all orders of tasks: for each possible task order, π∈Sn\pi\in\mathcal{S}_{n}, where Sn\mathcal{S}_{n} is the symmetric group, we use (17) with confidence parameter δ/n!\delta/n!. We then combine all inequalities (of which there are n!n! many) using the union bound, thereby obtaining the following generalization:

For any fixed distribution Q0Q_{0}, any learning algorithm A\mathcal{A} and any δ>0\delta>0 with probability at least 1−δ1-\delta (over sampling the training sets S1,...,SnS_{1},...,S_{n}) the following inequality holds uniformly for any order π∈Sn\pi\in\mathcal{S}_{n}:

where Qπ(i)=A(Qπ(i−1),Sπ(i))Q_{\pi(i)}=\mathcal{A}(Q_{\pi(i-1)},S_{\pi(i)}), mˉ=(1n∑i=1n1mi)−1\bar{m}=\left(\frac{1}{n}\sum_{i=1}^{n}\frac{1}{m_{i}}\right)^{-1} and π(0)=0\pi(0)=0.

The case of linear predictors can be captured by the PAC-Bayesian setting if prior and posterior distributions are Gaussian . More formally, assume that Qi=N(wi,Id⁡)Q_{i}=\mathcal{N}(w_{i},\operatorname{\textit{Id}}) for i=0,...,ni=0,...,n, i.e. Gaussian distributions with unit variance that differ only by the value of their mean vectors. Due to the symmetry of the Gaussian distribution, the predictor defined by wiw_{i} is equivalent to the majority vote predictor corresponding to distribution QiQ_{i}. Hence one can use the result of Theorem 3 in the case of deterministic linear predictors. We also assume that the learner uses an algorithm, A\mathcal{A}, that for every task tit_{i} returns wiw_{i} based on the mean vector of the used prior distribution and training data SiS_{i}.

By computing the complexity term from (18) we obtain:

where π(0)=0\pi(0)=0, w0=0w_{0}=\textbf{0} and wπ(i)=A(wπ(i−1),Sπ(i))w_{\pi(i)}=\mathcal{A}(w_{\pi(i-1)},S_{\pi(i)}). Note that the loss of the Gibbs classifier defined by QiQ_{i} on a point (x,y)(x,y) is given by \bar{\Phi}\Big{(}\frac{yx^{T}w_{i}}{||x||}\Big{)}, where Φˉ(z)=12(1−erf⁡(z2))\bar{\Phi}(z)=\frac{1}{2}\left(1-\operatorname{erf}\left(\frac{z}{\sqrt{2}}\right)\right) and erf⁡(z)=2π∫0ze−t2dt\operatorname{erf}(z)=\frac{2}{\sqrt{\pi}}\int_{0}^{z}e^{-t^{2}}dt is the Gauss error function . Together with (16) it gives us the result of Theorem 1.

Appendix B Additional information for MultiSeqMT

Assume that, as in the case of learning in a fixed order described in Theorem (2), nn tasks t1,...,tnt_{1},...,t_{n} are processed one after another from t1t_{1} till tnt_{n}. We extend the sequential learning scenario by allowing the learner to not transfer information between some of the subsequent task. Specifically, if the posterior distribution QiQ_{i} obtained for task tit_{i} is not informative with respect to the next task, ti+1t_{i+1}, the learner may use original, fixed distribution Q0Q_{0} as a prior for ti+1t_{i+1} instead of QiQ_{i}. Such scenario can be described by introducing the set of flags bi∈{0,1}b_{i}\in\{0,1\} for i=2,...,ni=2,...,n, where bi=1b_{i}=1 means that information from task ti−1t_{i-1} is transferred to the task tit_{i}, in other words Qi−1Q_{i-1} is used as a prior for solving tit_{i}, while bi=0b_{i}=0 denotes that there is no transfer from ti−1t_{i-1} to tit_{i} and Q0Q_{0} is used as a prior PiP_{i}.

In the same manner, as we proved Theorem (2), we can prove the following generalization bound for the case of sequential learning with ability to not transfer information between subsequent tasks:

For any fixed distribution Q0Q_{0}, set of flags bi∈{0,1}b_{i}\in\{0,1\} for i=2,...,ni=2,...,n, learning algorithm A\mathcal{A} and any δ>0\delta>0 the following inequality holds with probability at least 1−δ1-\delta (over sampling the training sets S1,...,SnS_{1},...,S_{n}):

The result of Theorem (4) holds for any, but fixed in advance order of tasks and set of flags bib_{i}. Now, we can extend it to hold uniformly for all possible partitions of tasks in subsequences and orders of tasks in each group. First, note that there are n!≤nnn!\leq n^{n} possible full orderings of nn tasks. Second, there are 2n−12^{n-1} possible ways to define flags bib_{i} for each task. Therefore there are less than nn2n−1n^{n}2^{n-1} possible partitions of tasks and groups and orderings inside each group. We now let the confidence parameter to be δ/((2n)n)\delta/((2n)^{n}) and combine inequalities for all possible partitions and orderings (of which there are less than (2n)n(2n)^{n} many) using the union bound argument. Thereby we obtain the following result:

For any fixed distribution Q0Q_{0}, learning algorithm A\mathcal{A} and any δ>0\delta>0 with probability at least 1−δ1-\delta (over sampling the training sets S1,...,SnS_{1},...,S_{n}) the following inequality holds uniformly for all orders π∈S\pi\in\mathcal{S} and all set of flags {b2,...,bn}∈{0,1}n−1\{b_{2},...,b_{n}\}\in\{0,1\}^{n-1}:

We can formulate the instantiation of Theorem (5) for the case of linear predictors and 0/10/1 loss using Gaussian distributions as we did for proving Theorem 1 based on Theorem (3). As a result, we obtain the following generalization bound:

For any deterministic learning algorithm A\mathcal{A} and any δ>0\delta>0, the following holds with probability at least 1−δ1-\delta over sampling the training sets S1,...,SnS_{1},...,S_{n} uniformly for any order π\pi in the symmetric group Sn\mathcal{S}_{n} and any set of flags {b2,...,bn}∈{0,1}n−1\{b_{2},...,b_{n}\}\in\{0,1\}^{n-1}:

Appendix C Additional information for experiments

References