Chatomics Field GuideWhat They Don't Teach You

Comparison · dimensionality reduction

UMAP vs t-SNE: Which One Should You Use?

Both embeddings will lie to you about distance and cluster size; the real question is which one lies faster and more consistently.

By Ming "Tommy" Tang, Director of Bioinformatics in Big Pharma · Reviewed September 2026 · 5 min read

The verdict

Default to UMAP. For the typical reader here, running single-cell RNA-seq through a scanpy or Seurat pipeline, UMAP wins on every axis that matters day to day: it is roughly 10-100x faster (about 3 minutes for 1 million cells versus roughly 45 minutes for Barnes-Hut t-SNE), it preserves global structure 2-3x better by Spearman correlation of pairwise distances, and it stays stable across reruns and initializations. It also generalizes past 2-3 dimensions, so the same embedding can feed downstream clustering or ML steps instead of being a dead-end visualization. It is also simply what scanpy.tl.umap and Seurat's RunUMAP already give you by default, so sticking with it keeps your pipeline boring and reproducible.

Reach for t-SNE when you are reproducing a published figure that used it, when your dataset is small enough that the 45-minute runtime doesn't matter and you want the modest accuracy edge (ARI/NMI) that benchmarks give t-SNE over UMAP, or when a manuscript figure needs the tighter, more visually separated clusters that t-SNE tends to produce. None of that changes the underlying rule: whichever plot you use, the distances between clusters and the sizes of clusters are artifacts of the projection, not measurements, and treating them as such is the single most common way people fool themselves with either tool.

Both UMAP and t-SNE take a matrix with thousands of genes per cell and squash it down to two dimensions you can actually look at. Both are built on the same core promise: points that are close together in high-dimensional expression space should stay close in the 2D plot. Neither one promises anything about points that start out far apart, which is exactly why both distort global structure and neither should be read as a map of "how different" two cell populations really are.

Under the hood they get there differently. UMAP builds a weighted nearest-neighbor graph under three assumptions (data sits on a Riemannian manifold, the metric is locally constant, the manifold is locally connected), then optimizes a low-dimensional layout to match that fuzzy topological structure. t-SNE converts pairwise distances into probabilities, using perplexity to set the effective neighborhood size, then runs gradient descent to minimize the KL divergence between the high-dimensional and low-dimensional probability distributions. Barnes-Hut approximation makes that gradient descent faster, but it is still solving a harder optimization problem than UMAP's graph layout.

The practical gap shows up at scale. UMAP's runtime is bounded by kNN computation plus gradient steps and stays usable well past 100,000 cells; t-SNE's convergence degrades sharply above that point and default settings tend to leave you with fragmented, poorly converged clusters. UMAP also generalizes past 2-3 dimensions for feeding downstream ML pipelines, while t-SNE is built and tuned for visualization only.

Head to head

CriterionUMAPt-SNEEdge
Core algorithmBuilds a fuzzy weighted nearest-neighbor graph under manifold assumptions (uniform distribution, locally constant metric, local connectivity) and optimizes a low-dim layout to match it.Converts pairwise distances to probabilities scaled by perplexity, then minimizes KL divergence between high-dim and low-dim distributions via gradient descent.Tie
Different philosophies, not a strictly better/worse comparison.
Speed at 1 million cellsRoughly 3 minutes on standard hardware.Roughly 45 minutes with Barnes-Hut approximation.UMAP
Global structure preservationPreserves global structure 2-3x better than default t-SNE, measured by Spearman correlation of pairwise distances.Distorts global distances more heavily under default settings.UMAP
Cluster accuracy metrics (ARI/NMI)Close behind t-SNE on accuracy benchmarks, at a fraction of the compute cost.Achieved the best ARI/NMI accuracy scores in a 10-method single-cell benchmark, but at higher computational cost.t-SNE
Stability to initialization and perturbationDemonstrated the highest stability and robustness to initialization and data perturbation in cross-method benchmarks.More sensitive to random seed and perplexity choice, producing visibly different layouts run to run.UMAP
Key parameter and its default trapmin_dist controls packing density; umap-learn defaults to 0.1 but scanpy defaults to 0.5, silently changing how tight your clusters look depending on entry point.perplexity controls the effective neighborhood size (default 30); no single default is safe across dataset sizes, and large datasets need it scaled to roughly 1% of n.Tie
Both tools have a default that will bite you if you don't set it explicitly and note it in your methods.
Usable embedding dimensionalityn_components supports arbitrary dimensions and stays useful even in the tens of thousands, making it viable as input to downstream ML, not just plotting.Effectively limited to 2D-3D visualization; not designed as a feature-reduction step for other models.UMAP
Convergence behavior on large datasetsRuntime is bounded by kNN computation (about O(n log n)) plus O(kn) gradient steps; stays practical past 100,000 cells.Convergence slows dramatically above 100,000 points; default optimization often leaves fragmented, poorly converged clusters.UMAP
Visual separation for publication figuresContinuous connectivity between neighboring populations can blur separations a reviewer wants to see crisply.Tends to produce visually tighter, more distinct clusters, which reads better in a static figure.t-SNE
Documentation and parameter guidanceumap-learn docs give thorough, specific guidance on n_neighbors and min_dist effects and tradeoffs.openTSNE docs are explicit about perplexity's role and how to scale it with sample size.Tie
Ecosystem integrationDefault embedding step in scanpy.tl.umap and Seurat's RunUMAP; no extra dependency required in standard pipelines.Requires a separate library (openTSNE or Rtsne) and manual perplexity tuning outside the default single-cell workflow.UMAP

