Self-supervised learning

Self-supervised learning trains a model on unlabelled data by hiding part of each example and asking the model to predict it, so the data supplies its own answers.

Supervised learning needs labelled examples, and labels are slow and costly to produce. Self-supervised learning gets round this by making labels out of the data itself. Google's machine learning glossary describes it as turning an unsupervised problem into a supervised one by creating surrogate labels from unlabelled examples. Take a sentence, hide a word, and ask the model to fill it in: the hidden word is the answer, and no person had to write it down.

This is how large language models are pre-trained. A model is shown text and asked to predict the next token, over and over, across a vast collection of documents. The 2018 BERT model used a variant, predicting words masked out of the middle of sentences, and was then adapted to specific tasks by adding just one output layer. Because any text can serve as training material, the approach scales to amounts of data that could never be labelled by hand.

Yann LeCun and Ishan Misra made the case for the approach in a March 2021 Meta AI post that called it a route to the "dark matter of intelligence", the background knowledge about the world that people pick up without being taught. They noted that it had worked well for language but was harder for images and video, which are continuous and high-dimensional. As evidence of progress they cited Meta's SEER model, trained on a billion unlabelled images, which reached 84.2% top-1 accuracy on ImageNet after fine-tuning.

The terminology is not settled. Some researchers treat self-supervised learning as a kind of unsupervised learning, because no human labels are used; Google's glossary files it under semi-supervised learning. What matters in practice is the pattern: a self-supervised model learns general representations from cheap unlabelled data, and a much smaller amount of labelled data or feedback then adapts it to particular jobs.

Common questions

What is the difference between self-supervised and unsupervised learning?

Both use data without human labels. Unsupervised learning usually looks for structure, such as clusters, without any prediction target. Self-supervised learning creates a prediction target from the data itself, such as a hidden word, and then trains like supervised learning. Some researchers count self-supervised learning as a form of unsupervised learning.

Is ChatGPT trained with self-supervised learning?

Its underlying model was pre-trained that way, by learning to predict the next token across large amounts of text. It was then further trained with supervised fine-tuning and reinforcement learning from human feedback to behave as an assistant.

Why is self-supervised learning important?

It removes the need for people to label training data, which is the main bottleneck in supervised learning. That makes it possible to train on very large collections of text, images or audio, and the resulting models can then be adapted to many tasks with relatively little labelled data.

What is masked language modelling?

It is a self-supervised task in which some words in a sentence are hidden and the model must predict them from the words on both sides. BERT used this approach. It differs from next-token prediction, used by GPT-style models, which only looks at the words that come before.

Finding more

Search for "self-supervised learning", "masked language modelling", "contrastive learning" or "next-token prediction" to see the main techniques. Reliable sources include the original papers on arXiv, machine learning glossaries such as Google's, and research blogs from the labs that built the models. Be aware that researchers use the terms self-supervised, unsupervised and semi-supervised in overlapping ways, so check how a source defines them.

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.