Home Glossary Contrastive Learning

Contrastive Learning

Contrastive learning is a representation-learning method built around comparisons. The training objective moves related examples closer together in an embedding space and separates unrelated examples. A vision system might compare two altered views of the same photograph, while a multimodal model could match an image with its caption and reject incorrect pairings. This approach can learn useful features from large amounts of weakly labeled or unlabeled data, reducing dependence on manually assigned categories. Its performance is shaped by how positive and negative pairs are constructed, the augmentations applied, batch composition, and the risk that supposedly negative examples are actually related.

Related News