Self-Supervised Representation Learning

Derive the role of positives and negatives in InfoNCE and compare variance regularization with reconstruction from partially masked input.

Source
Anbloq
Language
English
Created
Updated
Chapters
3
Reading time
2 min
In this article3 chapters
  1. A contrastive objective defines the invariance
  2. Variance and covariance give another anti-collapse objective
  3. Masking changes which evidence is available

A contrastive objective defines the invariance

Take an anchor embedding \(q\), an embedding \(k^+\) of another view of the same input and negatives \(k_j\) sent through the same scoring rule. For score function \(s\) and temperature \(\tau>0\), InfoNCE minimizes

\[ -\log \frac{e^{s(q,k^+)/\tau}} {e^{s(q,k^+)/\tau}+\sum_j e^{s(q,k_j)/\tau}}. \]

Equal scores for all candidates give loss \(\log(1+m)\) for \(m\) negatives. Greater separation decreases the loss for this example. The pair construction defines which changes should be ignored. Two crops can preserve scene identity while one removes a small object needed for a later prediction. Negatives that depict the same underlying concept can also push apart features a downstream task would group.

Contrastive pair design determines which two views are encouraged to agree. Cosine similarity defines what agreement between normalized vectors means before any contrastive normalization.

Variance and covariance give another anti-collapse objective

VICReg aligns paired views through an invariance term, encourages each batch feature coordinate to maintain a minimum standard deviation, and penalizes off-diagonal covariance. Constant embeddings satisfy the alignment objective but violate the variance target. The covariance penalty discourages redundant coordinates under the training distribution. It does not enforce general statistical independence or attach meaning to a specific coordinate, a limitation elaborated by causal representation learning.

Masking changes which evidence is available

A masked autoencoder observes a subset of input patches and reconstructs hidden content. It can learn dependencies from structure in the visible patches. If a mask is too weak, local continuation can dominate. Very high masking may erase evidence for small structures. Compare methods with fixed training resources, a frozen encoder and controlled probes for local and global information. Multimodal foundation models expand the pairing idea across images and text and add different requirements for alignment and grounding.[1][2][3]

References

  1. Aaron van den Oord, Yazhe Li and Oriol Vinyals, Representation Learning with Contrastive Predictive Coding ↩
  2. Adrien Bardes, Jean Ponce and Yann LeCun, VICReg: Variance-Invariance-Covariance Regularization for Self-Supervised Learning ↩
  3. Kaiming He et al., Masked Autoencoders Are Scalable Vision Learners ↩