Contrastive Learning Using Spectral Methods