SIMULATED

Embedding Explorer

Twenty words in six dimensions, projected to two by PCA. Click a word and compare the neighbours the plot shows with the neighbours the model actually has. They disagree, and the disagreement is not a bug in the plot — it is what projecting six dimensions onto two must do.

ProblemTargetDataRepresentationSplitModelTrainingEvaluationValidationDeploymentInferenceMonitoringDriftRetraining
Read this before the picture

The projection distorts high-dimensional geometry. Two components here keep 67.7% of the variance, which means the rest was thrown away to make the plot — and words that differed mostly along the discarded directions land on top of each other. The neighbours the plot shows are not the neighbours the model sees. Every 2-D embedding picture in every slide deck has this property; the only difference here is that the page can count how often it lies.

variance kept (2 of 6)
67.7%
mean neighbour agreement
71.7%
worst word
travel
its agreement
0.0%

The projection

Colour is the word's hand-assigned group. Click a word. Solid ring: a neighbour in both spaces. Red dashed: a true neighbour the plot hides. Grey dashed: a neighbour the plot invents.

principal component 1principal component 2catdogwhalechickenparistokyokitchenfarmapplebreadsteaksushiruneatcompiletravellaptopserverpythondatacenter
kitchen
animacy 0.0place 0.8edible 0.5action 0.2technical 0.1size 0.3
3 nearest in 6-D (the model)
  • farm0.922
  • paris0.851
  • tokyo0.839
3 nearest in 2-D (the plot)
  • farm0.999
  • whale0.951
  • paris0.791

The plot got 1 of 3 neighbours wrong for this word. The red entries are the neighbours the model uses and you would never have guessed from the picture.

Where the projection lies most

Every word, its three nearest neighbours in the full space and in the plot, and how many agree. Worst first.

WordModel neighbours (6-D)Plot neighbours (2-D)Agree
travelrunfarmparisserver, laptop, python0 / 3
catdogwhalechickendog, eat, run1 / 3
whaledogcatfarmkitchen, farm, bread1 / 3
compilepythonlaptopserverpython, laptop, run2 / 3
dogcatwhaleruncat, eat, run2 / 3
eatrunchickendogcat, dog, run2 / 3
farmkitchenparistokyokitchen, whale, paris2 / 3
kitchenfarmparistokyofarm, whale, paris2 / 3
laptopserverpythoncompiletravel, server, python2 / 3
pythonlaptopcompileservercompile, laptop, run2 / 3
runeattraveldogdog, cat, eat2 / 3
serverlaptopdatacenterpythontravel, laptop, datacenter2 / 3
steaksushiapplebreadapple, chicken, sushi2 / 3
applebreadsushisteaksushi, steak, bread3 / 3
breadapplesushisteaksushi, apple, steak3 / 3
chickensteaksushiapplesteak, apple, sushi3 / 3
datacentertokyoserverparistokyo, paris, server3 / 3
paristokyofarmdatacentertokyo, datacenter, farm3 / 3
sushiapplesteakbreadapple, bread, steak3 / 3
tokyoparisdatacenterfarmparis, datacenter, farm3 / 3

Cosine similarity, by hand

Pick two words. The six numbers are the whole model; the cosine is the dot product over the product of the norms.

animacy 0.9place 0.1edible 0.1action 0.3technical 0.0size 0.2
cosine
0.992
animacy 0.9place 0.1edible 0.1action 0.4technical 0.0size 0.3

Try chicken against apple and against cat: it is close to both, for different reasons, along different dimensions. A 2-D plot has to put it in one place.

How to read this page honestly

What the model is, and what it deliberately refuses to be.

  • SIMULATEDThe projection is real principal component analysis — the vectors are centred, the 6×6 covariance is formed, the top two eigenvectors are found by power iteration. Nothing about the 2-D layout is placed by hand, and every neighbour list and cosine on this page is computed from the vectors shown.
  • SIMPLIFIEDThe twenty vectors are hand-crafted in six named dimensions — animacy, place-ness, edibility, action-ness, technicality, size — so the geometry can be read. A learned embedding has hundreds of unnamed dimensions and no axis means anything on its own; the distortion you see here is *milder* than the one a real 300-D to 2-D plot produces.
  • GENERALCosine similarity compares direction and ignores magnitude. That is the right choice when the vectors were trained for it and the wrong one when magnitude carries meaning — some models encode frequency or confidence in the norm.

The lessons behind it