Computational Lower Bounds for Community Detection on Random Graphs
Bruce Hajek, Yihong Wu, Jiaming Xu
Introduction
Networks often exhibit community structure with many edges joining the vertices of the same community and relatively few edges joining vertices of different communities. Detecting communities in networks has received a large amount of attention and has found numerous applications in social and biological sciences, etc (see, e.g., the exposition and the references therein). While most previous work focuses on identifying the vertices in the communities, this paper studies the more basic problem of detecting the presence of a small community in a large random graph, proposed recently in . This problem has practical applications including detecting new events and monitoring clusters, and is also of theoretical interest for understanding the statistical and algorithmic limits of community detection .
Inspired by the model in , we formulate this community detection problem as a planted dense subgraph detection (PDS) problem. Specifically, let denote the Erdős-Rényi random graph with vertices, where each pair of vertices is connected independently with probability . Let denote the planted dense subgraph model with vertices where: (1) each vertex is included in the random set independently with probability ; (2) for any two vertices, they are connected independently with probability if both of them are in and with probability otherwise, where . In this case, the vertices in form a community with higher connectivity than elsewhere. The planted dense subgraph here has a random size with mean , which is similar to the models adopted in , instead of a deterministic size as assumed in .
The planted dense subgraph detection problem with parameters , henceforth denoted by , refers to the problem of distinguishing hypotheses:
The statistical difficulty of the problem depends on the parameters . Intuitively, if the expected dense subgraph size decreases, or if the edge probabilities and both decrease by the same factor, or if decreases for fixed, the distributions under the null and alternative hypotheses become less distinguishable. Recent results in obtained necessary and sufficient conditions for detecting planted dense subgraphs under certain assumptions of the parameters. However, it remains unclear whether the statistical fundamental limit can always be achieved by efficient procedures. In fact, it has been shown in that many popular low-complexity tests, such as total degree test, maximal degree test, dense subgraph test, as well as tests based on certain convex relaxations, can be highly suboptimal. This observation prompts us to investigate the computational limits for the PDS problem, i.e., what is the sharp condition on under which the problem admits a computationally efficient test with vanishing error probability, and conversely, without which no algorithm can detect the planted dense subgraph reliably in polynomial time. To this end, we focus on a particular case where the community is denser by a constant factor than the rest of the graph, i.e., for some constant . Adopting the standard reduction approach in complexity theory, we show that the PDS problem in some parameter regime is at least as hard as the planted clique problem in some parameter regime, which is conjectured to be computationally intractable. Let denote the planted clique model in which we add edges to vertices uniformly chosen from to form a clique.
The PC detection problem with parameters , denoted by henceforth, refers to the problem of distinguishing hypotheses:
The problem of finding the planted clique has been extensively studied for and the state-of-the-art polynomial-time algorithms only work for . There is no known polynomial-time solver for the PC problem for and any constant . It is conjectured that the PC problem cannot be solved in polynomial time for with , which we refer to as the PC Hypothesis.
Fix some constant . For any sequence of randomized polynomial-time tests such that ,
The PC Hypothesis with is similar to [30, Hypothesis 1] and [11, Hypothesis ]. Our computational lower bounds require that the PC Hypothesis holds for any positive constant . An even stronger assumption that PC Hypothesis holds for has been used in [7, Theorem 10.3] for public-key cryptography. Furthermore, [22, Corollary 5.8] shows that under a statistical query model, any statistical algorithm requires at least queries for detecting the planted bi-clique in an Erdős-Rényi random bipartite graph with edge probability .
We consider the problem in the following asymptotic regime:
where is a fixed constant, governs the sparsity of the graph,The case of is not interesting since detection is impossible even if the planted subgraph is the entire graph (). and captures the size of the dense subgraph. Clearly the detection problem becomes more difficult if either increases or decreases. Assuming the PC Hypothesis holds for any positive constant , we show that the parameter space of is partitioned into three regimes as depicted in Fig. 1:
The Simple Regime: . The dense subgraph can be detected in linear time with high probability by thresholding the total number of edges.
The Hard Regime: . Reliable detection can be achieved by thresholding the maximum number of edges among all subgraphs of size ; however, no polynomial-time solver exists in this regime.
The Impossible Regime: . No test can detect the planted subgraph regardless of the computational complexity.
The computational hardness of the PDS problem exhibits a phase transition at the critical value : For moderately sparse graphs with , there exists a combinatorial algorithm that can detect far smaller communities than any efficient procedures; For highly sparse graphs with , optimal detection is achieved in linear time based on the total number of edges. Equivalently, attaining the statistical detection limit is computationally tractable only in the large-community regime (). Therefore, surprisingly, the linear-time test based on the total number of edges is always statistically optimal among all computationally efficient procedures in the sense that no polynomial-time algorithm can reliably detect the community when . It should be noted that Fig. 1 only captures the leading polynomial term according to the parametrization (1); at the boundary , it is plausible that one needs to go beyond simple edge counting in order to achieve reliable detection. This is analogous to the planted clique problem where the maximal degree test succeeds if the clique size satisfies and the more sophisticated spectral method succeeds if .
The above hardness result should be contrasted with the recent study of community detection on the stochastic block model, where the community size scales linearly with the network size. When the edge density scales as (resp. ), the statistically optimal threshold for partial (resp. exact) recovery can be attained in polynomial time up to the sharp constants. In comparison, this paper focuses on the regime when the community size grows sublinearly as and the edge density decays more slowly as . It turns out that in this case even achieving the optimal exponent is computationally as demanding as solving the planted clique problem.
Our computational lower bound for the PDS problem also implies the average-case hardness of approximating the planted dense subgraph or the densest -subgraph of the random graph ensemble , complementing the worst-case inapproximability result in , which is based on the planted clique hardness as well. In particular, we show that no polynomial-time algorithm can approximate the planted dense subgraph or the densest -subgraph within any constant factor in the regime of , which provides a partial answer to the conjecture made in [15, Conjecture 2.6] and the open problem raised in [3, Section 4] (see Section 4.1). Our approach and results can be extended to the bipartite graph case (see Section 4.3) and shed light on the computational limits of the PDS problem with a fixed planted dense subgraph size studied in (see Section 4.2).
2 Connections to the Literature
This work is inspired by an emerging line of research (see, e.g., ) which examines high-dimensional inference problems from both the statistical and computational perspectives. Our computational lower bounds follow from a randomized polynomial-time reduction scheme which approximately reduces the PC problem to the PDS problem of appropriately chosen parameters. Below we discuss the connections to previous results and highlight the main technical contributions of this paper.
Various hardness results in the theoretical computer science literature have been established based on the PC Hypothesis with , e.g. cryptographic applications , approximating Nash equilibrium , testing -wise independence , etc. More recently, the PC Hypothesis with has been used to investigate the penalty incurred by complexity constraints on certain high-dimensional statistical inference problems, such as detecting sparse principal components and noisy biclustering (submatrix detection) . Compared with most previous works, our computational lower bounds rely on the stronger assumption that the PC Hypothesis holds for any positive constant . An even stronger assumption that PC Hypothesis holds for has been used in for public-key cryptography. It is an interesting open problem to prove that PC Hypothesis for a fixed follows from that for .
Reduction from the PC Problem
Most previous work in the theoretical computer science literature uses the reduction from the PC problem to generate computationally hard instances of problems and establish worst-case hardness results; the underlying distributions of the instances could be arbitrary. Similarly, in the recent works on the computational limits of certain minimax inference problems, the reduction from the PC problem is used to generate computationally hard but statistically feasible instances of their problems; the underlying distributions of the instances can also be arbitrary as long as they are valid priors on the parameter spaces. In contrast, here our goal is to establish the average-case hardness of the PDS problem based on that of the PC problem. Thus the underlying distributions of the problem instances generated from the reduction must be close to the desired distributions in total variation under both the null and alternative hypotheses. To this end, we start with a small dense graph generated from under and under , and arrive at a large sparse graph whose distribution is exactly under and approximately equal to under . Notice that simply sparsifying the PC problem does not capture the desired tradeoff between the graph sparsity and the cluster size. Our reduction scheme differs from those used in which start with a large dense graph. Similar to ours, the reduction scheme in also enlarges and sparsifies the graph by taking its subset power; but the distributions of the resulting random graphs are rather complicated and not close to the Erdős-Rényi type.
Inapproximability of the DKS Problem
The densest -subgraph (DKS) problem refers to finding the subgraph of vertices with the maximal number of edges. In view of the NP-hardness of the DKS problem which follows from the NP-hardness of MAXCLIQUE, it is of interest to consider an -factor approximation algorithm, which outputs a subgraph with vertices containing at least a -fraction of the number of edges in the densest -subgraph. Proving the NP-hardness of -approximation for DKS for any fixed is a longstanding open problem. See for a comprehensive discussion. Assuming the PC Hypothesis holds with , shows that the DKS problem is hard to approximate within any constant factor even if the densest -subgraph is a clique of size for any , where denotes the total number of vertices. This worst-case inapproximability result is in stark contrast to the average-case behavior in the planted dense subgraph model under the scaling (1), where it is known that the planted dense subgraph can be exactly recovered in polynomial time if (see the simple region in Fig. 2 below), implying that the densest -subgraph can be approximated within a factor of in polynomial time for any . On the other hand, our computational lower bound for shows that any constant-factor approximation of the densest -subgraph has high average-case hardness if (see Section 4.1).
Variants of PDS Model
Three versions of the PDS model were considered in [12, Section 3]. Under all three the graph under the null hypothesis is the Erdős-Rényi graph. The versions of the alternative hypothesis, in order of increasing difficulty of detection, are: (1) The random planted model, such that the graph under the alternative hypothesis is obtained by generating an Erdős-Rényi graph, selecting nodes arbitrarily, and then resampling the edges among the nodes with a higher probability to form a denser Erdős-Rényi subgraph. This is somewhat more difficult to detect than the model of , for which the choice of which nodes are in the planted dense subgraph is made before any edges of the graph are independently, randomly generated. (2) The dense in random model, such that both the nodes and edges of the planted dense -subgraph are arbitrary; (3) The dense versus random model, such that the entire graph under the alternative hypothesis could be an arbitrary graph containing a dense -subgraph. Our PDS model is closely related to the first of these three versions, the key difference being that for our model the size of the planted dense subgraph is binomially distributed with mean (see Section 4.2). Thus, our hardness result is for the easiest type of detection problem. A bipartite graph variant of the PDS model is used in [9, p. 10] for financial applications where the total number of edges is the same under both the null and alternative hypothesis. A hypergraph variant of the PDS problem is used in for cryptographic applications.
3 Notations
Statistical Limits
This section determines the statistical limit for the problem with for a fixed constant . For a given pair , one can ask the question: What is the smallest density such that it is possible to reliably detect the planted dense subgraph? When the subgraph size is deterministic, this question has been thoroughly investigated by Arias-Castro and Verzelen for general and the statistical limit with sharp constants has obtained in certain asymptotic regime. Their analysis treats the dense regime and sparse regime separately. Here as we focus on the special case of and are only interested in characterizations within absolute constants, we provide a simple non-asymptotic analysis which treats the dense and sparse regimes in a unified manner. Our results demonstrate that the problem in Definition 1 has the same statistical detection limit as the problem with a deterministic size studied in .
By the definition of the total variation distance, the optimal testing error probability is determined by the total variation distance between the distributions under the null and the alternative hypotheses:
The following result (proved in Section A.1) shows that if , then there exists no test which can detect the planted subgraph reliably.
2 Upper Bound
Let denote the adjacency matrix of the graph . The detection limit can be achieved by the linear test statistic and scan test statistic proposed in :
which correspond to the total number of edges in the whole graph and the densest -subgraph, respectively. Interestingly, the exact counterparts of these tests have been proposed and shown to be minimax optimal for detecting submatrices in Gaussian noise . The following lemma bounds the error probabilities of the linear and scan test.
Suppose for a constant . For the linear test statistic, set . For the scan test statistic, set . Then there exists a constant which only depends on such that
To illustrate the implications of the above lower and upper bounds, consider the problem with the parametrization , and for and and . In this asymptotic regime, the fundamental detection limit is characterized by the following function
Note that can be computed in linear time. However, computing amounts to enumerating all subsets of of cardinality , which can be computationally intensive. Therefore it is unclear whether there exists a polynomial-time solver in the regime . Assuming the PC Hypothesis, this question is resolved in the negative in the next section.
Computational Lower Bounds
In this section, we establish the computational lower bounds for the PDS problem assuming the intractability of the planted clique problem. We show that the PDS problem can be approximately reduced from the PC problem of appropriately chosen parameters in randomized polynomial time. Based on this reduction scheme, we establish a formal connection between the PC problem and the PDS problem in Proposition 3, and the desired computational lower bounds follow as Theorem 1.
An immediate consequence of Proposition 3 is the following result (proved in Section A.4) showing that any solver induces a solver for a corresponding instance of the problem.
Let the assumption of Proposition 3 hold. Suppose is a test for with Type-I+II error probability . Then is a test for the whose Type-I+II error probability is upper bounded by with given by the right-hand side of (9).
The following theorem establishes the computational limit of the problem as shown in Fig. 1.
Assume Hypothesis 1 holds for a fixed . Let . Let and be such that
where under and under . Consequently, if Hypothesis 1 holds for all , then the above holds for all and such that
Consider the asymptotic regime given by (1). The function in (11) gives the computational barrier for the problem (see Fig. 1). Compared to the statistical limit given in (4), we note that if and only if , in which case computational efficiency incurs a significant penalty on the detection performance. Interestingly, this phenomenon is in line with the observation reported in for the noisy submatrix detection problem, where the statistical limit can be attained if and only if the submatrix size exceeds the power of the matrix size.
Extensions and Open Problems
In this section, we discuss the extension of our results to: (1) the planted dense subgraph recovery and DKS problem; (2) the PDS problem where the planted dense subgraph has a deterministic size. (3) the bipartite PDS problem;
Closely related to the PDS detection problem is the recovery problem, where given a graph generated from , the task is to recover the planted dense subgraph. As a consequence of our computational lower bound for detection, we discuss implications on the tractability of the recovery problem as well as the closely related problem as illustrated in Fig. 2.
Consider the asymptotic regime of (1), where it has been shown that recovery is possible if and only if and . Note that in this case the recovery problem is harder than finding the , because if the planted dense subgraph is recovered with high probability, we can obtain a -approximation of the densest -subgraph for any in polynomial time.If the planted dense subgraph size is smaller than , output any -subgraph containing it; otherwise output any of its -subgraph. Results in imply that the planted dense subgraph can be recovered in polynomial time in the simple (green) regime of Fig. 2 where . Consequently -approximation of the DKS can be found efficiently in this regime.
Conversely, given a polynomial time -factor approximation algorithm to the DKS problem with the output , we can distinguish versus if and in polynomial time as follows: Fix any positive such that . Declare if the density of is larger than and otherwise. Assuming , one can show that the density of is at most under and at least under . Hence, our computational lower bounds for the PC problem imply that the densest -subgraph as well as the planted dense subgraph is hard to approximate to any constant factor if (the red regime in Fig. 1). Whether is hard to approximate with any constant factor in the blue regime of is left as an interesting open problem.
2 PDS Problem with a Deterministic Size
Nonetheless, our result on the hardness of solving the PDS problem extends to the case of deterministic dense subgraph size if the tests are required to be monotone. (A test is monotone if implies whenever is obtained by adding edges to .) It is intuitive to assume that any reasonable test should be more likely to declare the existence of the planted dense subgraph if the graph contains more edges, such as the linear and scan test defined in (3). Moreover, by the monotonicity of the likelihood ratio, the statistically optimal test is also monotone. If we restrict our scope to monotone tests, then our computational lower bound implies that for the PDS problem with a deterministic size, there is no efficiently computable monotone test in the hard regime of in Fig. 1. In fact, for a given monotone polynomial-time solver for the PDS problem with size , the can be solved by in polynomial time because with high probability the planted dense subgraph is of size at least . It is an interesting open problem to prove the computational lower bounds without restricting to monotone tests, or prove the optimal polynomial-time tests are monotone. We conjecture that the computational limit of of fixed size is identical to that of the random size, which can indeed by established in the bipartite case as discussed in the next subsection.
Finally, we can show that the PDS recovery problem with a deterministic planted dense subgraph size is computationally intractable if (the red regime in Fig. 1). This follows from the fact that given a polynomial-time algorithm for the PDS recovery problem with size , we can construct a polynomial-time solver for if (See Appendix B for a formal statement and the proof).
3 Bipartite PDS Problem
Let denote the bipartite Erdős-Rényi random graph model with top vertices and bottom vertices. Let denote the bipartite variant of the planted densest subgraph model in Definition 1 with a planted dense subgraph of top vertices and bottom vertices on average. The bipartite PDS problem with parameters , denoted by , refers to the problem of testing versus .
References
Appendix A Proofs
Combining (12) and (13) yields (2) with . ∎
A.2 Proof of Proposition 2
For the scan test statistic, under the null hypothesis, for any fixed subset of size , . By the union bound and the Bernstein inequality,
Under the alternative hypothesis, conditional on for some , and thus is stochastically dominated by . By the multiplicative Chernoff bound,
A.3 Proof of Proposition 3
where the last inequality follows from (16) and (17). ∎
The following lemma is useful for upper bounding the total variation distance between a truncated mixture of product distribution and a product distribution .
where is an independent copy of .
By definition of the total variation distance,
where (19) is Cauchy-Schwartz inequality, (21) follows from Fubini theorem. This proves the desired (18). ∎
Note that can be equivalently generated as follows: Throw balls indexed by into bins indexed by independently and uniformly at random; let denote the set of balls in the bin. Furthermore, Fix a subset and let . Conditioned on , can be generated by throwing balls indexed by into bins indexed by independently and uniformly at random. We need the following negative association property [19, Definition 1].
Fix a subset and let . Let be an independent copy of conditioned on . Then conditioned on , the full vector is negatively associated, i.e., for every two disjoint index sets ,
Define the indicator random variables for as
By [19, Proposition 12], the full vector is negatively associated. By definition, we have
which is a non-decreasing function of . Moreover, for distinct pairs , the sets and are disjoint. Applying [19, Proposition 8] yields the desired statement. ∎
The negative association property of allows us to bound the expectation of any non-decreasing function of conditional on and as if they were independent [19, Lemma 2], i.e., for any collection of non-decreasing functions ,
Let denote the unordered pair of and . For any set , let denote the set of unordered pairs of distinct elements in , i.e., , and let . For with , let denote the bipartite graph where the set of left (right) vertices is (resp. ) and the set of edges is the set of edges in from vertices in to vertices in . For , let denote the subgraph of induced by . Let denote the edge distribution of for .
where the first inequality follows from the convexity of , and the last inequality follows from applying the Chernoff bound to . Fix an such that . Define for and for . By the triangle inequality,
where follows since for all ; is because the number of edges is a sufficient statistic for testing versus on the submatrix of the adjacency matrix; follows from Lemma 1. Therefore,
To bound the term in (27), applying Lemma 2 yields
The proposition follows by combining (25), (26), (27), (28) and (31). ∎
A.4 Proof of Proposition 4
A.5 Proof of Theorem 1
Fix and that satisfy (10). Then it is straightforward to verify that
where the above inequality follows from (32). Therefore, (35) contradicts our assumption that Hypothesis 1 holds for . Finally, if Hypothesis 1 holds for any , (11) follows from (10) by sending . ∎
Appendix B Computational Lower Bounds for Approximately Recovering a Planted Dense Subgraph with Deterministic Size
Let denote the planted dense subgraph model with vertices and a deterministic dense subgraph size : (1) A random set of size is uniformly chosen from ; (2) for any two vertices, they are connected with probability if both of them are in and with probability otherwise, where . Let PDSR () denote the planted dense subgraph recovery problem, where given a graph generated from and an , the task is to output a set of size such that is a -approximation of , i.e., . The following theorem implies that PDSR () is at least as hard as PDS if . Notice that in PDSR (), the planted dense subgraph has a deterministic size , while in PDS , the size of the planted dense subgraph is binomially distributed with mean .
For any constant and , suppose there is an algorithm with running time that solves the PDSR () problem with probability . Then there exists a test with running time at most that solves the PDS problem with Type-I+II error probabilities at most , where the constant only depends on and .
Given a graph , we construct a sequence of graphs sequentially as follows: Choose a permutation on the vertices uniformly at random. Let . For each , replace the vertex in with a new vertex that connects to all other vertices independently at random with probability . We run the given algorithm on and let denote the outputs which are sets of vertices. Let denote the total number of edges in and . Define a test such that if and only if . The construction of each takes time units; the running time of on is at most time units; the computation of takes at most time units. Therefore, the total running time of is at most .
Next we upper bound the Type-I and II error probabilities of . Let denote a positive constant whose value may depend on the context. If , then all are distributed according to . By the union bound and the Bernstein inequality,
Appendix C A Lemma on Hypergeometric Distributions
Next assume that . Then and . Let . Then which dominates stochastically. It follows that
In the rest of the proof we shall focus on the intermediate regime: . Since dominates stochastically,
Let and , which is an independent copy of . Next we use a decoupling argument to replace by :
where (39) is by Cauchy-Schwartz inequality and (40) is a standard decoupling inequality (see, e.g., [37, Theorem 1]).
The first expectation on the right-hand side (41) can be easily upper bounded as follows: Since , we have . Using the convexity of the exponential function:
where the last inequality follows from .
which, in view of (38), (41) and (43), completes the proof of the lemma. We proceed toward this end by truncating on the value of . First note that
where the last inequality follows from and . It follows from the definition that
where follows because and ; follows because ; follows because and ; follows because ; holds because for .
Recall that . Then . Hence, we have
By conditioning on and averaging with respect to , we have
where follows from for ; follows because and ; follows due to (47) and ; follows because . Assembling (45), (46) and (48), we complete the proof of (44), hence the lemma. ∎