Foundations to Frontier
Tests
D. Classical Machine Learning › D9 Dimensionality Reduction and Manifold Learning

Isomap

Isomap (Tenenbaum, de Silva and Langford, 2000) unrolls data lying on a curved low-dimensional manifold by replacing straight-line distances with geodesic distances: it builds a k-nearest-neighbour graph, computes shortest paths through it, and embeds those path lengths with classical MDS. On a Swiss roll, where PCA and plain MDS fold distant layers together, Isomap recovers the flat rectangle. Its guarantees assume a well-sampled, convex, isometric manifold, and its practical weak point is the neighbourhood graph: too few neighbours disconnect it, while a single edge that jumps across a fold (a short-circuit) collapses the whole embedding. This page covers geodesic approximation through graphs, the algorithm, residual variance for choosing the dimension, convergence theory, landmark Isomap, and the failure modes. In the exercises you implement Isomap with Floyd–Warshall shortest paths and recover a Swiss roll that PCA cannot; then you map how the usable range of k shrinks and vanishes as noise grows, and count the short-circuit edges responsible.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Measuring distance along the surface

Picture a rolled-up carpet. An ant on one layer and an ant on the layer just beneath are close through the air, but to meet they must walk all the way around the roll. Isomap measures distance the ant’s way. It links each data point to its nearest neighbours, measures distance by hopping along those links, and then draws a flat map that preserves those hop distances. The carpet comes out unrolled.

Isomap: unrolling the Swiss roll through a neighbour graph
2-D Isomap embedding
graph components 1 · short-circuit edges 0 · Procrustes disparity from the unrolled truth 0.007
With a moderate k the graph follows the sheet, shortest paths approximate distances along it, and the embedding is a clean rectangle with colours in order. Too small a k breaks the graph into pieces. Too large a k, or noise that brings layers closer, adds edges across the gap between layers (thick lines), and even one such short-circuit lets shortest paths cut through the roll, folding the embedding. Raise the noise and the good range of k shrinks until none is left.
Why engineers care

Many datasets have few true degrees of freedom: images of an object under changing pose, states of a robot arm, flight conditions along an envelope. Straight-line distance mixes up states that are far apart along the manifold but close in the ambient space. Isomap recovers coordinates that follow the real degrees of freedom, such as pose angles or arc length along a trajectory, which helps visualisation, interpolation and planning.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Isomap measures distance…
  2. 2. On a Swiss roll, PCA tends to…
  3. 3. An edge between two different layers of the roll is called a…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

Geodesics by hand

Straight line versus geodesic. Two opposite points on a unit circle are 2 apart in a straight line but π ≈ 3.142 apart along the circle.

The Swiss roll. The roll is the spiral (t cos t, t sin t), t from 1.5π to 4.5π, extended 21 units along its axis.

  • Each turn moves the radius out by 2π, so neighbouring layers are about 6.28 apart.
  • The length along the spiral is ½(t√(1 + t²) + asinh t), evaluated between the ends: 89.4. Unrolled, the roll is a rectangle about 89 × 21.

Shortest paths. With edges 0–1 (length 1), 1–2 (2), 2–3 (3) and 0–3 (10), the graph distance from 0 to 3 is 1 + 2 + 3 = 6. Floyd–Warshall computes all pairs in n³ steps: 125 million for n = 500. Dijkstra from every node costs about n² log n on a sparse graph.

The steps in plain English:

  1. Build a k-nearest-neighbour graph (or ε-ball graph) weighted by Euclidean distance, and symmetrise it.
  2. Check that it is connected; if not, raise k or embed the largest component.
  3. Compute all-pairs shortest-path distances G.
  4. Run classical MDS on G: double-centre G⁽²⁾ and take the top d eigenvectors scaled by √λ.
  5. Choose d from the residual variance 1 − R²(G, embedded distances) and inspect the embedding for folds.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Geodesic distance between opposite points of a circle of radius 2?
  2. 2. Isomap's last step is…
  3. 3. If the neighbour graph is disconnected…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 30 minUndergraduate students and practising engineers.

