advancedadvanced-ml

t-SNE

A dimensionality reduction technique built purely to make high-dimensional data visually intuitive.

Key Points

What it is

t-SNE (t-distributed Stochastic Neighbor Embedding) is a technique that reduces high-dimensional data down to 2 or 3 dimensions for visualization, specifically preserving how close points are to their neighbors rather than the global structure of the data.

Why it exists

PCA preserves overall variance but can fail to reveal cluster structure that only shows up in local neighborhoods, especially for non-linear data. t-SNE exists specifically to make clusters and neighborhood relationships in high-dimensional data — like word embeddings or image features — visually obvious in a 2D plot.

Intuition

Imagine trying to lay out a crumpled 3D friendship map flat on a table, where you only care about keeping close friends near each other — you're allowed to totally distort how far apart different friend groups end up from one another. t-SNE does exactly this: it obsesses over preserving 'who's near whom' locally and doesn't care about preserving the big-picture distances between separate groups.

When to use

When not to use

Common mistakes

Notes

In practice

Common for visualizing high-dimensional embeddings (word2vec, image features) in 2D to visually inspect cluster separation before or after modeling.

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

principal-component-analysiscurse-of-dimensionality
Chirp at me!