Neural Mastery

Embedding Space Explorer

A small, hand-built demo vocabulary (48 words across 8 categories) plotted in 2D via a real, from-scratch PCA projection (power iteration + deflation on the covariance matrix — the same eigenvector math Linear Algebra covers, not a canned library call). There's no trained word embedding model running in your browser — the vectors are structured by hand — but every computation on top of them (cosine similarity, nearest-neighbor lookup, vector-arithmetic analogy) is real.

Interactive
Embedding Space Explorer
kingqueenmanwomanboygirlfathermotherdukeduchessdogcatwolflioneagledolphincomputeralgorithmnetworkrobotsoftwareinternetpizzabreadapplecoffeecheesericerainsnowsunshinestormwindfogjoyangerfearsadnesshopecalmcartrainbicycleairplaneshipbus
royalty
people
animals
tech
food
weather
emotion
transport
Nearest to "king"
queen0.599
man0.188
father0.188
duke0.184
boy0.183
Analogy: A − B + C ≈ ?
"king" − "man" + "woman" ≈ ...
queen (0.962)
duchess (0.198)
mother (0.188)
Hand-authored, structured demo vectors (no trained model here) -- but cosine similarity, nearest-neighbor lookup, the A - B + C word-vector analogy, and the 2D projection below are all real math, computed from scratch, live.

What to Try

  • Click any point and watch the "Nearest to..." panel fill in with the words closest to it by real cosine similarity — words in the same category cluster tightly because their vectors share a dominant direction, exactly the geometric intuition behind why embeddings work at all.
  • Run the default analogy — king − man + woman — and watch "queen" come out on top, word2vec's most famous empirical result, reproduced live from real vector arithmetic instead of quoted as a fact.
  • Try other analogies from the vocabulary (father − man + woman, duke − man + woman) and see which ones the geometry actually supports and which ones break down — a concrete way to feel the limits of a linear analogy structure, not just its successes.
  • Notice the categories form visually distinct clusters in the 2D projection even though PCA never saw the category labels — it only saw the raw vectors, and the clustering emerged from real variance in the data.

Back to Visual Lab Overview.

Last updated Sep 5, 2026Edit this pageReport an issue
← Previous
Decision Boundary Playground
Next →
Linear Regression Studio