InfoNCE: Identifying the Gap Between Theory and Practice

Published: 16 Jun 2024, Last Modified: 16 Jul 2024HiLD at ICML 2024 PosterEveryoneRevisionsBibTeXCC BY 4.0
Keywords: identifiability, SSL theory, InfoNCE, Contrastive Learning
TL;DR: We generalize previous identifiability results for contrastive learning toward anisotropic latents that better capture the effect of augmentations used in practical applications, thereby reducing the gap between theory and practice.
Abstract: Previous theoretical work on contrastive learning (CL) with InfoNCE showed that, under certain assumptions, the learned representations uncover the ground-truth latent factors. We argue these theories overlook crucial aspects of how CL is deployed in practice. Specifically, they assume that within a positive pair, all latent factors either vary to a similar extent or some do not vary at all. However, in practice, positive pairs are often generated using augmentations such as strong cropping to just a few pixels. Hence, a more realistic assumption is that all latent factors change, with a continuum of variability across these factors. We introduce a new contrastive loss, AnInfoNCE, a generalization of InfoNCE containing additional learnable parameters. We provably explain the role of the learnable element in uncovering the latent factors of this anisotropic setting, broadly generalizing previous identifiability results in CL. We validate our identifiability results in controlled experiments and show that AnInfoNCE increases the recovery of previously collapsed information in CIFAR10 and ImageNet, albeit at the cost of downstream accuracy. Upon analyzing our newly developed model it is revealed that CL extracts exactly the shortcut features relevant for discriminating the positive pair from the negative ones.
Student Paper: Yes
Submission Number: 74
Loading