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 G(N,q)\mathcal{G}(N,q) denote the Erdős-Rényi random graph with NN vertices, where each pair of vertices is connected independently with probability qq. Let G(N,K,p,q)\mathcal{G}(N,K,p,q) denote the planted dense subgraph model with NN vertices where: (1) each vertex is included in the random set SS independently with probability KN\frac{K}{N}; (2) for any two vertices, they are connected independently with probability pp if both of them are in SS and with probability qq otherwise, where p>qp>q. In this case, the vertices in SS form a community with higher connectivity than elsewhere. The planted dense subgraph here has a random size with mean KK, which is similar to the models adopted in , instead of a deterministic size KK as assumed in .

The planted dense subgraph detection problem with parameters (N,K,p,q)(N,K,p,q), henceforth denoted by PDS(N,K,p,q){\sf PDS}(N,K,p,q), refers to the problem of distinguishing hypotheses:

The statistical difficulty of the problem depends on the parameters (N,K,p,q)(N,K,p,q). Intuitively, if the expected dense subgraph size KK decreases, or if the edge probabilities pp and qq both decrease by the same factor, or if pp decreases for qq 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 (N,K,p,q)(N,K,p,q) 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., p=cqp=cq for some constant c>1c>1. 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 G(n,k,γ){\mathcal{G}}(n,k,\gamma) denote the planted clique model in which we add edges to kk vertices uniformly chosen from G(n,γ){\mathcal{G}}(n,\gamma) to form a clique.

The PC detection problem with parameters (n,k,γ)(n,k,\gamma), denoted by PC(n,k,γ){\sf PC}(n,k,\gamma) henceforth, refers to the problem of distinguishing hypotheses:

The problem of finding the planted clique has been extensively studied for γ=12\gamma=\frac{1}{2} and the state-of-the-art polynomial-time algorithms only work for k=Ω(n)k=\Omega(\sqrt{n}). There is no known polynomial-time solver for the PC problem for k=o(n)k=o(\sqrt{n}) and any constant γ>0\gamma>0. It is conjectured that the PC problem cannot be solved in polynomial time for k=o(n)k=o(\sqrt{n}) with γ=12\gamma=\frac{1}{2}, which we refer to as the PC Hypothesis.

Fix some constant 0<γ≤120<\gamma\leq\frac{1}{2}. For any sequence of randomized polynomial-time tests {ψn,kn}\{\psi_{n,k_{n}}\} such that lim sup⁡n→∞log⁡knlog⁡n<1/2\limsup_{n\to\infty}\frac{\log k_{n}}{\log n}<1/2,

The PC Hypothesis with γ=12\gamma=\frac{1}{2} is similar to [30, Hypothesis 1] and [11, Hypothesis BPC\mathbf{B_{PC}}]. Our computational lower bounds require that the PC Hypothesis holds for any positive constant γ\gamma. An even stronger assumption that PC Hypothesis holds for γ=2−log⁡0.99n\gamma=2^{-\log^{0.99}n} 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 nΩ(log⁡nlog⁡(1/γ))n^{\Omega(\frac{\log n}{\log(1/\gamma)})} queries for detecting the planted bi-clique in an Erdős-Rényi random bipartite graph with edge probability γ\gamma.

We consider the PDS(N,K,p,q){\sf PDS}(N,K,p,q) problem in the following asymptotic regime:

where c>1c>1 is a fixed constant, α∈\alpha\in governs the sparsity of the graph,The case of α>2\alpha>2 is not interesting since detection is impossible even if the planted subgraph is the entire graph (K=NK=N). and β∈\beta\in captures the size of the dense subgraph. Clearly the detection problem becomes more difficult if either α\alpha increases or β\beta decreases. Assuming the PC Hypothesis holds for any positive constant γ\gamma, we show that the parameter space of (α,β)(\alpha,\beta) is partitioned into three regimes as depicted in Fig. 1:

The Simple Regime: β>12+α4\beta>\frac{1}{2}+\frac{\alpha}{4}. The dense subgraph can be detected in linear time with high probability by thresholding the total number of edges.

