03
Learning from two views
Common origin supplies a relationship. The pixels do not have to be identical.
Change the view, keep the source
Make two intensity variants of our arrow. Their pixels differ, but both were constructed from the same source image. We call this known relationship a positive pair. The pairing requires a record of common origin, not the semantic label “up.” Our intensity-only change is an illustrative augmentation, not SimCLR's complete transformation recipe.
In SimCLR's architecture, the two views pass through the same encoder. “Same” means shared parameters: changing an encoder weight changes the function used on both branches. A small network called a projection head then maps the encoder's features into the space used by the contrastive objective.
Here is a view, the encoder with parameters , and the projector with parameters . The encoder representation and projected representation are different objects. SimCLR applies its contrastive loss to and retains the encoder representation for downstream use.
A SimCLR-style schematic: fθ is the shared encoder, gφ the shared projection head. The objective compares projected z; the encoder’s h is retained for downstream use. Intensity-only views are illustrative. No encoder runs on this page.
Positive is a construction rule
Take one view as an anchor. Its paired view is the positive candidate. In the contrastive setup we will illustrate, views from other source images supply negative candidates. The objective compares the positive's similarity to the anchor with the competing similarities; matching the positive is not judged in isolation.
A negative here does not mean “known to belong to a different human class.” Two different images could both show upward arrows. Treating them as negatives can create a semantic false negative: the construction rule separates sources that a later task might want to group. Source identity and semantic category are not interchangeable.
Matching is not enough
Suppose every input receives exactly the same representation. Positive pairs match perfectly, but so does everything else. This is representation collapse: that representation preserves no distinction between inputs. The next chapter's three-candidate loss makes the problem concrete—equal scores give the positive only one third of the probability, not a perfect score.
Does every self-supervised method need negatives?
No. BYOL uses an online predictor, a moving-average target network and a stop-gradient target, without negative pairs in its objective. It is a different complete design. Its existence does not show that simply deleting negatives from this contrastive loss will produce useful learning, or that one component guarantees freedom from collapse.
Let's now isolate candidate competition. We will prescribe four tiny vectors directly, leaving the encoder out of the calculation so that every score is visible.