This page is the toolbox. The parent note throws around symbols like z, sim, τ, exp, log, and ∑ as if you already own them. Here we earn each one from nothing, in an order where every symbol only uses symbols we already built.
Every image (or sentence) becomes a single dot on a flat map. The whole game is where the dots land. Two crops of the same cat should be neighbours; a cat and a car should be strangers on opposite sides of town. That map is called an embedding space, and each dot is an embedding (also called a representation).
Keep the map in mind — every symbol below is a tool for either placing a dot or measuring the distance between two dots.
The parent writes z∈R128. Read that as: "z is a vector — a point — that lives in (∈) the space R128 of all lists of 128 real numbers." R is just the shorthand name for "all ordinary numbers" (the Reals: 3, −0.5, π, ...). The little superscript counts how many coordinates.
Recall What does
z∈R128 mean in plain words?
z is a point whose address is a list of 128 ordinary numbers.
Something has to turn a photo into that list of numbers. That something is a function.
In the parent there are two such boxes stacked: f (the encoder, e.g. a ViT or ResNet) then g (the small projection head). Composition just means "run one box, feed its output into the next": z=g(f(x)).
Now we have two dots. We need a number that says how much they point the same way. That is the dot product.
The little ⊤ (read "transpose") is bookkeeping notation that flips a column list into a row so the multiplication lines up. For our purposes u⊤v just means "dot product of u and v."
The raw dot product has a flaw: a longer arrow gives a bigger number even if it points the same way. We only care about direction, not how long the arrow is. So we divide out the lengths.
Recall If two embeddings point in exactly the same direction, what is their cosine similarity?
We now have a similarity score per pair. To train, we want to phrase things as a probability: "how likely is this the correct match?" Two functions convert scores↔probabilities: exp and log.
Now stack the tools. Take similarities, run each through exp, and divide each by the total. Every result is positive and they all add to 1 — that's a probability distribution. This recipe is softmax.
Putting it together, the parent's InfoNCE loss for anchor z with positive z+ and negatives zi− is just "negative log of the softmax probability that the positive is the right answer":
L=−logexp(sim(z,z+)/τ)+∑iexp(sim(z,zi−)/τ)exp(sim(z,z+)/τ)
Read left to right with our toolbox: measure alignment (sim) → sharpen (/τ) → make positive (exp) → convert to a share (the fraction) → make it a pain meter (−log). Nothing mysterious remains.