The Hard Regime: α<β<12+α4\alpha<\beta<\frac{1}{2}+\frac{\alpha}{4}. Reliable detection can be achieved by thresholding the maximum number of edges among all subgraphs of size KK; however, no polynomial-time solver exists in this regime.

The Impossible Regime: β<min⁡{α,12+α4}\beta<\min\{\alpha,\frac{1}{2}+\frac{\alpha}{4}\}. 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 α=2/3\alpha=2/3: For moderately sparse graphs with α<2/3\alpha<2/3, there exists a combinatorial algorithm that can detect far smaller communities than any efficient procedures; For highly sparse graphs with α>2/3\alpha>2/3, 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 (β>2/3\beta>2/3). 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 β<12+α4\beta<\frac{1}{2}+\frac{\alpha}{4}. It should be noted that Fig. 1 only captures the leading polynomial term according to the parametrization (1); at the boundary β=α/4+1/2\beta=\alpha/4+1/2, 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 k=Ω(nlog⁡n)k=\Omega(\sqrt{n\log n}) and the more sophisticated spectral method succeeds if k=Ω(n)k=\Omega(\sqrt{n}) .

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 Θ(1N)\Theta(\frac{1}{N}) (resp. Θ(log⁡NN)\Theta(\frac{\log N}{N}) ), 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 NβN^{\beta} and the edge density decays more slowly as N−αN^{-\alpha}. 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 KK-subgraph of the random graph ensemble G(N,K,p,q){\mathcal{G}}(N,K,p,q), 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 KK-subgraph within any constant factor in the regime of α<β<12+α4\alpha<\beta<\frac{1}{2}+\frac{\alpha}{4}, 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 γ=12\gamma=\frac{1}{2}, e.g. cryptographic applications , approximating Nash equilibrium , testing kk-wise independence , etc. More recently, the PC Hypothesis with γ=12\gamma=\frac{1}{2} 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 γ\gamma. An even stronger assumption that PC Hypothesis holds for γ=2−log⁡0.99n\gamma=2^{-\log^{0.99}n} has been used in for public-key cryptography. It is an interesting open problem to prove that PC Hypothesis for a fixed γ∈(0,12)\gamma\in(0,\frac{1}{2}) follows from that for γ=12\gamma=\frac{1}{2}.

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 G(n,γ){\mathcal{G}}(n,\gamma) under H0H_{0} and G(n,k,γ){\mathcal{G}}(n,k,\gamma) under H1H_{1}, and arrive at a large sparse graph whose distribution is exactly G(N,q){\mathcal{G}}(N,q) under H0H_{0} and approximately equal to G(N,K,p,q){\mathcal{G}}(N,K,p,q) under H1H_{1}. 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 KK-subgraph (DKS) problem refers to finding the subgraph of KK 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 η\eta-factor approximation algorithm, which outputs a subgraph with KK vertices containing at least a 1η\frac{1}{\eta}-fraction of the number of edges in the densest KK-subgraph. Proving the NP-hardness of (1+ϵ)(1+\epsilon)-approximation for DKS for any fixed ϵ>0\epsilon>0 is a longstanding open problem. See for a comprehensive discussion. Assuming the PC Hypothesis holds with γ=12\gamma=\frac{1}{2}, shows that the DKS problem is hard to approximate within any constant factor even if the densest KK-subgraph is a clique of size K=NβK=N^{\beta} for any β<1\beta<1, where NN 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 G(N,K,p,q)G(N,K,p,q) under the scaling (1), where it is known that the planted dense subgraph can be exactly recovered in polynomial time if β>12+α2\beta>\frac{1}{2}+\frac{\alpha}{2} (see the simple region in Fig. 2 below), implying that the densest KK-subgraph can be approximated within a factor of 1+ϵ1+\epsilon in polynomial time for any ϵ>0\epsilon>0. On the other hand, our computational lower bound for PDS(N,K,p,q){\sf PDS}(N,K,p,q) shows that any constant-factor approximation of the densest KK-subgraph has high average-case hardness if α<β<12+α4\alpha<\beta<\frac{1}{2}+\frac{\alpha}{4} (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 KK nodes arbitrarily, and then resampling the edges among the KK 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 KK 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 KK-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 KK-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 KK (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 PDS(N,K,p,q){\sf PDS}(N,K,p,q) problem with p=cqp=cq for a fixed constant c>1c>1. For a given pair (N,K)(N,K), one can ask the question: What is the smallest density qq such that it is possible to reliably detect the planted dense subgraph? When the subgraph size KK is deterministic, this question has been thoroughly investigated by Arias-Castro and Verzelen for general (N,K,p,q)(N,K,p,q) and the statistical limit with sharp constants has obtained in certain asymptotic regime. Their analysis treats the dense regime log⁡(1∨(Kq)−1)=o(log⁡NK)\log(1\vee(Kq)^{-1})=o(\log\frac{N}{K}) and sparse regime log⁡NK=O(log⁡(1∨(Kq)−1))\log\frac{N}{K}=O(\log(1\vee(Kq)^{-1})) separately. Here as we focus on the special case of p=cqp=cq 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 PDS{\sf PDS} problem in Definition 1 has the same statistical detection limit as the PDS{\sf PDS} problem with a deterministic size KK 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 q=O(1Klog⁡eNK∧N2K4)q=O(\frac{1}{K}\log\frac{eN}{K}\wedge\frac{N^{2}}{K^{4}}), then there exists no test which can detect the planted subgraph reliably.

2 Upper Bound

Let AA denote the adjacency matrix of the graph GG. 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 KK-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 p=cqp=cq for a constant c>1c>1. For the linear test statistic, set τ1=(N2)q+(K2)(p−q)/2\tau_{1}=\binom{N}{2}q+\binom{K}{2}(p-q)/2. For the scan test statistic, set τ2=(K2)(p+q)/2\tau_{2}=\binom{K}{2}(p+q)/2. Then there exists a constant CC which only depends on cc such that

To illustrate the implications of the above lower and upper bounds, consider the PDS(N,K,p,q){\sf PDS}(N,K,p,q) problem with the parametrization p=cqp=cq, q=N−αq=N^{-\alpha} and K=NβK=N^{\beta} for α>0\alpha>0 and β∈(0,1)\beta\in(0,1) and c>1c>1. In this asymptotic regime, the fundamental detection limit is characterized by the following function

Note that TlinT_{\rm lin} can be computed in linear time. However, computing TscanT_{\rm scan} amounts to enumerating all subsets of [N][N] of cardinality KK, which can be computationally intensive. Therefore it is unclear whether there exists a polynomial-time solver in the regime α<β<12+α4\alpha<\beta<\frac{1}{2}+\frac{\alpha}{4}. 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 PDS{\sf PDS} solver induces a solver for a corresponding instance of the PC{\sf PC} problem.

Let the assumption of Proposition 3 hold. Suppose ϕ:{0,1}(N2)→{0,1}\phi:\{0,1\}^{\binom{N}{2}}\to\{0,1\} is a test for PDS(N,K,2q,q){\sf PDS}(N,K,2q,q) with Type-I+II error probability η\eta. Then G↦ϕ(G~)G\mapsto\phi({\widetilde{G}}) is a test for the PC(n,k,γ){\sf PC}(n,k,\gamma) whose Type-I+II error probability is upper bounded by η+ξ\eta+\xi with ξ\xi given by the right-hand side of (9).

The following theorem establishes the computational limit of the PDS{\sf PDS} problem as shown in Fig. 1.

Assume Hypothesis 1 holds for a fixed 0<γ≤1/20<\gamma\leq 1/2. Let m0=⌊log⁡2(1/γ)⌋m_{0}=\lfloor\log_{2}(1/\gamma)\rfloor. Let α>0\alpha>0 and 0<β<10<\beta<1 be such that

where G′∼G(N,q)G^{\prime}\sim{\mathcal{G}}(N,q) under H0H_{0} and G′∼G(N,K,p,q)G^{\prime}\sim{\mathcal{G}}(N,K,p,q) under H1H_{1}. Consequently, if Hypothesis 1 holds for all 0<γ≤1/20<\gamma\leq 1/2, then the above holds for all α>0\alpha>0 and 0<β<10<\beta<1 such that

Consider the asymptotic regime given by (1). The function β♯\beta^{\sharp} in (11) gives the computational barrier for the PDS(N,K,p,q){\sf PDS}(N,K,p,q) problem (see Fig. 1). Compared to the statistical limit β∗\beta^{*} given in (4), we note that β∗(α)<β♯(α)\beta^{*}(\alpha)<\beta^{\sharp}(\alpha) if and only if α<23\alpha<\frac{2}{3}, 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 (2/3)th(2/3)^{{\rm th}} 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 G(N,K,p,q){\mathcal{G}}(N,K,p,q), 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 DKS{\sf DKS} 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 β>α\beta>\alpha and α<1\alpha<1. Note that in this case the recovery problem is harder than finding the DKS{\sf DKS}, because if the planted dense subgraph is recovered with high probability, we can obtain a (1+ϵ)(1+\epsilon)-approximation of the densest KK-subgraph for any ϵ>0\epsilon>0 in polynomial time.If the planted dense subgraph size is smaller than KK, output any KK-subgraph containing it; otherwise output any of its KK-subgraph. Results in imply that the planted dense subgraph can be recovered in polynomial time in the simple (green) regime of Fig. 2 where β>12+α2\beta>\frac{1}{2}+\frac{\alpha}{2}. Consequently (1+ϵ)(1+\epsilon)-approximation of the DKS can be found efficiently in this regime.

Conversely, given a polynomial time η\eta-factor approximation algorithm to the DKS problem with the output S^\widehat{S}, we can distinguish H0:G∼G(N,q)H_{0}:G\sim{\mathcal{G}}(N,q) versus H1:G∼G(N,K,p=cq,q)H_{1}:G\sim{\mathcal{G}}(N,K,p=cq,q) if β>α\beta>\alpha and c>ηc>\eta in polynomial time as follows: Fix any positive ϵ>0\epsilon>0 such that (1−ϵ)c>(1+ϵ)η(1-\epsilon)c>(1+\epsilon)\eta. Declare H1H_{1} if the density of S^\widehat{S} is larger than (1+ϵ)q(1+\epsilon)q and H0H_{0} otherwise. Assuming β>α\beta>\alpha, one can show that the density of S^\widehat{S} is at most (1+ϵ)q(1+\epsilon)q under H0H_{0} and at least (1−ϵ)p/η(1-\epsilon)p/\eta under H1H_{1}. Hence, our computational lower bounds for the PC problem imply that the densest KK-subgraph as well as the planted dense subgraph is hard to approximate to any constant factor if α<β<β♯(α)\alpha<\beta<\beta^{\sharp}(\alpha) (the red regime in Fig. 1). Whether DKS{\sf DKS} is hard to approximate with any constant factor in the blue regime of β♯(α)∨α≤β≤12+α2\beta^{\sharp}(\alpha)\vee\alpha\leq\beta\leq\frac{1}{2}+\frac{\alpha}{2} 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 ϕ\phi is monotone if ϕ(G)=1\phi(G)=1 implies ϕ(G′)=1\phi(G^{\prime})=1 whenever G′G^{\prime} is obtained by adding edges to GG.) 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 α<β<β♯\alpha<\beta<\beta^{\sharp} in Fig. 1. In fact, for a given monotone polynomial-time solver ϕ\phi for the PDS problem with size KK, the PDS(N,2K,p,q){\sf PDS}(N,2K,p,q) can be solved by ϕ\phi in polynomial time because with high probability the planted dense subgraph is of size at least KK. 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 PDS{\sf PDS} 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 KK is computationally intractable if α<β<β♯(α)\alpha<\beta<\beta^{\sharp}(\alpha) (the red regime in Fig. 1). This follows from the fact that given a polynomial-time algorithm for the PDS recovery problem with size KK, we can construct a polynomial-time solver for PDS(N,K,p=cq,q){\sf PDS}(N,K,p=cq,q) if α<β\alpha<\beta (See Appendix B for a formal statement and the proof).

3 Bipartite PDS Problem

Let Gb(N,q)\mathcal{G}_{\rm b}(N,q) denote the bipartite Erdős-Rényi random graph model with NN top vertices and NN bottom vertices. Let Gb(N,K,p,q)\mathcal{G}_{\rm b}(N,K,p,q) denote the bipartite variant of the planted densest subgraph model in Definition 1 with a planted dense subgraph of KK top vertices and KK bottom vertices on average. The bipartite PDS problem with parameters (N,K,p,q)(N,K,p,q), denoted by BPDS(N,K,p,q){\sf BPDS}(N,K,p,q), refers to the problem of testing H0:G∼Gb(N,q)H_{0}:G\sim\mathcal{G}_{\rm b}(N,q) versus H1:G∼Gb(N,K,p,q)H_{1}:G\sim\mathcal{G}_{\rm b}(N,K,p,q).

References

Appendix A Proofs

Combining (12) and (13) yields (2) with h≜log⁡∘τh\triangleq\log\circ\tau. ∎

A.2 Proof of Proposition 2

For the scan test statistic, under the null hypothesis, for any fixed subset SS of size KK, ∑i,j∈SAij∼Binom((K2),q)\sum_{i,j\in S}A_{ij}\sim{\rm Binom}\left(\binom{K}{2},q\right). By the union bound and the Bernstein inequality,

Under the alternative hypothesis, conditional on ∣S∣=K′|S|=K^{\prime} for some K′≥0.9KK^{\prime}\geq 0.9K, ∑i,j∈SAij∼Binom((K′2),p)\sum_{i,j\in S}A_{ij}\sim{\rm Binom}\left(\binom{K^{\prime}}{2},p\right) and thus TscanT_{\rm scan} is stochastically dominated by Binom((K′∧K2),p){\rm Binom}\left(\binom{K^{\prime}\wedge K}{2},p\right). 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 PYP_{Y} and a product distribution QYQ_{Y}.

where X~{\widetilde{X}} is an independent copy of X∼PXX\sim P_{X}.

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 {Vt:t∈[n]}\{V_{t}:t\in[n]\} can be equivalently generated as follows: Throw balls indexed by [N][N] into bins indexed by [n][n] independently and uniformly at random; let VtV_{t} denote the set of balls in the ttht^{{\rm th}} bin. Furthermore, Fix a subset C⊂[n]C\subset[n] and let S=∪t∈CVtS=\cup_{t\in C}V_{t}. Conditioned on SS, {Vt:t∈C}\{V_{t}:t\in C\} can be generated by throwing balls indexed by SS into bins indexed by CC independently and uniformly at random. We need the following negative association property [19, Definition 1].

Fix a subset C⊂[n]C\subset[n] and let S=∪t∈CVtS=\cup_{t\in C}V_{t}. Let {V~t:t∈C}\{{\widetilde{V}}_{t}:t\in C\} be an independent copy of {Vt:t∈C}\{V_{t}:t\in C\} conditioned on SS. Then conditioned on SS, the full vector {∣Vs∩V~t∣:s,t∈C}\{|V_{s}\cap\widetilde{V}_{t}|:s,t\in C\} is negatively associated, i.e., for every two disjoint index sets I,J⊂C×CI,J\subset C\times C,

Define the indicator random variables Zm,s,tZ_{m,s,t} for m∈S,s,t∈Cm\in S,s,t\in C as

By [19, Proposition 12], the full vector {Zm,s,t:m∈S,s,t∈C}\{Z_{m,s,t}:m\in S,s,t\in C\} is negatively associated. By definition, we have

which is a non-decreasing function of {Zm,s,t:m∈S}\{Z_{m,s,t}:m\in S\}. Moreover, for distinct pairs (s,t)≠(s′,t′)(s,t)\neq(s^{\prime},t^{\prime}), the sets {(m,s,t):m∈S}\{(m,s,t):m\in S\} and {(m,s′,t′):m∈S}\{(m,s^{\prime},t^{\prime}):m\in S\} are disjoint. Applying [19, Proposition 8] yields the desired statement. ∎

The negative association property of {∣Vs∩V~t∣:s,t∈C}\{|V_{s}\cap\widetilde{V}_{t}|:s,t\in C\} allows us to bound the expectation of any non-decreasing function of {∣Vs∩V~t∣:s,t∈C}\{|V_{s}\cap\widetilde{V}_{t}|:s,t\in C\} conditional on CC and SS as if they were independent [19, Lemma 2], i.e., for any collection of non-decreasing functions {fs,t:s,t∈[n]}\{f_{s,t}:s,t\in[n]\},

Let [i,j][i,j] denote the unordered pair of ii and jj. For any set I⊂[N]I\subset[N], let E(I){\mathcal{E}}(I) denote the set of unordered pairs of distinct elements in II, i.e., E(I)={[i,j]:i,j∈S,i≠j}{\mathcal{E}}(I)=\{[i,j]:i,j\in S,i\neq j\}, and let E(I)c=E([N])∖E(I){\mathcal{E}}(I)^{c}={\mathcal{E}}([N])\setminus{\mathcal{E}}(I). For s,t∈[n]s,t\in[n] with s≠ts\neq t, let G~VsVt{\widetilde{G}}_{V_{s}V_{t}} denote the bipartite graph where the set of left (right) vertices is VsV_{s} (resp. VtV_{t}) and the set of edges is the set of edges in G~{\widetilde{G}} from vertices in VsV_{s} to vertices in VtV_{t}. For s∈[n]s\in[n], let G~VsVs{\widetilde{G}}_{V_{s}V_{s}} denote the subgraph of G~{\widetilde{G}} induced by VsV_{s}. Let P~VsVt{\widetilde{P}}_{V_{s}V_{t}} denote the edge distribution of G~VsVt{\widetilde{G}}_{V_{s}V_{t}} for s,t∈[n]s,t\in[n].

where the first inequality follows from the convexity of (P,Q)↦dTV(P,Q)(P,Q)\mapsto d_{\rm TV}(P,Q), and the last inequality follows from applying the Chernoff bound to ∣S∣|S|. Fix an S⊂[N]S\subset[N] such that ∣S∣≤1.5K|S|\leq 1.5K. Define PVtVt=∏[i,j]∈E(Vt)Bern(q)P_{V_{t}V_{t}}=\prod_{[i,j]\in{\mathcal{E}}(V_{t})}{\rm Bern}(q) for t∈[k]t\in[k] and PVsVt=∏(i,j)∈Vs×VtBern(p)P_{V_{s}V_{t}}=\prod_{(i,j)\in V_{s}\times V_{t}}{\rm Bern}(p) for 1≤s<t≤k1\leq s<t\leq k. By the triangle inequality,

where (a)(a) follows since P~VtVt=PVtVt{\widetilde{P}}_{V_{t}V_{t}}=P_{V_{t}V_{t}} for all t∈[k]t\in[k]; (b)(b) is because the number of edges E(Vs,Vt)E(V_{s},V_{t}) is a sufficient statistic for testing P~VsVt{\widetilde{P}}_{V_{s}V_{t}} versus PVsVtP_{V_{s}V_{t}} on the submatrix AVsVtA_{V_{s}V_{t}} of the adjacency matrix; (c)(c) 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 α>0\alpha>0 and 0<β<10<\beta<1 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 γ\gamma. Finally, if Hypothesis 1 holds for any γ>0\gamma>0, (11) follows from (10) by sending γ↓0\gamma\downarrow 0. ∎

Appendix B Computational Lower Bounds for Approximately Recovering a Planted Dense Subgraph with Deterministic Size

Let G~(N,K,p,q)\widetilde{{\mathcal{G}}}(N,K,p,q) denote the planted dense subgraph model with NN vertices and a deterministic dense subgraph size KK: (1) A random set SS of size KK is uniformly chosen from [N][N]; (2) for any two vertices, they are connected with probability pp if both of them are in SS and with probability qq otherwise, where p>qp>q. Let PDSR (n,K,p,q,ϵn,K,p,q,\epsilon) denote the planted dense subgraph recovery problem, where given a graph generated from G~(N,K,p,q)\widetilde{{\mathcal{G}}}(N,K,p,q) and an ϵ<1\epsilon<1, the task is to output a set S^\widehat{S} of size KK such that S^\widehat{S} is a (1−ϵ)(1-\epsilon)-approximation of SS, i.e., ∣S^∩S∣≥(1−ϵ)K|\widehat{S}\cap S|\geq(1-\epsilon)K. The following theorem implies that PDSR (N,K,p=cq,q,ϵN,K,p=cq,q,\epsilon) is at least as hard as PDS (N,K,p=cq,q)(N,K,p=cq,q) if Kq=Ω(log⁡N)Kq=\Omega(\log N). Notice that in PDSR (N,K,p,q,ϵN,K,p,q,\epsilon), the planted dense subgraph has a deterministic size KK, while in PDS (N,K,p,q)(N,K,p,q), the size of the planted dense subgraph is binomially distributed with mean KK.

For any constant ϵ<1\epsilon<1 and c>0c>0, suppose there is an algorithm AN{\mathcal{A}}_{N} with running time TNT_{N} that solves the PDSR (N,K,cq,q,ϵN,K,cq,q,\epsilon) problem with probability 1−ηN1-\eta_{N}. Then there exists a test ϕN\phi_{N} with running time at most N2+NTN+NK2N^{2}+NT_{N}+NK^{2} that solves the PDS (N,2K,cq,q)(N,2K,cq,q) problem with Type-I+II error probabilities at most ηN+e−CK+2Ne−CK2q+Klog⁡N\eta_{N}+e^{-CK}+2Ne^{-CK^{2}q+K\log N}, where the constant C>0C>0 only depends on ϵ\epsilon and cc.

Given a graph GG, we construct a sequence of graphs G1,…,GNG_{1},\ldots,G_{N} sequentially as follows: Choose a permutation π\pi on the NN vertices uniformly at random. Let G0=GG_{0}=G. For each t∈[N]t\in[N], replace the vertex π(t)\pi(t) in Gt−1G_{t-1} with a new vertex that connects to all other vertices independently at random with probability qq. We run the given algorithm AN{\mathcal{A}}_{N} on G1,…,GNG_{1},\ldots,G_{N} and let S1,…,SNS_{1},\ldots,S_{N} denote the outputs which are sets of KK vertices. Let E(Si,Si)E(S_{i},S_{i}) denote the total number of edges in SiS_{i} and τ=q+(1−ϵ)2(p−q)/2\tau=q+(1-\epsilon)^{2}(p-q)/2. Define a test ϕ:G→{0,1}\phi:G\to\{0,1\} such that ϕ(G)=1\phi(G)=1 if and only if max⁡i∈[N]E(Si,Si)>τ(K2)\max_{i\in[N]}E(S_{i},S_{i})>\tau\binom{K}{2}. The construction of each GiG_{i} takes NN time units; the running time of A{\mathcal{A}} on GiG_{i} is at most TNT_{N} time units; the computation of E(Si,Si)E(S_{i},S_{i}) takes at most K2K^{2} time units. Therefore, the total running time of ϕ\phi is at most N2+NTN+NK2N^{2}+NT_{N}+NK^{2}.

Next we upper bound the Type-I and II error probabilities of ϕ\phi. Let C=C(ϵ,c)C=C(\epsilon,c) denote a positive constant whose value may depend on the context. If G∼G(N,q)G\sim\mathcal{G}(N,q), then all GiG_{i} are distributed according to G(N,q)\mathcal{G}(N,q). By the union bound and the Bernstein inequality,

Appendix C A Lemma on Hypergeometric Distributions

Next assume that m≤log⁡epmm\leq\log\frac{{\rm e}p}{m}. Then m≤log⁡pm\leq\log p and λ=bmlog⁡epm\lambda=\frac{b}{m}\log\frac{{\rm e}p}{m}. Let (s1,…,sm) ∼i.i.d. Bern(mp−m)({s_{1},\ldots,s_{m}})\,{\stackrel{{\scriptstyle\text{i.i.d.}}}{{\sim}}}\,{\rm Bern}(\frac{m}{p-m}). Then S=∑i=1msi∼Bin(m,mp−m)S=\sum_{i=1}^{m}s_{i}\sim\text{Bin}(m,\frac{m}{p-m}) which dominates HH stochastically. It follows that

In the rest of the proof we shall focus on the intermediate regime: log⁡epm≤m≤p4\log\frac{{\rm e}p}{m}\leq m\leq\frac{p}{4}. Since SS dominates HH stochastically,

Let (t1,…,tm) ∼i.i.d. Bern(mp−m)({t_{1},\ldots,t_{m}})\,{\stackrel{{\scriptstyle\text{i.i.d.}}}{{\sim}}}\,{\rm Bern}(\frac{m}{p-m}) and T=∑i=1mtiT=\sum_{i=1}^{m}t_{i}, which is an independent copy of SS. Next we use a decoupling argument to replace S2S^{2} by STST:

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 m≥log⁡epmm\geq\log\frac{{\rm e}p}{m}, we have λ≤b\lambda\leq b. Using the convexity of the exponential function:

where the last inequality follows from max⁡0≤x≤1xlog⁡ex=1\max_{0\leq x\leq 1}x\log\frac{{\rm e}}{x}=1.

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 TT. First note that

where the last inequality follows from S≤mS\leq m and λm≤blog⁡epm\lambda m\leq b\log\frac{{\rm e}p}{m}. It follows from the definition that

where (a)(a) follows because (mt)≤(emt)t\binom{m}{t}\leq\left(\frac{em}{t}\right)^{t} and m≤p/2m\leq p/2; (b)(b) follows because mt≤8mλ≤8blog⁡epm\frac{m}{t}\leq 8m\lambda\leq 8b\log\frac{{\rm e}p}{m}; (c)(c) follows because m≤p/4m\leq p/4 and b≤1/(16e)b\leq 1/(16{\rm e}); (d)(d) follows because λ≤b\lambda\leq b; τ′′(0+)=0\tau^{\prime\prime}(0+)=0 holds because log⁡2<8blog⁡(4e)+log⁡(8eblog⁡(4e))\log 2<8b\log(4{\rm e})+\log\left(8{\rm e}b\log(4{\rm e})\right) for b≤1/(16e)b\leq 1/(16{\rm e}).

Recall that m≥log⁡epmm\geq\log\frac{{\rm e}p}{m}. Then λ=b(1mlog⁡epm∧p2m4)≤b(1∧p2m4)\lambda=b\left(\frac{1}{m}\log\frac{{\rm e}p}{m}\wedge\frac{p^{2}}{m^{4}}\right)\leq b\left(1\wedge\frac{p^{2}}{m^{4}}\right). Hence, we have

By conditioning on TT and averaging with respect to SS, we have

where (a)(a) follows from ex−1≤eax{\rm e}^{x}-1\leq e^{a}x for x∈[0,a]x\in[0,a]; (b)(b) follows because T∼Bin(m,mp−m)T\sim\text{Bin}(m,\frac{m}{p-m}) and p≥2mp\geq 2m; (c)(c) follows due to (47) and 16eb≤116{\rm e}b\leq 1; (d)(d) follows because λ≤bp2m4\lambda\leq b\frac{p^{2}}{m^{4}}. Assembling (45), (46) and (48), we complete the proof of (44), hence the lemma. ∎