For symmetric t-SNE with high-dimensional affinities (symmetric, with ) and low-dimensional affinities , how do you derive for ? What do the two terms mean, and why does the Student-t kernel help with the crowding problem?
Unsupervised learning, Dimensionality reduction
Level L5 Expert. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can differentiate through a normalised kernel carefully, count each pair of points twice, and read the result as attractive and repulsive forces.
Key idea
Write , and , so . Then , and for each ordered pair. Each appears twice, as and , and ; together these give the factor 4.
Steps
- Split the cost: . The first sum does not depend on the 's, so it is a constant. Use and to get .
- Differentiate with respect to each first, because depends on the 's only through these squared distances. From : . So the first term contributes .
- Differentiate : . Adding the two parts, .
- Apply the chain rule. appears in and in for every ; these are equal and, by symmetry of and , have the same derivative. With : .
- Interpret the terms. Gradient descent moves against the gradient. The part pulls towards points that were neighbours in the original space (attraction). The part pushes all points apart (repulsion). At the optimum they balance.
- Explain crowding. In 2-D there is not enough room to place moderately distant neighbours at faithful distances, so everything tends to pile up in the middle. The heavy-tailed kernel falls off slowly, so moderately similar points can sit much farther apart for the same . Its tail follows an inverse-square law, at large distances, compared with the Gaussian's . So moderately dissimilar points can sit far apart in 2-D, which relieves the crowding and keeps separate clusters clearly apart.
Common mistakes
- Forgetting that depends on every , and so losing the repulsive term.
- Getting a factor of 2 instead of 4 by counting each pair only once.
- Using the asymmetric (conditional) SNE affinities, which give a different gradient: for the Gaussian-kernel version.
How long your answer should be
About a page; 8–10 minutes.
Last checked on 4 December 2026.
Read this
Previous in Unsupervised learning: Why is the log-likelihood of a Gaussian mixture unbounded above when each component has its own covariance matrix? How do you show it in one dimension with , and how do EM implementations avoid the problem?
Next in Unsupervised learning: How can the k-means objective be written as a trace problem over cluster indicator vectors, and what lower bound on the optimal SSE do you get by relaxing it to orthonormal matrices when the data are centred?