When would you choose spectral clustering over k-means?

Last updated 11 November 2026

  • Choose spectral clustering when clusters are defined by connectivity, not compactness: rings, moons, manifolds, or data given only as a similarity graph.

  • Laplacian eigenvectors unroll connected structures (approximating normalized cut), where k-means' convex Voronoi boundaries fail.

  • Prefer k-means for large n (spectral costs up to O(n²) memory and O(n³) time), compact blobs, or cheap out-of-sample assignment. Spectral is also sensitive to affinity parameters.

  • https://scikit-learn.org/stable/modules/clustering.html
  • https://www.screna.ai/experience/c5c997fa-d6bb-4d4a-ae62-46437e9f991f
  • https://medium.com/@sujathamudadla1213/interview-questions-on-machine-learning-clustering-algorithms-1521dbe6a1d6
All Clustering interview questions