Optimal Cluster Recovery in the Labeled Stochastic Block Model
Se-Young Yun, Alexandre Proutiere
Introduction
Community detection consists in extracting (a few) groups of similar items from a large global population, and has applications in a wide spectrum of disciplines including social sciences, biology, computer science, and statistical physics. The communities or clusters of items are inferred from the observed pair-wise similarities between items, which, most often, are represented by a graph whose vertices are items and edges are pairs of items known to share similar features.
Over the last few years, we have seen remarkable progresses for the problem of cluster recovery under the SBM (see for an exhaustive literature review), highlighting its scientific relevance and richness. Most recent work on the SBM aimed at characterizing the set of parameters (i.e., the probabilities that there exists an edge between nodes in clusters and for ) such that some qualitative recovery objectives can or cannot be met. For sparse scenarios where the average degree of items in the graph is , parameters under which it is possible to extract clusters positively correlated with the true clusters have been identified . When the average degree of the graph is , one may predict the set of parameters allowing a cluster recovery with a vanishing (as grows large) proportion of misclassified items , but one may also characterize parameters for which an asymptotically exact cluster reconstruction can be achieved .
In this paper, we address the finer and more challenging question of determining, under the general LSBM, the minimal number of misclassified items given the parameters of the model. Specifically, for any given , our goal is to identify the set of parameters such that it is possible to devise a clustering algorithm with at most misclassified items. Of course, if we achieve this goal, we shall recover all the aforementioned results on the SBM.
We first derive a tight lower bound on the average number of misclassified items when the latter is . Note that such a bound was unknown even for the SBM .
These theorems indicate that under the LSBM with parameters satisfying (A1) and (A2), the number of misclassified items scales at least as under any clustering algorithm, irrespective of its complexity. They further establish that the Spectral Partition algorithm reaches this fundamental performance limit under the additional condition (A3). We note that the SP algorithm runs in polynomial time, i.e., it requires floating-point operations.
We further establish a necessary and sufficient condition on the parameters of the LSBM for the existence of a clustering algorithm recovering the clusters exactly with high probability. Deriving such a condition was also open .
Assume that (A1) and (A2) hold. If there exists a clustering algorithm that does not misclassify any item with high probability, then the parameters of the LSBM satisfy: . If this condition holds, then under (A3), the SP algorithm recovers the clusters exactly with high probability.
The paper is organized as follows. Section 2 presents the related work and example of application of our results. In Section 3, we sketch the proof of Theorem 1, which leverages change-of-measure and coupling arguments. We present in Section 4 the Spectral Partition algorithm, and analyze its performance (we outline the proof of Theorem 2). All results are proved in details in the supplementary material.
Related Work and Applications
Cluster recovery in the SBM has attracted a lot of attention recently. We summarize below existing results, and compare them to ours. Results are categorized depending on the targeted level of performance. First, we consider the notion of detectability, the lowest level of performance requiring that the extracted clusters are just positively correlated with the true clusters. Second, we look at asymptotically accurate recovery, stating that the proportion of misclassified items vanishes as grows large. Third, we present existing results regarding exact cluster recovery, which means that no item is misclassified. Finally, we report recent work whose objective, like ours, is to characterize the optimal cluster recovery rate.
Detectability. Necessary and sufficient conditions for detectability have been studied for the binary symmetric SBM (i.e., , , , , and ). In the sparse regime where , and for the binary symmetric SBM, the main focus has been on identifying the phase transition threshold (a condition on and ) for detectability: It was conjectured in that if (i.e., under the threshold), no algorithm can perform better than a simple random assignment of items to clusters, and above the threshold, clusters can partially be recovered. The conjecture was recently proved in (necessary condition), and (sufficient condition). The problem of detectability has been also recently studied in for the asymmetric SBM with more than two clusters of possibly different sizes. Interestingly, it is shown that in most cases, the phase transition for detectability disappears.
The present paper is not concerned with conditions for detectability. Indeed detectability means that only a strictly positive proportion of items can be correctly classified, whereas here, we impose that the proportion of misclassified items vanishes as grows large.
Asymptotically accurate recovery. A necessary and sufficient condition for asymptotically accurate recovery in the SBM (with any number of clusters of different but linearly increasing sizes) has been derived in and . Using our notion of divergence specialized to the SBM, this condition is . Our results are more precise since the minimal achievable number of misclassified items is characterized, and apply to a broader setting since they are valid for the generic LSBM.
Asymptotically exact recovery. Conditions for exact cluster recovery in the SBM have been also recently studied. provide a necessary and sufficient condition for asymptotically exact recovery in the binary symmetric SBM. For example, it is shown that when and for , clusters can be recovered exactly if and only if . In , the authors consider a more general SBM corresponding to our LSBM with . They define CH-divergence as:
and show that is a necessary and sufficient condition for asymptotically exact reconstruction. The following claim, proven in the supplementary material, relates to .
When , we have for all :
Thus, the results in are obtained by applying Theorem 3 and Claim 4.
Again from this claim, the results derived in are obtained by applying Theorem 3 and Claim 5.
Optimal recovery rate. In , the authors consider the binary SBM in the sparse regime where the average degree of items in the graph is , and identify the minimal number of misclassified items for very specific intra- and inter-cluster edge probabilities and . Again the sparse regime is out of the scope of the present paper. are concerned with the general SBM corresponding to our LSBM with , and with regimes where asympotically accurate recovery is possible. The authors first characterize the optimal recovery rate in a minimax framework. More precisely, they consider a (potentially large) set of possible parameters , and provide a lower bound on the expected number of misclassified items for the worst parameters in this set. Our lower bound (Theorem 1) is more precise as it is model-specific, i.e., we provide the minimal expected number of misclassified items for a given parameter (and for a more general class of models). Then the authors propose a clustering algorithm, with time complexity , and achieving their minimax recovery rate. In comparison, our algorithm yields an optimal recovery rate for any given parameter , exhibits a lower running time, and applies to the generic LSBM.
2 Applications
We provide here a few examples of application of our results, illustrating their versatility. In all examples, is a function such that , and are fixed real numbers such that .
The binary SBM. Consider the binary SBM where the average item degree is , and represented by a LSBM with parameters , , , , and . From Theorems 1 and 2, the optimal number of misclassified vertices scales as when (w.l.o.g.) and where
It can be easily checked that (letting ). The worst case is hence obtained when the two clusters are of equal sizes. When , we also note that the condition for asymptotically exact recovery is .
Recovering a single hidden community. As in , consider a random graph model with a hidden community consisting of vertices, edges between vertices belonging the hidden community are present with probability , and edges between other pairs are present with probability . This is modeled by a LSBM with parameters , , , , and . The minimal number of misclassified items when searching for the hidden community scales as where
When , the condition for asymptotically exact recovery of the hidden community is .
Optimal sampling for community detection under the SBM. Consider a dense binary symmetric SBM with intra- and inter-cluster edge probabilities and . In practice, to recover the clusters, one might not be able to observe the entire random graph, but sample its vertex (here item) pairs as considered in . Assume for instance that any pair of vertices is sampled with probability for some fixed , independently of other pairs. We can model such scenario using a LSBM with three labels, namely , 0 and 1, corresponding to the absence of observation (the vertex pair is not sampled), the observation of the absence of an edge and of the presence of an edge, respectively, and with parameters for all , , , and . The minimal number of misclassified vertices scales as where When , the condition for asymptotically exact recovery is .
Signed networks. Signed networks are used in social sciences to model positive and negative interactions between individuals. These networks can be represented by a LSBM with three possible labels, namely 0, + and -, corresponding to the absence of interaction, positive and negative interaction, respectively. Consider such LSBM with parameters: , , , , , and , for some fixed such that and . The minimal number of misclassified individuals here scales as where
When , the condition for asymptotically exact recovery is .
Fundamental Limits: Change of Measures through Coupling
Construction of . Let , and let denote the smallest item index that belongs to cluster or . If both and are empty, we define . Let such that: The existence of such is proved in Lemma 7 in the supplementary material. Now to define the stochastic model , we couple the generation of labels under and as follows.
1. We first generate the random clusters under , and extract , , and . The clusters generated under are the same as those generated under . For any , we denote by the cluster of item .
The Spectral Partition Algorithm and its Optimality
In this section, we sketch the proof of Theorem 2. To this aim, we present the Spectral Partition (SP) algorithm and analyze its performance. The SP algorithm consists in two parts, and its detailed pseudo-code is presented at the beginning of the supplementary document (see Algorithm 1).
Assume that (A1) and (A2) hold, and that . After Step 4 (spectral decomposition) in the SP algorithm, with high probability, and there exists a permutation of such that:
Finally, we establish that if the clusters provided after the first part of the SP algorithm are asymptotically accurate, then after improvement iterations, there is no misclassified items in . To that aim, we denote by the set of misclassified items after the -th iteration, and show that with high probability, for all , . This completes the proof of Theorem 2, since after iterations, the only misclassified items are those in .
References
Appendix A The SP Algorithm
Appendix B Properties of the divergence D(α,p)𝐷𝛼𝑝D(\alpha,p) and related quantities
In this section, we prove the two claims of Section 2, as well as other results on the divergence that will be instrumental in the proofs of Theorems.
is the minimum of the objective function of the following convex optimization problem:
When we put (9) onto (8) and use the approximation (again using ),
Therefore, the minimum value of (6) is equivalent to
B.2 Proof of Claim 5
Now, since and when ,
B.3 Other properties
Let and . Then, there exists such that
Proof. We check by contradiction that such a exists. Indeed, assume that
Then there exists such that . Observe that by positivity of the divergence, . Hence by continuity of the divergence, we can construct such that for all , and such that: and for some . With this choice of , we get:
which contradicts the definition of .
Proof. Let and . From Lemma 7, there exists satisfying that
Under condition (A1), when ,
Proof. From the definition of , for any ,
where we use when .
Appendix C Proof of Theorem 1
Coupling and the perturbed stochastic model . Let , and let denote the smallest node index that belongs to cluster or . If both and are empty, we define . Let satisfy:
There exists such a from Lemma 7. Now to define the perturbed stochastic model , we couple the generation of labels under and as follows.
We first generate construct the random clusters under , and extract , , and . The clusters generated under are the same as those generated under . For any , we denote by the cluster of node .
Let denote a clustering algorithm with output , and let be the set of misclassified nodes under . Note that in general in our proofs, we always assume without loss of generality that for any permutation , so that the set of misclassified nodes is really . We denote by . Since under , nodes are interchangeable (remember that nodes are assigned to the various clusters in an i.i.d. manner), we have:
where the last inequality is obtained from the fact that we cannot distinguish between and any other . Indeed,
Furthermore, since under the stochastic model , the observed labels do not depend on whether belongs to cluster or , we have:
Combining (17), (22), and (27), we conclude that:
In addition, from Chebyshev’s inequality,
Hence from condition (A1), (32), and the definition of ,
where the last inequlaity stems from the fact that for all and from condition (A1).
To derive the above inequality, we have used:
Appendix D Performance of the SP Algorithm – Proof of Theorem 2
For every and , we have
where we derive the last inequality choosing .
The proof of Lemma 11 relies on arguments used in the spectral analysis of random graphs, see and .
For all and ,
Proof. Let be a set of matrices such that
where stems from the following inequality:
D.2 Part 1 of the SP algorithm – Proof of Theorem 6
Recall that and . We can bound the number of misclassified items as follows:
with high probability, every item pair and satisfies that when represents the cluster of and denotes the column vector of on ,
(40) suggests that if is misclassified by Algorithm 2, then we should have:
from (39) and (41), with high probability,
Proof of (39). First observe that from the definition of ,
where the first inequality stems from Lemma 10 and Markov inequality. Therefore, with high probability,
Proof of (41). Define the following sets:
;
From the properties of and , we state the following results.
since every is outside of (i.e., is necessary for );
since is a constant for all and from (ii), with high probability,
The properties (ii), (iii), and (iv) and (51) imply that
where is the -th largest value among ;
since from (ii) and (iii),
D.3 Proof of Theorem 2
From Chernoff bound, with high probability,
In what follows, we hence just prove the theorem assuming that (54) holds.
Let be the largest set of items satisfying:
(H1) regularizes degrees, (H2) means that is correctly classified when using the log-likelihood estimate, and (H3) means that does not share too many labels with items outside .
The proof of the theorem follows from the following propositions. The first provides an upper bound of , and the second provides the rate at which our estimated clusters improve in each iteration when we restrict our attention to items in .
When , with high probability.
If , with high probability, the following statement holds
From Proposition 14, after iterations (remember that , so when is large enough ), no item in can be misclassified with high probability. Hence the number of misclassified items cannot exceed , . The proof is completed by remarking that if the previous condition on holds, then
where we used from condition (A2) and Lemma 8.
We compute the number of items satisfying (H1), (H2), and (H3) in (55), (56), and Lemma 15, respectively.
Number of items satisfying (H1): From Lemma 10, we get:
Number of items satisfying (H2): We shall prove that when satisfies (H1), satisfies (H2) as well with probability at least
To this aim, we first establish that if satisfies
then satisfies (H2). Indeed, assume that (57) holds, then
, since and (57) holds;
, since and ;
, from ii) and the fact that ;
Hence satisfies (H2). It remains to evaluate the probability of the event (57), which is done by applying Lemma 12 and proves (56).
Number of items satisfying (H3): From (55), (56), and the Markov inequality, we deduce that with probability at least , the number of items that do not satisfy either (H1) or (H2) is less than when , since
where we have used Lemma 9 for the last inequality. Lemma 15 allows us to complete the proof of Proposition.
When the number of items that do not satisfy either (H1) or (H2) is less than , , with high probability.
Proof. Let . Next we prove the following intermediate claim: there is no subset such that and with high probability. For any subset such that by Markov inequality,
where, in the last two inequalities, we have set and used the fact that: which comes from the assumptions made in the theorem. Since the number of subsets with size is from (65), we deduce:
Therefore, by Markov inequality, we can conclude that there is no such that and with high probability.
To conclude the proof of the lemma, we build the following sequence of sets. Let denote the set of items that do not satisfy at least one of (H1) and (H2). Let be generated as follows:
For , if there exists such that and . If such an item does not exist, the sequence ends.
The sequence ends after the construction of . We show that if we assume that the cardinality of items that do not satisfy (H3) is strictly larger than , then one the set of the sequence contradicts the claim we just proved.
Assume that the number of items do not satisfy (H3) is strictly larger than , then these items will be at some point added to the sets , and by definition, each of these node contributes with more than in . Hence if starting from , we add items not satisfying (H3), we get a set of cardinality less than and such that . We can further add arbitrary items to so that it becomes of cardinality , and the obtained set contradicts the claim.
D.3.2 Proof of Proposition 14
Recall that is the partition after the -th improvement iteration. Also recall that with loss of generality, we assume that the set of misclassified items in after the -th step is (it should be defined through an appropriate permutation of by , but we omit ). With this notational convention, we can define and . At each improvement step, items move to the most likely cluster (according to the log-likelihood defined in the SP algorithm). Thus, for all ,
Therefore, from the above inequalities, we conclude that
Next we prove all the steps of the previous analysis.
From (77) and (78), with high probability,
Since , from the above inequality,
We now devote to the remaining part of (74). Since from Theorem 6,
From (74), (79) and (80), with high probability,
Proof of (69): Since for all and ,
where the last inequality stems from (H3), i.e., from when .
Proof of (70): Since and every satisfies (H2), every satisfies:
Appendix E Proof of Theorem 3
The positive result is obtained by applying Theorem 2 to . When , SP algorithm find clusters exactly with high probability. Thus, it suffices to show the negative result.
We prove the negative part by contradiction. Consider a maximum a posteriori (MAP) estimation with full parameter information. When we observe a labeld information , the MAP estimates the clusters as follows:
Let denote the number of misclassified nodes by the MAP estimation. From the definition of the MAP estimation, for any clustring algorithm , we have
Thus, in what follows, we show that when , the MAP estimation is failed to find the exact clusters with high probability.
We start by Lemma 16 which finds a large deviation inequality for edge connections.
Assume that there exists a constant such that . Let (i.e., it is the hardest case to discriminate cluster and cluster ). When , one can easily check using the continuity of the KL divergence that there exists such that when ,
Let be a node in . We denote by the original partition and define a slightly modified partition as follows:
Then, is a more likely partition than from (83), i.e.,
which means that the MAP estimator does not select the exact partition when is not empty. Therefore, from (82), every clustering algorithm has the error probability that
when there exists a constant such that .