A simple SVD algorithm for finding hidden partitions
Van Vu
The problem and a new algorithm
The hidden partition problem is the following: let be a set of vertices with a partition ; for all and any , we put a random edge between and with probability . Given one such random graph, the goal is to recover the sets . This problem is of importance in computer science and statistics and contains as special cases several well-studied problems such as the hidden clique, hidden bisection, hidden coloring, clustering etc (see, for instance, and the references therein). In what follows, we refer to as clusters.
In an influential paper , Mc Sherry provided a (randomized) polynomial time algorithm that solves the general hidden partition problem for a large range of parameters. As corollary, he derived several earlier results obtained for special cases.
The general idea (and in many earlier works on clustering) is to find a good geometric representation of the vertices. We say that a representation is perfect if there is a number such that
Vertices in the same cluster have distance at most from each other.
Vertices from different clusters have distance at least from each other.
Once a perfect representation is obtained, it is easy to find the clusters. If is known, then the solution is obvious. If is not known, then there are several simple algorithms. For instance, one can create a minimal spanning tree (with respect to the distances) on the vertices and then remove the largest edges. In what follows, we put all these simple algorithms under a subroutine called Clustering by Distances and the reader can choose his/her favorite to implement. Our main goal is to present a simple way to obtain a perfect representation.
In the rest of the paper, let if and . We assume that is sufficiently large, whenever needed. Asymptotic notation are used under the assumption . All explicit constants (such as the above) are adhoc and we make no attempt to optimize them.
Let be the probability matrix . For a vertex , denotes the corresponding column in . Define
where the minimum is taken over all pairs belonging to different clusters. Mc Sherry proved
Assume that is an upper bound on the variances of the entries. There is a constant such that if
the above algorithm (with a proper choice of the threshold ) recovers the partition with probability with respect to the random graph and with respect to the auxiliary random bits.
The main open question raised by Mc Sherry in is to find a more natural and simpler algorithm, which does not involve the subroutine CPROJ (see [24, Section 4.4]). The goal of this paper is to answer this question.
To this end, denotes the subspace spanned by the first left singular vectors of a matrix . Let be our input, namely the adjacency matrix of a random graph generated by . Arguably, the most natural choice for would be (SVD), which leads to the algorithm below
While SVD I could well win the contest for being the simplest algorithm, it is not easy to analyze in the general case. In what follows, we analyze a slightly more technical alternative, SVD II, which is a variant of an algorithm proposed in [24, Section 1].
Compared to SVD I, the extra steps in SVD II are the random partitions in Step done in order to reduce the correlation. (A careful reading of reveals that one also need an extra partition in Algorithm 2 to make the analysis go through.)
Notice that SVD II gives a partition of , not . There are many ways to extend it to a partition of . For instance, we can run the algorithm times (for some small ) and find partitions of , where are random subsets of with density (the input graph is the same, only the random partitions are different). If a cluster in and a cluster in intersect, then they must belong to the same cluster in and we can merge them. If we choose , say, then with probability , all vertices of must belong to some and we recover the clusters at the end. We can also first find the partitions of and by reversing the role of and and and and find which four clusters must belong to an original cluster by looking at the edge densities; we omit the details.
Beside being simple, SVD II is also very convenient to implement, as its main step, the computation of the projection onto (given as input) is a routine operation (SVD) which appears in most standard mathematical packages.
Let us now analyze SVD II. For convenience, we assume that has rank . The general case when can have a smaller rank is discussed later. Let be the least non-trivial singular value of .
There is a constant such that the following holds. Assume that and . Then SVD II clusters correctly with probability if one of the following two conditions is satisfied
Condition 1.
Condition 2.
If we omit the assumption , the statement still holds but with probability
The lower bound is optimal, up to the value of . If , then there are many isolated points, which can be assigned to any cluster.
We can reduce the failure probability to for any constant at the cost of increasing the constant .
Let us now consider the performance of SVD II on various subproblems. We allow the value of to be flexible in order to omit smaller order terms for convenience. It is instructive to compare the corollaries below with Corollaries 1,2,3 from .
Hidden clique. In this problem, , is the size of the clique, and , where is the density of the random graph. Condition 1 becomes
which is satisfied if . As , this simplifies to .
There is a constant such that for any and , SVD II finds the hidden clique of size with probability .
Hidden Coloring. Here is the number of color classes, each has size ; ; ; . The singular values of are . If , Condition 1 is
which is satisfied for .
If , then the bound holds, and the bound in Condition 2 is
which is satisfied if .
There is a constant such that the following holds. For any and edge density , SVD II finds the hidden -coloring with probability .
Hidden Bipartition. Let the two densities be . We have , , , . The two singular values of are and . Condition 2 requires
There is a constant such that the following holds Let be edge densities such that then SVD II finds the hidden bipartition with probability .
One can replace in the denominator by a better term by considering an approximate algorithm; see Corollary 11.
The rest of the paper is organized as follows. In the next section, we present a few technical lemmas and prove Theorem 2 and Theorem 10 in Section 3. In Section 4, we discuss variants of SVD II, including an approximate version which works under weaker assumptions.
Technical lemmas
Furthermore, if has an orthornormal bases such that , then
There is a constant such that the following holds. Let be a symmetric matrix whose upper diagonal entries are independent random variables where or with probabilities and , respectively, where . Let . If , then
If , the statement is a corollary of [26, Theorem 1.4]. For smaller , one can prove this lemma using the -net approach by Kahn and Szemeredi . We omit the details, which is very similar to the proof of Feige and Ofek for [14, Theorem 1.1].
Let be matrices where . Then
This lemma is a well known result in numerical linear algebra, known as Davis-Kahan-Wedin theorem; see .
Proof of Theorems 2
Let be the probability matrix corresponding to . As is a large random submatrix of , it is not hard to show that with high probability (we provide a verification of this fact at the end of the proof). In the rest of this proof, we assume
We view the adjacency matrix (between and ) as a random perturbation of , , where the entries of are independent and with probability and with probability . We denote by the columns corresponding to a vertex in , respectively. All matrices are of size approximately by the definitions of and .
Our leading idea is that the random perturbation does not change too much, thus hopefully the projections onto and differ by only a small amount. The heart of the matter, of course, is to bound this error term. While inviting, a straightforward application of Lemma 9 is too crude in the general case (it does lead to some simple solution for some subproblems in certain range of parameters). We will still make use of this lemma, but for a quite different purpose.
For simplicity, we assume in the rest of the proof that . For a sufficiently large , this implies that with probability , each cluster intersects in at least elements. Thus, the distance between two columns (belonging to different clusters) in is at least . We aim to show that with high probability for all ; this will provide a perfect geometric representation. If there is no lower bound on , then the probability that the random partition has this property is at least for some constant .
For a fixed , by the triangle inequality
To bound the second term, we follow an argument from and consider
The spectral norm of the first term is , as has rank at most . The spectral norm of the second term is also at most . Thus, by Lemma 8, by probability at least
Let be the unit vector where is the indicator vector for the cluster containing , we have
Combining the last two inequalities and using the union bound, we conclude that with probability at least
Now we tend to the first term, whose analysis is more involved. By the first part of Lemma 7,
with probability , for a properly chosen constant . As , the term is at most and can be omitted. This yields that if
then the algorithm succeeds with probability at least . This proves the first part of the theorem concerning Condition 1.
To prove the second part of the theorem, let us reconsider the distance . Notice that if , then Condition 2 implies Condition 1 (with some modification on the value of ). Thus, in what follows, we can assume .
Rewrite and let be a singular vector of . Recall that for all By symmetry, each coordinate in is repeated at least times, thus . Furthermore, by Lemma 9 and Lemma 8, we have with probability that
which implies that for any unit vector ,
by the condition on , with some properly chosen constant . Using the second part of Lemma 7, we conclude that with probability , for all and some properly chosen constant , concluding the proof.
To make the argument precise, we need to remove the assumption . Using (3), we can create a matrix such that
Variants
In the case , it makes more sense to project onto rather than onto ; the rest of the algorithm and analysis remains the same.
If we do not know either or in advance. we can modify SVD II slightly as follows. The idea is to define the essential rank of to be the largest index such that , for a properly chosen , and replace the projection onto by the projection onto . After redefining , the content of Theorem 2 remains the same. Its proof also remains the same, expect few nominal changes. The error term caused by smaller singular values is not going to effect the final conclusion.
The only information we need in SVD II (using essential dimension) is the value of . Even if this information is not known, we can still solve the problem by considering a sequence of trials with and run SVD II in each case. Each trial will output a clustering and it is easy to decide which one is correct by considering the degree densities of the vertices from one cluster to the others.
2. An approximate Solution.
In practice, one is often satisfied with an approximate solution. We say that a partition is -correct if . Similarly, we say that a geometric representation of is -perfect if there are points with distance at least from each other so that at least points from has distance at most to . One can use an -perfect representation to find an -correct partition.
Given , there is a constant such that the following holds. If and
then with probability the projection in SVD II produce an -perfect representation of the point sin .
It is worth mentioning that in various situations, an -correct partition can be upgraded to a fully correct one by a simple “correction” procedure, as shown in the following example:
Hidden bipartition. Assume . Let be an -correct partition, for some small (say ). Then both have size at most . Assume ; it follows that . With probability , the following holds. For any , let be the number of its neighbors in . If , then
It is clear that if , then . Thus, one can correct the partition by defining be the set of vertices with largest .
There is a constant such that the following holds Let be edge densities such that then the approximation algorithm with correction finds the hidden bipartition with probability .
Proof of Theorem 10. We first bound . Recall that
By Markov’s inequality, it follows that . We call a vertex good if . For a sufficiently large (depending on ), all good vertices will be clustered correctly. Moreover, choosing , the probability for being good is at least , thus the expectation of the number of good elements in is at least . As the good events are independent, Chernoff’s bound implies that with probability , at least points from are good. This completes the proof.
Appendix A Proof of Lemma 7
Notice that the function is -Lipschitz and convex, thus by Talagrand’s inequality for any
where is the mean of . We do not know ; however, we can bound from above. Slightly abusing the notation, let denote the projection matrix onto , then
Combining this with the concentration inequality, it is not hard to show that , concluding the proof of the first part of the lemma.
Let be real numbers such that and for all . Let be independent random variables with mean 0 and for all . Let . Then
To prove Claim 12, notice that for any we have
Since for all and , the right most formula is
To optimize the RHS, let us consider two cases
Case 1. . Take and . With this setting .
Case 2. . Take and . In this setting, .
One can bound the same way.
Acknowledgement. The author would like to thank NSF and AFORS for their support and K. Luh for his careful proof reading.