Spectral clustering






An example of two connected graphs


In multivariate statistics and the clustering of data, 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.




Contents






  • 1 Definitions


  • 2 Algorithms


  • 3 Relationship with k-means


  • 4 Measures to compare clusterings


  • 5 See also


  • 6 References





Definitions


Given an enumerated set of data points, the similarity matrix may be defined as a symmetric matrix A{displaystyle A}A, where Aij≥0{displaystyle A_{ij}geq 0}A_{ij}geq 0 represents a measure of the similarity between data points with indices i{displaystyle i}i and j{displaystyle j}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{displaystyle A}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 smallest several 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.


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. Specifically, the classical reference [1] 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{displaystyle L:=D-A}L:=D-A,

where D{displaystyle D}D is the diagonal matrix


Dii=∑jAij.{displaystyle D_{ii}=sum _{j}A_{ij}.}D_{ii} = sum_j A_{ij}.

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.


A popular related spectral clustering technique is the normalized cuts algorithm or Shi–Malik algorithm introduced by Jianbo Shi and Jitendra Malik,[2] commonly used for image segmentation. It partitions points into two sets (B1,B2){displaystyle (B_{1},B_{2})}(B_1,B_2) based on the eigenvector v{displaystyle v}v corresponding to the second-smallest eigenvalue of the
symmetric normalized Laplacian defined as


Lnorm:=I−D−1/2AD−1/2.{displaystyle L^{text{norm}}:=I-D^{-1/2}AD^{-1/2}.}{displaystyle L^{text{norm}}:=I-D^{-1/2}AD^{-1/2}.}

A mathematically equivalent algorithm [3] takes the eigenvector corresponding to the largest eigenvalue of the random walk normalized adjacency matrix P=D−1A{displaystyle P=D^{-1}A}P = D^{-1}A.


Knowing the eigenvectors, partitioning may be done in various ways, such as by computing the median m{displaystyle m}m of the components of the second smallest eigenvector v{displaystyle v}v, and placing all points whose component in v{displaystyle v}v is greater than m{displaystyle m}m in B1{displaystyle B_{1}}B_{1}, and the rest in B2{displaystyle B_{2}}B_{2}. The algorithm can be used for hierarchical clustering by repeatedly partitioning the subsets in this fashion.



Algorithms


If the similarity matrix A{displaystyle A}A has not already been explicitly constructed, the efficiency of spectral clustering may be improved if the solution to the corresponding eigenvalue problem is performed in a matrix-free fashion (without explicitly manipulating or even computing the similarity matrix), as in the Lanczos algorithm.


For large-sized graphs, the second eigenvalue of the (normalized) graph Laplacian matrix is often ill-conditioned, leading to slow convergence of iterative eigenvalue solvers. Preconditioning is a key technology accelerating the convergence, e.g., in the matrix-free LOBPCG method. Spectral clustering has been successfully applied on large graphs by first identifying their community structure, and then clustering communities.[4]


Spectral clustering is closely related to nonlinear dimensionality reduction, and dimension reduction techniques such as locally-linear embedding can be used to reduce errors from noise or outliers.[5]


Free software to implement spectral clustering is available in large open source projects like Scikit-learn [6] using LOBPCG with multigrid preconditioning or ARPACK, MLlib for pseudo-eigenvector clustering using the power iteration method,[7] and R.[8]



Relationship with k-means


The kernel k-means problem is an extension of the k-means problem where the input data points are mapped non-linearly into a higher-dimensional feature space via a kernel function k(xi,xj)=φT(xi)φ(xj){displaystyle k(x_{i},x_{j})=varphi ^{T}(x_{i})varphi (x_{j})}{displaystyle k(x_{i},x_{j})=varphi ^{T}(x_{i})varphi (x_{j})}. The weighted kernel k-means problem further extends this problem by defining a weight wr{displaystyle w_{r}}w_r for each cluster as the reciprocal of the number of elements in the cluster,


max{Cs}∑r=1kwr∑xi,xj∈Crk(xi,xj).{displaystyle max _{{C_{s}}}sum _{r=1}^{k}w_{r}sum _{x_{i},x_{j}in C_{r}}k(x_{i},x_{j}).}max _{{{C_{s}}}}sum _{{r=1}}^{k}w_{r}sum _{{x_{i},x_{j}in C_{r}}}k(x_{i},x_{j}).

Suppose F{displaystyle F}F is a matrix of the normalizing coefficients for each point for each cluster Fij=wr{displaystyle F_{ij}=w_{r}}F_{ij} = w_r if i,j∈Cr{displaystyle i,jin C_{r}}i,j in C_r and zero otherwise. Suppose K{displaystyle K}K is the kernel matrix for all points. The weighted kernel k-means problem with n points and k clusters is given as,


