t-SNE maps points xi∈R50 to yi∈R2 by minimising ∑iKL(Pi∥Qi), where pj∣i∝exp⁡(−∥xi−xj∥2/2σ2) in the original space and qj∣i∝(1+∥yi−yj∥2)−1 in the embedding. (a) What happens to the embedding if σ is very large, or very small? (b) How is σ chosen in practice?

Unsupervised learning, Dimensionality reduction
Level L4 Advanced. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you can reason from the kernel formula to the two extreme cases, and know how perplexity and a per-point binary search set σ.

Key idea

pj∣i is the probability that point i picks j as its neighbour, and KL(Pi∥Qi) (Kullback–Leibler divergence) measures how badly the 2-D probabilities Qi match it. σ sets how many neighbours count. As σ→∞, pj∣i→1n−1: every point is an equal neighbour, so there is no local structure to preserve. As σ→0, all the probability goes to the single nearest neighbour. In practice each point gets its own σi, found by binary search so that the perplexity 2H(Pi) equals a chosen value, typically 5–50.

Steps

  1. Write the normalised form, pj∣i=exp⁡(−∥xi−xj∥2/2σi2)∑k≠iexp⁡(−∥xi−xk∥2/2σi2), and say that σi controls how fast similarity falls off with distance.
  2. (a) Large σ: every exponent tends to 0, so every term tends to 1 and pj∣i→1/(n−1) for all j. The target says nothing about who is near whom, so the embedding becomes a shapeless ball and the clusters are lost.
  3. (a) Small σ: the nearest neighbour's term is exponentially larger than the rest, so Pi becomes one-hot (all mass on one point). Only nearest-neighbour pairs are kept, giving many tiny broken-up clusters that are very sensitive to noise. In sparse regions the numbers can also underflow to 0 on a computer.
  4. Explain why one global σ also fails: data density varies, and a σ that suits a dense cluster is too small for a sparse one. So each point i gets its own σi.
  5. (b) Choose σi through perplexity. Define the entropy H(Pi)=−∑jpj∣ilog⁡2pj∣i and the perplexity Perp(Pi)=2H(Pi), which reads as the effective number of neighbours. The user fixes a target perplexity. H(Pi) grows as σi grows, so a binary search on σi (or on βi=1/2σi2) finds the value that hits the target.
  6. Link the two parts: perplexity runs from 1 (the σ→0 limit) to n−1 (the σ→∞ limit), so the two extremes in (a) are the two ends of the perplexity scale.

Common mistakes

How long your answer should be

About half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Unsupervised learning: Why can exact divisive (top-down) clustering not simply try every possible split of a cluster, and how does DIANA's splinter-group heuristic get around this? How many splits exist for m=5 and m=20 points, and what does one DIANA split give on the 1-D points 0,1,2,9,10 (absolute difference as dissimilarity)?
Next in Unsupervised learning: How is k-means a limiting case of EM for a Gaussian mixture model, and what assumptions about the clusters does this reveal?