Self-Supervised Learning with Kernel Dependence Maximization

Yazhe Li, Roman Pogodin, Danica J. Sutherland, Arthur Gretton

TL;DR

Contrastive self-supervised learning (SSL) is traditionally framed as maximizing mutual information between augmented views, yet this theory fails to explain why these methods work in practice. This paper introduces SSL-HSIC, a framework that grounds self-supervised learning in kernel dependence maximization—matching image representations to image identities while controlling variance. In doing so, the authors prove that popular contrastive losses like InfoNCE actually approximate kernel dependence, unifying contrastive methods and negative-free approaches (like BYOL) under a single principled geometric objective.

What Problem Does This Paper Address?

Modern self-supervised visual representation learning predominantly relies on two paradigms:

  1. Contrastive methods (e.g., SimCLR, InfoNCE): Treat transformed views of the same image as "positives" and views of different images as "negatives." Theoretically motivated as lower bounds on Mutual Information (MI).
  2. Negative-free methods (e.g., BYOL, SimSiam): Avoid negative pairs altogether, relying on moving-average target networks or stop-gradient operations to prevent representations from collapsing into a trivial constant.

However, the theoretical foundation of contrastive learning is cracked. Mutual information has no concept of metric geometry: an arbitrary invertible scrambling of feature space preserves MI perfectly while destroying downstream linear separability. In practice, tighter variational bounds on MI often yield worse downstream representations. The field lacked a theoretically sound, geometrically grounded objective that explains both contrastive mechanics and negative-free dynamics.

Methods

The authors reframe self-supervised representation learning as maximizing statistical dependence between a transformed view's representation $Z$ and its unique image identity label $Y \in \mathbb{R}^N$ (a one-hot indicator of dataset index), using the Hilbert-Schmidt Independence Criterion (HSIC).

To prevent representations from blowing up or producing trivial high-variance solutions, they introduce an explicit regularizer: $$\mathcal{L}_{\text{SSL-HSIC}}(\theta) = -\text{HSIC}(Z, Y) + \gamma \sqrt{\text{HSIC}(Z, Z)}$$

Key technical details:

  • Kernel Choices: A linear kernel is used for labels $Y$, and an Inverse Multiquadric (IMQ) kernel is used for latent representations $Z$.
  • Finite-Sample Estimator: Standard HSIC estimators assume independent and identically distributed (i.i.d.) samples, which breaks when batches contain multiple augmentations per image. The authors derive a corrected, unbiased-scale estimator for mini-batches.
  • Linear-Time Scaling: Computing exact HSIC takes $O(B^2)$ time per batch. The authors approximate the latent kernel using Random Fourier Features (RFF), resampling frequencies at each iteration to drop the computational cost to $O(B)$ (linear in batch size).
  • Architecture Flexibility: Can be trained end-to-end with standard backpropagation alone—no stop-gradients, memory banks, or clustering steps required—though an exponential moving average (EMA) target network can still be added to boost stability.

Datasets

  • Pretraining: ImageNet ILSVRC-2012 (unlabeled training set).
  • Evaluation Benchmarks:
  • ImageNet validation set (standard linear readout and 1%, 10%, 100% semi-supervised fine-tuning).
  • 12 Transfer Classification Datasets: Birdsnap, Caltech-101, CIFAR-10, CIFAR-100, Describable Textures Dataset (DTD), FGVC Aircraft, Food-101, Oxford Flowers 102, Oxford-IIIT Pets, Stanford Cars, SUN397, and Pascal VOC 2007.
  • Dense Downstream Tasks: Pascal VOC 2012 (semantic segmentation), NYU Depth v2 (monocular depth estimation), and Microsoft COCO (object detection and instance segmentation).
  • Note: No new datasets were introduced.

Key Insights and Ideas

  • InfoNCE is Secretly HSIC: By Taylor-expanding the InfoNCE loss in its asymptotic regime, the authors show that InfoNCE approximates $-\text{HSIC}(Z, Y)$ plus a feature variance penalty. InfoNCE succeeds not because it bounds mutual information, but because it introduces an implicit kernel that injects metric geometry into the representation space.
  • A Bridge to Clustering and BYOL: When features are centered and normalized with linear kernels, maximizing $\text{HSIC}(Z, Y)$ is mathematically equivalent to kernel target alignment, spectral k-means clustering, and the Euclidean distance objective of BYOL.
  • Built-in Resistance to Collapse: BYOL relies on target networks or stop-gradients to prevent representations from collapsing to a single point. In SSL-HSIC, the kernel centering operation ($H = I - \frac{1}{N}\mathbf{1}\mathbf{1}^\top$) inherently penalizes collapsed representations, allowing the model to train stably without negative pairs or asymmetric architectural tricks.

Key Results

  • ImageNet Linear Evaluation: A standard ResNet-50 trained with SSL-HSIC reaches 74.8% top-1 accuracy (with target network) and 72.2% (without target network), outperforming SimCLR (69.3%), MoCo v2 (71.1%), and Barlow Twins (73.2%), and rivaling BYOL (74.3%).
  • Scale with Backbone: Scaling to wider/deeper architectures (ResNet-50 4x: 79.1%; ResNet-200 2x: 79.6%) virtually closes the gap with fully supervised training (80.1% on ResNet-200 2x).
  • Downstream Transfer: Achieves top performance across multiple classification transfer tasks (e.g., 57.8% on Birdsnap, 76.2% on DTD), while matching or exceeding BYOL on dense prediction tasks (VOC2012 segmentation: 76.0 mIoU; COCO detection: 41.3 $\text{AP}^{\text{bb}}$).
  • Hyperparameter Efficiency: 512 Random Fourier Features capture essentially the same performance as exact quadratic kernel computations (66.4% vs. 66.7% at 100 epochs) while dramatically reducing runtime.

Limitations and Future Work

  • Strict One-Hot Assumption: Treating every image as an entirely independent class ignores semantic overlap (e.g., two distinct images containing golden retrievers are penalized as negatives). Future extensions could infer continuous label structures $Y$ jointly during training.
  • The "Target Network" Mystery: While SSL-HSIC functions reliably without a target network (unlike BYOL), adding a target network still improves top-1 accuracy by ~2.6%. A rigorous theoretical explanation for why EMA target networks consistently boost generalization across SSL paradigms remains an open question.

Summary updated

BibTeX
@inproceedings{li2021self,
  author = {Yazhe Li and Roman Pogodin and Danica J. Sutherland and Arthur Gretton},
  title = {{Self-Supervised Learning with Kernel Dependence Maximization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=S4rnYxfrb4z},
}
Figure