Why it works, and where it breaks

Graph distances approximate geodesics. If neighbouring samples are close compared with the manifold’s curvature, each short edge nearly equals the geodesic between its ends, so a chain of edges approximates the geodesic. Graph paths zig-zag, so they slightly overestimate. In exercise 1, the median relative error of graph distances against true distances on the unrolled sheet was 9.9%, yet the embedding was still accurate, because the overestimate is fairly uniform.

MDS of geodesics. If the manifold is isometric to a convex region of ℝᵈ (it can be flattened without stretching, and has no holes), geodesic distances equal Euclidean distances in that region. Classical MDS then recovers the flat coordinates exactly, as it does for any Euclidean distance matrix.

Exercise 1 (500-point Swiss roll, k = 5):

  • Procrustes disparity from the true unrolled coordinates (arc length, height): Isomap 0.0112, PCA 0.915;
  • residual variance for 1, 2 and 3 dimensions: 0.018, 0.0045, 0.0019.

The residual variance drops by a factor of 4 from 1 to 2 dimensions but shows no dramatic elbow. The sheet is four times longer than it is wide, so even a 1-D embedding explains 98% of the distance variance. Read residual-variance curves together with the embedding itself.

Failure modes.

  • Short-circuits: an edge that crosses between layers gives a shortcut to every path that can use it, distorting many distances at once.
  • Disconnection: too small a k fragments the graph.
  • Holes or non-convex regions: geodesics bend around a hole and are longer than straight lines in the flat parameter space, so the embedding distorts. Isomap assumes convexity.
  • Non-isometric manifolds: a stretched sheet has distorted geodesics too; conformal Isomap rescales edges by local density.
from sklearn.manifold import Isomap
Y = Isomap(n_neighbors=8, n_components=2).fit_transform(X)       # check graph connectivity and look for folds
🐍 Exercise 1: Isomap on the Swiss roll
Generate a Swiss roll with its true unrolled coordinates, build a symmetric k-NN graph, compute Floyd–Warshall shortest paths, embed them with classical MDS, and compare with PCA by Procrustes disparity; report residual variance for 1–3 dimensions.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Graph shortest paths tend to…
  2. 2. Isomap's exactness guarantee assumes the manifold is…
  3. 3. In exercise 1, Isomap's disparity versus PCA's was…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Asymptotic convergence. Bernstein, de Silva, Langford and Tenenbaum (2000) showed that if the sampling is dense enough relative to the ε-ball size and to the manifold’s minimum radius of curvature and branch separation (the smallest gap between parts of the manifold that are far apart along it), graph distances approximate geodesics within factors 1 ± λ for any λ. The conditions say precisely when short-circuits are avoided: the neighbourhood radius must be smaller than the branch separation (about 6.3 for the roll), and noise effectively shrinks that separation.

Isomap as kernel PCA. The double-centred matrix −½JG⁽²⁾J acts as a kernel. For finite samples it need not be positive semidefinite, so negative eigenvalues signal non-Euclidean geodesics. Ham et al. (2004) placed Isomap, LLE and Laplacian eigenmaps in one kernel-PCA framework.

Scaling. All-pairs shortest paths and an n × n eigendecomposition limit plain Isomap to tens of thousands of points. Landmark Isomap computes shortest paths only from m landmarks (m Dijkstra runs) and places the rest by triangulation, as in landmark MDS.

Interview questions.

  • How do you choose k? Use the smallest k that gives a connected graph, then check for short-circuits: look for edges much longer than typical, unstable embeddings when k changes by 1, or folds. Prefer stability across a range of k over a single best value.
  • Isomap or t-SNE/UMAP? Isomap preserves global geometry (distances across the whole manifold) when its assumptions hold. t-SNE and UMAP preserve local neighbourhoods and are more robust, but distort global distances.
