The course page ends week 6 with a map: characters as dots, axes made of
word lists — the average embedding of science, technology
minus the average of magic, spell, sorcerer — and one
honest warning: none of these positions is a fact about the characters.
So we shipped the vectors into the browser and let you draw your own axes. Plus the
second half of the week's toolkit: a Scattertext-style term-rate contrast between
communities.
The recipe is the course page's, run on our own Marvel-trained skip-gram vectors
(100 dims, window 5, seed 0 — no GloVe download needed):
Every character keeps a fingerprint — the words with the highest
TF-IDF weight once proper names are removed, shipped with their weights
(top 12 per character).
An axis is a direction in embedding space: the average vector of the
positive pole's word list minus the average of the negative pole's,
normalized.
A character's projection is the TF-IDF-weighted average of their
fingerprint vectors, dotted with the axis direction. The map plots two such axes,
X and Y — presets or any two words you type.
The vectors themselves ship to your browser quantized to int8 — that's what makes
the type your own axis box possible without pre-baking anything.
The Scattertext panel: pick any two of the eight largest Louvain communities and look
at their word rates side by side. Each dot is a term; the axes are
uses per 10,000 tokens on a log-log scale; the dashed diagonal is
equal rates. Red dots are relatively distinctive of the X-community, blue of
the Y-community.
label
Click a dot to see both communities' counts and rates.
science ↔ magic works. Doctor Strange lands deep in the magic end
(his magic, mystical and ancient do the pulling)
while Machine Man, Supreme Intelligence-adjacent tech characters, and gadget heroes
hold the science end; Spider-Man drifts somewhere in the middle — a street kid
with a lab and a magic-adjacent rogues' gallery.
war ↔ home is the bias axis, exactly as the course page warned.
The home end collects female-gendered pulls — female-titled pages, the women of
Wakanda, the Shuris and Maris of the list — while the war end is almost all
soldiers. It's GloVe's Wikipedia fingerprint re-negotiated on a much smaller corpus:
the bias is in how the pages are written, not in the embedding tool.
Term contrasts answer a different question. Between the Wolverine-led
and Spider-Man-led communities, the diagonal catches the shared Wikipedia dialect
(series, character, team), Wolverine's corner floats x-men, logan,
adamantium-family words toward its end, and the Spider-corner pulls
spider, peter, venom. The same words the embeddings turn into geometry show
up here as raw rates — two lenses, one landscape.
One fitted Word2Vec run (seed frozen); change the seed and dot positions drift. Axes
made of single words are noisier than the 5-word presets; a pole word that is also a
character name behaves differently than an abstract pole. And 727k tokens is small:
every position carries corpus noise the course page's GloVe map hid behind a
128 MB training set. The point of the page is exactly that difference —
check both, believe neither.