In locally linear embedding (LLE), the weights reconstruct a point from its neighbours by minimising subject to . (a) Derive the closed-form weights using the local Gram matrix. (b) For with neighbours and , compute the weights. (c) What is the second stage of LLE, and why is regularisation needed when ?
Unsupervised learning, Isomap and LLE
Level L4 Advanced. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can solve the constrained least-squares problem for LLE weights and describe the embedding step.
Key idea
With , the weights are ; the embedding then keeps these weights and finds low-dimensional points that satisfy the same reconstructions.
Steps
- Because , we can write . So the error is .
- Minimise using a Lagrange multiplier . Setting the gradient to zero gives , so .
- The constraint fixes and gives the weights in the key idea.
- Numbers: and , so and , which sums to . So .
- Check: . This is the point on the line through and nearest to (it is perpendicular to the line direction : ). The residual is not because is not on that line.
- Stage two: keep fixed and find low-dimensional points minimising with , under centring and unit-covariance constraints. The solution is the eigenvectors of with the smallest non-zero eigenvalues. The constant eigenvector (eigenvalue ) is discarded.
- If (more neighbours than input dimensions), is singular, as the neighbours are linearly dependent, so we replace by with a small to make it invertible.
Common mistakes
- Dropping the sum-to-one constraint, which makes the weights depend on the position of the origin; it is what makes them invariant to translation.
- Choosing the smallest eigenvector of , which is the constant vector, instead of skipping it.
- Confusing LLE with Isomap: LLE preserves local reconstruction weights and never computes global distances.
How long your answer should be
One page; 8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Unsupervised learning: For a similarity graph with symmetric non-negative weights and degree matrix , let . How do you prove that , how does this show that the number of zero eigenvalues of equals the number of connected components, and why does this justify spectral clustering?
Next in Unsupervised learning: UMAP builds a weighted neighbour graph with membership strengths , where is the distance from to its nearest neighbour. (a) For a point with neighbours at distances , and , find , solve for so the strengths sum to , and give the three strengths. (b) How are directed strengths combined into an undirected weight? (c) How do UMAP and t-SNE differ?