maxFtrace⁡(KF){displaystyle max _{F}operatorname {trace} (KF)}{displaystyle max _{F}operatorname {trace} (KF)}

such that



F=Gn×kGk×nT{displaystyle F=G_{ntimes k}G_{ktimes n}^{T}}{displaystyle F=G_{ntimes k}G_{ktimes n}^{T}}

GTG=I{displaystyle G^{T}G=I}<br />
G^TG = I<br />


such that rank⁡(G)=k{displaystyle operatorname {rank} (G)=k}{displaystyle operatorname {rank} (G)=k}. In addition, there are identity constrains on F{displaystyle F}F given by,


F⋅I=I{displaystyle Fcdot mathbb {I} =mathbb {I} }<br />
Fcdot mathbb{I} = mathbb{I}<br />

where I{displaystyle mathbb {I} }mathbb {I} represents a vector of ones.


FTI=I{displaystyle F^{T}mathbb {I} =mathbb {I} }<br />
F^Tmathbb{I} = mathbb{I}<br />

This problem can be recast as,


maxGtrace⁡(GTG).{displaystyle max _{G}operatorname {trace} (G^{T}G).}{displaystyle max _{G}operatorname {trace} (G^{T}G).}

This problem is equivalent to the spectral clustering problem when the identity constraints on F{displaystyle F}F are relaxed. In particular, the weighted kernel k-means problem can be reformulated as a spectral clustering (graph partitioning) problem and vice versa. The output of the algorithms are eigenvectors which do not satisfy the identity requirements for indicator variables defined by F{displaystyle F}F. Hence, post-processing of the eigenvectors is required for the equivalence between the problems.[9]
Transforming the spectral clustering problem into a weighted kernel k-means problem greatly reduces the computational burden.[10]



Measures to compare clusterings


Ravi Kannan, Santosh Vempala and Adrian Vetta[11] proposed a bicriteria measure to define the quality of a given clustering. They said that a clustering was an (α, ε)-clustering if the conductance of each cluster(in the clustering) was at least α and the weight of the inter-cluster edges was at most ε fraction of the total weight of all the edges in the graph. They also look at two approximation algorithms in the same paper.



See also



  • Affinity propagation

  • Kernel principal component analysis

  • Cluster analysis

  • Spectral graph theory



References




  1. ^ J. Demmel, [1], CS267: Notes for Lecture 23, April 9, 1999, Graph Partitioning, Part 2


  2. ^ Jianbo Shi and Jitendra Malik, "Normalized Cuts and Image Segmentation", IEEE Transactions on PAMI, Vol. 22, No. 8, Aug 2000.


  3. ^ Marina Meilă & Jianbo Shi, "Learning Segmentation by Random Walks", Neural Information Processing Systems 13 (NIPS 2000), 2001, pp. 873–879.


  4. ^ Zare, Habil; P. Shooshtari; A. Gupta; R. Brinkman (2010). "Data reduction for spectral clustering to analyze high throughput flow cytometry data". BMC Bioinformatics. 11: 403. doi:10.1186/1471-2105-11-403. PMC 2923634. PMID 20667133..mw-parser-output cite.citation{font-style:inherit}.mw-parser-output q{quotes:"""""""'""'"}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-lock-limited a,.mw-parser-output .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}


  5. ^ Arias-Castro, E. and Chen, G. and Lerman, G. (2011), "Spectral clustering based on local linear approximations.", Electronic Journal of Statistics, 5: 1537–1587, doi:10.1214/11-ejs651CS1 maint: Multiple names: authors list (link)


  6. ^ http://scikit-learn.org/stable/modules/clustering.html#spectral-clustering


  7. ^ http://spark.apache.org/docs/latest/mllib-clustering.html#power-iteration-clustering-pic


  8. ^ https://cran.r-project.org/web/packages/kernlab


  9. ^ Dhillon, I.S. and Guan, Y. and Kulis, B. (2004). "Kernel k-means: spectral clustering and normalized cuts". Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining. pp. 551–556.CS1 maint: Multiple names: authors list (link)


  10. ^ Dhillon, Inderjit; Yuqiang Guan; Brian Kulis (November 2007). "Weighted Graph Cuts without Eigenvectors: A Multilevel Approach". IEEE Transactions on Pattern Analysis and Machine Intelligence. 29 (11): 1–14. doi:10.1109/tpami.2007.1115.


  11. ^ Kannan, Ravi; Vempala, Santosh; Vetta, Adrian. "On Clusterings : Good. Bad and Spectral". Journal of the ACM. 51: 497–515. doi:10.1145/990308.990313.








Popular posts from this blog

Y

Mount Tamalpais

Indian Forest Service