Definition

Contrastive learning is a kind of metric learning that learns representations of data by comparing similar and dissimilar samples. The model is trained to recognize that certain data points are related (positive pairs) or not (negative pairs). It helps the model learn meaningful features and representations without requiring explicit labels for every data point.