Finding Hidden Cliques in Linear Time with High Probability

Yael Dekel, Ori Gurel-Gurevich, Yuval Peres

Introduction

A clique in a graph GG is a subset of its vertices any two of which are connected by an edge. The problem of determining the size of the maximum clique in a graph is known to be NP-complete . It has also been proved that assuming P ≠\neq NP, there exists a constant b>0b>0 for which it is hard to approximate the size of the maximum clique within a factor of nbn^{b}. Therefore, it is natural to investigate the hardness of this problem in the average case.

The Erdös Rényi random graph model, also denoted G(n,12)G(n,\tfrac{1}{2}), is a probability measure on graphs with nn vertices. In this model, a random graph is generated by choosing each pair of vertices independently with probability 12\tfrac{1}{2} to be an edge. It is known that with probability tending to 11 as nn tends to infinity, the size of the largest clique in G(n,12)G(n,\tfrac{1}{2}) is (2+o(1))log⁡n(2+o(1))\log n. There exists a polynomial time algorithm (see for example ) that finds a clique of size (1+o(1))log⁡n(1+o(1))\log n in G(n,12)G(n,\tfrac{1}{2}) with high probability, but even though in expectation G(n,12)G(n,\tfrac{1}{2}) contains many cliques of size (1+ε)log⁡n(1+\varepsilon)\log n for any fixed 0<ε<10<\varepsilon<1, there is no known polynomial time algorithm that finds one. It is plausible to conjecture that this problem is computationally hard, and this hardness has been used in several cryptographic applications .

Numerical calculations show that c0c_{0} is close to 1.651.65. For a mathematical definition of c0c_{0} see Definition 2.2. A refinement of the algorithm that works with high probability for all c≥1.261c\geq 1.261 is presented in Sec. 3.1.

Since , there have been many papers describing algorithms that solve various variants of the hidden clique problem. In an algorithm for finding hidden cliques of size Ω(n)\Omega(\sqrt{n}) based on the Lovász theta function is given, that has two advantages. The first is being able to find the clique also in a semi-random hidden clique model, in which an adversary can remove edges that are not in the clique, and the second is being able to certify the optimality of its solution by providing an upper bound on the size of the maximum clique in the graph.

McSherry gives an algorithm that solves the more general problem of finding a planted partition. In the random graph model described there, we are given a graph where the vertices are randomly partitioned into mm classes, and between every pair of vertices where one is in class ii and the other in class jj there is an edge with probability pijp_{ij}. With the appropriate parameters, this model can be reduced both to the hidden clique model and to the hidden dense graph model that we describe in Sec. 3.2. For both these cases, the result is a polynomial time algorithm that finds the hidden clique (dense graph) with high probability for k=cnk=c\sqrt{n}.

Several attempts have been made to develop polynomial time algorithms for finding hidden cliques of size k=o(n)k=o(\sqrt{n}), so far with no success. For example, Jerrum described the Metropolis process and proved that it cannot find the clique when k=o(n)k=o(\sqrt{n}). Feige and Krauthgamer explain why the algorithm described in fails when k=o(n)k=o(\sqrt{n}). Frieze and Kannan give an algorithm to find a hidden clique of size k=Ω(n1/3log⁡4n)k=\Omega\left(n^{1/3}\log^{4}n\right), however, the algorithm maximizes a certain cubic form, and there are no known polynomial time algorithms for maximizing cubic forms. In Sec. 2.1.3 we give an algorithm that finds the hidden clique when we are given a small part of it by an oracle or an adversary. We prove, that for any k=ω(log⁡nlog⁡log⁡n)k=\omega(\log n\log\log n), knowing only log⁡n+1\log n+1 vertices of the hidden clique enables us to find the rest of them with high probability. For smaller kk’s, log⁡n+1\log n+1 is not enough, but (1+ε)log⁡n(1+\varepsilon)\log n is.

