# Contrastive Methods

Contrastive methods learn representations by contrasting positive and negative examples. This is one of methods used in Self-supervised Learning.

The goal is to learn an encoder $$f$$ such that:

$$\text{score}(f(x), f(x^{+})) » \text{score}(f(x), f(x^{-}))$$

where $$x^{+}$$ is a positive example, and $$x^{-}$$ is a negative example.