Paper notes

SimCLR: Strong augmentation, a projection head and large batches

SimCLR treats two augmentations of an image as positives and others as negatives with NT-Xent. Ablations establish augmentation composition, nonlinear projection and batch size as central design choices.

Published Updated 1 min read

On this page
  1. How it works
  2. What the evidence shows
  3. A reproducible check
  4. Limitations and common misreadings
  5. The key takeaway
  6. Further reading
  7. FAQ

SimCLR simplifies self-supervised vision without a memory bank or special architecture. Two transformed views pass through an encoder and a projection head.

How it works

NT-Xent uses cosine similarity and temperature. Crop plus color distortion is especially important, the projection head protects backbone features, and large batches supply more in-batch negatives.

What the evidence shows

ImageNet linear evaluation and fine-tuning approach contemporary supervised results with strong label efficiency. Large batches cost compute, and augmentations suited to natural images may destroy semantics in other domains.

A reproducible check

This snippet checks a public formula or configuration; it does not reproduce full training.

import math
def cosine(a,b):
    dot=sum(x*y for x,y in zip(a,b))
    return dot/(math.sqrt(sum(x*x for x in a))*math.sqrt(sum(y*y for y in b)))
print("positive cosine =", cosine([1,0],[0.8,0.2]))
print("negative cosine =", cosine([1,0],[-0.8,0.2]))
positive cosine = 0.9701425001453318
negative cosine = -0.9701425001453318

The arithmetic is reproducible, but model quality still depends on the full experiments in the paper.

Limitations and common misreadings

Learned invariances depend on augmentation. False negatives can belong to the same class, and linear-probe quality does not guarantee every downstream capability.

The key takeaway

SimCLR’s contribution is the demonstrated interaction among augmentations, projection space and negative-sample scale, not the loss alone.

Further reading

FAQ

Where do positives come from?
Two independently augmented views of the same image.
Why use a projection head?
It separates contrastive training from backbone representations and improves downstream quality.
Why crop and color augmentation?
Together they define useful invariances and outperform either alone in the ablations.