Multi-task learning (MTL) is a subfield of machine learning in which multiple learning tasks are solved at the same time, while exploiting commonalities and differences across tasks. This can result in improved learning efficiency and prediction accuracy for the task-specific models, when compared to training the models separately.[1][2][3] Early versions of MTL were called "hints".[4][5]
In a widely cited 1997 paper, Rich Caruana gave the following characterization:
Multitask Learning is an approach to inductive transfer that improves generalization by using the domain information contained in the training signals of related tasks as an inductive bias. It does this by learning tasks in parallel while using a shared representation; what is learned for each task can help other tasks be learned better.[3]
In the classification context, MTL aims to improve the performance of multiple classification tasks by learning them jointly. One example is a spam-filter, which can be treated as distinct but related classification tasks across different users. To make this more concrete, consider that different people have different distributions of features which distinguish spam emails from legitimate ones, for example an English speaker may find that all emails in Russian are spam, not so for Russian speakers. Yet there is a definite commonality in this classification task across users, for example one common feature might be text related to money transfer. Solving each user's spam classification problem jointly via MTL can let the solutions inform each other and improve performance.[citation needed] Further examples of settings for MTL include multiclass classification and multi-label classification.[6]
Multi-task learning works because regularization induced by requiring an algorithm to perform well on a related task can be superior to regularization that prevents overfitting by penalizing all complexity uniformly. One situation where MTL may be particularly helpful is if the tasks share significant commonalities and are generally slightly under sampled.[7] However, as discussed below, MTL has also been shown to be beneficial for learning unrelated tasks.[7][8]
The key challenge in multi-task learning, is how to combine learning signals from multiple tasks into a single model. This may strongly depend on how well different task agree with each other, or contradict each other. There are several ways to address this challenge:
Within the MTL paradigm, information can be shared across some or all of the tasks. Depending on the structure of task relatedness, one may want to share information selectively across the tasks. For example, tasks may be grouped or exist in a hierarchy, or be related according to some general metric. Suppose, as developed more formally below, that the parameter vector modeling each task is a linear combination of some underlying basis. Similarity in terms of this basis can indicate the relatedness of the tasks. For example, with sparsity, overlap of nonzero coefficients across tasks indicates commonality. A task grouping then corresponds to those tasks lying in a subspace generated by some subset of basis elements, where tasks in different groups may be disjoint or overlap arbitrarily in terms of their bases.[9] Task relatedness can be imposed a priori or learned from the data.[6][10] Hierarchical task relatedness can also be exploited implicitly without assuming a priori knowledge or learning relations explicitly.[7][11] For example, the explicit learning of sample relevance across tasks can be done to guarantee the effectiveness of joint learning across multiple domains.[7]
One can attempt learning a group of principal tasks using a group of auxiliary tasks, unrelated to the principal ones. In many applications, joint learning of unrelated tasks which use the same input data can be beneficial. The reason is that prior knowledge about task relatedness can lead to sparser and more informative representations for each task grouping, essentially by screening out idiosyncrasies of the data distribution. Novel methods which builds on a prior multitask methodology by favoring a shared low-dimensional representation within each task grouping have been proposed. The programmer can impose a penalty on tasks from different groups which encourages the two representations to be orthogonal. Experiments on synthetic and real data have indicated that incorporating unrelated tasks can result in significant improvements over standard multi-task learning methods.[8]
Related to multi-task learning is the concept of knowledge transfer. Whereas traditional multi-task learning implies that a shared representation is developed concurrently across tasks, transfer of knowledge implies a sequentially shared representation. Large scale machine learning projects such as the deep convolutional neural network GoogLeNet,[12] an image-based object classifier, can develop robust representations which may be useful to further algorithms learning related tasks. For example, the pre-trained model can be used as a feature extractor to perform pre-processing for another learning algorithm. Or the pre-trained model can be used to initialize a model with similar architecture which is then fine-tuned to learn a different classification task.[13]
Traditionally Multi-task learning and transfer of knowledge are applied to stationary learning settings. Their extension to non-stationary environments is termed Group online adaptive learning (GOAL).[14] Sharing information could be particularly useful if learners operate in continuously changing environments, because a learner could benefit from previous experience of another learner to quickly adapt to their new environment. Such group-adaptive learning has numerous applications, from predicting financial time-series, through content recommendation systems, to visual understanding for adaptive autonomous agents.
Multitask optimization: In some cases, the simultaneous training of seemingly related tasks may hinder performance compared to single-task models.[15] Commonly, MTL models employ task-specific modules on top of a joint feature representation obtained using a shared module. Since this joint representation must capture useful features across all tasks, MTL may hinder individual task performance if the different tasks seek conflicting representation, i.e., the gradients of different tasks point to opposing directions or differ significantly in magnitude. This phenomenon is commonly referred to as negative transfer. To mitigate this issue, various MTL optimization methods have been proposed. Commonly, the per-task gradients are combined into a joint update direction through various aggregation algorithms or heuristics. These methods include subtracting the projection of conflicted gradients,[16] and applying techniques from game theory.[17]
The MTL problem can be cast within the context of RKHSvv (a complete inner product space of vector-valued functions equipped with a reproducing kernel). In particular, recent focus has been on cases where task structure can be identified via a separable kernel, described below. The presentation here derives from Ciliberto et al., 2015.[6]
Suppose the training data set is [math]\displaystyle{ \mathcal{S}_t =\{(x_i^t,y_i^t)\}_{i=1}^{n_t} }[/math], with [math]\displaystyle{ x_i^t\in\mathcal{X} }[/math], [math]\displaystyle{ y_i^t\in\mathcal{Y} }[/math], where t indexes task, and [math]\displaystyle{ t \in 1,...,T }[/math]. Let [math]\displaystyle{ n=\sum_{t=1}^Tn_t }[/math]. In this setting there is a consistent input and output space and the same loss function [math]\displaystyle{ \mathcal{L}:\mathbb{R}\times\mathbb{R}\rightarrow \mathbb{R}_+ }[/math] for each task: . This results in the regularized machine learning problem:
[math]\displaystyle{ \min_{f \in \mathcal{H}}\sum _{t=1} ^T \frac{1}{n_t} \sum _{i=1} ^{n_t} \mathcal{L}(y_i^t, f_t(x_i^t))+\lambda ||f||_\mathcal{H} ^2 }[/math] |
|
( ) |
where [math]\displaystyle{ \mathcal{H} }[/math] is a vector valued reproducing kernel Hilbert space with functions [math]\displaystyle{ f:\mathcal X \rightarrow \mathcal{Y}^T }[/math] having components [math]\displaystyle{ f_t:\mathcal{X}\rightarrow \mathcal {Y} }[/math].
The reproducing kernel for the space [math]\displaystyle{ \mathcal{H} }[/math] of functions [math]\displaystyle{ f:\mathcal X \rightarrow \mathbb{R}^T }[/math] is a symmetric matrix-valued function [math]\displaystyle{ \Gamma :\mathcal X\times \mathcal X \rightarrow \mathbb{R}^{T \times T} }[/math] , such that [math]\displaystyle{ \Gamma (\cdot ,x)c\in \mathcal{H} }[/math] and the following reproducing property holds:
[math]\displaystyle{ \langle f(x),c \rangle _ {\mathbb{R}^T} = \langle f,\Gamma (x,\cdot ) c \rangle _ {\mathcal {H}} }[/math] |
|
( ) |
The reproducing kernel gives rise to a representer theorem showing that any solution to equation 1 has the form:
[math]\displaystyle{ f(x)=\sum _{t=1}^T \sum _{i=1}^{n_t} \Gamma(x,x_i^t)c_i^t }[/math] |
|
( ) |
The form of the kernel Γ induces both the representation of the feature space and structures the output across tasks. A natural simplification is to choose a separable kernel, which factors into separate kernels on the input space X and on the tasks [math]\displaystyle{ \{1,...,T\} }[/math]. In this case the kernel relating scalar components [math]\displaystyle{ f_t }[/math] and [math]\displaystyle{ f_s }[/math] is given by [math]\displaystyle{ \gamma((x_i,t),(x_j,s )) = k(x_i,x_j)k_T(s,t)=k(x_i,x_j)A_{s,t} }[/math]. For vector valued functions [math]\displaystyle{ f\in \mathcal H }[/math] we can write [math]\displaystyle{ \Gamma(x_i,x_j)=k(x_i,x_j)A }[/math], where k is a scalar reproducing kernel, and A is a symmetric positive semi-definite [math]\displaystyle{ T\times T }[/math] matrix. Henceforth denote [math]\displaystyle{ S_+^T=\{\text{PSD matrices} \} \subset \mathbb R^{T \times T} }[/math] .
This factorization property, separability, implies the input feature space representation does not vary by task. That is, there is no interaction between the input kernel and the task kernel. The structure on tasks is represented solely by A. Methods for non-separable kernels Γ is a current field of research.
For the separable case, the representation theorem is reduced to [math]\displaystyle{ f(x)=\sum _{i=1} ^N k(x,x_i)Ac_i }[/math]. The model output on the training data is then KCA , where K is the [math]\displaystyle{ n \times n }[/math] empirical kernel matrix with entries [math]\displaystyle{ K_{i,j}=k(x_i,x_j) }[/math], and C is the [math]\displaystyle{ n \times T }[/math] matrix of rows [math]\displaystyle{ c_i }[/math].
With the separable kernel, equation 1 can be rewritten as
[math]\displaystyle{ \min _{C\in \mathbb{R}^{n\times T}} V(Y,KCA) + \lambda tr(KCAC^{\top}) }[/math] |
|
( ) |
where V is a (weighted) average of L applied entry-wise to Y and KCA. (The weight is zero if [math]\displaystyle{ Y_i^t }[/math] is a missing observation).
Note the second term in P can be derived as follows:
There are three largely equivalent ways to represent task structure: through a regularizer; through an output metric, and through an output mapping.
Regularizer — With the separable kernel, it can be shown (below) that [math]\displaystyle{ ||f||^2_\mathcal{H} = \sum_{s,t=1}^T A^\dagger _{t,s} \langle f_s, f_t \rangle _{\mathcal H_k} }[/math], where [math]\displaystyle{ A^\dagger _{t,s} }[/math] is the [math]\displaystyle{ t,s }[/math] element of the pseudoinverse of [math]\displaystyle{ A }[/math], and [math]\displaystyle{ \mathcal H_k }[/math] is the RKHS based on the scalar kernel [math]\displaystyle{ k }[/math], and [math]\displaystyle{ f_t(x)=\sum _{i=1} ^n k(x,x_i)A_t^\top c_i }[/math]. This formulation shows that [math]\displaystyle{ A^\dagger _{t,s} }[/math] controls the weight of the penalty associated with [math]\displaystyle{ \langle f_s, f_t \rangle _{\mathcal H_k} }[/math]. (Note that [math]\displaystyle{ \langle f_s, f_t \rangle _{\mathcal H_k} }[/math] arises from [math]\displaystyle{ ||f_t||_{\mathcal H_k} = \langle f_t, f_t \rangle _{\mathcal H_k} }[/math].)
[math]\displaystyle{ \begin{align} \|f\|^2_\mathcal{H} &= \left\langle \sum _{i=1} ^n \gamma ((x_i,t_i),\cdot )c_i^{t_i}, \sum _{j=1} ^n \gamma ((x_j,t_j), \cdot )c_j^{t_j}\right\rangle_{\mathcal H } \\ &=\sum _{i,j=1} ^n c_i^{t_i} c_j^{t_j} \gamma ((x_i,t_i),(x_j,t_j)) \\ &=\sum _{i,j=1} ^n \sum _{s,t=1} ^T c_i^{t} c_j^{s} k(x_i,x_j)A_{s,t} \\ &=\sum _{i,j=1} ^n k(x_i,x_j) \langle c_i, A c_j\rangle_{\mathbb R^T} \\ &=\sum _{i,j=1} ^n k(x_i,x_j) \langle c_i, A A^\dagger A c_j\rangle_{\mathbb R^T} \\ &=\sum _{i,j=1} ^n k(x_i,x_j) \langle Ac_i, A^\dagger A c_j\rangle_{\mathbb R^T} \\ &=\sum _{i,j=1} ^n \sum _{s,t=1} ^T (Ac_i)^t (A c_j)^s k(x_i,x_j) A^\dagger_{s,t} \\ &= \sum _{s,t=1} ^T A^\dagger_{s,t} \langle \sum _{i=1} ^n k(x_i,\cdot )(Ac_i)^t, \sum _{j=1} ^n k(x_j,\cdot )(A c_j)^s \rangle _{\mathcal H_k} \\ &= \sum _{s,t=1} ^T A^\dagger_{s,t} \langle f_t, f_s \rangle _{\mathcal H_k} \end{align} }[/math]
Output metric — an alternative output metric on [math]\displaystyle{ \mathcal Y^T }[/math] can be induced by the inner product [math]\displaystyle{ \langle y_1,y_2 \rangle _\Theta=\langle y_1,\Theta y_2 \rangle_{\mathbb R^T} }[/math]. With the squared loss there is an equivalence between the separable kernels [math]\displaystyle{ k(\cdot,\cdot)I_T }[/math] under the alternative metric, and [math]\displaystyle{ k(\cdot,\cdot)\Theta }[/math], under the canonical metric.
Output mapping — Outputs can be mapped as [math]\displaystyle{ L:\mathcal Y^T \rightarrow \mathcal \tilde Y }[/math] to a higher dimensional space to encode complex structures such as trees, graphs and strings. For linear maps L, with appropriate choice of separable kernel, it can be shown that [math]\displaystyle{ A=L^\top L }[/math].
Via the regularizer formulation, one can represent a variety of task structures easily.
Learning problem P can be generalized to admit learning task matrix A as follows:
[math]\displaystyle{ \min _{C \in \mathbb{R}^{n\times T},A \in S_+^T} V(Y,KCA) + \lambda tr(KCAC^{\top})+F(A) }[/math] |
|
( ) |
Choice of [math]\displaystyle{ F:S_+^T\rightarrow \mathbb R_+ }[/math] must be designed to learn matrices A of a given type. See "Special cases" below.
Restricting to the case of convex losses and coercive penalties Ciliberto et al. have shown that although Q is not convex jointly in C and A, a related problem is jointly convex.
Specifically on the convex set [math]\displaystyle{ \mathcal C=\{(C,A)\in \mathbb R^{n \times T}\times S_+^T | Range(C^\top KC)\subseteq Range(A)\} }[/math], the equivalent problem
[math]\displaystyle{ \min _{C ,A \in \mathcal C } V(Y,KC) + \lambda tr(A^\dagger C^{\top}KC)+F(A) }[/math] |
|
( ) |
is convex with the same minimum value. And if [math]\displaystyle{ (C_R, A_R) }[/math] is a minimizer for R then [math]\displaystyle{ (C_R A^\dagger _R, A_R) }[/math] is a minimizer for Q.
R may be solved by a barrier method on a closed set by introducing the following perturbation:
[math]\displaystyle{ \min _{C \in \mathbb{R}^{n\times T},A \in S_+^T} V(Y,KC) + \lambda tr(A^\dagger (C^{\top}KC+\delta^2I_T))+F(A) }[/math] |
|
( ) |
The perturbation via the barrier [math]\displaystyle{ \delta ^2 tr(A^\dagger) }[/math] forces the objective functions to be equal to [math]\displaystyle{ +\infty }[/math] on the boundary of [math]\displaystyle{ R^{n \times T}\times S_+^T }[/math] .
S can be solved with a block coordinate descent method, alternating in C and A. This results in a sequence of minimizers [math]\displaystyle{ (C_m,A_m) }[/math] in S that converges to the solution in R as [math]\displaystyle{ \delta_m \rightarrow 0 }[/math], and hence gives the solution to Q.
Spectral penalties - Dinnuzo et al[18] suggested setting F as the Frobenius norm [math]\displaystyle{ \sqrt{tr(A^\top A)} }[/math]. They optimized Q directly using block coordinate descent, not accounting for difficulties at the boundary of [math]\displaystyle{ \mathbb R^{n\times T} \times S_+^T }[/math].
Clustered tasks learning - Jacob et al[19] suggested to learn A in the setting where T tasks are organized in R disjoint clusters. In this case let [math]\displaystyle{ E\in \{0,1\}^{T\times R} }[/math] be the matrix with [math]\displaystyle{ E_{t,r}=\mathbb I (\text{task }t\in \text{group }r) }[/math]. Setting [math]\displaystyle{ M = I - E^\dagger E^T }[/math], and [math]\displaystyle{ U = \frac 1 T \mathbf{11}^\top }[/math], the task matrix [math]\displaystyle{ A^\dagger }[/math] can be parameterized as a function of [math]\displaystyle{ M }[/math]: [math]\displaystyle{ A^\dagger(M) = \epsilon _M U+\epsilon_B (M-U)+\epsilon (I-M) }[/math] , with terms that penalize the average, between clusters variance and within clusters variance respectively of the task predictions. M is not convex, but there is a convex relaxation [math]\displaystyle{ \mathcal S_c = \{M\in S_+^T:I-M\in S_+^T \land tr(M) = r \} }[/math]. In this formulation, [math]\displaystyle{ F(A)=\mathbb I(A(M)\in \{A:M\in \mathcal S_C\}) }[/math].
Non-convex penalties - Penalties can be constructed such that A is constrained to be a graph Laplacian, or that A has low rank factorization. However these penalties are not convex, and the analysis of the barrier method proposed by Ciliberto et al. does not go through in these cases.
Non-separable kernels - Separable kernels are limited, in particular they do not account for structures in the interaction space between the input and output domains jointly. Future work is needed to develop models for these kernels.
A Matlab package called Multi-Task Learning via StructurAl Regularization (MALSAR) [20] implements the following multi-task learning algorithms: Mean-Regularized Multi-Task Learning,[21][22] Multi-Task Learning with Joint Feature Selection,[23] Robust Multi-Task Feature Learning,[24] Trace-Norm Regularized Multi-Task Learning,[25] Alternating Structural Optimization,[26][27] Incoherent Low-Rank and Sparse Learning,[28] Robust Low-Rank Multi-Task Learning, Clustered Multi-Task Learning,[29][30] Multi-Task Learning with Graph Structures.
Original source: https://en.wikipedia.org/wiki/Multi-task learning.
Read more |