Contrastive Learning: The SimCLR Algorithm

Get an overview of a widely used contrastive learning algorithm: SimCLR.

What is contrastive learning?

The objective of contrastive learning is to learn neural network embeddings such that embeddings from related images should be closer than embeddings from unrelated or dissimilar images. So, given an image XaX_a, we can call it an “anchor image” and define two terms:

  • Positives: Images that are closely related to the anchor image, XaX_a. Let’s represent them by XpX_p

  • Negatives: Images that are unrelated or dissimilar to XaX_a. Let’s call them XnX_n.

The contrastive learning objective thus learns a neural network f(.)f(.) such that:

Get hands-on with 1400+ tech skills courses.