There are many problems in different fields of computer science that are related to the hidden clique problem. Among others, there are connections to cryptography, testing and game theory. For connections to cryptography, see for example where an encryption scheme based on hiding an independent set in a graph is described or where the function whose input is a graph GG and a set KK of kk vertices and whose output is GG with a clique on KK is proposed as a one way function for certain values of kk. For connections to testing, see where Alon et al. prove that if there is no polynomial time algorithm to find hidden cliques of size t>log⁡3nt>\log^{3}n then there is no polynomial time algorithm that can test kk-wise independence of a distribution even when given a polynomial number of samples from it, for k=Θ(log⁡n)k=\Theta(\log n). For connections to game theory, see , where Hazan and Krauthgamer prove that if there is a polynomial time algorithm that finds a Nash equilibrium of a two player game whose social-welfare is close to the maximum, then there is a randomized polynomial time algorithm that finds the hidden clique for k=O(log⁡n)k=O(\log n). The hidden clique model is also related to the planted-SAT model and some models in computational biology .

Proof of Thm. 1.1

Throughout the paper we use the following notations.

Given a graph G=(V,E)G=(V,E), for every v∈Vv\in V and S⊆VS\subseteq V we denote by dS(v)d_{S}(v) the number of neighbors vv has in SS. Formally,

All logarithms in the paper are base 22.

We use the shorthand “whp(f(n)f(n))” to mean: “with probability at least 1−f(n)1-f(n)”.

Given 0<α<10<\alpha<1 and β>0\beta>0, we define

Follows directly from Thm. A.3, by setting t=n1−ε1t=n^{1-\varepsilon_{1}} for the bound on ∣S0∣|S_{0}| and t=k1−ε2t=k^{1-\varepsilon_{2}} for the bound on ∣S0∩K∣|S_{0}\cap K|. ∎

Assume that the events ∣S0∣=(1+o(1))αn|S_{0}|=(1+o(1))\alpha n and ∣S0∩K∣=(1+o(1))αk|S_{0}\cap K|=(1+o(1))\alpha k both occur. By Lemma 2.5 this happens with high probability. We can now apply Cor. A.4 twice.

For the vertices in (V∖S0)∖K\left(V\setminus S_{0}\right)\setminus K, the result follows directly from Cor. A.4 by setting ε=ε1\varepsilon=\varepsilon_{1}. For v∈(V∖S0)∩Kv\in\left(V\setminus S_{0}\right)\cap K, having dS0(v)≥12αn+βαn2d_{S_{0}}(v)\geq\tfrac{1}{2}\alpha n+\beta\tfrac{\sqrt{\alpha n}}{2} is equivalent to having

So setting ε=ε2\varepsilon=\varepsilon_{2} in Cor. A.4, gives that

In order to get a success probability that tends to 11, we need to bound the sum of the probabilities of failing in each iteration by o(1)o(1). We refer the reader to Sec. 2.2 for a detailed analysis of the failure probability of the algorithm.

1.2 Proving the correctness of the second phase of the algorithm

We start by bounding the probability that a hidden clique of size kk contains the kk largest degree vertices in the graph.

Define x=14kx=\tfrac{1}{4}k. Then by Thm. A.3

1.3 Proving the correctness of the third phase of the algorithm

In order to prove that K∗K^{*} is the hidden clique with high probability, we prove a more general Lemma. We prove that if an adversary reveals a subset of the clique that is not too small, we can use it to find the whole clique.

k=O(log⁡nlog⁡log⁡n)k=O(\log n\log\log n) and s≥(1+ε)log⁡ns\geq(1+\varepsilon)\log n for some ε>0\varepsilon>0, or

k≥ω(log⁡nlog⁡log⁡n)k\geq\omega(\log n\log\log n) and s≥log⁡n+1s\geq\log n+1.

Consider an arbitrary subset of KK of size ss. The probability that its vertices have at least l0l_{0} non-clique common neighbors can be bounded by ∑l=l0n−knl2−sl\sum_{l=l_{0}}^{n-k}n^{l}2^{-sl}. Taking union bound over all subsets of size ss of KK gives that the probability that there exists a subset with at least l0l_{0} non-clique common neighbors is bounded by

