The analogy slot machine

The week's most famous demonstration is word arithmetic: king − man + woman ≈ queen. Does the same trick work one level up — start from a character, subtract a word, add a word, and let the machine name the closest superhero? This is the week's play round: all the TF-IDF, PPMI and topic-mixing the pages built gets compressed into one toy with a lever. Pull the lever:

How a character becomes a vector

↑

Same recipe as the Marvel map: a character's position is the TF-IDF-weighted average of their fingerprint words (names removed) in our Marvel-trained Word2Vec space. A fingerprint is just the handful of highest-TF-IDF words on a single page, and names are dropped so the machine can't shortcut through people's titles. Trade a word and the traded vectors have to come from the 3,791 words we shipped — anything outside the vocabulary would silently poison the arithmetic, so those inputs get bounced with an error instead. The space itself was trained on the full week's corpus, 727,440 tokens across all 303 pages, which is why words like magic or hammer carry real Marvel meaning inside it.

The new direction is scored against all 303 character positions by cosine — read it as a similarity dial, where 1 means "same direction" and 0 means "unrelated"; it is not a percentage. The podium is who's closest. If you already know the hero you expected, pick them too — the machine reports their exact rank, cosine, and who got in the way. Nothing is precomputed; every spin is live arithmetic.

The lever

↑
− + →

Why does a dot that looks closest not have the highest number? The map is a 2D projection — a PCA shadow — of the 100-dimensional space the machine actually lives in: the x-axis runs along the traded direction, but the y-axis squeezes the other 98 dimensions into one, and the cosine ranking also rescales each character's length in a way the projection does not. So “looks nearest” is not “is nearest”: the thin dashed white line from the arrowhead points at the machine’s true #1, and the numbers on the podium above are always the full-space truth.

Illustrative example — made-up characters and numbers, not output from the machine.

What the 2D map shows

traded direction arrowhead Hero A Looks closest Hero B Hero C Hero D

The dashed line points at the true nearest.

What the full 100D space says

  1. #1Hero B true nearest (looks farther on the map) 0.62
  2. #2Hero A looks closest on the map, ranked lower 0.55
  3. #3Hero C 0.41
  4. #4Hero D 0.33

The projection compresses 100 dimensions into 2, so visible distance can be misleading.

How to read a spin — and three to try

↑

Every spin reads the same way. The podium is the machine's top five, with its best guess highlighted. Beneath it, the moved-words line shows which of the starting fingerprint words pulled toward each pole — the trade's geometry in one sentence. If you named an expected hero, the verdict card reports their exact rank out of 302, their cosine, and up to three pages that got in the way; that ranking deliberately includes near-duplicate pages, so you can see the corpus's own copy problem in the numbers. Click any podium row to recenter the whole equation on that hero, and audit anything suspicious with the sentence drawer underneath. The map above the podium redraws once per spin: its x-axis is the traded direction, so the podium's dots herd toward the arrowhead (in roughly rank order — cosines and projections disagree a little), y is the widest spread left over. It is a projection, not a ruler — the podium above, computed in the full 100-D space, is the ground truth.

What the machine gets right (and wrong)

↑

Limitation

↑

A character is reduced to a dozen weighted words, the space to 100 dimensions learned from 727k tokens, and every round inherits the corpus's biases — the war↔home lean that the map post caught. Treat the machine as a comedy writer with a statistics degree: sometimes strangely right, always worth auditing.

← Back to all weeks