Self-supervised Learning
What Is Self-supervised Learning?
Self-supervised learning is a machine learning paradigm in which a model generates its own supervisory signals from unlabeled data rather than relying on human-annotated labels. The approach occupies a position between supervised and unsupervised learning. Supervised learning requires large volumes of labeled examples, which are expensive and slow to produce. Unsupervised learning discovers structure without any labels but historically has produced representations less directly useful for downstream prediction tasks. Self-supervised learning bridges these positions: it imposes a learning objective derived automatically from the data's own structure, producing rich representations that transfer well to supervised fine-tuning on smaller labeled sets. The paradigm has become central to large-scale natural language processing and computer vision since the mid-2010s, with models trained via self-supervised objectives on internet-scale corpora subsequently achieving strong performance across many tasks.
The key distinction from unsupervised learning is the presence of an explicit prediction objective. From each unlabeled example, the system constructs a pseudo-label by withholding or transforming part of the data, then trains the model to predict the withheld element. This design converts a structureless unsupervised problem into a tractable supervised one without requiring human effort per example. A survey on self-supervised learning methods in imaging published in Entropy organizes the field into two principal categories: auxiliary pretext tasks and contrastive learning.
Pretext Tasks
A pretext task is a surrogate learning objective whose solution requires the model to encode semantically meaningful features of the input, even though the task itself is not the ultimate goal. Common pretext tasks in vision include rotation prediction, where the model must identify which of four discrete rotations has been applied to an image; jigsaw puzzle reconstruction, where the spatial positions of shuffled image patches must be recovered; and masked autoencoding, where a fraction of image patches or text tokens is hidden and the model must predict their content. In natural language processing, the BERT model's masked language modeling objective follows this pattern: random tokens are replaced with a mask symbol, and the model is trained to recover the original tokens using context from both directions. The insight behind pretext task design is that solving the task requires understanding the data well enough to generalize, and that understanding transfers to the target application.
Contrastive Learning
Contrastive learning is a family of self-supervised methods that learn representations by pushing similar samples together in embedding space while pushing dissimilar samples apart. A training pair is constructed by applying two different augmentations to the same input, yielding a positive pair that should embed close together, and treating other examples in the same batch as negatives. The SimCLR framework, introduced by researchers at Google Brain in 2020, demonstrated that strong augmentation, a nonlinear projection head, and large batch sizes were sufficient to achieve representations competitive with supervised baselines on ImageNet using this approach. Subsequent methods including MoCo, BYOL, and SimSiam reduced dependence on large batch sizes or explicit negative pairs, broadening the practical applicability. As documented in PMC research surveying auxiliary pretext tasks and contrastive methods, contrastive frameworks share a reliance on data augmentation as the source of invariance: the model learns to treat two views of the same object as equivalent, which encodes the semantic information that augmentations preserve.
Relation to Supervised and Unsupervised Learning
Self-supervised learning is typically used in a two-stage workflow. In the first stage, a model is pretrained on a large unlabeled corpus using a pretext or contrastive objective. In the second stage, the pretrained encoder is fine-tuned on a small labeled dataset for a specific downstream task. This transfer learning pattern means the cost of label collection is amortized across many downstream tasks. IBM's summary of self-supervised learning concepts describes how this two-stage approach positions self-supervised pretraining as a general-purpose feature extractor, where supervised and self-supervised methods become complementary rather than competing.
Applications
Self-supervised learning has applications in a range of fields, including:
- Natural language processing, including large language model pretraining on text corpora
- Computer vision, including image classification, object detection, and medical image analysis
- Speech recognition, where unlabeled audio is used to pretrain acoustic models
- Robotics, where agents learn motor representations from sensor streams without task-specific rewards
- Drug discovery, where molecular structure representations are learned from unlabeled chemical databases