Compressive Spectral Clustering
Nicolas Tremblay, Gilles Puy, Remi Gribonval, Pierre Vandergheynst
Introduction
SC is mainly used in two contexts: if the data points show particular structures (e.g., concentric circles) for which naive -means clustering fails; ) if the input data is directly a graph modeling a network (White & Smyth, 2005), such as social, neuronal, or transportation networks. SC suffers nevertheless from three main computational bottlenecks for large and/or : the creation of the similarity matrix ; the partial eigendecomposition of the graph Laplacian matrix ; and -means.
Circumventing these bottlenecks has raised a significant interest in the past decade. Several authors have proposed ideas to tackle the eigendecomposition bottleneck, e.g., via the power method (Boutsidis & Gittens, 2015; Lin & Cohen, 2010), via a careful optimisation of diagonalisation algorithms in the context of SC (Liu et al., 2007), or via matrix column-subsampling such as in the Nyström method (Fowlkes et al., 2004), the nSPEC and cSPEC methods of (Wang et al., 2009), or in (Chen & Cai, 2011; Sakai & Imiya, 2009). All these methods aim to quickly compute feature vectors, but -means is still applied on feature vectors. Other authors, inspired by research aiming at reducing k-means complexity (Jain, 2010), such as the line of work on coresets (Har-Peled & Mazumdar, 2004), have proposed to circumvent -means in high dimension by subsampling a few data points out of the available ones, applying SC on its reduced similarity graph, and interpolating the results back on the complete dataset. One can find similar methods in (Yan et al., 2009) and (Wang et al., 2009)’s eSPEC proposition, where two different interpolation methods are used. Both methods are heuristic: there is no proof that these methods approach the results of SC. Also, let us mention (Dhillon et al., 2007) that circumvents both the eigendecomposition and the -means bottlenecks: the authors reduce the graph’s size by successive aggregation of nodes, apply SC on this small graph, and propagate the results on the complete graph using kernel -means to control interpolation errors. The kernel is computed so that kernel -means and SC share the same objective function (Filippone et al., 2008). Finally, we mention works (Boutsidis et al., 2011; Cohen et al., 2015) that concentrate on reducing the feature vectors’ dimension in the -means problem, but do not sidestep the eigendecomposition nor the large issues.
2 Contribution: compressive clustering
The first ingredient builds upon recent works (Tremblay et al., 2016; Ramasamy & Madhow, 2015) that avoid the costly computation of the eigenvectors of by filtering random signals on that will then serve as feature vectors to perform clustering. We show in this paper how to incorporate the effects of non-ideal, but computationally efficient, graph filters on the quality of the feature vectors used for clustering.
The second ingredient uses a recent sampling theory of bandlimited graph-signals (Puy et al., 2015) to reduce the computational complexity of -means. Using the fact that the indicator vectors of each cluster are approximately bandlimited on , we prove that clustering a random subset of nodes of using random features vectors of size is sufficient to infer rapidly and accurately the cluster label of all nodes of the graph. Note that the complexity of -means is reduced to instead of for SC. One readily sees that this method scales easily to large datasets, as will be demonstrated on artifical and real-world datasets containing up to nodes.
The proposed compressive spectral clustering method can be summarised as follows:
generate a feature vector for each node by filtering random Gaussian signals on ;
sample nodes from the full set of nodes;
interpolate the cluster indicator vectors back to the complete graph.
Background
Let be an undirected weighted graph with the set of nodes, the set of edges, and the weighted adjacency matrix such that is the weight of the edge between nodes and .
Denote by the graph filter operator associated to .
2 Spectral clustering
We choose here Ng et al.’s method (2002) based on the normalized Laplacian as our standard SC method. The input is the adjacency matrix representing the pairwise similarity of all the objects to clusterIn network analysis, the raw data is directly . In the case where one starts with a set of data points , the first step consists in deriving from the pairwise similarities . See (von Luxburg, 2007) for several choices of similarity measure and several ways to create from the .. After computing its Laplacian , follow Alg. 1 to find classes.
Principles of CSC
Compressive spectral clustering (CSC) circumvents two of SC’s bottlenecks, the partial diagonalisation of the Laplacian and the high-dimensional -means, thanks to the following ideas.
2) Run -means on randomly selected feature vectors out of the available ones - thus clustering the corresponding nodes into groups - and interpolate the result back on the full graph. To guarantee robust reconstruction, we take advantage of our recent results on random sampling of -bandlimited graph signals. In Sec. 3.2, we explain why these results are applicable to clustering and show that it is sufficient to sample features only! Note that to cluster data into groups, one needs at least samples. This result is thus optimal up to the extra factor.
The following theorem shows that, for large enough ,
is a good estimation of with high probability.
Let and be given. If is larger than
then with probability at least , we have
The proof is provided in the supplementary material.
In Sec. 4.2, we generalize this result to the real-world case where the low-pass filter is approximated by a finite order polynomial; we also prove that, as announced in the introduction, one only needs features when using the downsampling scheme that we now detail.
2 Downsampling and interpolation
For a simple regular (with nodes of same degree) graph of disconnected clusters, it is easy to check that form a set of orthogonal eigenvectors of with eigenvalue . All indicator vectors therefore live in . For general graphs, we assume that the indicator vectors live close to , i.e., the difference between any and its orthogonal projection onto is small. Experiments in Section 5 will confirm that it is a good enough model to recover the cluster indicator vectors.
In graph signal processing words, one can say that is approximately -bandlimited, i.e., its first graph Fourier coefficients bear most of its energy. There has been recently a surge of interest around adapting classical sampling theorems to such bandlimited graph signals (Chen et al., 2015; Anis et al., 2015; Tsitsvero et al., 2015; Marques et al., 2015). We rely here on the random sampling strategy proposed in (Puy et al., 2015) to select a subset of nodes.
2.2 Sampling and interpolation
To recover from its observations , Puy et al. (2015) show that the solution to the optimisation problem
2.3 How many features to sample?
We terminate this section by providing the theoretical number of features one needs to sample in order to make sure that the indicator vectors can be faithfully recovered. This number is driven by the following quantity.
The global cumulative coherence of order of the graph is
It is shown in (Puy et al., 2015) that .
Let be a random sampling matrix constructed as in (6). For any ,
for all with probability at least provided that
The above theorem presents a sufficient condition on ensuring that satisfies the restricted isometry property (8). This condition is required to ensure that the solution of (7) is an accurate estimation of . The above theorem thus indicates that sampling features is sufficient to recover the cluster indicator vectors.
For a simple regular graph made of disconnected clusters, we have seen that up to a normalisation of the vectors. Therefore, , where is the size of the cluster. If the clusters have the same size then , the lower bound on . In this simple optimal scenario, sampling features is thus sufficient to recover the cluster indicator vectors.
The attentive reader will have noticed that for graphs where , no downsampling is possible. Yet, a simple solution exists in this situation: variable density sampling. Indeed, it is proved in (Puy et al., 2015) that, whatever the graph , there always exists an optimal sampling distribution such that samples are sufficient to satisfy Eq. (8). This distribution depends on the profile of the local cumulative coherence and can be estimated rapidly (see (Puy et al., 2015) for more details). In this paper, we only consider uniform sampling to simplify the explanations, but keep in mind that in practice results will always be improved if one uses variable density sampling. Note also that one cannot expect to sample less than nodes to find clusters. Up to the extra , our result is optimal.
CSC in practice
We have detailed the two fundamental theoretical notions supporting our algorithm, presented in Alg. 2. However, some steps in Alg. 2 still need to be clarified. In particular, Sec. 4.2 provides an extension of Theorem 3.2 that takes into account the use of a non-ideal low-pass filter (to handle the practical case where the order of the polynomial approximation is finite). This theorem in fine explains and justifies step 4 of Alg. 2. Then, in Sec. 4.3, important details are discussed such as the estimation of (step 1) and the choice of the polynomial approximation (step 2). We finish this section with complexity considerations.
2 Non-ideal filtering of random signals
where the are here Diracs in dimensions.
The normalisation of Step 4 in Alg. 2 approximates the action of in the above equation. More details and justifications are provided in the “Important remark” at the end of this section. The distance between any two features reads
Approximation error. Denote the approximation error of the ideal low-pass filter:
In the form of graph filter operators, one has
We model the error using two parameters: (resp. ) the maximal error for (resp. ). We have
The resolution parameter. In some cases, the ideal reduced spectral distance may be null. In such cases, approximating using a non-ideal filter is not possible. In fact, non-ideal filtering introduces an irreducible error on the estimation of the feature vectors that is not possible to compensate in general. We thus introduce a resolution parameter below which the distances do not need to be approximated exactly, but should remain below (up to a tolerated error).
Let be a chosen resolution parameter. For any , , if is larger than
then, for all ,
with probability at least provided that
The proof is provided in the supplementary material.
Consequence of Theorem 4.1. All distances smaller (resp. larger) than the chosen resolution parameter are estimated smaller than (resp. correctly estimated up to a relative error ). Moreover, for a fixed distance estimation error , the lower we decide to fix , the lower should also be the errors and/or to ensure that Eq. (9) still holds, which implies an increase of the order of the polynomial approximation of the ideal filter , and ultimately, that means a higher computation time for the filtering operation of the random signals.
The polynomial approximation. Theorem 4.1 uses a separate control on below (with ) and above (with ). To have such a control in practice, one would need to use rational filters (ratio of two polynomials) to approximate . Such filters have been introduced in the graph context (Shi et al., 2015), but they involve another optimisation step that would burden our main message. We prefer to simplify our analysis by using polynomials for which only the maximal error can be controlled. We write
In this easier case, one can show that Theorem 4.1 is still valid if Eq. (9) is replaced by
In our experiments, we could follow (Shuman et al., 2011) and use truncated Chebychev polynomials to approximate the ideal filter, as these polynomials are known to require a small degree to ensure a given tolerated maximal error . We prefer to follow (Napoli et al., 2013) who suggest to use Jackson-Chebychev polynomials: Chebychev polynomials to which are added damping multipliers to alleviate the unwanted Gibbs oscillations around the cut-off frequency .
The polynomial’s order . For a fixed , , and , one should use the Jackson-Chebychev polynomial of smallest order ensuring that satisfies Eq. (11), in order to optimize the computation time while making sure that Theorem 4.1 applies. Studying theoretically without computing the Laplacian’s complete spectrum (see Eq. (10)) is beyond the scope of this paper. Experimentally, yields good results (see Fig. 2c).
Estimation of . The fast filtering step is based on the polynomial approximation of , which is itself parametrized by . Unless we compute the first eigenvectors of , thereby partly loosing our efficiency edge on other methods, we cannot know the value of with infinite precision. To estimate it efficiently, we use eigencount techniques (Napoli et al., 2013): based on low-pass filtering with a cut-off frequency at of random signals, one obtains an estimation of the number of enclosed eigenvalues in the interval . Starting with and proceeding by dichotomy on , one stops the algorithm as soon as the number of enclosed eigenvalues equals . For each value of , in order to have a proper estimation of the number of enclosed eigenvalues, we choose to filter random signals with Jackson-Chebychev polynomial approximation of the ideal low-pass filters.
4 Complexity considerations
The complexity of steps 2, 3 and 5 of Alg. 2 are not detailed as they are insignificant compared to the others. First, note that fast filtering a graph signal costs .Recall that is the order of the polynomial filter. Therefore, Step 1 costs per iteration of the dichotomy, and Step 4 costs (as ). Step 7 requires to solve Eq. (7) with the polynomial approximation of . When solved, e.g., by conjugate gradient or gradient descent, this step costs a fast filtering operation per iteration of the solver and for each of the classes. Step 7 thus costs . Also, the complexity of -means to cluster feature vectors of dimension into classes is per iteration. Therefore, Step 6 with and costs . CSC’s complexity is thus In practice, we are interested in sparse graphs: . Using the fact that , CSC’s complexity simplifies to
SC’s -means step has a complexity of per iteration. In many casesRoughly, all cases for which . this sole task is more expensive than the CSC algorithm. On top of this, SC has the additional complexity of computing the first eigenvectors of , for which the cost of ARPACK - a popular eigenvalue solver - is (see, e.g., Sec. 3.2 of (Chen et al., 2011)).
This study suggests that CSC is faster than SC for large and/or . The above algorithms’ number of iterations are not taken into account as they are difficult to predict theoretically. Yet, the following experiments confirm the superiority of CSC over SC in terms of computational time.
Experiments
We first perform well-controlled experiments on the Stochastic Block Model (SBM), a model of random graphs with community structure, that was showed suitable as a benchmark for SC in (Lei & Rinaldo, 2015). We also show performance results on a large real-world network. Implementation was done in Matlab R2015a, using the built-in function kmeans with 20 replicates, and the function eigs for SC. Experiments were done on a laptop with a 2.60 GHz Intel i7 dual-core processor running OS Fedora release 22 with 16 GB of RAM. The fast filtering part of CSC uses the gspchebyop function of the GSP toolbox (Perraudin et al., 2014). Equation (7) is solved using Matlab’s gmres function. All our results are reproducible with the CSCbox downloadable at http://cscbox.gforge.inria.fr/.
What distinguishes the SBM from Erdos-Renyi graphs is that the probability of connection between two nodes and is not uniform, but depends on the community label of and . More precisely, the probability of connection between nodes and equals if they are in the same community, and if not. In a first approach, we look at graphs with communities, all of same size . Furthermore, instead of considering the probabilities, one may fully characterize a SBM by providing their ratio , as well as the average degree of the graph. The larger , the more difficult the community structure’s detection. In fact, Decelle et al. (2011) show that a critical value exists above which community detection is impossible at the large limit: .
2 Performance results
In Figs. 2 a-d), we compare the recovery performance of CSC versus SC for different parameters. The performance is measured by the Adjusted Rand similarity index (Hubert & Arabie, 1985) between the SBM’s ground truth and the obtained partitions. It varies between and . The higher it is, the better is the reconstruction. These figures show that the performance of CSC saturates at the default values of and (see top of Alg. 2). Experiments on the SBM with heterogeneous community sizes are provided in the supplementary material and show similar results.
Fig. 2 e) shows the estimation results of for different values of : it is overestimated in the SBM context. As long as the estimated value stays under , this overestimation does not have a strong impact on the method. On the other hand, as becomes larger than , our estimation of is larger than , which means that our feature vectors start to integrate some unwanted information from eigenvectors outside of . Even though the impact of this additional information is application-dependent and in some cases insignificant, further efforts to improve the estimation of would be beneficial to our method.
In Figs. 2 f-g) we fix to , and to the values given in Alg. 2, and vary and . We compare the recovery performance and the time of computation of CSC, SC and Boutsidis’ power method (Boutsidis & Gittens, 2015). The power method (PM), in a nutshell, 1) applies the Laplacian matrix to the power to random signals, 2) computes the left singular vectors of the obtained matrix, to extract feature vectors, 3) applies -means in high-dimension (like SC) with these feature vectors. In our experiments, we use . The recovery performances are nearly identical in all situations, even though CSC is only a few percents under SC and PM (Fig. f is zoomed around the high values of the recovery score). For the time of computation, the experiments confirm that all three methods are roughly linear in and polynomial in (Fig. g is plotted in log-log), with a lower exponent for CSC than for SC and PM; such that SC and PM are faster for but CSC becomes up to an order of magnitude faster as increases to 200. Note that the SBM is favorable to SC as Matlab’s function eigs converges very fast in this case, e.g., for , it finds the first eigenvectors in less than 2 minutes! PM sidesteps successfully the cost of eigs, but the cost of -means in high-dimension is still a strong bottleneck.
We finally compare CSC and SC on a real-world dataset: the Amazon co-purchasing network (Yang & Leskovec, 2015). It is an undirected connected graph comprising nodes and edges. The results are presented in Fig.2 h) for three values of . As there is no clear ground truth in this case, we use the modularity (Newman & Girvan, 2004) to measure the algorithm’s clustering performance, a well-known cost function that measures how well a given partition separates a network in different communities. Note that the 20 replicates of -means would not converge for SC with the default maximum number of iterations set to . For a fair comparison with CSC, we used only 2 replicates with a maximum number of iterations set to for SC’s -means step. We see that for the same clustering performance, CSC is much faster than SC, especially as increases. The PM algorithm on this dataset does not perform well: even though the features are estimated quickly, they apparently do not form clear classes such that its -means step takes even longer than SC’s. For the three values of , we stopped the PM algorithm after a time of computation exceeding SC’s.
Conclusion
By graph filtering random signals, we construct feature vectors whose interdistances approach the standard SC feature distances. Then, building upon compressive sensing results, we show that one can sample nodes from the set of nodes, cluster this reduced set of nodes and interpolate the result back to the whole graph. If the low-dimensional -means result is correct, i.e., if Eq. (3) is verified, we guarantee that the interpolation is a good approximation of the SC result. To improve the clustering result of the reduced set of nodes, one could consider the concept of community cores (Seifi et al., 2013). In fact, as the filtering and the low-dimensional clustering steps are fairly cheap to compute, one could repeat these steps for different random signals, keep the sets of nodes that are always classified together and use only these stable “cores” for interpolation. Our experiments show that even without such potential improvements, CSC proves efficient and accurate in synthetic and real-world datasets; and could be preferred to SC for large and/or .
Acknowledgments
This article was submitted when G. Puy was with INRIA Rennes - Bretagne Atlantique, France. This work was partly funded by the European Research Council, PLEASE project (ERC-StG-2011-277906), and by the Swiss National Science Foundation, grant 200021-154350/1 - Towards Signal Processing on Graphs.
Appendix A Proof of Theorem 3.2
where the are the standard SC feature vectors. Applying Theorem 1.1 of (Achlioptas, 2003) (an instance of the Johnson-Lindenstrauss lemma) to , the following holds. If is larger than:
then with probability at least , we have, :
As the columns of are orthonormal, we end the proof:
Appendix B Proof of Theorem 4.1
We continue the proof by bounding and separately.
Let . To bound , we set in Theorem 3.2. This proves that if is larger than
then with probability at least ,
for all . To bound , we use Theorem in (Achlioptas, 2003). This theorem proves that if , then with probability at least ,
for all . Using the union bound and (B), we deduce that, with probability at least ,
for all provided that .
Then, as is bounded by on the first eigenvalues of the spectrum and by on the remaining ones, we have
Define, for all :
Thus, the above inequality may be rewritten as:
for all , which combined with (B) yields
for all , with probability at least provided that .
Let us now separate two cases. In the case where , we have
provided that Eq. (7) of the main paper holds. Combining the last inequality with (B) proves the first part of the theorem.
In the case where , we have
provided that Eq. (7) of the main paper holds. Combining the last inequality with (B) terminates the proof. ∎
Appendix C Experiments on the SBM with heterogeneous community sizes
We perform experiments on a SBM with and hetereogeneous community sizes. More specifically, the list of community sizes is chosen to be: , , , , , , , , , , , , , , , , , , and nodes. In this scenario, there is no theoretical value of over which it is proven that recovery is impossible in the large limit. Instead, we vary between and and show the recovery performance results with respect to , , and in Fig. 2. Results are similar to the homogeneous case presented in Fig. 1(a-d) of the main paper.