Isomap, short for isometric mapping, is a nonlinear dimensionality reduction algorithm that embeds high-dimensional data in a low-dimensional space while preserving geodesic distances, the distances measured along the curved surface on which the data lie. In machine learning, it is one of the founding methods of manifold learning, introduced in 2000 by Tenenbaum, de Silva and Langford.
Isomap extends classical multidimensional scaling (MDS) by replacing straight-line Euclidean distances with shortest-path distances through a neighborhood graph. This single change lets it unroll curved structures such as the well-known Swiss roll dataset, which linear methods like principal component analysis cannot flatten.
How Isomap approximates geodesic distances
The key idea of Isomap is that local Euclidean distances are trustworthy while long-range ones are not. Two points on opposite layers of a rolled sheet may be close in the ambient space yet far apart along the sheet. Isomap therefore trusts only short hops between neighbors and chains them into paths to estimate the true distance along the manifold.
The algorithm runs in three stages, summarized in the table below together with their computational cost for n points in D dimensions.
| Stage | Operation | Typical cost |
|---|---|---|
| Neighborhood graph | Connect each point to its k nearest neighbors or all points within radius ε | O(D n log n) with tree search |
| Shortest paths | Compute all-pairs graph distances with Dijkstra or Floyd–Warshall | O(n² log n) to O(n³) |
| Classical MDS | Double-center squared distances and take top eigenvectors | O(n³) dense, less with partial solvers |
In the final stage, the matrix of squared geodesic distances is double-centered into a Gram matrix, and the eigenvectors belonging to the d largest eigenvalues, scaled by the square roots of those eigenvalues, give the d-dimensional coordinates. The eigenvalue spectrum also indicates how many dimensions are needed: a sharp drop after the second eigenvalue suggests a two-dimensional manifold.
Key parameters and their effects
Isomap has few hyperparameters, but the neighborhood size dominates the result. Too small a neighborhood breaks the graph into disconnected pieces; too large a neighborhood creates short-circuit edges that jump across folds and destroy the geodesic estimate.
| Parameter | Typical values | Effect when too small | Effect when too large |
|---|---|---|---|
| Number of neighbors k | 5 to 15 | Disconnected graph, missing points | Short circuits, folded embedding |
| Radius ε | Data-dependent | Isolated points | Edges across folds |
| Target dimension d | 2 or 3 for visualization | Lost structure | Noise dimensions retained |
| Distance metric | Euclidean, sometimes cosine | Not applicable | Not applicable |
Because Euclidean distances drive the neighborhood search, feature scaling must be applied first whenever features have different units. A practical check is to plot the residual variance of the embedding against k and d and choose the smallest setting after which the curve flattens.
Isomap compared with other manifold learning methods
Isomap is a global method: it tries to preserve all pairwise geodesic distances, not only local relations. This makes its embeddings geometrically faithful at large scale but sensitive to graph errors, whereas local methods focus on neighborhoods and are more robust to noise but may distort global layout.
| Method | What it preserves | Linearity | Out-of-sample mapping |
|---|---|---|---|
| Principal component analysis | Global variance, Euclidean distances | Linear | Exact, by projection |
| Classical MDS | Euclidean pairwise distances | Linear equivalent | Approximate |
| Isomap | Geodesic pairwise distances | Nonlinear | Landmark or Nyström extension |
| Locally linear embedding | Local linear reconstruction weights | Nonlinear | Approximate |
| Kernel PCA | Variance in a kernel feature space | Nonlinear | Exact via kernel |
| t-SNE | Local neighbor probabilities | Nonlinear | Not native |
| UMAP | Local fuzzy graph structure | Nonlinear | Supported |
Isomap can also be viewed as kernel PCA with a geodesic kernel, although the resulting matrix is not always positive semidefinite, so small negative eigenvalues are typically discarded.
Practical use and scaling
Isomap works best on data that genuinely lie on a smooth, connected, low-dimensional manifold, such as images of one object under continuous rotation, sensor readings governed by a few physical parameters, or motion-capture poses. It is used for visualization, feature extraction before clustering or regression, and for estimating the intrinsic dimension of a dataset.
The cubic cost of all-pairs shortest paths and dense eigendecomposition limits plain Isomap to roughly a few thousand to tens of thousands of points on ordinary hardware. Landmark Isomap reduces this by computing geodesic distances only to m landmarks, with m often between 50 and a few hundred, and triangulating the remaining points. Implementations such as the one in scikit-learn expose the neighbor count, path method and eigensolver as options.
Limitations and common mistakes
The theoretical guarantees of Isomap assume a manifold that is isometric to a convex region of Euclidean space. Manifolds with holes or non-convex shapes violate this, because geodesics must bend around the gap, and the embedding becomes distorted.
| Symptom | Likely cause | Fix |
|---|---|---|
| Embedding folds onto itself | Short-circuit edges | Reduce k or denoise data |
| Separate islands or missing points | Disconnected graph | Increase k or embed components separately |
| One feature dominates layout | Unscaled features | Standardize before fitting |
| Distorted boundaries | Non-convex manifold | Try locally linear embedding or UMAP |
| Run time explodes | Too many points | Use landmark Isomap or subsampling |
Isomap is also sensitive to noise and outliers, since a single noisy point bridging two layers can create a shortcut that changes many geodesic distances at once. Inspecting the neighborhood graph before trusting the embedding is a sound habit for every analysis.
In plain words
Picture an ant walking on a rolled-up carpet. Two spots may be close through the air, but the ant must walk around the whole roll to get from one to the other. Isomap measures distance the way the ant walks, not the way a bird flies.
It first links each data point only to its closest neighbors. Then it measures long distances by hopping from neighbor to neighbor. Finally it lays the carpet flat on a table while keeping those walking distances. The result is a simple flat map of complex data.
A real-world example
A robotics team records 4,000 grayscale camera images, each 64 by 64 pixels, as a robot arm rotates a part on a turntable and tilts it up and down. Each image is a point in a 4,096-dimensional space, yet only two physical angles actually change between images.
The engineers standardize the pixels, run Isomap with 8 neighbors and inspect the eigenvalues, which drop sharply after the second one. The two-dimensional embedding arranges the images in a clean grid in which one axis follows rotation and the other follows tilt, while principal component analysis on the same data produced an overlapping, curved cloud.
The team uses the Isomap coordinates as compact pose features for a simple regression model, which estimates the orientation of new parts more reliably than the raw-pixel baseline and makes failure cases easy to spot on the map.