Isomap

Also known as: isometric mapping

On this page 7

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.

StageOperationTypical cost
Neighborhood graphConnect each point to its k nearest neighbors or all points within radius εO(D n log n) with tree search
Shortest pathsCompute all-pairs graph distances with Dijkstra or Floyd–WarshallO(n² log n) to O(n³)
Classical MDSDouble-center squared distances and take top eigenvectorsO(n³) dense, less with partial solvers
The three stages of the Isomap algorithm

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.

ParameterTypical valuesEffect when too smallEffect when too large
Number of neighbors k5 to 15Disconnected graph, missing pointsShort circuits, folded embedding
Radius εData-dependentIsolated pointsEdges across folds
Target dimension d2 or 3 for visualizationLost structureNoise dimensions retained
Distance metricEuclidean, sometimes cosineNot applicableNot applicable
Main Isomap parameters

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.

MethodWhat it preservesLinearityOut-of-sample mapping
Principal component analysisGlobal variance, Euclidean distancesLinearExact, by projection
Classical MDSEuclidean pairwise distancesLinear equivalentApproximate
IsomapGeodesic pairwise distancesNonlinearLandmark or Nyström extension
Locally linear embeddingLocal linear reconstruction weightsNonlinearApproximate
Kernel PCAVariance in a kernel feature spaceNonlinearExact via kernel
t-SNELocal neighbor probabilitiesNonlinearNot native
UMAPLocal fuzzy graph structureNonlinearSupported
Isomap and related dimensionality reduction methods

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.

SymptomLikely causeFix
Embedding folds onto itselfShort-circuit edgesReduce k or denoise data
Separate islands or missing pointsDisconnected graphIncrease k or embed components separately
One feature dominates layoutUnscaled featuresStandardize before fitting
Distorted boundariesNon-convex manifoldTry locally linear embedding or UMAP
Run time explodesToo many pointsUse landmark Isomap or subsampling
Symptoms, causes and fixes

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.