What does the perplexity parameter control in t-SNE?

Quick Overview

Asks what the perplexity parameter controls in t-SNE and how changing it affects the resulting embedding. Tests understanding of how t-SNE turns distances into neighbor probabilities and how to tune perplexity sensibly in practice.

What does the perplexity parameter control in t-SNE?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What does the `perplexity` parameter control in t-SNE? Explain what the value means for each point and what happens to the map when you set it low or high. ```hint Look at each point's Gaussian t-SNE turns high-dimensional distances into neighbor probabilities using a Gaussian centered on each point. Ask what decides the width of that Gaussian and why it would differ between dense and sparse regions. ``` ```hint Exponentiated entropy Perplexity is defined from the entropy of a point's neighbor distribution. Think about what $2^{H}$ counts when a distribution is spread evenly over a few outcomes. ``` ### What a Strong Answer Covers - The definition of perplexity from the entropy of each point's conditional neighbor distribution, and its reading as an effective number of neighbors. - How t-SNE fits a separate bandwidth per point to reach the target perplexity, and what that does in dense versus sparse regions. - The effect of low and high values on the map, including fragmentation, merging of small clusters and runtime. - Practical ranges, the limit relative to the number of points, and the habit of trying several values. ### Follow-up Questions - Why does t-SNE use a Student t distribution in the low-dimensional space instead of a Gaussian? - Can you read cluster sizes or the distances between clusters off a t-SNE plot? Why or why not? - How would you set perplexity for a dataset with a million points, and what else would you change to make the run feasible? - How does UMAP's `n_neighbors` compare to t-SNE perplexity?

Overview: Asks what the perplexity parameter controls in t-SNE and how changing it affects the resulting embedding. Tests understanding of how t-SNE turns distances into neighbor probabilities and how to tune perplexity sensibly in practice.

Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What does the perplexity parameter control in t-SNE? Explain what the value means for each point and what happens to the map when you set it low or high.

What a Strong Answer Covers Guidance

  • The definition of perplexity from the entropy of each point's conditional neighbor distribution, and its reading as an effective number of neighbors.
  • How t-SNE fits a separate bandwidth per point to reach the target perplexity, and what that does in dense versus sparse regions.
  • The effect of low and high values on the map, including fragmentation, merging of small clusters and runtime.
  • Practical ranges, the limit relative to the number of points, and the habit of trying several values.

Follow-up Questions Guidance

  • Why does t-SNE use a Student t distribution in the low-dimensional space instead of a Gaussian?
  • Can you read cluster sizes or the distances between clusters off a t-SNE plot? Why or why not?
  • How would you set perplexity for a dataset with a million points, and what else would you change to make the run feasible?
  • How does UMAP's n_neighbors compare to t-SNE perplexity?