Skip to content
AI360Xpert
Beta
Core ML

Visual explainer

Embedding Space

How models convert fuzzy semantic meaning into precise mathematical distances.

Raw spelling puts Cat near Car and Kitten far away.
Raw spelling puts Cat near Car and Kitten far away.

You read cat and kitten as cousins, but raw code sees letters only. Cat shares two letters with car and none with kitten, so spelling ranks the wrong pair first.

Words Become Vectors

An embedding turns each word into a short list of numbers.
An embedding turns each word into a short list of numbers.

You hand a word to the model and get back a short list of numbers. Cat becomes [2.0, 1.0] and car becomes [0.2, 2.8], so each word now owns a dot you can plot.

Angles Measure Meaning

Vectors [2,1] and [1,3] meet at 45 degrees with cosine 0.707.
Vectors [2,1] and [1,3] meet at 45 degrees with cosine 0.707.

You dot [2,1] with [1,3] to get 5, divide by 2.24 times 3.16, and land cosine 0.707. That is 45 degrees, so you can read closeness as an angle.

Shifts Stay Parallel

The same shift turns Man to Woman and King to Queen.
The same shift turns Man to Woman and King to Queen.

You learn one shift from man to woman and reuse it. Add that same arrow to king and you land near queen, which tells you relations live as directions.

Meaning Beats Spelling

Spelling order flips to meaning order in embedding space.
Spelling order flips to meaning order in embedding space.

You compare the same three words on two rulers. Spelling says cat-car 1 edit beats cat-kitten 6, while vectors say 0.3 beats 2.6 and fix the order.

Pick Your Ruler

Use cosine for direction and distance when size matters.
Use cosine for direction and distance when size matters.

You use cosine when direction matters and length should not. Flip to Euclidean distance when counts matter, like when frequent words grow longer vectors than rare ones.

Where It Breaks

One Bank vector stuck between two meanings serves neither.
One Bank vector stuck between two meanings serves neither.

You give bank one dot for river edge and money house. It parks halfway between both groups and matches neither, so you'll need context to split it.

The Quick Version

  • Spelling ranks cat with car, not kitten.
  • Vectors give each word a plottable dot.
  • Cosine 0.707 means a 45 degree gap.
  • One shift links man-woman and king-queen.
  • Vectors flip spelling order to meaning order.
  • Cosine for direction, distance for size.
  • One bank dot cannot hold two meanings.