Multi-task learning (MTL)

Multi-task learning is training a single model on several tasks at the same time, so that what it learns for one task can help it with the others.

The usual way to build a model is one task, one model. Multi-task learning trains one model on several tasks together. Typically the tasks share most of the model, a common representation of the input, with small task-specific parts on top, and training combines the errors from every task into one signal. Rich Caruana's 1997 paper in the journal Machine Learning framed it as a form of inductive transfer: learning tasks in parallel through a shared representation.

Why should this help? Having to do well on a related task acts as a kind of regularisation, steering the model towards features that matter rather than quirks of one dataset. It helps most when tasks have a lot in common and each has limited data of its own. The risk is negative transfer: if tasks pull the shared parts in opposite directions, training them together can give worse results than training separate models, and researchers have proposed many ways of balancing the competing signals.

Language models turned multi-task learning into something close to the default. Google's T5 paper, first posted in October 2019, recast every language task as turning one piece of text into another. A prefix tells the model which task it is doing: fed translate English to German: That is good., it is trained to output Das ist gut. The same model can then be trained on a mixture of translation, summarising and classification tasks. In September 2021 Google Research's FLAN paper went further, fine-tuning a 137 billion parameter model on more than 60 tasks phrased as plain instructions; it beat zero-shot GPT-3 (175 billion parameters) on 20 of 25 evaluated tasks, including kinds of task it had not been trained on.

In practice, today's general-purpose chatbots are multi-task models in this sense: one set of weights translates, summarises, answers questions and writes code. The work has shifted from listing tasks to choosing the mixture of data and instructions, which is why technical reports spend so much space on what went into training and in what proportions.

Common questions

What is multi-task learning in simple terms?

It is teaching one model several jobs at once instead of training a separate model for each. The tasks share most of the model, so lessons from one can improve performance on the others.

What is negative transfer?

Negative transfer is when training on one task makes a model worse at another. It happens when tasks pull the shared part of the model in conflicting directions, and it is the main reason multi-task training needs careful balancing.

How is multi-task learning different from transfer learning?

Transfer learning usually happens in sequence: a model is pre-trained on one task or dataset and then fine-tuned for another. Multi-task learning trains on several tasks at the same time. The two are often combined, as in T5, which compared multi-task training mixtures with pre-training followed by fine-tuning.

Is a large language model a multi-task model?

In effect, yes. A single chatbot model handles translation, summarising, question answering and coding with the same weights, and instruction tuning on many tasks, as in Google's FLAN work, is a direct descendant of multi-task learning.

Finding more

Search for "multi-task learning", "negative transfer", "T5 text-to-text" or "multitask instruction tuning" to follow the idea from classic machine learning to large language models. Good sources are the original papers on arXiv and in journals, encyclopedia articles that cite them, and survey papers on multi-task learning. Be wary of product pages that call any versatile model multi-task without saying how it was trained.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.