ArticleslgStudy

mathematics

Spectral clustering

Spectral clustering is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Spectral clustering rather than just read about it. In short: In multivariate statistics, spectral clustering techniques make use of the spectrum (eigenvalues) of the similarity matrix of the data to perform dimensionality reduction before clustering in fewer dimensions. The similarity matrix is provided as an input and consists of a quantitative assessment of the relative similarity of each pair of points in the dataset.

Spectral clustering — main illustration
Spectral clustering — illustration

Key takeaways

  • Spectral clustering belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Spectral clustering to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Spectral clustering from memory before moving on to harder problems.

Reference excerpt

In multivariate statistics, spectral clustering techniques make use of the spectrum (eigenvalues) of the similarity matrix of the data to perform dimensionality reduction before clustering in fewer dimensions. The similarity matrix is provided as an input and consists of a quantitative assessment of the relative similarity of each pair of points in the dataset. In application to image segmentation, spectral clustering is known as segmentation-based object categorization.

Definitions Given an enumerated set of data points, the similarity matrix may be defined as a symmetric matrix A, where Aij≥0 represents a measure of the similarity between data points with indices i and j. The general approach to spectral clustering is to use a standard clustering method (there are many such methods, k-means is discussed below) on relevant eigenvectors of a Laplacian matrix of A. There are many different ways to define a Laplacian which have different mathematical interpretations, and so the clustering will also have different interpretations. The eigenvectors that are relevant are the ones that correspond to several smallest eigenvalues of the Laplacian except for the smallest eigenvalue which will have a value of 0. For computational efficiency, these eigenvectors are often computed as the eigenvectors corresponding to the largest several eigenvalues of a function of the Laplacian.

Laplacian matrix

Spectral clustering is well known to relate to partitioning of a mass-spring system, where each mass is associated with a data point and each spring stiffness corresponds to a weight of an edge describing a similarity of the two related data points, as in the spring system. Specifically, the classical reference explains that the eigenvalue problem describing transversal vibration modes of a mass-spring system is exactly the same as the eigenvalue problem for the graph Laplacian matrix defined as

L:=D−A, where D is the diagonal matrix

Dii=∑jAij, and A is the adjacency matrix. The masses that are tightly connected by the springs in the mass-spring system evidently move together from the equilibrium position in low-frequency vibration modes, so that the components of the eigenvectors corresponding to the smallest eigenvalues of the graph Laplacian can be used for meaningful clustering of the masses. For example, assuming that all the springs and the masses are identical in the 2-dimensional spring system pictured, one would intuitively expect that the loosest connected masses on the right-hand side of the system would move with the largest amplitude and in the opposite direction to the rest of the masses when the system is shaken — and this expectation will be confirmed by analyzing components of the eigenvectors of the graph Laplacian corresponding to the smallest eigenvalues, i.e., the smallest vibration frequencies.

Laplacian matrix normalization The goal of normalization is making the diagonal entries of the Laplacian matrix to be all unit, also scaling off-diagonal entries correspondingly. In a weighted graph, a vertex may have a large degree because of a small number of connected edges but with large weights just as well as due to a large number of connected edges with unit weights. A popular normalized spectral clustering technique is the normalized cuts algorithm or Shi–Malik algorithm introduced by Jianbo Shi and Jitendra Malik, commonly used for image segmentation. It partitions points into two sets (B1,B2) based on the eigenvector v corresponding to the second-smallest eigenvalue of the symmetric normalized Laplacian defined as

Lnorm:=I−D−1/2AD−1/2. The vector v is also the eigenvector corresponding to the second-largest eigenvalue of the symmetrically normalized adjacency matrix D−1/2AD−1/2. The random walk (or left) normalized Laplacian is defined as

Lrw:=D−1L=I−D−1A and can also be used for spectral clustering. A mathematically equivalent algorithm takes the eigenvector u corresponding to the largest eigenvalue of the random walk normalized adjacency matrix P=D−1A. The eigenvector v of the symmetrically normalized Laplacian and the eigenvector u of the left normalized Laplacian are related by the identity D−1/2v=u.

Cluster analysis via Spectral Embedding Knowing the n-by-k matrix V of selected eigenvectors, mapping — called spectral embedding — of the original n data points is performed to a k-dimensional vector space using the rows of V. Now the analysis is reduced to clustering vectors with k components, which may be done in various ways. In the simplest case k=1, the selected single eigenvector v, called the Fiedler vector, corresponds to the second smallest eigenvalue. Using the components of v, one can place all points whose component in v is positive in the set B+ and the rest in B−, thus bi-partitioning the graph and labeling the data points with two labels. This sign-based approach follows the intuitive explanation of spectral clustering via the mass-spring model — in the low frequency vibration mode that the Fiedler vector v represents, one cluster data points identified with mutually strongly connected masses would move together in one direction, while in the complement cluster data points identified with remaining masses would move together in the opposite direction. The algorithm can be used for hierarchical clustering by repeatedly partitioning the subsets in the same fashion. In the general case k>1, any vector clustering technique can be used, e.g., DBSCAN.

… excerpt ends here. Continue reading the full article.

Illustrations

Spectral clustering: An example connected graph, with 6 vertices.
An example connected graph, with 6 vertices.
Spectral clustering: Partitioning into two connected graphs
Partitioning into two connected graphs
Spectral clustering: A 2-dimensional spring system.
A 2-dimensional spring system.

Worked examples

Example 1 — a first encounter with Spectral clustering

Start with the simplest possible case. Write down what Spectral clustering claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Spectral clustering before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Spectral clustering ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Spectral clustering

In research
Spectral clustering appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Spectral clustering in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Spectral clustering is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algebraic graph theory, Cluster analysis algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Spectral clustering outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Spectral clustering” →

How to study Spectral clustering in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Spectral clustering means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Spectral clustering out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Spectral clustering in simple terms?

In multivariate statistics, spectral clustering techniques make use of the spectrum (eigenvalues) of the similarity matrix of the data to perform dimensionality reduction before clustering in fewer dimensions. The similarity matrix is provided as an input and consists of a quantitative assessment o…

Why does Spectral clustering matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Spectral clustering?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Spectral clustering.

Tags

  • Algebraic graph theory
  • Cluster analysis algorithms

Keep exploring