If k=ω(log⁡nlog⁡log⁡n)k=\omega(\log n\log\log n) then letting s=log⁡n+1s=\log n+1 gives l_{0}=2\big{(}\log n+\log n\log k+\log k\big{)}. Clearly, log⁡n+log⁡k=o(k)\log n+\log k=o(k). To see that log⁡nlog⁡k=o(k)\log n\log k=o(k), denote k=log⁡nf(n)k=\log nf(n) where f(n)=ω(log⁡log⁡n)f(n)=\omega(\log\log n). Then \log n\log k=\log n\big{(}\log\log n+\log\big{(}f(n)\big{)}\big{)}. Clearly, log⁡nlog⁡(f(n))=o(log⁡nf(n))\log n\log(f(n))=o(\log nf(n)), and from the definition of f(n)f(n) we also have log⁡nlog⁡log⁡n=o(log⁡nf(n))\log n\log\log n=o(\log nf(n)).

If k≤O(log⁡nlog⁡log⁡n)k\leq O(\log n\log\log n), then letting s≥(1+ε)log⁡ns\geq(1+\varepsilon)\log n for some small ε>0\varepsilon>0 is enough, since then l0=2ε+2(1+ε)εlog⁡k=o(k)l_{0}=\tfrac{2}{\varepsilon}+\tfrac{2(1+\varepsilon)}{\varepsilon}\log k=o(k). ∎

2 Bounding the failure probability

For any choice of 0<ε1,ε2<120<\varepsilon_{1},\varepsilon_{2}<\tfrac{1}{2} and 0<ε4<1a0<\varepsilon_{4}<\tfrac{1}{a}, denote

Refinements

The subset of SiS_{i} that we use in this variation is the set of all vertices v∈Siv\in S_{i} that have dSi(v)≥12∣Si∣+η∣Si∣2d_{S_{i}}(v)\geq\tfrac{1}{2}|S_{i}|+\eta\tfrac{\sqrt{|S_{i}|}}{2}, for some η>0\eta>0. Since these degrees are not independent we cannot use the same concentration results we used before, so we first prove the following concentration result.

Let G\in G\big{(}n,\tfrac{1}{2}\big{)} and a,c′>0a,c^{\prime}>0. Define a random variable

Then for every 0<ε′<140<\varepsilon^{\prime}<\tfrac{1}{4} it holds that

For every v∈V(G)v\in V(G) define a random variable

Thus, we need to calculate the concentration of FF and GG. Both are edge exposure martingales with Lipschitz constant 2εn\tfrac{2}{\varepsilon\sqrt{n}}. Therefore, by Azuma’s inequality (see, for example ) we get:

Choosing λ=c′n−ε′\lambda=c^{\prime}n^{-\varepsilon^{\prime}} and ε=122πc′n−ε′\varepsilon=\tfrac{1}{2}\sqrt{2\pi}c^{\prime}n^{-\varepsilon^{\prime}} concludes the proof. ∎

2 Finding hidden dense graphs in G​(n,p)𝐺𝑛𝑝G(n,p)

Define the random graph model G(n,p,k,q)G(n,p,k,q) for 0<p<q<10<p<q<1. Given a set of nn vertices, randomly choose a subset KK of kk vertices. For every pair of vertices (u,v)(u,v), the edge between them exists with probability pp if at least one of the two vertices is in V∖KV\setminus K, and with probability qq if they are both in KK. The model discussed in the previous sections is equivalent to G\big{(}n,\tfrac{1}{2},c\sqrt{n},1\big{)}.

To prove Thm. 3.4, as in the hidden clique case, we first prove the correctness of each of the phases of the algorithm, and then bound the failure probability. To prove the correctness of the first phase, we prove Lemmas B.1 and B.2, which are analogous to Lemmas 2.4 and 2.6. To prove the correctness of the second phase, we prove Lemma B.3 and Cor. B.4, which are analogous to Lemma 2.7 and Cor. 2.8. To prove the correctness of the third phase we prove Lemma B.5. The failure probability follows as in Lemma 2.10 by noticing that substituting cp(1−p)q−pc\tfrac{\sqrt{p(1-p)}}{q-p} for cc in the definition of ρ′\rho^{\prime} gives the exact definition of ρ\rho.

Discussion