Use UMAP when

  • You have more than 100,000 cells and need the embedding to finish in minutes, not the better part of an hour.
  • You need the embedding as input to a downstream clustering or ML step in more than 2-3 dimensions, not just a plot.
  • You're following the default scanpy or Seurat workflow and want to keep the pipeline standard and reproducible.
  • You need consistent, stable embeddings across reruns with different random seeds.
  • You're building an interactive exploration tool where users rerun the embedding repeatedly and speed matters.

Use t-SNE when

  • You're reproducing a figure from a published paper that specifically used t-SNE.
  • Your dataset is a few thousand cells, runtime isn't a constraint, and you want the accuracy edge some benchmarks give t-SNE on ARI/NMI.
  • You're preparing a manuscript figure where reviewers expect crisp, visually separated clusters rather than continuous connectivity.
  • You're teaching or demonstrating classic nonlinear embedding behavior with well-studied perplexity dynamics.
  • You already have a validated t-SNE pipeline and switching tools would cost more in re-validation than it gains in speed.

Switching between them

Perplexity (t-SNE) and n_neighbors (UMAP) are not directly interchangeable even though both set an effective neighborhood size; perplexity is described as a continuous analog to k nearest neighbors, but the two parameters respond to dataset size differently and need separate tuning, not a 1:1 conversion. min_dist has no t-SNE equivalent: it only exists in UMAP and controls packing density, so a t-SNE pipeline moving to UMAP needs to set it explicitly rather than carry over any prior setting.

Watch the min_dist default itself: umap-learn defaults to 0.1, scanpy.tl.umap defaults to 0.5, so code moved between raw umap-learn and scanpy will produce visibly different-looking embeddings unless you set min_dist explicitly in both places and log the value. Neither method's output coordinates or distances are on a comparable scale to the other's, so don't overlay a UMAP and a t-SNE plot or compare axis values between them. Both algorithms are non-deterministic by default; fix random_state when migrating so you can tell a real embedding change from a seed change. Finally, a difference in cluster count or apparent cluster size between an old t-SNE plot and a new UMAP plot is not evidence of a biological difference; it's more likely a difference in how each algorithm distorts structure.

Pitfalls with either

  • Reading the distance between two clusters on a UMAP or t-SNE plot as a measure of biological similarity: validate any such claim with marker gene expression or a real statistical test, not the plot geometry.
  • Comparing cluster size or area across the embedding to infer cell-type abundance: cluster area is an artifact of the nonlinear projection, so get actual proportions from the count table instead.
  • Leaving scanpy's UMAP at its default min_dist=0.5 without realizing umap-learn's own default is 0.1: set min_dist explicitly and record it in your methods so results reproduce outside scanpy.
  • Running t-SNE with the default perplexity=30 on a dataset of 100,000+ cells: scale perplexity to roughly 1% of sample size and expect longer runtimes or fragmented convergence otherwise.
  • Not fixing random_state for either method and treating rerun-to-rerun layout changes as a real result change: pin a seed and note it's for reproducibility, not correctness.
  • Feeding UMAP or t-SNE coordinates into a statistical clustering step and then reporting distances or p-values from that space as meaningful: cluster in PCA or expression space (or with a graph-based method like Leiden) and use UMAP or t-SNE only for the final plot.

Questions people ask

Is UMAP or t-SNE better for single-cell RNA-seq?

For most single-cell pipelines UMAP is the practical default: it runs roughly 10-100x faster and preserves global structure 2-3x better than default t-SNE, measured by Spearman correlation of pairwise distances. t-SNE still edges out UMAP on accuracy metrics like ARI and NMI in some benchmarks, but at a much higher computational cost.

Can I trust distances between clusters in a UMAP or t-SNE plot?

No. Both methods are optimized to preserve local neighborhoods, not global distances, so two clusters that look far apart in the plot may not be biologically distinct at all. Validate any claim about relatedness with marker gene expression or a proper statistical test, never the plot geometry alone.

What is the t-SNE equivalent of UMAP's n_neighbors?

Perplexity is the closest analog: it functions as a continuous version of k nearest neighbors and is described as t-SNE's single most important parameter. It typically runs 5-50, and for datasets over 100,000 points should scale to roughly 1% of sample size to preserve more global structure.

Why does scanpy's UMAP look different from a UMAP run with default umap-learn settings?

scanpy.tl.umap defaults to min_dist=0.5, while the raw umap-learn library defaults to min_dist=0.1, and that parameter controls how tightly points pack in the embedding. Set min_dist explicitly in whichever entry point you use if you need the two to produce comparable-looking plots.

Does UMAP or t-SNE scale better to very large single-cell datasets?

UMAP scales substantially better. On standard hardware it processes about 1 million cells in roughly 3 minutes, versus roughly 45 minutes for Barnes-Hut t-SNE on the same data, and default t-SNE optimization tends to leave fragmented, poorly converged clusters above 100,000 points.

Related pages

Related reading on the blog

Sources

  1. openTSNE 1.0.0 Documentation - Parameters — Perplexity as t-SNE's key parameter, default value, and scaling guidance for large datasets
  2. UMAP: Uniform Manifold Approximation and Projection Documentation - Parameters — n_neighbors, min_dist, n_components, and metric definitions and defaults
  3. Evaluation of UMAP as an alternative to t-SNE for single-cell data — 1 million cell speed benchmark: UMAP ~3 minutes vs t-SNE Barnes-Hut ~45 minutes
  4. A Comparison for Dimensionality Reduction Methods of Single-Cell RNA-seq Data — Global structure preservation, stability, and ARI/NMI accuracy benchmark across methods
  5. Scanpy UMAP Function Documentation — scanpy's min_dist=0.5 default differs from umap-learn's 0.1 default
  6. Comparison Between UMAP and t-SNE for Multiplex-Immunofluorescence Derived Single-Cell Data — UMAP optimization strategies and early-stopping runtime savings