📝 Quick check (Level 3)
0/3 answered
  1. 1. Branch separation is…
  2. 2. Landmark Isomap reduces cost by…
  3. 3. Compared with t-SNE, Isomap aims to preserve…

Level 4: Expert

★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.

How fragile is the neighbourhood graph?

History.

  • J. Tenenbaum, V. de Silva and J. Langford (2000) introduced Isomap in Science, alongside LLE in the same issue.
  • M. Bernstein et al. (2000) proved its convergence.
  • M. Balasubramanian and E. Schwartz (2002) pointed out its topological instability: short-circuits.
  • V. de Silva and J. Tenenbaum (2003) introduced landmark and conformal Isomap.

Exercise 2. A 600-point Swiss roll with Gaussian noise of s.d. 0, 0.5 or 1 in each coordinate, 2 datasets. Each cell shows the Procrustes disparity from the true unrolled coordinates, the number of graph components (the largest is embedded), and the number of short-circuit edges, which join points more than 15 apart in arc length.

noise k = 3 k = 4 k = 5 k = 6 k = 8 k = 12
0 0.094 / 2.5 / 0 0.043 / 1 / 0 0.006 / 1 / 0 0.004 / 1 / 0 0.002 / 1 / 0 0.552 / 1 / 2
0.5 0.195 / 3 / 0 0.048 / 1.5 / 0 0.011 / 1 / 0 0.005 / 1 / 0 0.518 / 1 / 1 0.907 / 1 / 12
1.0 0.676 / 2 / 2 0.743 / 1 / 5 0.822 / 1 / 9 0.833 / 1 / 13 0.962 / 1 / 32 0.961 / 1 / 96
  • The usable range of k is a window: below it the graph falls apart (2–3 components at k = 3), above it short-circuits appear.
  • Two short-circuit edges out of several thousand were enough to wreck the embedding (k = 12 without noise: disparity 0.552). At noise 0.5, about one such edge per dataset did the same at k = 8 (disparity 0.518).
  • Noise shrank the window from k = 5–8 to k = 5–6, and at noise 1 it vanished: even k = 3 had short-circuits, and no k gave a usable map. Noise of s.d. 1 per coordinate is large relative to the 6.3 gap between layers.
  • The demo, with 400 points, has an even narrower window: fewer points mean longer neighbour edges for the same k.
🐍 Exercise 2 (research): neighbourhood size, noise and short-circuits
For noisy Swiss rolls (noise 0, 0.5, 1) and k = 3 … 12, run Isomap with Dijkstra shortest paths on the largest graph component, and record the Procrustes disparity from the unrolled truth, the number of components, and the number of between-layer edges.

Isomap in AI, robotics and aerospace

  • Pose and configuration spaces: recover joint angles or viewing angles from images of a robot arm or a rotating satellite.
  • Trajectory analysis: embed flight-state samples to find the low-dimensional envelope a vehicle actually explores.
  • Sensor-network localisation: with hop counts or ranges only between nearby nodes, Isomap-style shortest paths plus MDS give approximate positions, including on non-convex deployments where straight-line estimates fail.

References

  1. J. B. Tenenbaum, V. de Silva, J. C. Langford (2000). “A global geometric framework for nonlinear dimensionality reduction.” Science 290(5500).
  2. M. Bernstein, V. de Silva, J. C. Langford, J. B. Tenenbaum (2000). “Graph approximations to geodesics on embedded manifolds.” Technical report, Stanford University.
  3. M. Balasubramanian, E. L. Schwartz (2002). “The Isomap algorithm and topological stability.” Science 295(5552).
  4. V. de Silva, J. B. Tenenbaum (2003). “Global versus local methods in nonlinear dimensionality reduction.” Advances in NeurIPS 15.
  5. J. Ham, D. D. Lee, S. Mika, B. Schölkopf (2004). “A kernel view of the dimensionality reduction of manifolds.” Proc. ICML.