Our results bring up some interesting questions for future research. For example, one of the advantages of the algorithm presented here is a failure probability that is less than polynomially small in the size of the input. Experimental results shown in suggest that the failure probability of the algorithm described there may also be o(1)o(1). Whether the analysis can be improved to prove this rigorously is an interesting open question. One can also ask whether the analysis in can be improved to show failure probability that is less than polynomially small.

Aside from the most interesting open question of whether there exists an algorithm that finds hidden cliques for k=o(n)k=o(\sqrt{n}), one can ask about ways to find hidden cliques of size k=cnk=c\sqrt{n} as cc gets smaller. In , Alon, Krivelevich and Sudakov give a way to improve the constant for which their algorithm works, at the expense of increasing the running time. This technique can be used for any algorithm that finds hidden cliques, so we describe it here. Pick a random vertex v∈Vv\in V, and run the algorithm only on the subgraph containing vv and its neighborhood. vv is a clique vertex, then the parameters of the algorithm have improved, since instead of having a graph with nn vertices and a hidden clique of size cnc\sqrt{n} we now have a graph with n2\tfrac{n}{2} vertices and a hidden clique of size cnc\sqrt{n}. The expected number of trials we need to do until we pick a clique vertex is O(n)O(\sqrt{n}). This means that if we have an algorithm that finds a hidden clique of size cnc\sqrt{n}, where c≥c0c\geq c_{0}, we can also find a hidden clique for c≥c02c\geq\tfrac{c_{0}}{\sqrt{2}}, while increasing the running time by a factor of n\sqrt{n}. If we wish to improve the constant even further, we can pick rr random vertices and run the algorithm on the subgraph containing them and their common neighborhood. This gives an algorithm that works for constants smaller by up to a factor of 2r/22^{r/2} than the original constant, at the expense of increasing the running time of the algorithm by a factor of nr/2n^{r/2}.

We have described a sequence of algorithms whose running times increase by factors of n\sqrt{n}. It is not known whether the constant can be decreased if we can only increase the running time by a factor smaller than n\sqrt{n}.

Given an algorithm that runs in time O(n2)O(n^{2}) and finds hidden cliques of size cnc\sqrt{n} for any c≥c0c\geq c_{0}, is there an algorithm that runs in time O(n2+ε)O(n^{2+\varepsilon}), where ε<12\varepsilon<\tfrac{1}{2}, and finds hidden cliques of size cnc\sqrt{n} where c<c0c<c_{0}? How small can cc be as a function of ε\varepsilon?

References

Appendix A Concentration inequalities

Throughout the paper, we use the central limit theorem for binomial random variables, and its rate of convergence that was independently discovered by Berry in 1941 and by Esseen in 1942 . For details, see, for example [9, §Sec. 3.4.4].

Let S=X1+⋯+XnS=X_{1}+\cdots+X_{n} where the XiX_{i}’s are independent Bernoulli random variables. Then for every t>0t>0

Then for every c′>0c^{\prime}>0 and 0<ε<120<\varepsilon<\tfrac{1}{2} it holds that

where the last inequality holds because \tfrac{n_{1}}{\sqrt{n_{2}}}\leq O\big{(}\sqrt{n_{1}}\big{)}=o(n_{1}^{1-\varepsilon}). ∎

Appendix B The G​(n,p,k,q)𝐺𝑛𝑝𝑘𝑞G(n,p,k,q) case

The proof is identical to the proof of Lemma 2.4. ∎

Follows from Cor. A.4 the same way as in the proof of Lemma 2.6. ∎

Let G∈G(n,p,k,q)G\in G(n,p,k,q) where k≥c0nlog⁡nk\geq c_{0}\sqrt{n\log n}. Denote the hidden dense graph by KK and the set of kk largest degree vertices by MM. Then

Define x=12(q−p)kx=\tfrac{1}{2}(q-p)k. Then by Thm. A.3

k=O(log⁡nlog⁡log⁡n)k=O(\log n\log\log n) and s\geq\big{(}\tfrac{2}{(q-p)^{2}}+\varepsilon\big{)}\ln n for some ε>0\varepsilon>0, or

k≥ω(log⁡nlog⁡log⁡n)k\geq\omega(\log n\log\log n) and s≥2(q−p)2ln⁡n+1s\geq\tfrac{2}{(q-p)^{2}}\ln n+1.