Contrastive Learning
{Contrastive Instance Discrimination}
The key concept of contrastive learning is to generate the positive and negative training sample pairs based on the understanding of the data. The model needs to learn a function so that the two positive samples have high similarity scores and two negative samples have low similarity scores. As a result, the appropriate sample generation is essential to ensure the model learn the underlying features/structures of the data.