2.5.11 · D5Unsupervised Learning
Question bank — t-SNE for visualization
Before you start, keep three anchors in your head, because every trap leans on one of them:
- = "how much does point in the high-dimensional data want as a neighbour", a probability built from a Gaussian bump.
- = the same idea in the 2D map, but built from a t-distribution with heavy tails.
- The whole method just drags the 2D points around until looks like , measured by KL divergence (see 1.3.5 KL Divergence).
True or false — justify
t-SNE preserves the global distances between clusters.
False. It matches local neighbour probabilities; the empty space between two clusters is set by the t-distribution and optimisation, not by their true separation, so it carries no reliable meaning.
Two clusters drawn far apart in a t-SNE plot are more dissimilar than two drawn close.
False. Inter-cluster gaps are essentially arbitrary. A tight, well-separated blob only tells you those points share neighbours; the amount of gap between blobs is not a distance you can trust.
The size (spread) of a cluster in the plot reflects its true variance in high-D.
False. Dense high-D clusters and diffuse ones can both be squeezed to similar apparent sizes, because the t-distribution and KL cost regularise cluster widths rather than preserving them.
Running t-SNE twice on the same data gives the same picture.
False. Initialisation is random and the cost is non-convex, so you get rotations, reflections, and sometimes genuinely different layouts each run.
is symmetric: .
True. It is made symmetric on purpose via , so no point gets a directional bias. Note the raw conditional is generally not symmetric.
Both and are valid probability distributions summing to 1 over all pairs.
True. The in the symmetrisation and the global normaliser in each force , which is exactly what lets us compare them with KL divergence.
Increasing perplexity always sharpens clusters.
False. Higher perplexity widens each point's neighbourhood, which tends to merge fine structure and emphasise coarser groupings, not sharpen small ones.
The gradient force between two points can either pull or push depending on the sign of .
True. When the points are too far in 2D and are pulled together; when they are too close and pushed apart.
t-SNE gives you a function you can apply to a brand-new data point.
False. It is non-parametric — it only outputs coordinates for the training points. A new point has no learned mapping, unlike an autoencoder which stores an encoder.
t-SNE and PCA both use a linear projection.
False. PCA is linear (projection onto principal directions); t-SNE is non-linear, matching neighbour probabilities rather than projecting.
Spot the error
" — a Gaussian, same as high-D."
Wrong. Low-D uses the t-distribution . A Gaussian would decay too fast and reintroduce the crowding problem it was designed to avoid.
"We minimise so that far-apart high-D points stay far apart."
Wrong direction. We minimise , which penalises breaking nearby pairs (local structure) and is lenient about far pairs — the opposite priority to what the statement claims.
"Perplexity is just measured in the original units."
Wrong. Perplexity is , an effective neighbour count; a binary search then picks the that achieves it. Same perplexity gives different in dense vs sparse regions.
"After finding the 2D coordinates I can feed those two features into a classifier for better accuracy."
Wrong. t-SNE outputs are stochastic and have no mapping for future data. For downstream features use PCA, autoencoders, or 2.5.10 UMAP.
"With 5 features I should run t-SNE before I do anything else."
Wrong. t-SNE's crowding machinery is meant for 50+ dimensions; on low-D data it can invent distortions. Plot feature pairs or use PCA instead.
"Early exaggeration means we run t-SNE longer at the end to polish clusters."
Wrong. Early exaggeration multiplies (typically by ~4) in the first ~250 iterations to open up gaps between clusters, then is switched off for fine-tuning.
"The gradient — that's the whole formula."
Wrong. It's missing the t-distribution weight , which softens forces from distant points and keeps the descent stable.
"KL divergence is symmetric, so ."
Wrong. KL is asymmetric — that asymmetry is precisely why the choice of direction encodes t-SNE's preference for local structure (see 1.3.5 KL Divergence).
Why questions
Why a Gaussian in high-D but a t-distribution in low-D?
The Gaussian gives a natural notion of "close" among many high-D neighbours; the t-distribution's heavy tail gives moderately distant map points more room, solving the crowding problem where too many points want to sit near a centre in 2D.
Why symmetrise into instead of using the conditional directly?
Symmetrising removes directional bias and, crucially, keeps outlier points from being ignored — a lone point still contributes because its neighbours' conditionals feed into the shared .
Why does the crowding problem arise at all?
In high dimensions you can place many points roughly equidistant around a centre, but 2D has no room for all of them at that distance, so without heavy tails they'd pile on top of each other.
Why choose rather than a symmetric distance?
Because we deliberately want to punish stretching apart true neighbours far more than pulling together true strangers — local faithfulness matters more for visualisation than global layout.
Why does t-SNE need many iterations and momentum?
The cost is non-convex with many shallow minima; momentum and thousands of gradient-descent steps help escape early tangles and settle clusters cleanly.
Why is t-SNE naively, and how does Barnes-Hut help?
Every pair contributes to and , giving interactions; Barnes-Hut approximates far-away point groups as single lumps, cutting cost to about .
Why can PCA and t-SNE be complementary rather than competing?
PCA quickly strips redundant linear structure (often used first to reduce 784 → 50 dims), and t-SNE then untangles the remaining non-linear local neighbourhoods for a final picture.
Edge cases
What happens if you set perplexity larger than the number of points?
The binary search can't achieve the target effective-neighbour count, so t-SNE either warns/fails or behaves erratically — perplexity must stay well below .
What does an isolated outlier point do in the layout?
With symmetric it still gets a small pull toward its nearest high-D neighbour, so it usually lands near, not infinitely far from, its closest cluster rather than floating alone.
Two identical points (): what is their distance term?
gives the maximum Gaussian similarity ( before normalising), so they are the strongest possible neighbours and the map will place them essentially on top of each other.
If all data lies on a single blob with no real clusters, what will t-SNE show?
It may still carve out fake-looking sub-clumps because early exaggeration and the non-convex cost create separation even where none exists — apparent clusters are not proof of clusters.
Very high learning rate — what breaks?
Points overshoot each iteration and the layout oscillates or explodes, never settling; too low and it crawls, so the rate (~100–1000) must be tuned.
Data already living on a low-dimensional manifold — is t-SNE appropriate?
It can visualise the manifold's local neighbourhoods well (compare 2.5.9 Manifold Learning), but remember it will not preserve the manifold's true geodesic distances, only who-is-near-whom.
What if two clusters genuinely overlap in high-D (like digits 4 and 9)?
t-SNE cannot manufacture separation that isn't there; their neighbour probabilities are entangled, so their blobs will bleed into each other in the map — that overlap is a faithful signal, not a bug.
Recall Fast self-check
t-SNE preserves local neighbourhoods, not global distances. Which KL direction does t-SNE minimise? ::: , because it punishes breaking nearby pairs. Which distribution is used in low-D and why? ::: Student's t (1 dof), heavy tails fix the crowding problem. Can t-SNE map a new unseen point? ::: No — it is non-parametric with random init; use PCA/UMAP/autoencoders instead.