Skip to main content
QUICK REVIEW

[Paper Review] Perfectly Balanced: Improving Transfer and Robustness of Supervised Contrastive Learning

Mayee F. Chen, Daniel Y. Fu|arXiv (Cornell University)|Apr 15, 2022
Domain Adaptation and Few-Shot LearningComputer Science11 citations
TL;DR

This paper proposes a method to improve transferability and robustness in supervised contrastive learning by addressing class collapse and permutation invariance. It introduces a weighted class-conditional InfoNCE loss to control optimal spread and a class-conditional autoencoder to break permutation invariance, achieving state-of-the-art performance with 11.1 accuracy points gain on coarse-to-fine transfer and 4.7 points on worst-group robustness across datasets, including 11.5 points on CelebA.

ABSTRACT

An ideal learned representation should display transferability and robustness. Supervised contrastive learning (SupCon) is a promising method for training accurate models, but produces representations that do not capture these properties due to class collapse -- when all points in a class map to the same representation. Recent work suggests that "spreading out" these representations improves them, but the precise mechanism is poorly understood. We argue that creating spread alone is insufficient for better representations, since spread is invariant to permutations within classes. Instead, both the correct degree of spread and a mechanism for breaking this invariance are necessary. We first prove that adding a weighted class-conditional InfoNCE loss to SupCon controls the degree of spread. Next, we study three mechanisms to break permutation invariance: using a constrained encoder, adding a class-conditional autoencoder, and using data augmentation. We show that the latter two encourage clustering of latent subclasses under more realistic conditions than the former. Using these insights, we show that adding a properly-weighted class-conditional InfoNCE loss and a class-conditional autoencoder to SupCon achieves 11.1 points of lift on coarse-to-fine transfer across 5 standard datasets and 4.7 points on worst-group robustness on 3 datasets, setting state-of-the-art on CelebA by 11.5 points.

Motivation & Objective

  • To address the limitations of supervised contrastive learning (SupCon), which suffers from class collapse and poor transferability due to permutation-invariant representations.
  • To understand why simple spreading of representations is insufficient for improved performance, despite empirical gains.
  • To formalize the need for both controlled spread and a mechanism to break class-fixing permutation invariance in representation geometry.
  • To develop and validate a method that combines weighted class-conditional InfoNCE loss and a class-conditional autoencoder to achieve better representation quality.

Proposed method

  • Introduces a weighted combination of SupCon and class-conditional InfoNCE loss, parameterized by α, to control the degree of spread in representation space.
  • Defines s_f(y) as a measure of class variance to quantify spread and proves that optimal α balances collapse and uniformity.
  • Proposes σ_f(z) as a measure of subclass clustering to assess representation quality and link it to coarse-to-fine transfer performance.
  • Employs a class-conditional autoencoder to induce inductive bias toward latent subclass clustering, breaking permutation invariance.
  • Uses theoretical analysis and simulations on S^{d-1} to derive bounds for α under which intermediate spread is optimal.
  • Validates the method empirically on CIFAR-10 and multiple downstream tasks, using optimization-based geometry search to verify theoretical claims.

Experimental results

Research questions

  • RQ1Can a weighted combination of SupCon and class-conditional InfoNCE loss control the degree of spread in representations without collapsing or over-uniforming?
  • RQ2Why is spread alone insufficient for improved transferability, given that it is invariant to class-fixing permutations?
  • RQ3How can permutation invariance in representation geometry be broken to improve coarse-to-fine transfer and robustness?
  • RQ4What inductive biases are effective in encouraging latent subclass clustering under realistic conditions?
  • RQ5Does combining controlled spread with subclass clustering via a class-conditional autoencoder lead to state-of-the-art performance on transfer and robustness benchmarks?

Key findings

  • A properly weighted class-conditional InfoNCE loss (with α ∈ (2/3, c(τ,d))) induces optimal spread, avoiding both collapse and uniformity, as validated on CIFAR-10.
  • The optimal geometry transitions from collapsed (low α) to spread (intermediate α) to uniform (high α), with nonzero spread emerging at α ≈ 0.67.
  • The class-conditional autoencoder effectively breaks permutation invariance by encouraging latent subclass clustering, improving transfer performance.
  • The proposed method achieves a 11.1-point gain in coarse-to-fine transfer accuracy across 5 standard datasets compared to baseline SupCon.
  • On worst-group robustness, the method improves performance by 4.7 points across 3 datasets, setting a new state-of-the-art on CelebA with a 11.5-point improvement.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.