How Machines Judge Similarity
Machines judge similarity by representing items as numerical vectors and computing the distance between them in a feature space.
A complete interactive classroom, not just a preview.
Start when you are ready to enter this Stage's 4 scenes and explore, respond, and learn as you go.
How does a machine turn 'these two things feel alike' into a concrete numerical judgment?
A music app groups your songs into moods you didn't label — how did it decide which tracks resemble each other?
We feel similarity intuitively ('this song feels like that one'), but machines can't feel anything. They must reduce songs, images, or documents to numbers and then apply a geometric rule — so what is that rule, and could it be wrong in ways we wouldn't notice?
A side-by-side comparison of two items as both human perception and as points in a coordinate space, with a distance formula computing the gap between them.
Machines judge similarity by turning items into numerical vectors and measuring the distance between those vectors — so the real question is never 'are they similar?' but 'similar in which measured feature?'
- Specific distance metrics (cosine, Manhattan, Mahalanobis)
- Embedding learning algorithms (word2vec, contrastive loss)
- Clustering algorithms (k-means, DBSCAN)
- Perceptual psychology of human similarity
- High-dimensional mathematics beyond intuition
- 01The Mood Playlist MysteryslideSlot 1Hook
Open with a streaming app that has organized a listener's library into 'Rainy Day Acoustic' and 'Late Night Drive' without any tags. Show two song cards side by side and ask how the app could possibly know they belong together.
- Apps group items we never labeled
- Similarity must be computed, not felt
- The machine sees no feelings — only data
PhenomenonA music app has silently split a library into coherent mood playlists with no human input.
QuestionHow can a machine decide two songs are similar when it has never heard either one?
- 02Two Different 'Alike'slideSlot 2Tension
Present the same two songs and challenge the intuition that 'similar' is one thing. One song matches the other in tempo but not in lyrical mood; another matches in mood but not tempo. Surface the conflict: which axis should the machine trust?
- Two songs can be similar in one way and different in another
- Humans blend features automatically; machines must choose
- The choice of features silently defines what 'similar' means
PredictionLearners will predict the app uses 'overall vibe' — a single holistic judgment.
Tempting intuitionThat similarity is one unified feeling the machine somehow captures.
- 03Vectors and DistanceslideSlot 3Reveal
Reveal the mechanism: the app represents each song as a list of numbers (a vector) — one number for tempo, one for energy, one for brightness, and so on. Two songs become two points in a multi-dimensional space. Similarity is then just the geometric distance between those points: smaller distance, more similar. Walk through the chain feature → number → coordinate → distance.
- Each song becomes a vector of feature values
- Each vector is a point in a feature space
- Distance between points = the similarity score
- Closer points are judged more alike
EvidenceA 2D scatter plot where songs from the same mood cluster tightly while different moods sit far apart, showing that geometric distance reproduces the playlist groupings.
ConclusionSimilarity is not a feeling the machine has — it is the distance between two points it has placed in a feature space.
Mechanism- 1Step 1: Choose measurable features (tempo, energy, brightness) and compute a number for each feature on every song.
- 2Step 2: Stack those numbers into a vector, so every song is a single point in a feature space.
- 04The Real Question Behind SimilarityslideSlot 4Takeaway
Transfer the insight to a new domain: a streaming service recommending a movie, or a photo app grouping faces. In each case, similarity is vectors plus distance — and the hidden choice of which features to measure shapes every downstream judgment.
- Vectors + distance is the universal pattern
- Different features produce different similarity judgments
- Ask 'similar in what?' before trusting any machine-made match
TransferApply the same lens to a movie recommender that suggests films based on genre and year vectors, where two films close in one feature space can be far apart in another.
Expected inferenceLearners should infer that when a system's grouping seems wrong, the issue is rarely the distance formula — it is the feature list the vectors were built from.
Discussion threads for a Stage aren't available yet.