A Probabilistic Model for Self-Supervised Learning