What Is Manifold Learning?
- 1 day ago
- 28 min read

A single photograph of a rotating object can be stored as thousands of pixel values, yet the picture only really changes with one thing: the angle of rotation. That gap — thousands of measured numbers governed by a handful of true underlying causes — is the exact problem manifold learning was built to solve, and it shows up constantly in genomics, robotics, finance, and computer vision, wherever data science teams face more columns than they know what to do with.
TL;DR
Manifold learning is a family of nonlinear dimensionality reduction methods that assume high-dimensional data actually lies near a much lower-dimensional, curved structure.
The ambient dimension (how many features you measured) and the intrinsic dimension (how many real degrees of freedom generated the data) are usually very different numbers.
PCA is a linear baseline; Isomap, LLE, Laplacian Eigenmaps, Diffusion Maps, t-SNE, and UMAP are nonlinear methods built for curved structure.
t-SNE and UMAP are popular for visualization, but their plots are not proof of real clusters — clustering claims need a real clustering algorithm and independent checks.
No single method wins on every dataset; the right choice depends on whether you need local neighborhoods, global geometry, speed, or the ability to transform new points.
Always evaluate an embedding with a metric such as trustworthiness, not just a pretty picture.
What Is Manifold Learning?
Manifold learning is a branch of machine learning that assumes high-dimensional data lies near a lower-dimensional, curved surface called a manifold. Instead of a straight-line projection like PCA, methods such as Isomap, LLE, and UMAP try to preserve neighborhoods or geodesic distances so the true, simpler structure behind complex data becomes visible in two or three dimensions.
Table of Contents
Manifold Learning in Plain English
Manifold learning is a group of techniques inside unsupervised learning that tries to answer one question: if a dataset has hundreds or thousands of measured features, how many of those features actually carry independent information? Often the honest answer is "far fewer than you think."
A useful, concrete example is a set of photographs of the same rigid object taken from many camera angles under different lighting. Each image might be stored as tens of thousands of pixel intensities — a huge ambient dimension. But the content of every image is really controlled by just two or three real variables: the rotation angle, the tilt, and the lighting direction. The pixels are a complicated, tangled encoding of a simple underlying story.
Manifold learning methods try to undo that tangling. They take points from a high-dimensional feature space and produce a lower-dimensional coordinate system — called an embedding — that keeps the meaningful relationships between points while dropping the redundant, correlated, or noisy dimensions. A good embedding lets you see, plot, cluster, or feed into a downstream model the "real" structure that was hiding inside the raw measurements.
This is not the same as supervised learning. There are no labels involved. The algorithm only looks at how points relate to their neighbors and tries to preserve that relationship in fewer dimensions — a task closely related to representation learning more broadly.
Why High-Dimensional Data Is Difficult
"High-dimensional" simply means a dataset has many measured features per observation — a gene-expression profile with 20,000 genes, a sensor array with hundreds of channels, or an image with tens of thousands of pixels. Once you pass three dimensions, you lose the ability to plot the data directly, which is one of the most basic motivations for data visualization-oriented dimensionality reduction.
High dimensionality also causes subtler problems that matter specifically for manifold learning:
Distance concentration. As dimensionality grows, the ratio between the nearest and farthest neighbor distances tends to shrink toward one under many distance measures — part of the "curse of dimensionality." Naive distance-based reasoning gets less reliable as ambient dimension grows, which is why manifold methods rely on local neighborhoods rather than raw global distances.
Redundant and correlated features. Many measured columns move together. A temperature sensor and a nearby humidity sensor may both track the same weather pattern; that redundancy inflates the ambient dimension without adding real information.
Noise and irrelevant variation. Measurement error and irrelevant covariates add dimensions that do not correspond to any meaningful underlying factor.
Reducing dimensions can help interpretation, speed up computation, make visualization possible, support anomaly detection, and improve downstream model training. But dimensionality reduction is lossy by definition — some information is always discarded, and the central design question of any manifold-learning method is which information to keep.
What Is a Mathematical Manifold?
Intuitively, a manifold is a shape that looks flat and ordinary if you zoom in close enough, even if it is curved or twisted at a larger scale. A circle is a one-dimensional manifold: if you zoom into any small arc, it looks like a straight line segment. The surface of a sphere is a two-dimensional manifold: stand on the Earth and your local surroundings look flat, even though the whole planet is curved. This is the idea of local Euclidean structure — small neighborhoods resemble ordinary flat space, even when the global object does not.
A few concepts recur throughout manifold learning:
Ambient dimension is the number of coordinates used to describe the space the data is embedded in (for the Earth's surface, that is 3, since it sits in 3D space).
Intrinsic dimension is the number of coordinates actually needed to describe a point locally (for the Earth's surface, that is 2 — latitude and longitude).
Geodesic distance is the distance measured along the surface of the manifold, rather than the straight-line distance through the ambient space. The geodesic distance between two cities is the flight distance along the curved Earth, not a straight tunnel through the planet's interior.
Curvature describes how the manifold bends away from a flat approximation as you move away from a point.
Boundaries and disconnected components matter too: a manifold can have edges (like a sheet of paper), and a dataset can consist of several separate manifolds (for example, several distinct classes of objects, each with its own internal structure).
Manifold learning generally avoids deep differential-geometry machinery. What matters for practical purposes is simpler: nearby points in ambient space are assumed to be connected by short paths along an underlying curved structure, and the job of the algorithm is to recover coordinates that respect that structure rather than raw straight-line distances.
The Manifold Hypothesis
The manifold hypothesis is the working assumption behind this entire field: real, naturally occurring high-dimensional data — images, audio, sensor streams, biological measurements — often lies on or near a much lower-dimensional manifold embedded inside the high-dimensional measurement space, because the process that generated the data has only a few real latent variables (pose, lighting, physical state, and so on).
This is an assumption, not a guaranteed law. Several things can weaken or break it:
Noise around the manifold. Real measurements almost never sit exactly on a perfect surface; they scatter near it.
Multiple or intersecting manifolds. A dataset containing several distinct object categories may really be a union of several manifolds that touch or cross, not one single smooth surface.
Sparse or biased sampling. If some regions of the manifold are barely sampled, neighborhood-based algorithms can misjudge the true geometry.
Changing density and mixed populations. Some regions of the data may be densely sampled and others sparse, which distorts algorithms that treat density as meaningful.
Because of these caveats, treat the manifold hypothesis as a useful modeling lens for many real datasets — not an experimentally guaranteed property of any specific dataset you happen to be holding.
Linear Versus Nonlinear Dimensionality Reduction
Principal Component Analysis (PCA) is the essential baseline for any dimensionality-reduction problem. PCA finds the directions of greatest variance in the data and projects onto a smaller set of straight, orthogonal axes. It is fast, deterministic, easy to interpret, and it naturally supports transforming brand-new points after the model is fit.
The trouble is that PCA can only fold the data along flat planes. Picture a strip of paper rolled up into a spiral, sitting in three-dimensional space (a classic "Swiss roll" shape). Two points on opposite sides of the rolled paper might sit close together in straight-line distance, even though you would have to travel a long way along the paper's surface to get from one to the other. A linear projection like PCA cannot distinguish between "close along the surface" and "close because the roll happened to bring them together" — it can only measure straight-line distance, so it can overlap points that are actually far apart along the true geometry of the manifold.
Nonlinear manifold-learning methods are built to keep that distinction. Instead of preserving raw straight-line (Euclidean) distances, they try to preserve neighborhood relationships or geodesic distances measured along the estimated surface.
Aspect | PCA (linear) | Manifold learning (nonlinear) |
Structure assumed | Flat, linear subspace | Curved, locally Euclidean manifold |
What it preserves | Global variance | Local neighborhoods, geodesic distances, or topology (method-dependent) |
Interpretability | High — axes are weighted feature combinations | Usually low — axes have no direct feature meaning |
Speed | Fast, closed-form solution | Ranges from moderate to slow, method-dependent |
New-point transform | Native and efficient | Varies; some methods support it, others do not by default |
Best when | Structure is close to linear, interpretability matters, or new points arrive constantly | Structure is genuinely curved and visualization or local relationships matter most |
PCA remains the better choice whenever the underlying structure is close to linear, whenever you need to explain results in terms of original features, or whenever new observations must be transformed quickly and consistently. It is also the right first step in almost every manifold-learning workflow, since it establishes a baseline you can compare against.
How Manifold Learning Works
Most manifold-learning algorithms follow a similar general pipeline, even though the mathematical details differ sharply from one method to the next:
Represent each observation as a point $x_i \in \mathbb{R}^D$, where $D$ is the ambient dimension.
Choose a distance or similarity metric appropriate for the data (Euclidean distance is common, but not always correct).
Estimate local neighborhoods for each point, typically using a k-nearest-neighbor graph (each point connects to its $k$ closest neighbors) or a radius-neighbor graph (each point connects to all neighbors within a fixed distance).
Build a graph or similarity representation from those neighborhoods, often with weighted edges that reflect how close or similar two points are.
Decide what structure should be preserved when moving to fewer dimensions: geodesic distances, local linear relationships, graph connectivity, diffusion/random-walk behavior, or neighborhood probabilities.
Solve an eigenvalue problem or run an iterative optimization to produce low-dimensional coordinates $z_i \in \mathbb{R}^d$, where $d \ll D$.
Select the output dimension $d$ — usually 2 or 3 for visualization, or somewhat higher for feature extraction.
Evaluate whether the resulting embedding is stable, faithful to the chosen structure, and useful for the task at hand.
The neighborhood graph is the backbone of nearly every classical method. Edge weights can be binary (connected or not), based on Euclidean distance, or based on a kernel that decays smoothly with distance. Once a graph exists, algorithms differ mainly in what they compute from it: Isomap computes shortest paths across the graph to approximate geodesic distance; Laplacian Eigenmaps and Diffusion Maps build a matrix from the graph and extract its eigenvectors; LLE fits local linear weights within each neighborhood. Every one of these routes ultimately produces the same kind of output — a low-dimensional coordinate for every original point — but the geometric or probabilistic story behind that coordinate is different for each method, and that story is exactly what "preserving structure" means in each case.
Major Manifold-Learning and Neighbor-Embedding Algorithms
Multidimensional Scaling
Classical multidimensional scaling (MDS) takes a full matrix of pairwise distances (or dissimilarities) between points and finds low-dimensional coordinates that reproduce those distances as closely as possible. Metric MDS minimizes a "stress" function measuring the mismatch between original and embedded distances; non-metric MDS relaxes this to preserve distance rank order rather than exact values. MDS is a direct ancestor of Isomap — Isomap is essentially classical MDS applied to geodesic distances instead of raw Euclidean distances.
Isomap
Isomap (Isometric Mapping) was introduced by Joshua Tenenbaum, Vin de Silva, and John Langford in 2000 as a way to recover geodesic structure in curved data [1]. It works in three steps: build a neighborhood graph, compute approximate geodesic distances between all pairs of points as shortest paths through that graph, and then run classical MDS on those geodesic distances to produce the final embedding.
Isomap's central strength is capturing global geometry — it tries to preserve the overall shape of the manifold, not just local neighborhoods. Its main weaknesses are sensitivity to the neighborhood size: too few neighbors can disconnect the graph into separate pieces, while too many neighbors can create "shortcut edges" that cut across the true geometry (for example, bridging across two nearby folds of a Swiss roll) and distort the geodesic-distance estimate. Isomap also struggles with noisy data, holes in the sampling, and non-convex or disconnected manifolds.
Locally Linear Embedding
Locally Linear Embedding (LLE), introduced by Sam Roweis and Lawrence Saul in 2000 [2], takes a different local-first approach. For each point, LLE finds its nearest neighbors and computes weights that best reconstruct that point as a linear combination of those neighbors. It then searches for low-dimensional coordinates that can be reconstructed by the same weights — preserving the local linear relationships rather than the geodesic distances that Isomap targets.
LLE tends to do well on smoothly sampled, well-behaved manifolds, but it is sensitive to the choice of neighborhood size and can struggle with unevenly sampled or non-convex data, since the local reconstruction step assumes each neighborhood really is approximately linear. Important variants exist, including modified LLE, which stabilizes the weight-fitting step, Hessian LLE, which uses local Hessian estimates instead of simple reconstruction weights, and local tangent space alignment (LTSA), which aligns local tangent-space coordinates into one global embedding.
Laplacian Eigenmaps and Spectral Embedding
Laplacian Eigenmaps, introduced by Mikhail Belkin and Partha Niyogi in 2003 [3], build a similarity graph (often with a Gaussian kernel over neighbor distances) and then compute the graph Laplacian — a matrix derived from the graph that encodes how connected each point is to its neighbors. The low-dimensional embedding comes from the Laplacian's smallest nontrivial eigenvectors, chosen so that points connected by strong edges end up close together in the embedding. This is a form of spectral embedding: the term "spectral" refers to using eigenvalues and eigenvectors of a matrix derived from the data's graph structure.
Laplacian Eigenmaps emphasize local structure — points that are neighbors in the graph stay close in the embedding — but they make no explicit promise about preserving distances between points that are far apart on the manifold. Results depend heavily on how the similarity graph is built, including the kernel bandwidth and how strongly the graph is connected.
Diffusion Maps
Diffusion Maps, developed by Ronald Coifman and Stéphane Lafon and published in 2006 [4], describe relationships between points using a random walk over the data graph rather than a single fixed distance. The diffusion distance between two points reflects how likely a random walker is to move from one to the other within a chosen number of steps, called the diffusion time. Diffusion Maps are naturally multiscale: short diffusion times emphasize fine local structure, while longer diffusion times reveal coarser, more global relationships. This makes the method useful in problems where the underlying data-generating process really is dynamical — molecular simulations, single-cell trajectories, and other physical or biological systems where "how likely am I to reach that state" is a meaningful question.
t-SNE
t-distributed Stochastic Neighbor Embedding (t-SNE), introduced by Laurens van der Maaten and Geoffrey Hinton in 2008 [5], converts high-dimensional pairwise distances into probabilities of being neighbors, then tries to find a low-dimensional layout whose neighbor probabilities — computed using a heavy-tailed Student's t-distribution — match those original probabilities as closely as possible, measured with KL divergence. The heavy-tailed distribution in the low-dimensional space specifically counters the "crowding problem," where moderately distant points in high dimensions would otherwise all have to compete for the same limited amount of low-dimensional space.
Important settings include perplexity (roughly, the effective number of neighbors considered for each point), the learning rate, and the initialization (results can differ noticeably between random and PCA-based starts). Because the optimization is stochastic, different runs and different random seeds can produce visibly different layouts. t-SNE is best understood as a visualization tool that preserves local neighborhoods; the sizes of clusters, the distances between clusters, and the density of points in a t-SNE plot are not reliable indicators of the true structure and should not be interpreted as literal measurements of global distance or population size.
UMAP
Uniform Manifold Approximation and Projection (UMAP), introduced by Leland McInnes, John Healy, and James Melville in 2018 [6], is motivated by ideas from topology and builds a weighted graph representing the data's local neighborhood structure, then optimizes a low-dimensional layout so that its own weighted graph resembles the high-dimensional one as closely as possible, using a different loss than t-SNE's KL divergence. Key parameters include n_neighbors (controlling the local-versus-global balance — smaller values emphasize fine local structure, larger values emphasize broader relationships), min_dist (how tightly points are allowed to pack together in the embedding), the distance metric, the number of output components, and the random seed.
UMAP is often faster than t-SNE at scale and, depending on the implementation and fitting options used, can support transforming new points onto an existing embedding — a capability worth verifying against current official documentation for the specific implementation in use [7]. Like t-SNE, UMAP's output is sensitive to its hyperparameters and to randomness, and different settings can tell visually different stories about the same data. UMAP's plots should not be treated as an automatic clustering result — visually separated groups still need to be validated with a genuine clustering algorithm and independent evidence.
Deep and Parametric Approaches
Autoencoders learn a neural-network mapping that compresses data into a lower-dimensional bottleneck and then reconstructs it, effectively learning a nonlinear embedding as a byproduct of minimizing reconstruction error. Variational autoencoders extend this idea with a probabilistic latent space, which supports generating new samples in addition to compressing existing ones. Parametric t-SNE and related parametric embeddings train a neural network to approximate the t-SNE objective, which — unlike classical t-SNE — yields a reusable function that can map new points without recomputing the whole embedding.
The key distinction from classical manifold-learning methods is that these are parametric: once trained, the mapping is a fixed function that can be applied to new data directly, whereas most classical nonparametric methods (Isomap, LLE, Laplacian Eigenmaps, standard t-SNE) recompute relationships from the full dataset each time and require separate techniques to place new points.
Algorithm Comparison
Method | Linear/Nonlinear | Primary structure preserved | Local/Global | Best use | Main weakness | Scalability | Out-of-sample | Stochastic/Deterministic |
Linear | Variance | Global | Linear structure, preprocessing, speed | Misses curved structure | High | Native | Deterministic | |
MDS | Linear/metric | Pairwise distances | Global | Distance-based summaries | Costly at scale | Low–moderate | Limited | Deterministic |
Isomap | Nonlinear | Geodesic distance | Global | Single, well-sampled manifold | Sensitive to shortcuts, noise | Moderate | Implementation-dependent | Deterministic |
LLE | Nonlinear | Local reconstruction weights | Local | Smooth, evenly sampled manifolds | Sensitive to neighborhood size, non-convex data | Moderate | Implementation-dependent | Deterministic |
Laplacian Eigenmaps | Nonlinear | Graph adjacency/similarity | Local | Graph-like or clustered structure | No global-distance guarantee | Moderate | Implementation-dependent | Deterministic |
Diffusion Maps | Nonlinear | Diffusion/random-walk distance | Multiscale | Dynamical or connectivity-driven data | Requires tuning diffusion time | Moderate | Implementation-dependent | Deterministic |
t-SNE | Nonlinear | Local neighbor probabilities | Local | 2D/3D visualization | Global distances/cluster sizes not meaningful | Moderate (large-N variants exist) | Not native (standard form) | Stochastic |
UMAP | Nonlinear | Weighted neighbor graph/topology | Local + some global | Visualization, general nonlinear reduction | Sensitive to parameters and randomness | High | Often supported (verify implementation) | Stochastic |
Autoencoders | Nonlinear | Reconstruction fidelity | Depends on architecture | Feature learning, large datasets, downstream tasks | Needs more data/tuning, less interpretable | High | Native | Depends on training |
Treat every entry as a general tendency, not an absolute rule — actual behavior depends heavily on the specific implementation, chosen parameters, initialization, and solver.
How to Choose a Method
A practical decision guide:
Need a quick, interpretable baseline or must transform new points cheaply? Start with PCA.
Need a 2D/3D plot purely for exploration? Try UMAP or t-SNE, and run several seeds before trusting any single picture.
Care most about preserving the manifold's overall shape (global geometry)? Isomap or classical MDS are better starting points than t-SNE.
Care most about fine local neighborhoods and less about long-range distances? LLE, Laplacian Eigenmaps, t-SNE, or UMAP are reasonable choices.
Working with a very large dataset? UMAP and PCA scale better than classical Isomap, LLE, or standard t-SNE; consider approximate nearest-neighbor search and subsampling.
Data has a natural, non-Euclidean distance (e.g., string edit distance, cosine similarity for text embeddings)? Choose a method and implementation that accepts a custom distance metric.
New observations will keep arriving after training? Favor PCA, autoencoders, or an implementation of UMAP that explicitly documents a transform capability for unseen points.
Reproducibility across runs matters (e.g., for a production dashboard)? Fix random seeds, and prefer deterministic methods like PCA, MDS, Isomap, or LLE over stochastic ones like standard t-SNE.
Data is a time series or dynamical system? Diffusion Maps are purpose-built for this kind of connectivity and multiscale structure.
Preparing features for a downstream predictive model rather than a plot? Test whether the embedding actually improves validation performance versus using feature engineering or the raw features directly — a beautiful plot is not the same goal as better model training.
Practical Workflow
A responsible end-to-end manifold-learning workflow:
Clarify the actual analytical objective — visualization, feature extraction, denoising, or clustering support all call for different choices.
Inspect missing values, duplicates, outliers, and class imbalance where relevant, following good data cleaning and data quality practice.
Select meaningful features and remove ones that add noise without adding signal.
Standardize or normalize features when they are on different scales, since most distance-based methods are sensitive to feature scaling.
Choose a distance metric suited to the data type (Euclidean, cosine, or a domain-specific metric).
Establish a PCA baseline before trying anything nonlinear.
Test several neighborhood sizes and embedding dimensions rather than accepting the first result.
Repeat stochastic methods (t-SNE, UMAP) with multiple random seeds to check stability.
Inspect the neighborhood graph's connectivity — a disconnected graph is a warning sign for Isomap, LLE, and Laplacian Eigenmaps.
Compare embeddings both quantitatively (with a metric like trustworthiness) and visually.
Test downstream usefulness — does the embedding actually help a real task, such as classification accuracy or human interpretation?
Document preprocessing choices, parameters, software versions, and random seeds for reproducibility.
Preprocessing choices — scaling, metric choice, outlier handling — often have as much impact on the final result as which algorithm you pick, which is why hyperparameter tuning discipline matters just as much here as in supervised modeling.
Python Example
The following example compares a linear baseline against two nonlinear manifold-learning methods on the classic Swiss-roll dataset, using scikit-learn and NumPy. Always check current parameter names against the official documentation before relying on this in production, since APIs evolve between releases [7].
import numpy as np
from sklearn.datasets import make_swiss_roll
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
from sklearn.manifold import Isomap, LocallyLinearEmbedding, trustworthiness
# 1. Generate a synthetic Swiss-roll dataset with a known 2D intrinsic structure
X, color = make_swiss_roll(n_samples=1500, noise=0.05, random_state=42)
# 2. Scale features (important for distance-based methods)
X_scaled = StandardScaler().fit_transform(X)
# 3. Linear baseline
pca = PCA(n_components=2, random_state=42)
X_pca = pca.fit_transform(X_scaled)
# 4. Nonlinear manifold learning: Isomap (global, geodesic-distance based)
isomap = Isomap(n_neighbors=10, n_components=2)
X_isomap = isomap.fit_transform(X_scaled)
# 5. Nonlinear manifold learning: Locally Linear Embedding (local reconstruction based)
lle = LocallyLinearEmbedding(n_neighbors=10, n_components=2, method="standard", random_state=42)
X_lle = lle.fit_transform(X_scaled)
# 6. Quantitatively compare embedding quality with trustworthiness (range 0-1, higher is better)
for name, embedding in [("PCA", X_pca), ("Isomap", X_isomap), ("LLE", X_lle)]:
score = trustworthiness(X_scaled, embedding, n_neighbors=10)
print(f"{name} trustworthiness: {score:.3f}")When you inspect the resulting plots, look for whether the Swiss roll's spiral is genuinely "unrolled" into a flat rectangle (Isomap and LLE should do this reasonably well) versus PCA, which typically collapses the spiral onto itself because it cannot see the curved geometry. A compelling plot alone does not validate an embedding — always pair visual inspection with a quantitative score such as trustworthiness, and repeat with different neighborhood sizes.
An optional UMAP example requires an external package that is not part of scikit-learn:
# Optional: pip install umap-learn
import umap
reducer = umap.UMAP(n_neighbors=10, min_dist=0.1, n_components=2, random_state=42)
X_umap = reducer.fit_transform(X_scaled)Important Hyperparameters
Hyperparameter | Used in | Effect of too small | Effect of too large |
Number of neighbors ($k$) | Isomap, LLE, Laplacian Eigenmaps, UMAP | Graph fragments into disconnected pieces; local view is too narrow | Shortcut edges bridge across folds; global geometry gets distorted |
Radius (for radius-neighbor graphs) | Alternative to $k$-NN graphs | Isolated points, weak connectivity | Neighborhoods blur together, losing local detail |
Distance metric | All methods | Wrong metric misrepresents true similarity | Same |
Number of output dimensions ($d$) | All methods | Underfits true intrinsic dimension, folding structure together | Wastes capacity, harder to visualize or interpret |
Perplexity | t-SNE | Overly local, fragmented view | Overly smoothed, blurs distinct groups |
Learning rate | t-SNE, some optimizers | Slow or stuck convergence | Unstable, poor layouts |
Initialization | t-SNE, UMAP | Random start increases run-to-run variance | PCA-based start can bias toward linear structure |
min_dist | UMAP | Points pack very tightly, obscuring density | Points spread out, losing fine local detail |
Kernel width / affinity scale | Laplacian Eigenmaps, Diffusion Maps | Graph becomes too sparse or disconnected | Graph becomes nearly fully connected, losing locality |
Diffusion time | Diffusion Maps | Captures only very fine local structure | Captures only very coarse, global structure |
Random seed | Stochastic methods (t-SNE, UMAP, some solvers) | N/A | N/A — always report and fix it for reproducibility |
There is no universal "best" value for any of these settings. Treat every hyperparameter as something to sweep across a reasonable range and check for stability, rather than a fixed constant to set once.
Evaluating an Embedding
A visually appealing two-dimensional plot is not, by itself, evidence that an embedding is faithful. Several quantitative tools exist:
Trustworthiness measures whether points that appear close together in the low-dimensional embedding were actually close together in the original high-dimensional space, penalizing "false neighbors" that got pulled together by the projection. It ranges from 0 to 1, where 1 means the neighborhoods in the embedding are fully consistent with the original data — but a high score does not certify that the embedding is right for every purpose, only that it preserved local neighborhoods well. Scikit-learn implements this metric directly [7].
Continuity is the complementary measure: whether points that were close together in the original space remain close together in the embedding, penalizing neighbors that got pulled apart.
Neighborhood preservation / k-NN overlap directly compares the set of nearest neighbors before and after the embedding.
Stress (used in MDS-style evaluation) measures the mismatch between original and embedded pairwise distances.
Reconstruction error, relevant for LLE and autoencoders, measures how well local linear weights or a decoder network can rebuild the original data.
Correlation of original and embedded distances, often visualized with a Shepard diagram, shows systematically where distances are compressed or stretched.
Stability across seeds and hyperparameters: rerun stochastic methods multiple times and check whether the qualitative story (not necessarily the exact coordinates) stays consistent.
Downstream task performance: if the embedding feeds a classifier, clustering algorithm, or random forest, measure whether it actually improves that task compared with raw features or a PCA baseline.
Domain-expert validation: for scientific or business-critical use, a subject-matter expert should sanity-check whether the embedding's story matches known facts about the domain.
Match the evaluation to the actual purpose of the embedding — a metric tuned for visualization faithfulness is not automatically the right metric for judging a feature-engineering pipeline.
Common Mistakes and Misleading Interpretations
Treating every visible island in a t-SNE or UMAP plot as a real cluster. Visual separation can arise from optimization dynamics, not genuine structure. Confirm with a real clustering algorithm and independent evidence.
Interpreting blank space between groups as meaningful. Distances between separated groups in t-SNE, in particular, are not reliable measures of dissimilarity.
Comparing distances across separate t-SNE runs. Each run's coordinate system is arbitrary; absolute positions and scales are not comparable across runs.
Assuming embedding axes have direct feature meaning. Unlike PCA loadings, nonlinear manifold-learning axes usually have no simple interpretation in terms of original features.
Ignoring feature scaling before computing distances. A single unscaled feature with a large numeric range can dominate the entire neighborhood structure.
Using an inappropriate distance metric for the data type — for instance, Euclidean distance on raw categorical codes.
Choosing parameters purely because the plot "looks nice." Always cross-check with a quantitative metric like trustworthiness.
Ignoring random seeds for stochastic methods, then presenting a single favorable run as if it were the only possible outcome.
Fitting preprocessing steps (like scaling) on the entire dataset before any validation split, which can leak information and inflate apparent performance.
Using labels to silently tune an allegedly unsupervised visualization, without disclosing that labels influenced hyperparameter choices.
Ignoring disconnected neighborhood graphs, which silently break the geodesic-distance assumptions behind Isomap and similar methods.
Forgetting that class labels may not align with the dominant geometric structure the algorithm actually found.
Using only two output dimensions when the true intrinsic dimension is higher, forcing distinct structures to overlap.
Treating an embedding as lossless. Some information is always discarded; the question is whether the discarded information mattered for your task.
Assuming UMAP or t-SNE performs clustering. They reduce dimensions; clustering is a separate step performed with an actual clustering algorithm such as k-means or DBSCAN.
Presenting one favorable-looking run without any sensitivity analysis across seeds and hyperparameters.
Computational and Production Considerations
Classical manifold-learning methods that require full pairwise-distance computation or full-graph shortest paths (Isomap, MDS, standard Laplacian Eigenmaps) tend to scale poorly with sample size, since pairwise-distance matrices and all-pairs shortest-path computations grow quickly. Nearest-neighbor search is usually the main bottleneck; approximate nearest-neighbor libraries speed this up at large scale, which is part of why UMAP, built around approximate search, tends to scale better than classical Isomap or LLE.
Other practical considerations for production use:
Subsampling and landmark methods reduce cost by computing the embedding on a representative subset and then placing remaining points relative to those landmarks.
Batch effects, common in genomics and other measurement-heavy fields, can masquerade as genuine manifold structure if not corrected before embedding.
Streaming or incrementally arriving data is poorly suited to classical nonparametric methods, which generally need to see the whole dataset at once; parametric approaches like autoencoders handle this more gracefully.
Out-of-sample transformation capability differs sharply between methods and even between different software implementations of the same method — verify this against current official documentation rather than assuming it works the way an older paper or blog post describes.
Reproducibility and model persistence matter for anything beyond a one-off exploratory plot: record software versions, random seeds, and exact preprocessing steps.
Monitoring for model drift: if new data starts to differ systematically from the data an embedding or parametric mapping was fit on, its outputs may silently become unreliable.
Real-World Applications
Image and computer vision. Observations are pixel intensities or learned features; the manifold often reflects pose, lighting, and object identity.
Single-cell genomics. Observations are individual cells; dimensions are gene-expression levels, and structure often reflects developmental or cell-type trajectories.
Molecular simulations. Observations are molecular configurations; diffusion-based methods suit this well since the process really is a random walk over a physical energy landscape.
Speech and audio. Observations are spectrogram slices; structure can reflect phonetic or speaker variation, related to broader speech recognition systems.
Sensor and industrial data. Observations are readings from many sensors; a low-dimensional embedding can reveal a machine's true operating regimes.
Human motion and robotics. Observations are joint-angle or motion-capture readings; the manifold often reflects a few true controllable degrees of freedom.
Document or language embeddings. Observations are documents or tokens built from word embeddings; structure can reveal topical relationships useful for text mining and NLP.
Customer or behavioral data. Observations are users or accounts; a manifold view can support exploratory segmentation ahead of a formal clustering step.
A manifold-learning result is a hypothesis-generating tool in every one of these fields — not automatic proof of a scientifically valid discovery. Findings from an embedding should be checked against independent evidence before being treated as established fact.
Limitations and Open Questions
Manifold learning remains an active research area with real, unresolved difficulties:
Estimating intrinsic dimensionality reliably from finite, noisy samples is itself a hard statistical problem.
Noise and finite sampling mean real data is never a perfect, densely sampled manifold, which weakens the theoretical guarantees behind several classical methods.
Nonuniform density across a manifold can bias graph-based methods toward denser regions.
Multiple or intersecting manifolds and topological defects (holes, self-intersections) violate the smooth single-surface assumption several methods rely on.
Metric selection remains partly an art — the "right" distance function for a given problem is rarely obvious from the data alone.
Hyperparameter dependence across nearly every method means results can shift meaningfully with small changes in settings.
Scalability for classical methods with large sample sizes remains a genuine engineering constraint.
Out-of-sample generalization is uneven across methods and implementations.
Evaluation without ground truth is difficult outside synthetic benchmarks with known latent structure.
Reproducibility and explainability — nonlinear axes generally cannot be explained in terms of original features the way PCA loadings can.
The gap between an attractive visualization and valid scientific inference remains one of the field's most persistent and easy-to-overlook risks.
Current research continues to explore more principled ways to estimate intrinsic dimension, combine local and global structure preservation more reliably, and build parametric, out-of-sample-capable versions of classical nonparametric methods.
FAQ
What is manifold learning in simple terms?
Manifold learning is a set of techniques that assume complex, high-dimensional data is really controlled by a small number of underlying variables, arranged along a curved, lower-dimensional surface. The algorithms try to recover that simpler surface so the data becomes easier to visualize, analyze, or feed into other models.
Is manifold learning supervised or unsupervised?
Classical manifold learning is unsupervised — it uses only the relationships between data points, with no labels involved. Supervised or semi-supervised variants of some methods exist, but they are a distinct case that should be explicitly identified as such, not assumed by default.
What is the manifold hypothesis?
The manifold hypothesis is the assumption that real, naturally occurring high-dimensional data lies on or near a much lower-dimensional manifold, because the process generating the data has only a few true degrees of freedom. It is a useful modeling lens for many datasets, not a guaranteed universal property.
What is the difference between intrinsic and ambient dimension?
Ambient dimension is the number of features you actually measured. Intrinsic dimension is the smaller number of coordinates truly needed to describe the data's local structure. A photo dataset might have an ambient dimension in the tens of thousands (pixels) but an intrinsic dimension of just two or three (pose, lighting).
How is manifold learning different from PCA?
PCA is linear — it projects data onto flat, straight subspaces and preserves variance. Manifold-learning methods are nonlinear — they try to preserve local neighborhoods or geodesic distances along a curved structure that a flat projection would distort.
Is t-SNE a manifold-learning algorithm?
t-SNE is closely related to manifold learning and is often discussed alongside it, but it is primarily a visualization and neighborhood-preserving technique. Its output should not be read as a literal map of global distances, cluster sizes, or densities.
Is UMAP better than t-SNE?
Neither is universally better. UMAP often scales better and can preserve more global structure depending on settings, but both remain sensitive to hyperparameters and randomness, and neither guarantees that visual clusters are real.
Does manifold learning perform clustering?
No. Manifold-learning methods reduce dimensions; they do not assign points to groups. Apparent clusters in a 2D plot must be confirmed with an actual clustering algorithm, such as k-means, and ideally with independent evidence.
How many dimensions should an embedding use?
There is no single correct number — it depends on the estimated intrinsic dimensionality of the data and the purpose of the embedding. Two or three dimensions suit visualization; feature-engineering use cases may benefit from somewhat higher dimensions that better capture the true structure.
How should the number of neighbors be selected?
Test a range of values rather than fixing one number. Too few neighbors can fragment the neighborhood graph; too many can blur genuine local structure or introduce shortcut edges that distort geodesic-distance estimates.
Should data be scaled before manifold learning?
Yes, in most cases. Because these methods rely on distances or neighborhood relationships, features with very different numeric ranges can dominate the result unless they are standardized or normalized first, following standard feature scaling practice.
Can manifold-learning models transform new data?
It depends on the method and the specific software implementation. PCA and autoencoders naturally support this. Classical nonparametric methods like Isomap and LLE typically do not by default, and UMAP's support for new points varies by implementation and fitting configuration — always verify against current official documentation.
How can an embedding be evaluated?
Use quantitative metrics such as trustworthiness, continuity, neighborhood preservation, or stress, in addition to visual inspection. Check stability across different random seeds and hyperparameter settings, and, where possible, test whether the embedding improves a downstream task.
Why do different runs produce different plots?
Stochastic methods like t-SNE and UMAP involve random initialization and randomized optimization steps, so different runs (or different random seeds) can produce visibly different layouts even on identical data and settings.
What are the main disadvantages of manifold learning?
Sensitivity to hyperparameters and noise, limited or inconsistent support for transforming new points, difficulty evaluating results without ground truth, computational cost at scale for classical methods, and a persistent risk of over-interpreting an attractive plot as if it were proof of real structure.
When should manifold learning not be used?
When the underlying structure is approximately linear, when interpretability of axes in terms of original features is essential, when new observations must be transformed cheaply and consistently, or when the dataset is too small or too noisy to support reliable neighborhood estimation. In those cases, PCA or simpler linear methods are usually the better starting point.
Key Takeaways
Manifold learning assumes complex, high-dimensional data can often be explained by a much smaller number of true underlying variables arranged along a curved surface.
Ambient dimension (features measured) and intrinsic dimension (real degrees of freedom) are different quantities, and confusing them leads to poor modeling choices.
The manifold hypothesis is a useful assumption, not a guarantee — noise, sparse sampling, and multiple intersecting manifolds can all violate it.
PCA remains the right first step for almost every dimensionality-reduction problem, even when you expect to need a nonlinear method eventually.
Isomap, LLE, Laplacian Eigenmaps, and Diffusion Maps each preserve a different kind of structure — geodesic distance, local reconstruction weights, graph adjacency, and diffusion behavior, respectively — so "preserving structure" always needs to specify which structure.
t-SNE and UMAP are powerful visualization tools, but cluster sizes, densities, and inter-cluster distances in their plots are not reliable measurements and must not be treated as proof of natural categories.
No single algorithm is best for every dataset; the right choice depends on whether local neighborhoods, global geometry, speed, interpretability, or out-of-sample transformation matters most.
Always evaluate an embedding quantitatively — with trustworthiness, continuity, or downstream task performance — rather than relying on visual impression alone.
Random seeds, neighborhood size, and other hyperparameters can materially change results, so stability checks across multiple settings are essential before trusting any single embedding.
Actionable Next Steps
Clarify whether your goal is visualization, feature extraction, denoising, or clustering support — the right method depends on the answer.
Build a PCA baseline before trying any nonlinear method.
Scale or normalize your features appropriately for the distance metric you plan to use.
Test at least two nonlinear methods (for example, Isomap and UMAP) rather than committing to one immediately.
Sweep neighborhood-size and dimensionality parameters across a reasonable range instead of guessing a single value.
Repeat stochastic methods (t-SNE, UMAP) with multiple random seeds and compare the resulting layouts for stability.
Measure embedding quality quantitatively with trustworthiness or a similar neighborhood-preservation metric.
Test whether the embedding genuinely improves a downstream task before adopting it in production.
Record your preprocessing steps, chosen parameters, software versions, and random seeds for reproducibility.
Glossary
Affinity matrix: A matrix recording how similar or connected each pair of points is, often used as the input to spectral or graph-based methods.
Ambient dimension: The number of features actually measured for each observation.
Curse of dimensionality: The set of problems that arise as dimensionality grows, including distance concentration and increasing data sparsity.
Diffusion distance: A measure of relatedness between points based on the probability of a random walk moving from one to the other over a chosen number of steps.
Dimensionality reduction: Any technique that represents data using fewer coordinates than the original number of measured features. See dimensionality reduction.
Distance metric: A function that quantifies how far apart two points are, such as Euclidean or cosine distance.
Eigenvector: A special vector associated with a matrix that only changes in scale (not direction) when that matrix is applied to it; eigenvectors of graph-derived matrices underlie spectral embedding methods.
Embedding: The lower-dimensional coordinate representation produced by a dimensionality-reduction method.
Geodesic distance: The distance measured along the surface of a manifold, rather than a straight line through the space it sits in.
Graph Laplacian: A matrix built from a similarity graph that encodes connectivity, used to compute spectral embeddings such as Laplacian Eigenmaps.
Intrinsic dimension: The smallest number of coordinates genuinely needed to describe a dataset's local structure.
Latent variable: An underlying, often unobserved, factor that helps generate the observed data. See latent space.
Local neighborhood: The set of points closest to a given point, used as the basic building block of most manifold-learning algorithms.
Manifold: A shape that looks locally like ordinary flat (Euclidean) space, even if it is globally curved.
Manifold hypothesis: The assumption that real, high-dimensional data often lies near a much lower-dimensional manifold.
Neighborhood graph: A graph connecting each data point to its nearest neighbors, forming the structural basis for most manifold-learning methods.
Nonlinear dimensionality reduction: Dimensionality reduction that allows curved, non-flat structure to be preserved, as opposed to linear methods like PCA.
Out-of-sample transformation: The ability of a fitted model to place new, previously unseen points into an existing embedding.
Perplexity: A t-SNE parameter that roughly controls the effective number of neighbors considered for each point.
Spectral method: Any technique that derives its result from the eigenvalues and eigenvectors of a matrix built from the data, such as a graph Laplacian or affinity matrix.
Stress: A measure of how well an embedding reproduces the original pairwise distances, used to evaluate MDS-style embeddings.
Trustworthiness: A metric, ranging from 0 to 1, that measures whether neighbors in a low-dimensional embedding were genuinely close together in the original high-dimensional data.
Sources & References
[1] Tenenbaum, J. B., de Silva, V., & Langford, J. C. "A Global Geometric Framework for Nonlinear Dimensionality Reduction." Science, vol. 290, no. 5500, 2000, pp. 2319–2323. DOI: 10.1126/science.290.5500.2319. https://www.science.org/doi/10.1126/science.290.5500.2319
[2] Roweis, S. T., & Saul, L. K. "Nonlinear Dimensionality Reduction by Locally Linear Embedding." Science, vol. 290, no. 5500, 2000, pp. 2323–2326. https://www.science.org/doi/10.1126/science.290.5500.2323
[3] Belkin, M., & Niyogi, P. "Laplacian Eigenmaps for Dimensionality Reduction and Data Representation." Neural Computation, vol. 15, no. 6, 2003, pp. 1373–1396. https://direct.mit.edu/neco/article/15/6/1373/6693/Laplacian-Eigenmaps-for-Dimensionality-Reduction
[4] Coifman, R. R., & Lafon, S. "Diffusion Maps." Applied and Computational Harmonic Analysis, vol. 21, no. 1, 2006, pp. 5–30. DOI: 10.1016/j.acha.2006.04.006. https://www.sciencedirect.com/science/article/pii/S1063520306000546
[5] van der Maaten, L., & Hinton, G. "Visualizing Data Using t-SNE." Journal of Machine Learning Research, vol. 9, 2008, pp. 2579–2605. https://www.jmlr.org/papers/v9/vandermaaten08a.html
[6] McInnes, L., Healy, J., & Melville, J. "UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction." arXiv:1802.03426, 2018 (revised 2020). https://arxiv.org/abs/1802.03426
[7] scikit-learn developers. "2.2. Manifold Learning." scikit-learn Documentation, n.d. Accessed July 19, 2026. https://scikit-learn.org/stable/modules/manifold.html
[8] scikit-learn developers. "sklearn.manifold.trustworthiness." scikit-learn API Reference, n.d. Accessed July 19, 2026. https://scikit-learn.org/stable/modules/generated/sklearn.manifold.trustworthiness.html
[9] scikit-learn developers. "sklearn.manifold.Isomap." scikit-learn API Reference, n.d. Accessed July 19, 2026. https://scikit-learn.org/stable/modules/generated/sklearn.manifold.Isomap.html
[10] scikit-learn developers. "sklearn.manifold.LocallyLinearEmbedding." scikit-learn API Reference, n.d. Accessed July 19, 2026. https://scikit-learn.org/stable/modules/generated/sklearn.manifold.LocallyLinearEmbedding.html
[11] McInnes, L., Healy, J., & Saul, N. "UMAP: Uniform Manifold Approximation and Projection." UMAP Documentation, n.d. Accessed July 19, 2026. https://umap-learn.readthedocs.io/en/latest/
[12] van der Maaten, L., Postma, E., & van den Herik, J. "Dimensionality Reduction: A Comparative Review." Tilburg University Technical Report, TiCC TR 2009-005, 2009. https://lvdmaaten.github.io/publications/papers/TR_Dimensionality_Reduction_Review_2009.pdf


