Improved Graph Clustering
Yudong Chen, Sujay Sanghavi, Huan Xu
I Introduction
This paper proposes a new algorithm for the following task: given an undirected unweighted graph, assign the nodes into disjoint clusters so that the density of edges within clusters is higher than the edge density across clusters. Clustering arises in applications such as a community detection, user profiling, link prediction, collaborative filtering etc. In these applications, one is often given as input a set of similarity relationships (either “1” or “0”) and the goal is to identify groups of similar objects. For example, given the friendship relations on Facebook, one would like to detect tightly connected communities, which is useful for subsequent tasks like customized recommendation and advertisement.
Graphs in modern applications have several characteristics that complicate graph clustering:
Small density gap: the edge density across clusters is only a small additive or multiplicative factor different from within clusters;
Sparsity: the graph is overall very sparse even within clusters;
High dimensionality: the number of clusters may grow unbounded as a function of the number of nodes , which means the sizes of the clusters can be vanishingly small compared to ;
Unaffiliated nodes: there may exist a large number of nodes that do not belong to any clusters and are loosely connected to the rest of the graph;
Heterogeneity: the cluster sizes, node degrees and edge densities may be non-uniform across the graph; edge connections may not be well-modeled by a probabilistic distribution, and there may exist hierarchical cluster structures.
Various large modern datasets and graphs have such characteristics ; examples include the web graph and social graphs of various social networks etc. As has been well-recognized, these characteristics make clustering more difficult. When the in-cluster and across-cluster edge densities are close or there are many unstructured unaffiliated nodes, the clustering structure is less significant and thus harder to detect. Sparsity further reduces the amount of information and makes the problem noisier. In the high dimensional regime, there are many small clusters, which are easy to lose in the noise. Heterogeneous and non-random structures in the graphs foil many algorithms that otherwise perform well; for example, conventional spectral clustering methods are often known to be not robust to heterogeneity in the graphs . Finally, the existence of hierarchical structures and unaffiliated nodes renders many existing algorithms and theoretical results inapplicable, as they fix the number of clusters a priori and force each node to be assigned to a cluster. It is desirable to design an algorithm that can handle all these issues in a principled manner.
Our algorithmic contribution is a new method for unweighted graph clustering. It is motivated by the maximum-likelihood estimator for the classical Stochastic Blockmodel (also known as the Planted Partition Model ) for random clustered graphs. In particular, we show that this maximum-likelihood estimator can be written as a linear objective over combinatorial constraints; our algorithm is a convex relaxation of these constraints, yielding a convex program overall. While this is the motivation, it performs well—both in theory and empirically—in settings that are not just the standard stochastic blockmodel.
Our main analytical result in this paper is theoretical guarantees on our algorithm’s performance; we study it in a semi-random generalized stochastic blockmodel. This model generalizes not only the standard stochastic blockmodel and planted partition model, but many other classical planted models including planted -disjoint-cliques , planted dense subgraph , planted coloring and their semi-random variants . Our main result gives the conditions (as a function of the in/cross-cluster edge densities and , the density gap , the minimum cluster size and the total number of nodes ) under which our algorithm is guaranteed to recover the ground-truth clustering. When , the key condition reads
here all the parameters are allowed to scale with . Note that the condition does not depend explicitly on the number of unaffiliated nodes or the number of clusters. An analogous result holds for .
While the planted and stochastic block models have a rich literature, this single result shows that the performance of our algorithm matches all existing methods (up to at most logarithmic factors) in exact recovery; moreover, in the cases of the standard planted partition/-disjoint-cliques/noisy-coloring models with general scaling of and , we achieve order-wise improvement over existing methods, in the sense that our algorithm succeeds for a much larger range of the parameters. In fact, there is evidence indicating that we are close to the boundary at which any polynomial-time algorithm can be expected to work. The proof for our main theorem is relatively simple, relying only on standard concentration results. Our simulation study supports our theoretic finding, that the proposed method is effective in clustering noisy graphs and outperforms existing methods.
The rest of the paper is organized as follows: Section I-B provides an overview of related work; Section II presents our algorithm; Section III describes the Semi-Random Generalized Stochastic Blockmodel, which is a generalization of the standard stochastic blockmodel, one that allows the modeling of the issues mentioned above; Section IV presents the main results—a performance analysis of our algorithm for the semi-random generalized stochastic blockmodel, and provides a detailed comparison to the existing literature and a discussion of the implications for different special cases; Section V provides simulation results; the proofs of our theoretic results are given in Sections VI to IX; the paper concludes with a discussion in Section X
I-B Related Work
The general field of clustering, or even graph clustering, is too vast for a detailed survey here; we focus on the most related threads, and therein too primarily on work which provides analytical guarantees on the resulting algorithms.
Also called “planted models” , these are arguably the most natural random clustered graph models. In the simplest or standard setting, nodes are partitioned into disjoint subsets of equal size (called the true clusters), and then edges are generated independently and at random, with the probability of an edge between two nodes in the same cluster higher than the probability for two nodes in different clusters. The task is to recover the true clusters given the graph. The parameters and typically govern whether an algorithm succeeds in recovery or not.
There is now a long line of analytical work on stochastic block models; we focus on methods that allow for exact recovery (i.e., every node is correctly classified), and summarize the conditions required by known methods in Table I. As can be seen, we improve over existing methods by polynomial factors for general values of —in particular, when the cluster size satisfies for any constant (which means the number of clusters is growing at the rate .) Our comparison focuses on polynomial factors and the setting with general values of . We note that in the special case of , some existing results (e.g.,) are better then ours by logarithmic factors. In addition, as opposed to several of these methods, our method can handle unaffiliated nodes, heterogeneity, hierarchy in clustering etc, and apply to other models including planted clique and planted noisy coloring.
A complimentary line of work has investigated lower bounds for the stochastic blockmodel; i.e., for what values/scalings of and it is not possible (either for any algorithm, or for any polynomial-time algorithm) to recover the underlying true clusters . We discuss and compare with these two lines of work in more details in the main results section.
I-B2 Convex methods for matrix decomposition
Our method is related to recent literature on the recovery of low-rank matrices using convex optimization, and in particular the recovery of such matrices from “sparse” perturbations (i.e., where a fraction of the elements of the low-rank matrix are possibly arbitrarily modified, while others are untouched). Sparse and low-rank matrix decomposition using convex optimization was initiated by ; follow-up works have the current state-of-the-art guarantees on this problem, and applies it directly to graph clustering.
The method in this paper is Maximum Likelihood, but it can also be viewed as a weighted version of sparse and low-rank matrix decomposition, with different elements of the sparse part penalized differently, based on the given input graph. There is currently little work or analysis on weighted matrix decomposition; in that sense, while our weights have a natural motivation in our setting, our recovery results are likely to have broader implications, for example robust versions of PCA when not all errors are created equal but have a corresponding prior.
II Algorithm
We now describe our algorithm. As mentioned, it is a convex relaxation of the Maximum Likelihood (ML) estimator as applied to the standard stochastic blockmodel. So, in what follows, we first develop notation and the exact ML estimator, and then its relaxation.
We notice that this can be written, via a re-arrangement of terms, as
where collects the terms that are independent of . The ML estimator would be maximizing the above expression subject to being a cluster matrix. While the objective is a linear function of , this optimization problem is combinatorial due to the requirement that be a cluster matrix (i.e., block-diagonal with each block being all-ones), and is intractable in general.
Our algorithm: We obtain a convex and tractable algorithm by replacing the constraint “ is a cluster matrix” with (i) the constraints for all pairs , and (ii) a nuclear norm The nuclear norm of a matrix is the sum of its singular values. regularizer in the objective. The latter encourages to be low-rank, and is based on the well-established insight that a cluster matrix has low rank—in particular, its rank equals the number of clusters. (We discuss other related relaxations later in this section.)
Also notice that the likelihood expression (2) is linear in and only the ratio of the two coefficients and is important. We therefore introduce a parameter which allows us to choose any ratio. This has the advantage that instead of knowing both and , we only need to choose one number (which should be between and ; we remark on how to choose later). This leads to the following convex formulation:
where the weights and are given by
Here the factor balances the contributions of the nuclear norm and the likelihood; the specific values of this factor as well as of and are derived from our analysis (cf. Section VII-E). The optimization problem (3)–(4) is convex and can be cast as a Semidefinite Program (SDP) . More importantly, it can be solved using efficient first-order methods for large graphs (see Section V-A).
Our algorithm is given as Algorithm 1. Depending on the given and the choice of , the optimal solution may or may not be a cluster matrix. Checking if a given is a cluster matrix can be done easily, e.g., via an SVD, which will also reveal the cluster memberships if it is a cluster matrix. If it is not, any one of several rounding/aggregation ideas (e.g., the one in ) can be used empirically; we do not delve into this approach in this paper, and simply output failure. In Section IV we provide sufficient conditions under which is guaranteed to be a cluster matrix, with no rounding required.
Note that while we derive our algorithm from the standard stochastic blockmodel, our analytical results hold in a much more general setting. In practice, one could execute the algorithm (with appropriate choice of , and hence and ) on any given graph.
The formulation (3)–(4) is not the only way to relax the non-convex ML estimator. Instead of the nuclear norm regularizer, a hard constraint may be used. One may further replace this constraint with the positive semidefinite constraint and the linear constraints , both satisfied by any cluster matrix. The constraints are satisfied when there is no unaffiliated node. It is not hard to check that these modifications lead to convex relaxations with smaller feasible sets, so any performance guarantee for our formulation (3)–(4) also applies to these alternative formulations. We choose to focus on our original formulation based on the following theoretical and practical considerations: a) Its performance guarantees apply to the other tighter relaxations as well. b) We do not obtain order-wise better theoretical guarantees with these alternative formulations. The work considers these tighter relaxations but does not obtain better exact recovery guarantees than ours. In fact, as we argue in the next section, our guarantees are likely to be order-wise optimal and thus any alternative convex formulations are unlikely to provide significant improvements in a scaling sense. c) Our simpler formulation facilitates efficient solution for large graphs via first-order methods; we describe one such method in Section V-A.
Choice of tt
Our algorithm requires an extraneous input . For the standard planted -disjoint-cliques problem (with disjoint cliques planted in a random graph ), one can use (see Section IV-C2). For the standard stochastic blockmodel (with nodes partitioned into equal-size clusters and edge probabilities being uniformly and inside and across clusters), the value of can be determined from the data (see Section IV-D). In these cases, our algorithm has no tuning parameters whatsoever and does not require knowledge of the number or sizes of the clusters. For the general setting, should be chosen to lie between and , which now represent the lower/upper bounds for the in/cross-cluster edge densities. As such, can be interpreted as the resolution of the clustering algorithm. To see this, suppose the clusters have a hierarchical structure, where each big cluster is partitioned into smaller sub-clusters with higher edge densities inside. In this case, either level of the clusters, the top-level big ones or the bottom-level small ones, can be considered as the ground truth, and it is a priori not clear which of them should be recovered. This ambiguity is resolved by specifying : our algorithm recovers those clusters with in-cluster edge density higher than and cross-cluster density lower than . With a larger , the algorithm operates at a higher resolution and detects small clusters with high density. By varying , our algorithm can be turned into a method for multi-resolution clustering which explores all levels of the cluster hierarchy. We leave this to future work. Importantly, the above example shows that it is generally impossible to uniquely determine the value of from data.
III The Generalized Stochastic Blockmodel
While our algorithm above is derived as a relaxation of ML estimator for the standard stochastic blockmodel, we establish performance guarantees in a much more general setting. The model is described below, which is defined by six parameters , , , , and .
The nodes are divided into two sets and . The nodes in are further partitioned into disjoint sets, which we will refer to as the “true” clusters. Let be the minimum size of a true cluster. If , consider a random graph generated as follows: For every pair of nodes that belong to the same true cluster, edge is present in the graph with probability that is at least , while for every pair where the nodes are in different clusters the edge is present with probability at most . The other nodes in are not in any cluster (we will call them unaffiliated nodes); for each and , there is an edge between the pair with probability at most . If , then the graph is generated similarly as above, except that the probability of an in-cluster edge is at most , while the probability of other edges is at least . Note that it is implicit that , and .
On a graph generated from GSBM with (, resp.), an adversary is allowed to arbitrarily (a) add (remove, resp.) edges between pairs of nodes in the same true cluster, and (b) remove (add, resp.) edges between pairs of nodes if they are in different clusters, or if at least one of them is an unaffiliated node in .
The objective is to find the underlying true clusters, given the graph generated from the semi-random GSBM.
The standard stochastic blockmodel/planted partition model is a special case of GSBM with , all cluster sizes equal to , and all in-cluster and cross-cluster probabilities equal to and , respectively. GSBM generalizes the standard models as it allows for heterogeneity in the graph:
and are lower and upper bounds instead of exact edge probabilities, so nodes can have different degrees; there may also exist nested clusters (cf. Section II-A).
is also a lower bound, so clusters can have different sizes.
Unaffiliated nodes (nodes not in any cluster) are allowed.
GSBM removes many restrictions in the standard planted models and better models practical graphs.
The semi-random GSBM allows for further modeling power. It blends the worst case models, which are often overly pessimistic, For example, the minimum graph bisection problem is NP-hard. and the purely random graphs, which are extremely unstructured and have very special properties usually not possessed by real-world graphs . This semi-random framework has been used and studied extensively in the computer science literature as a better model for real-world networks , as it allows for non-randomness in a graph. Note that the term “adversary” means arbitrary deviation from the random model (as long as it is allowed by the semi-random model), and it covers, but is not limited to, adversarial deviation. At first glance, the adversary seems to make the problem easier as it adds in-cluster edges and removes cross-cluster edges (when ). This is not necessarily the case. The adversary can significantly change some statistical properties of the random graph (e.g., alter spectral structure and node degrees, and create local optima by adding dense spots ), and foil algorithms that over-exploit such properties. For example, some spectral algorithms that work well on random models are proved to fail in the semi-random setting . An algorithm that works well in the semi-random setting is likely to be more robust to model mis-specification in real-world applications . As shown later, our algorithm processes this desired property.
GSBM recovers as special cases many classical and widely studied models for clustered graphs, by considering different values for the parameters , , , , and . We classify these models into two categories based on the relation between and .
: GSBM with models homophily, the tendency that individuals belonging to the same community tend to connect more than those in different communities. Special cases include:
Planted Clique : , (so ) and ;
Planted -Disjoint-Cliques : and ;
Planted Dense Subgraph : , and ;
Stochastic Blockmodel, Planted Partition : , with all cluster sizes equal to . The special case with can be call the Planted Bisection Model .
: This is complementary to the homophily case above. Special cases include:
Planted Coloring : , , and ;
Planted -Cut, Planted Noisy Coloring : , , and .
Recall that the max-clique, max-cut, graph partition and graph coloring problems are all NP-hard in the worst case . The above “planted” variants of these problems are standard models for studying their average-case behavior.
In the next section, we provide performance guarantees for our algorithm under the semi-random GSBM. This implies guarantees for all the special cases above. We provide a detailed comparison with literature after presenting our results.
IV Main Results: Performance Guarantees
In this section we study the performance of our algorithm under the semi-random GSBM and provide theoretical guarantees. We give a unified theorem, and then discuss its consequences for various special cases, and compare with literature. We also discuss how to estimate the parameter in the special case of the standard stochastic blockmodel. We shall first consider the case with . The case is similar and is discussed in Section IV-C3. All proofs are postponed to Sections VI to IX.
Our optimization-based algorithm has a nice monotone property: adding/removing edges “aligned with” the optimal (as is done by the adversary under the semi-random setting) cannot result in a different optimal solution. This is summarized in the following lemma.
Suppose and is the unique optimal solution of (3)–(4) for a given and . If now we arbitrarily change some edges of to obtain , by (a) choosing some edges such that but , and making , and (b) choosing some edges where but , and making Then, is also the unique optimal solution of (3)–(4) with as the input and the same .
The lemma shows that our algorithm is inherently robust under the semi-random model. In particular, the algorithm succeeds in recovering the true clusters on the semi-random GSBM as long as it succeeds on the GSBM with the same parameters. In the sequel, we therefore focus solely on the GSBM, with the understanding that any guarantee for it immediately implies a guarantee for the semi-random variant.
IV-B Main Theorem
Let be the matrix corresponding to the true clusters in the GSBM, i.e., if and only if and they are in the same true cluster, and 0 otherwise. The theorem below establishes conditions under which our algorithm, specifically the convex program (3)–(4), yields this as the unique optimal solution with high probability (without any further need for rounding etc.).
Suppose the graph is generated according to the GSBM with . If in (5) is chosen to satisfy
then is the unique optimal solution to the convex program (3)–(4) with probability at least provided
where is an absolute constant independent of and .
Our theorem quantifies the tradeoff between the four parameters governing the hardness of GSBM—the minimum in-cluster edge density , the maximum across-cluster density , the minimum cluster size and the number of unaffiliated nodes —required for our algorithm to succeed, i.e., to recover the underlying true clustering without any error. Note that we can handle any values of and as long as they satisfy the condition in the theorem; in particular, they are allowed to scale with . Interestingly, the theorem does not have an explicit dependence on the number of clusters (except for the requirement ). We note that by using a slightly stronger version of the spectral bound in Lemma 4 in the appendix (see e.g., ), it is possible to improve the factor in (7) to . We omit such logarithmic improvement for reasons of space.
We now discuss the tightness of Theorem 1 in terms of these model parameters. When the minimum cluster size , we have a near-matching converse result.
Suppose all clusters have equal size , and the in-cluster (cross-cluster, resp.) edge probabilities are uniformly (, resp.), with and . Under GSBM with and sufficiently large, for any algorithm to correctly recover the clusters with probability at least , we must have
This theorem gives a necessary condition for any algorithm to succeed regardless of its computational complexity. It shows that Theorem 1 is optimal up to logarithmic factors for all values of and when .
For smaller values of the minimum cluster size , Theorem 1 requires to be since the left hand side of (7) is less than . This lower-bound is achieved when and are both constants independent of and . There are reasons to believe that this requirement is unlikely to be improvable using polynomial-time algorithms. Indeed, the special case with and corresponds to the classical planted clique problem ; finding a clique of size is widely believed to be computationally hard even on average and has been used as a hard problem for cryptographic applications .
For other values of and , no general and rigorous converse result exists. However, there is evidence suggesting that no other polynomial-time algorithm is likely to have better guarantees than our result in (7). The authors of show, using non-rigorous but deep arguments from statistical physics, that recovering the clustering is impossible in polynomial time if . Moreover, the work in shows that a large class of spectral algorithms fail under similar conditions. In view of these results, it is possible that our algorithm is order-wise optimal with respect to all polynomial-time algorithms for all values of , and .
We give several further remarks regarding Theorem 1.
A nice feature of our result is that we only need to be large as compared to ; several other existing results (see Table I) require a lower bound (as a function of and ) on itself. When is , we allow and to be as small as .
The number of clusters is allowed to grow rapidly with —sometimes called the high-dimensional setting . In particular, our algorithm can recover up to equal-sized clusters when . Any algorithm with a better scaling would recover cliques of size , an unlikely task in polynomial time in light of the hardness of the planted clique problem discussed above.
The number of unaffiliated nodes can be large, as many as , which is attained when are and the clusters have equal size. In other words, almost all the nodes can be unaffiliated, and this is true even when there are multiple clusters that are not cliques (i.e., ).
Not all existing methods can handle non-uniform edge probabilities and node degrees, which often require special treatment (see e.g., ). This issue is addressed seamlessly by our method by definition of GSBM.
IV-C Consequences and Comparison with Literature
In this subsection we discuss the consequences of Theorem 1 for specific planted problems and compare with existing work. Our results match the best existing results in all cases (up to logarithmic factors), and in many important settings lead to order-wise stronger guarantees.
This model assumes that all clusters have the same size with no unaffiliated nodes () and . We compared our result to past approaches and theoretical results in Table I: For general values of and , our result has the scaling and , which improves on all existing results by polynomial factors. This means that we can handle much noisier and sparser graphs, especially when the number of clusters is growing.
IV-C2 Planted rr-Disjoint-Cliques Problem
Here the task is to find a set of disjoint cliques, each of size at least , that have been planted in an Erdos-Renyi random graphs . Setting in Theorem 1, we obtain the following guarantee for this problem.
For the planted -disjoint-cliques problem, the formulation (3)-(5) with chosen according to Theorem 1 finds the hidden cliques with probability at least provided
In the regime where is allowed to scale with and is bounded away from zero, the best previous results are given in with and in with . Corollary 1 is stronger than both of them for large . In the special case with and , which is the standard planted clique problem, the corollary guarantees recovery for the clique size , matching the best known bound .
IV-C3 The p<qp<q Case
Given a graph generated from the semi-random GSBM with in/cross-cluster densities , we can run our algorithm on the graph , where is the all-one matrix. Note that can be considered as generated from GSBM with in/cross-cluster densities and , where . With this reduction, Theorem 1 immediately yields the following guarantee.
Under the semi-random GSBM with , the formulation (3)-(5) applied to with satisfying
finds the true clustering with probability provided
This corollary implies guarantees for the planted coloring problem and the planted -cut (a.k.a. planted noisy coloring ) problem. We are not aware of any exiting work that explicitly considers the GSBM with in its general form (i.e., , , and with potential non-random edges). However, since any guarantee for GSBM with implies a guarantee for GSBM with , Table I provides a comparison with existing work when and the edge probabilities and cluster sizes are uniform. Again our guarantee outperforms all existing ones.
IV-C4 Planted Coloring Problems
This is a special case of the above setting, where , and the goal is to find the planted groups of colored nodes with no edge between nodes with the same color. The best existing result is achieved by various algorithms; see e.g., . By Corollary 2, our algorithm succeeds when . We match the best existing algorithms for , and are off by a few log factors for larger .
IV-C5 Clustering Partially Observed Graphs
In many applications the pairwise relations in the graph are partially observed, meaning that the values of are known only for a subset of the pairs , and information of other pairs is impossible or too expensive to obtain . A standard and natural model for this setting is as follows: after the graph is generated according to the GSBM with edge densities and , each entry of is erased (i.e., unobserved) independently with probability , so is the observation probability. One possible approach is to set to zero all the entries of that are unobserved, and apply our algorithm to the zero-imputed graph . Note that can be considered as generated from the GSBM with in/cross-cluster densities equal to and , respectively. Theorem 1 is powerful enough to imply the following strong guarantee for this simple approach.
Under the above setting with , the formulation (3)-(5) applied to with satisfying
finds the true clustering with probability provided
The work in considers the special case with . Their algorithm explicitly handles unobserved pairs and requires the condition which is the best known result in this setting. Corollary 3 matches this result up to at most a logarithmic factor, and in addition applies to settings with more general values of and . The algorithm proposed in also imputes unobserved pairs with zeros and requires . Corollary 3 is order-wise better whenever .
IV-D Estimating tt in Special Cases
The following theorem guarantees that the estimation errors are sufficiently small.
Under the standard stochastic blockmodel and the condition (7) in Theorem 1, the parameters estimated in Algorithm 2 satisfy the following with probability at least , where is an absolute positive constant:
In particular, the estimated satisfies the condition (6) in Theorem 1. The above theorem also ensures that Algorithm 2 is a consistent estimator of the parameters and when condition (7) is satisfied, which may be a result of independent interest. Combining Theorem 1 and Theorem 3, we obtain a complete algorithm that is guaranteed to find the clusters for the standard stochastic blockmodel under the condition (7), without any knowledge of the parameters of the underlying generative model.
V Empirical Results
In this section we discuss implementation issues of our algorithm, and provide empirical results on synthetic and real-world datasets.
The convex program (3)–(4) can be solved using a general purpose SDP solver, but this method does not scale well to problems with more than a few hundred nodes. To facilitate a fast and efficient solution, we propose to use a family of first-order algorithms called the Augmented Lagrange Multiplier (ALM) method. Note that the program (3)–(4) can be rewritten as
While does not prove a convergence rate for the ALM method, it is observed there that it converges Q-linearly. We observe a similar behavior, as shown in Figure 1. In the subsequent simulations, we use as the stopping criterion, so the number of iteration needed is usually small. The main bottleneck of the algorithm is computing the SVD in each iteration. Therefore, the time complexity of the algorithm is roughly the time for one SVD multiplied by the number of iterations. This can be compared with spectral clustering, which requires one SVD. The memory requirement of the ALM algorithm is , i.e., the same order as the space needed to store the graph. It is possible to improve the space and time complexity by various approaches, such as only storing sparse and low-rank matrices and computing the first few singular values/vectors instead of a full SVD; see for more discussion on implementation details.
V-B Simulations
We perform experiments on synthetic data, and compare with other methods. We generate a graph using the stochastic blockmodel with nodes, clusters with equal size , and . We apply our method to the graph, where we pick using Algorithm 2 and solve the optimization problem using Algorithm 3. Due to numerical accuracy, the output of our algorithm may not be strictly integer, so we do the following simple rounding: compute the mean of the entries of , and round each entry of to if it is greater than , and otherwise. We measure the error by , which equals the number of misclassified pairs. We say our method succeeds if it misclassifies less than of the pairs.
For comparison, we consider three alternative methods: (1) Single-Linkage clustering (SLINK) , which is a hierarchical clustering method that merges the most similar clusters in each iteration. We use the difference of neighbors, namely , as the distance measure of nodes and , and terminate when SLINK finds a clustering with clusters. (2) A spectral clustering method , where we run SLINK on the top singular vectors of . (3) The low-rank-plus-sparse approach , followed by the rounding scheme described in the last paragraph. Note the first two methods assume knowledge of the number of clusters , which is not available to our method.
For each value of , we find the smallest for which a method succeeds, and average over trials. The results are shown in Figure 2(a), where the area above each curve corresponds to the range of feasible for each method. It can been seen that our method outperforms all others, in that we succeed for a strictly larger range of . Figure 2(b) shows more detailed results for sparse graphs (), for which SLINK and the low-rank-plus-sparse approach completely fail, while our method significantly outperforms the spectral method, the only alternative method that works in this regime. The running time of each method is shown in Figure 2 (c). Our approach and the low-rank-plus-sparse approach (both based on convex optimization) require more computational time than the simpler spectral method and SLINK. This suggests a tradeoff between the statistical and computational performance of clustering algorithms.
V-C Real-world Collaboration Graph
We evaluate our method on the NIPS Conference Papers Vol. 0-12 Dataset. Available at http://www.cs.nyu.edu/~roweis/data.html It contains the authorship relation of authors and papers. We use this dataset to generate a graph of the authors by connecting co-authors; that is, we place an edge between a pair of authors if they have written at least one NIPS paper together. This is a sparse graph with an overall edge density of .
We apply the four methods to this graph and compare their performance. For fairness, we force all methods to partition the authors into clusters as follows: the SLINK and spectral algorithms are the same as in the previous sub-section; for our method and the low-rank-plus-sparse approach, we apply SLINK to their output with as the distance measure to obtain clusters; the parameter for our method is estimated using Algorithm 2 with fixed to . We measure the quality of the solutions by computing the in-cluster and cross-cluster edge densities, which are shown in Table II. The clustering produced by our method has higher in-cluster density and lower cross-cluster density.
VI Proof of Lemma 1
where we use for all in the last inequality. Summing the L.H.S. and R.H.S. of (VI)–(VI) establishes that
Since is arbitrary, we conclude that is the unique optimal solution to the modified program.
VII Proof of Theorem 1
We prove our main theorem in this section. In the remainder of the paper, with high probability (w.h.p.) means with probability at least . The proof consists of three main steps, which we elaborate below.
We show that it suffices to assume that the in-cluster edge probability is uniformly , and the across-cluster edge probability is uniformly . In the heterogeneous model, suppose an edge is placed between nodes and with probability if they are in the same cluster, where . This is equivalent to the following two-step model: first flip a coin with head probability , and add the edge if it is head; if it is tail, then flip another coin and add the edge with probability . By the monotone property in Lemma 1, we know that if our convex program succeeds on the graph generated in the first step, then it also succeeds for the second step, because more in-cluster edges are added. Similarly, an across-cluster edge with probability can be generated equivalently as follows: (1) add an edge with probability ; (2) if an edge is added in the first step, remove it with probability . Monotonicity can then be applied. Therefore, heterogeneous edge probabilities only make the probability of success higher, and thus we only need to prove the homogeneous case.
VII-B Step 2: Optimality Condition
The true cluster matrix is an optimal solution to the program (3)–(4) if
for all feasible obeying (4). Suppose there is a matrix that satisfies
The matrix is a subgradient of at , so for all . Then, we see that (12) is implied by
The above inequality holds in particular for any feasible of the form with or with . This leads to the following element-wise inequalities:
It is easy to see that these inequalities are actually equivalent to (VII-B), so together with (13) they form a sufficient condition for the optimality of .
Finding a “dual certificate” obeying the exact conditions (13) and (15) is difficult, and does not guarantee uniqueness of the optimum. Instead, we consider an alternative sufficient condition that only requires a that approximately satisfies the exact conditions. This is done in Proposition 1 below (proved in Section VII-D), which significantly simplifies the construction of . Note that condition (b) in the proposition is a relaxation of the equality in (13), whereas condition (c) tightens (15). Setting and changing equalities to inequalities in the proposition recover the exact conditions.
VII-C Step 3: Constructing WW
where is the identity matrix. We briefly explain the ideas behind the construction. Each of the matrices , and is the sum of two terms. The first term is derived from the equalities in condition (c) in Proposition 1. The second term is constructed in such a way that each is a zero-mean random matrix (due to the randomness in the set ), so it is likely to have small norms and satisfy conditions (a) and (b). The matrix accounts for the unaffiliated nodes. In particular, it is a diagonal matrix with being non-zero if and only if
The following proposition (proved in Section VII-E) shows that indeed satisfies all the desired conditions w.h.p., hence establishing Theorem 1.
Under the conditions in Theorem 1, constructed above satisfies the conditions (a)–(c) in Proposition 1 w.h.p. with
VII-D Proof of Proposition 1 (Optimality Condition)
Let . Consider any feasible solution and let . The difference between the objective values of and satisfies
where in the inequality we use the fact that is a subgradient of at , a consequence of condition (a) in the proposition and . We substitute the condition (c) into the third term in (16) to obtain
where we used the fact that for and for since satisfies (4). Applying condition (b) yields
The last R.H.S. is strictly negative whenever . This proves that is the unique optimal solution.
VII-E Proof of Proposition 2
We show that constructed in Section VII-C satisfies the conditions in Proposition 1 w.h.p. We need two technical lemmas. First notice that the conditions (6) and (7) in Theorem 1 imply bounds on various quantities.
Under conditions (6) and (7) in Theorem 1, we have and .
Since , we have . Under condition (6) on , we further have and . It then follows from condition (7) that
which implies the inequalities in part (1) of the lemma. Part (2) follows directly from part (1) and the definition of . ∎
Due to the randomness of , , and are symmetric random matrices with independent zero-mean entries. The support and variance of their entries are bounded in the following lemma.
The following holds under the GSBM and the conditions (6) and (7) in Theorem 1.
For , the absolute values of the entries of are bounded by a.s. and their variance is bounded by , where
We have for .
The first part of the lemma follows from the definitions of the ’s, and (Lemma 2). The second part follows from Lemma 2. ∎
We now proceed with the proof of Proposition 2, The proof has three sub-steps, corresponding to checking the three conditions in Proposition 1.
Recall that is a random matrix with i.i.d. entries, and their absolute values and variance are bounded in Lemma 3. We apply standard bounds on the spectral norm of random matrices (Lemma 4 in the Appendix) to obtain w.h.p.
where the last inequality follows from (cf. Lemma 2). In a similar manner, we obtain that w.h.p.
where the last inequality follows from , and w.h.p.
where the last inequality follows from . Finally, since is a diagonal matrix, we have
since (cf. Lemma 2). We conclude that .
(2) Bounding .
Therefore, for , each entry of the matrix equals times the sum of independent zero-mean random variables (which are the entries of ), whose absolute values and variance are bounded in Lemma 3. Therefore, can be bounded by applying the standard Bernstein inequality (given as Lemma 5 in the Appendix) to each entry of and then using the union bound over all the entries. More specifically, by choosing the constant in Lemma 5 sufficiently large such that in the same lemma is at least , we have the following:
where we use in the last inequality (cf. Lemma 2) with sufficiently large.
where we use and being sufficiently large in the last inequality.
where we use and being sufficiently in the last inequality.
Finally, since is a diagonal matrix supported on and is supported on , we have .
Combining with the previous bounds on for , we obtain
Now observe that since and are both symmetric, we have . Furthermore, we have
Using the bounds on derived above, we obtain that .
(3) The two equalities in condition (c) in Proposition 1 hold by the definition of . The two inequalities in condition (c) follow from simple algebra as follows. Because and , we have . It follows from the conditions in Theorem 1 that
One verifies that this implies . Plugging in the values of and in (5) yields
Hence, for each , we have
where follows from . Combining (18) and (19) proves the first inequality in the condition (c).
where follows from (17) and follows from and . This implies . Therefore, for each , we have
proving the second inequality in condition (c). This completes the proof of Proposition 2.
VIII Proof of Theorem 2
We use a standard information theoretic argument via Fano’s inequality. For simplicity we assume and are both integers, and we use to denote positive absolute constants. Let be the set of all possible ways of assigning nodes into clusters of equal size . When , the cardinality of can be bounded as
for is sufficiently large, where is the mutual information between and . We now bound ). Let denote the Shannon entropy and the Shannon entropy conditioned on . Observe that
where in the second equality we have used the symmetry under the uniform distribution of and the conditional independence between . By definition of the mutual information, we have
where in the last inequality we use , ) and . Combining pieces, we obtain
For the last R.H.S. to be less than , we need . This completes the proof of the theorem.
IX Proof of Theorem 3
In the sequel, we assume we are on the event that (20) holds.
Recall that , , and . The inequality (20) implies that for some universal constant :
;
similarly, for and ;
.
Under the condition (7), we have for some constant . This implies for all and . This guarantees and thus .
By (20) and the triangle inequality, the estimation error of satisfies
Using the above bounds on and , we obtain
where in the last inequality we use , satisfied under the condition (7). This proves one side of the interval for . The other side is proved in a similar way.
X Conclusion
This work is motivated by clustering large-scale networks such as modern online social networks, where the graphs are often highly noisy and have heterogeneous and non-random structures. We considered a natural and versatile model, namely the semi-random Generalized Stochastic Blockmodel, for clustered random graphs. This model recovers many classical generative models for graph clustering. We presented a convex optimization formulation, essentially a convexification of the maximum likelihood estimator. Our theoretic analysis shows that this method is guaranteed to recover the correct clusters under a wide range of parameters of the problem. In fact, our method order-wise outperforms existing methods in this setting, in the sense that it succeeds under less restrictive conditions. Experiment results also validate the effectiveness of the proposed method.
Possible directions for future work include faster algorithm implementations, developing effective post-processing/rounding schemes when the obtained solution is not an exact cluster matrix, and extension to online clustering settings (e.g., via incremental stochastic optimization ). It is also interesting to extend the algorithms and analysis to more general settings beyond the models in Definitions 1 and 2, for example, when the in-cluster and cross-cluster densities are not bounded uniformly and the clusters have overlaps.
Appendix A Technical Lemmas
In this section, we record two technical lemmas that are needed in the proofs of our theoretical results. The first lemma is a standard bound on the spectral norm of a random symmetric matrix.
Suppose is a symmetric matrix, where , are independent random variables, each of which has mean and variance at most and is bounded in absolute value by . If for some absolute constant , then with probability at least ,
Except for being symmetric, the proof is the same as that of Theorem 3.1 in . ∎
The second lemma is a restatement of the standard Bernstein inequality for the sum of independent random variables.
be independent random variables, each of which is bounded in absolute value by a.s. and has variance bounded by . For any constant , there exists a constant independent of , , and such that for any , if , then we have
with probability at least .