- Introduced by
- Rich Caruana
- Year
- 1997
- Type
- Inductive transfer method
- Family
- Training paradigms
What does it do?
Multitask Learning (MTL) is a machine learning paradigm in which a model is trained simultaneously on multiple related tasks, sharing representations across them to improve generalization.
Rich Caruana's 1997 paper is the standard reference for the approach. The core idea is that auxiliary tasks supply additional supervision that acts as an inductive bias, which can lead the shared layers to learn feature representations that are more useful across tasks than those learned by single-task training.
The intuition behind the method
Imagine a student who learns chemistry and biology at the same time: knowledge from one domain constantly reinforces the other, so both are learned more efficiently than in isolation. MTL works the same way — a neural network's shared layers are exposed to gradient signals from several tasks at once, forcing them to encode features that are broadly useful. Tasks act as mutual regularizers, reducing overfitting and encouraging the model to discover the underlying structure of the data.
History
Rich Caruana's 1997 Machine Learning paper, 'Multitask learning', is the canonical reference for the approach. Later work extended it to deep neural networks; Collobert and Weston (2008), for example, presented a unified deep neural architecture for natural language processing with multitask learning. Subsequent research has also addressed loss weighting and conflicting task gradients, which are discussed under pitfalls and in the FAQ.
When to use it
Use MTL when you have multiple related prediction tasks that share input structure — for example, part-of-speech tagging and named entity recognition in NLP, or simultaneous detection and segmentation in computer vision. It is most effective when tasks share informative features and datasets are limited, since auxiliary tasks supply extra supervision. Avoid MTL when tasks are unrelated or when one task's gradients consistently harm others (negative transfer). Single-task baselines should always be established first; if a single task already has abundant data and strong performance, the MTL benefit may be marginal.
Limitations and considerations
- Negative transfer can occur if tasks are insufficiently related, degrading performance on one or more tasks
- Task loss weighting (lambda_t) requires careful tuning and is problem-dependent
- Shared capacity may be insufficient when tasks have very different complexity or output structures
- Debugging is harder than single-task training because errors in one task can propagate through shared weights
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Improves generalization by leveraging complementary supervision signals from related tasks
- Acts as an implicit regularizer, reducing overfitting especially in low-data regimes
- Under hard parameter sharing, one shared forward pass serves all task heads, reducing inference cost compared with running a separate model per task; soft sharing uses separate encoders and does not give this saving
- Encourages learning of task-agnostic representations that can support downstream transfer
Applications
- Natural language processing: simultaneous part-of-speech tagging, dependency parsing, named entity recognition, and sentiment analysis sharing a single encoder
- Computer vision: joint object detection and semantic segmentation using a shared convolutional backbone
- Speech recognition: acoustic modeling trained jointly with speaker identification and language identification
- Healthcare: predicting multiple clinical outcomes (mortality, length-of-stay, diagnosis codes) from a shared patient representation
- Recommender systems: jointly optimizing click-through rate, conversion rate, and dwell-time predictions with shared user and item embeddings
How it works
How it works
All tasks feed their input through a common encoder parameterized by shared weights. This encoder maps raw input x into a dense intermediate representation h of dimension d. Because every task contributes gradients to these weights during training, the encoder learns features that are simultaneously useful across the task set, a form of inductive transfer described by Caruana (1997).
Formula
h = f_{\theta_{\text{shared}}}(x), \quad h \in \mathbb{R}^dOn top of the shared encoder sits one task-specific output head per task t, each with its own parameters. These heads decode the shared representation h into task-appropriate predictions. Hard-parameter sharing (one encoder, T heads) is the most common architecture; soft-parameter sharing allows separate encoders whose weights are regularized to remain similar.
Formula
\hat{y}^{(t)} = g^{(t)}_{\phi_t}(h), \quad t = 1, \ldots, TThe total training objective is a weighted sum of the individual task losses. Each task loss is scaled by a coefficient lambda_t, which can be set by hand or learned. The joint loss couples all task-specific heads through the shared encoder, so minimizing it can improve performance on several tasks at once, while the shared layers receive gradient information from every task rather than from a single one. Whether each task benefits depends on how related the tasks are, as discussed under limitations.
Formula
\mathcal{L}_{\text{MTL}} = \sum_{t=1}^{T} \lambda_t \, \mathcal{L}_t\!\left(\hat{y}^{(t)}, y^{(t)}\right)At each optimization step, gradients of the joint loss with respect to the shared parameters are accumulated from all T tasks and used to update the encoder. Task-specific head parameters are updated only by their own task gradient. This interleaved update schedule means the shared representation is shaped by diverse supervision at every iteration, which is one of the main mechanisms usually cited for MTL's generalization benefit.
Formula
\theta_{\text{shared}} \leftarrow \theta_{\text{shared}} - \eta \, \nabla_{\theta_{\text{shared}}} \mathcal{L}_{\text{MTL}}Common pitfalls
- Assuming relatedness: grouping unrelated tasks can harm all of them; empirical task similarity should be verified
- Ignoring gradient interference: conflicting gradient directions in shared layers are a known failure mode and may require gradient surgery or uncertainty-weighting
- Unbalanced datasets: when task datasets differ greatly in size, the dominant task can crowd out minority tasks; careful sampling or loss scaling is required
- Treating MTL as always better than transfer learning: for very different tasks, sequential pre-training and fine-tuning often outperforms joint MTL
Frequently asked questions
How is MTL different from transfer learning?
Transfer learning trains on a source task first and then adapts to a target task sequentially, typically freezing or fine-tuning pretrained weights. MTL trains on all tasks simultaneously from the start, with continuous two-way gradient flow between tasks. Both exploit shared representations, but MTL is preferred when tasks are available together, while transfer learning is preferred when the target task data arrives later or is scarce.
What is negative transfer and how can it be mitigated?
Negative transfer occurs when learning one task degrades performance on another, typically because their gradient directions conflict in the shared parameter space. Mitigation strategies include gradient projection (projecting conflicting gradients onto a common subspace), uncertainty-based loss weighting to down-weight dominant tasks, task grouping based on similarity metrics, and architectural separation of task-specific layers to limit the shared capacity that conflicting tasks can corrupt.
Should I always use equal loss weights across tasks?
Rarely. Equal weights implicitly assume all tasks have the same scale and importance, which is almost never true in practice. Common approaches include manual tuning on a validation set, uncertainty-based dynamic weighting (which treats each task weight as a learned noise parameter), and gradient normalization methods that scale task losses so their gradient magnitudes are comparable. Starting with equal weights and then tuning is a reasonable baseline strategy.
Related methods
Sources
Caruana, R. (1997). Multitask learning. Machine Learning, 28(1), 41–75.
Open DOI referenceunderstanding-machine-learning-theory-algorithms (bibliography entry: Collobert, R. & Weston, J., 2008, ICML, 'A unified architecture for natural language processing: deep neural networks with multitask learning'), p. ?