June 26, 2025
We study a generalization of the classical hidden clique problem to graphs with real-valued edge weights. Formally, we define a hypothesis testing problem. Under the null hypothesis, edges of a complete graph on \(n\) vertices are associated with independent and identically distributed edge weights from a distribution \(P\). Under the alternative hypothesis, \(k\) vertices are chosen at random and the edge weights between them are drawn from a distribution \(Q\), while the remaining ones are sampled from \(P\). The goal is to decide, upon observing the edge weights, which of the two hypotheses they were generated from. We investigate the problem under two different scenarios: (1) when \(P\) and \(Q\) are completely known, and (2) when there is only partial information of \(P\) and \(Q\). In the first scenario, we obtain statistical limits on \(k\) when the two hypotheses are distinguishable, and when they are not. Additionally, in each of the scenarios, we provide bounds on the minimal risk of the hypothesis testing problem when \(Q\) is not absolutely continuous with respect to \(P\). We also provide computationally efficient spectral tests that can distinguish the two hypotheses as long as \(k=\Omega(\sqrt{n})\) in both the scenarios.
The classical hidden clique detection problem is a hypothesis testing problem in which one needs to test whether a given graph \(G\) is a realization of an Erdős-Rényi graph \(\mathcal{G}(n,p)\) or alternatively, a realization of \(\mathcal{G}(n,p)\) along with a planted clique on a subset of \(k=k_n\) vertices that are chosen at random. The hidden clique (or the planted clique) problem is a canonical example of a problem that exhibits a statistical-computational gap in theoretical computer science. While it is possible to determine whether there is a clique of size \(k_n=\Omega(\log n)\) using a brute-force search that runs in quasi-polynomial time, the best known polynomial time algorithms have only been shown to detect cliques of size \(k_n = \Omega(\sqrt{n})\).
In this work, we study a generalization of the hidden clique problem to graphs with edge weights. Let \(P\) and \(Q\) be two distributions on the real line. The weighted hidden clique problem is a hypothesis testing problem that involves observing the complete graph on \(n\) vertices with real-valued edge weights. Under the null hypothesis, edges are associated with independent and identically distributed edge weights from a distribution \(P\). Under the alternative hypothesis, \(k\) vertices are chosen at random and the edge weights between them are drawn from a distribution \(Q\), while the remaining are sampled from \(P\). The goal is to decide, upon observing the edge weights, which of the two hypotheses they were generated from. We investigate the problem under two different scenarios: (1) when the distributions \(P\) and \(Q\) are completely known, and (2) when there is only partial information available of \(P\) and \(Q\).
Our contributions are as follows.
Scenario 1: When the distributions \(P,Q\) are known, we show that, if \(P\neq Q\), the two hypotheses are distinguishable, as long as \(k_n\) grows at a logarithmic rate. If \(Q\) is not absolutely continuous with respect to \(P\), we show that the two hypotheses can always be distinguished as long as \(k_n\to \infty\). On the other hand when \(Q\) is absolutely continuous with respect to \(P\), we obtain statistical limits on \(k\) when the two hypotheses are distinguishable in terms of information divergence measures between \(P\) and \(Q\). We also provide computationally efficient spectral tests that can distinguish the two hypotheses as long as \(k=\Omega(\sqrt{n})\).
Scenario 2: When the distributions \(P\) and \(Q\) are unknown and \(Q\) is not absolutely continuous with respect to \(P\), we provide a polynomial-time test to distinguish the two hypotheses. Under the knowledge of only the means of the two distributions, we also provide a spectral test to distinguish the two hypotheses when \(k=\Omega(\sqrt{n})\).
Note that by taking \(P\) to be the Bernoulli distribution with parameter \(p\) and \(Q\) to be the Dirac distribution at \(1\), the problem reduces to the classical hidden clique problem described before.
The paper is organized as follows: In Section 2, we briefly review the related literature. Section 3 formally describes the problem setting and the main results under both the scenarios. Our main results are proved in Section 4. Section 5 concludes the paper and lists some directions for future work. In the Appendix we recall some basic facts results that are required to prove our main results. Below, we provide the notation used in the rest of the article.
The set of vertices is denoted by \([n] := \{1,2,\cdots,n\}\). For any subset \(S\subseteq[n]\), the set of edges connecting vertices in \(S\) is denoted by \(E(S) := \{(i,j): i,j \in S \text{ and }i<j\}\).
The hidden clique problem has been investigated both in terms of detecting whether a planted clique is present as well as recovering it. In this section, we review some of the related work on the statistical and computational aspects of both problems.
The hidden clique problem in Erdős-Rényi random graphs \(G(n,p)\) (with \(p\) constant) dates back to Jerrum [1] and Kučera [2], who already pointed out that, while hidden cliques of size \(2\log_{1/p} n\) can be detected and recovered without computational restrictions, finding computationally efficient algorithms is a highly nontrivial challenge. Alon, Krivelevich, and Sudakov [3] showed how spectral methods can be used to find a hidden clique of size proportional to \(n^{1/2}\). Efficient non-spectral algorithms that work in the same regime were introduced by Feige and Krauthgamer [4], Feige and Ron [5], Ames and Vavasis [6], and Dekel, Gurel-Gurevich and Peres [7]. The latter paper introduces a particularly simple method that reconstructs the hidden clique with computational complexity of optimal order (\(O(n^2)\)). Deshpande and Montanari [8] show that cliques of size \(\sqrt{n/e}(1+o(1))\) can be recovered, with high probability, by an algorithm of nearly optimal complexity.
The prevalence of the statistical-computational gap mentioned above is referred to as the planted clique conjecture and is contrasted with other related conjectures in Hirahara and Shimizu [9].
Various attempts have been made to prove that it is impossible to find hidden cliques of size \(o(\sqrt{n})\) with computationally efficient methods. Progress has been made in this direction by restricting the class of allowed algorithms. For a sample of such results, see Meka, Potechin, and Wigderson [10], Montanari, Reichman, and Zeitouni [11] Barak, Hopkins, Kelner, Kothari, Moitra, and Potechin [12], and Feldman, Grigorescu, Reyzin, Vempala, and Xiao [13]. Chen and Xu [14] identify four different regimes of hardness of the planted clique problem. Gamarnik and Zadik [15] and Gamarnik [16] study the so-called “Overlap Gap Property” of the planted clique problem, providing further evidence of the computational hardness of recovering planted cliques of size \(o(\sqrt{n})\).
The hypothesis testing framework described in the introduction is also closely related to anomaly detection in deterministic graphs such as trees Arias-Castro, Candès, Helgason, and Zeitouni [17], lattices Arias-Castro, Candès, and Durand [18], Arias-Castro and Grimmett [19]. Here, the edges are equipped with real-valued weights drawn from a normal distribution whose mean depends on whether the edge is between vertices that are among the chosen \(k\) anomalous ones or not. In Addario-Berry, Broutin, Devroye, and Lugosi [20], the setting is generalized. The planted clique problem can be viewed as an anomaly detection problem where the edges within the clique constitute the anomaly. The hypothesis testing problem on Erdős-Rényi graphs is discussed in [21].
The hidden clique problem can also be viewed as a special case of the planted dense subgraph problem where instead of a clique being planted under the alternate hypothesis, edges are generated with a probability \(q>p\) between the \(k_n\) chosen vertices. The planted dense subgraph problem has been extensively studied in [22]–[29].
Recently, several variants and extensions of the hidden clique problem have been investigated. Structures such as the planted tree by Massoulié, Stephan, and Towsley [30], planted Hamiltonian cycle by Bagaria, Ding, Tse, Wu, and Xu [31], planted dense cycle by Mao, Wein, and Zhang [32], planted matching by Moharrami, Moore, and Xu [33], Addario-Berry et al. [34], planted \(r\)-colorable graphs by Louis, Paul, and Raghavendra [35], planted stars by Narang, Perkins, and Wee [36] and the planted bipartite graph by Rotenberg, Huleihel, and Shayevitz [37] have been considered. Additionally, in Dhawan, Mao, and Wein [38], the authors investigate the planted clique problem on a hypergraph, see also Alaluusua and Kumar [39] Algorithms for planted clique recovery have also been investigated on geometric graphs by Avrachenkov, Bobu, Litvak, and Michielan [40]. The problem considered here is also closely related to the weighted stochastic block model, see Heimlicher, Lelarge and Massoulié [41], Lelarge, Massoulié, and Xu [42], Xu, Jog, and Loh [43], where the emphasis is on community reconstruction, rather than detection.
The present work is an extension of the planted dense subgraph detection problem. Instead of having two parameters, \(p\) and \(q\), for edges within and outside the chosen set of \(k\) vertices, we consider a weighted graph where the edge weights are sampled from two distributions \(P\) and \(Q\). The formal problem setting is described in the next section along with our main results.
Consider the complete graph on \(n\) vertices with real-valued edge weights \(\boldsymbol{X}= (X_{ij})_{i,j\in[n]}\) generated according to one of two different distributions. Under the null hypothesis, the edge weights are independent and identically distributed (i.i.d.) from a probability measure \(P\). The resulting weighted graph is denoted by \(\mathcal{G}(n,P)\). Under the alternative hypothesis, \(k\) vertices are chosen uniformly at random and the edge weights between them follow the distribution \(Q\), while the remaining edge weights follow the distribution \(P\). All edge weights are independent and the model is denoted by \(\mathcal{G}(n,k,P,Q)\). We study the hypothesis testing problem \[\mathcal{H}_0: \boldsymbol{X}\sim \mathcal{G}(n,P) \qquad \text{ vs. } \qquad \mathcal{H}_1: \boldsymbol{X}\sim \mathcal{G}(n,k,P,Q)~. \label{eq:hypo95test}\tag{1}\] In the following, we use \(\mathbb{P}_0\) and \(\mathbb{P}_1\) for the distribution of \(\boldsymbol{X}\) under the null and alternative hypotheses, respectively.
A test is a function \(T\colon \mathbb{R}^{\binom{n}{2}} \to \{0,1\}\) that takes \(\boldsymbol{X}\) as input and outputs one of the two hypotheses. The risk of test \(T\) is defined as \[R(T) \ = \ \mathbb{P}_0\big(T(\boldsymbol{X})=1\big)+\mathbb{P}_1\big(T(\boldsymbol{X})=0\big)~. \label{eq:risk95defn}\tag{2}\] As it is well known, the test that minimizes the risk for the binary hypothesis testing problem 1 is the likelihood ratio test defined by \(T^*(\boldsymbol{X}) = 1\) if and only if \(L(\boldsymbol{X})>1\) where \(L(\mathbf{x}) := \frac{\mathbb{P}_1(\mathbf{x})}{\mathbb{P}_0(\mathbf{x})}\) is the likelihood ratio. Our goal is to understand the behavior of the risk of the likelihood ratio test, \(R(T^*)\), in terms of the model parameters, and provide computationally efficient tests, whenever possible. In particular, we wish to understand for what values of \(k \equiv k_n\) does \(R(T^*) \to 1\) (i.e., the two hypotheses are asymptotically indistinguishable), and for what values of \(k_n\) does \(R(T^*) \to 0\) (i.e., there exists a test that solves the problem 1 ). Furthermore we investigate the existence of polynomial-time algorithms to distinguish the two hypotheses. We study the problem under two scenarios: when there is complete information about the distributions \(P\) and \(Q\), and when there is only partial information available. In the following two subsections, we describe the main results in each of these scenarios. All proofs may be found in Section 4.
In this subsection, we assume that the statistician has access to the distributions \(P\) and \(Q\). The difficulty of the hypothesis testing problem 1 is governed by the degree of similarity between the two distributions \(P\) and \(Q\). If \(P=Q\), then the two hypotheses are identical and one cannot differentiate between them. If \(Q\) is not absolutely continuous with respect to \(P\), then \(R(T^*)\) is bounded away from \(1\) for any \(n\). This follows from the following simple result.
Theorem 1. Suppose there exists \(A\subset \mathbb{R}\) such that \(Q(A)>0\) whereas \(P(A)=0\). Then, for any \(n \ge 2\), the optimal risk satisfies \[R(T^*) \ \le \ (1-Q(A))^{\binom{k}{2}}~.\]
In particular, as soon as \(k \to \infty\), \(R(T^*) \to 0\). Next, we consider the case when \(Q\) is absolutely continuous with respect to \(P\). The following proposition asserts that if the optimal risk approaches \(0\), then necessarily \(k\) must grow with \(n\).
Proposition 2. Let \(P,Q\) be such that \(Q\) is absolutely continuous with respect to \(P\). If \(R(T^*) \to 0\) as \(n \to \infty\), then \(k_n \to \infty\).
Moreover, if \(k_n\to \infty\), regardless of how slowly \(k_n\) grows, there exist distributions for which the optimal risk vanishes with \(n\).
Proposition 3. Given any sequence \(k_n \to \infty\), there exist distributions \(P\) and \(Q\), absolutely continuous with respect to each other, such that \(R(T^*) \to 0.\)
We provide an explicit construction of the distributions for which \(R(T^*) \to 0\) in Section 4.3. Further, when \(Q\) is absolutely continuous with respect to \(P\), we provide conditions on \(k_n\) when the optimal risk 2
converges to \(0\) solving the hypothesis testing problem in 1 and,
converges to \(1\) rendering the two hypotheses indistinguishable.
Our results are expressed in terms of standard divergences between probability measures \(Q\) and \(P\) such as the Kullback-Leibler divergence (\(D_{\operatorname{KL}}(Q||P)\)) and the \(\chi^2\)-divergence (\(\chi^2(Q,P)\)), see the Appendix for the definitions.
Theorem 4. Let \(P,Q\) be such that \(Q\) is absolutely continuous with respect to \(P\) and \(\chi^2(Q||P) <\infty\). For any \(\epsilon >0\),
if \(k_n \geq \frac{(2 + \epsilon)\log n}{ D_{\operatorname{KL}}(Q||P)}\), then \(\lim_{n\to \infty} R(T^*) = 0\).
if \(k_n \leq \lfloor 2 \log_{\rho} n -2\log_{\rho} \log_{\rho} n-1+2\log_{\rho} e -\epsilon \rfloor\) where \(\rho = \chi^2(Q|| P) + 1\), then \(\lim_{n\to \infty} R(T^*) = 1\).
In the classical hidden clique problem, the \(\chi^2\)-divergence and the KL -divergence coincide to provide a sharp phase transition for detecting a clique. It is an interesting problem to determine whether such a sharp phase transition exists in the general problem studied here, and if it does, what the exact location of the threshold is. The leading constants in our upper and lower bounds only match in some special cases.
It also follows from the proof of Theorem 4, together with Theorem 1, that the "critical" value of \(k_n\) is at most logarithmic in \(n\):
Corollary 5. For all \(P\neq Q\), there exists a constant \(c>0\), such that if \(k_n\ge c\log n\), then \(R(T^*)\to 0.\)
The bound in Theorem 4(a) is obtained by analyzing the scan test, described in Section 4.4 below. The scan test searches over all possible subsets of \(k\) nodes, computes the likelihood ratio of the weights of edges within the subset, and decides whether it is from \(P\) or \(Q\). This is computationally intensive for large \(n\). As an alternative, we propose a spectral algorithm on the weight matrix \(\boldsymbol{X}\) which runs in polynomial time and can solve 1 as long as \(k_n = \Omega(\sqrt{n})\).
To define the spectral test, let \(p(\cdot)\) and \(q(\cdot)\) denote the densities of the distributions \(P\) and \(Q\) with respect to some common dominating measure. Then we may transform the entries of the matrix \(\boldsymbol{X}\) to obtain a matrix \(\mathbf{Z}= \left(Z_{ij}\right)_{n\times n}\), where \(Z_{i,j} = \phi(X_{ij})\), with \[\phi(x) = \begin{cases} 1 & \text{ if } x\in \mathcal{A}\\ 0 & \text{ otherwise } \end{cases}, \qquad \text{ where } \mathcal{A}= \{x : p(x)>q(x)\}~. \label{eq:transform}\tag{3}\] Note that the total variation distance between \(P\) and \(Q\) equals \(d_{\operatorname{TV}}(P,Q) = |P(\mathcal{A})-Q(\mathcal{A})|\). The maximum eigenvalue of the centered matrix \(\mathbf{Z}-\mathbb{E}_0\mathbf{Z}\) may be used as test statistic. We have the following performance bound:
Theorem 6. Let \(\delta \in (0,1)\) and let \(P,Q\) be two distributions with densities \(p(\cdot), q(\cdot)\) with respect to a common dominating measure on \(\mathbb{R}\). Consider the test \(T_1\) that accepts the null hypothesis if and only if \(\|\mathbf{Z}-\mathbb{E}_0\mathbf{Z}\| \le 4\sqrt{(\log 9)n+\log (4/\delta)}\). Then the risk of the test satisfies \(R(T_1) \le \delta\), whenever \[k>(1+o(1)) \frac{4\sqrt{(\log 9)n+\log (4/\delta)}}{d_{\operatorname{TV}}(P,Q)}~.\]
In this section, we investigate the case when there is only partial information available on the distributions \(P\) and \(Q\). Our first result addresses the case when \(Q\) is not absolutely continuous with respect to \(P\) but the distributions themselves are unknown. In this case, the test used in the proof of Theorem 1 is not feasible. Yet, as the next result shows, even in this scenario, there exists a test distinguishing the two hypotheses, as long as \(k_n\to \infty\). Moreover, the test can be computed in polynomial time.
Theorem 7. Suppose that \(P\) and \(Q\) are unknown and \(Q\) is not absolutely continuous with respect to \(P\). Then, \(R(T^*) \to 0\) if \(k\to \infty\) and \(k\le n/2\).
On the other hand, when \(Q\) is absolutely continuous with respect to \(P\), we provide a spectral test for 1 that uses only the means of \(P\) and \(Q\) and their common support. When the means are different and the distributions have bounded support, the maximum eigenvalue of the centered weight matrix \(\|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\|\) exhibits a gap under the two hypotheses which can be exploited to design a test.
Theorem 8. Let \(\delta \in (0,1)\) and \(P,Q\) be two distributions having a bounded support \([a,b]\) and different means \(\mu_P \neq\mu_Q\). Consider the test \(T_2\) that accepts the null hypothesis if and only if \(\|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\| \le 4(b-a)\sqrt{(\log 9)n+\log (4/\delta)}\). Then the risk of the test satisfies \(R(T_2) \le \delta\) whenever \(k > (1+o(1)) \frac{4(b-a)\sqrt{(\log 9)n+\log (4/\delta)}}{|\mu_Q-\mu_P|}\).
When the means are the same, the transform in 3 separates the two means and the spectral test proposed in the statement of Theorem 6 can be employed. Although this seems to require complete information on densities \(p(\cdot)\) and \(q(\cdot)\), it suffices if a subset \(\mathcal{B}\subset \mathcal{A}\) is provided where the density of \(P\) is strictly greater than the density of \(Q\). In such a case, the function \(\phi\) is the indicator function of the set \(\mathcal{B}\) and the result of Theorem 6 holds with \(\mathcal{A}\) replaced by \(\mathcal{B}\).
In this section, we provide the proofs of all our results from Section 3. Standard well-known results on the likelihood ratio and inequalities between information divergence measures used in the proofs are provided in Appendix 6.
Proof. To derive the stated upper bound on the risk, consider the test such that \(T = 1\) if and only if at least one of the edge weights belongs to \(A\). The Type I error for this test is \(0\) since \(P\) puts no mass on \(A\). The Type II error is the probability \[\mathbb{P}_1\big(\cap_{e\in E}\{X_e\in A^c\}\big)=\frac{1}{\binom{n}{k}}\sum_{S:|S|=k}\prod_{e\in E(S)}Q(A^c)\prod_{e\in E\setminus E(S)}P(A^c)~.\] Since \(P(A^c) = 1\), the risk of \(T\) satisfies \(R(T) = (1 - Q(A))^{\binom{k}{2}}\). ◻
Proof. From Proposition 11 we conclude that \(R(T^{\ast}) \to 0\) if and only if \(E_0[\sqrt{L(\boldsymbol{X})}] \to 0\). We also have, \[\begin{align} E_0[\sqrt{L(\boldsymbol{X})}] &= \int \sqrt{\frac{1}{\binom{n}{k}}\sum_{S:|S|=k}\prod_{e\in E(S)} \frac{q(x_e)}{p(x_e)}} \prod_{e \in E} p(x_e) \,d\mathbf{x}\\ &= \int \sqrt{\frac{1}{\binom{n}{k}}\sum_{S:|S|=k}\prod_{e\in E(S)} q(x_e)p(x_e) \prod_{e\notin E(S)}p(x_e)^2} \,d\mathbf{x}. \end{align}\] Using Jensen’s inequality on the integrand, \[E_0[\sqrt{L(\boldsymbol{X})}] \geq \int \frac{1}{\binom{n}{k}} \sum_{S:|S|=k} \sqrt{\prod_{e\in E(S)} q(x_e)p(x_e) \prod_{e\notin E(S)}p(x_e)^2}\,d\mathbf{x}= \left(\int \sqrt{q(x)p(x)} \,dx \right)^{\binom{k}{2}}~.\]
Note that \(\int \sqrt{p(x)q(x)} \,dx = BC(P,Q)\leq 1\). The equality holds only when the distributions are identical. Therefore, for two different distributions \(P\) and \(Q\) if \(E[\sqrt{L(\boldsymbol{X})}] \to 0\) then \(k \to \infty.\) This proves the proposition. ◻
Proof. For any \(n\), let \(k'_n = \inf_{m \geq n} k_m\). Then \(k'_n\) is non-decreasing and tends to \(\infty\). Let \(\tau_{\text{min}} = \min_{e \in E}X_e\). Take \(P = \text{\emph{Unif}}(0,1)\), and define the density of \(Q\) as follows: \[q(x) = \begin{cases} \left(1 - \frac{1}{k'_1}\right) + \frac{1}{2} & \text{if}\,\, \frac{1}{2} \leq x < 1, \\ 2^{m-1}\left(\frac{1}{k'_{m-1}} - \frac{1}{k'_{m}}\right) + \frac{1}{2} & \text{if}\,\, \frac{1}{2^m} \leq x < \frac{1}{2^{m-1}} \text{ and }m\ge 2, \\ 0 & \text{otherwise.} \end{cases}\] It is easy to check that the previous expression is indeed a valid density supported on \([0,1]\), and that \(P\) and \(Q\) are absolutely continuous with respect to each other. Consider the test \(T_{\text{min}}\) that rejects \(\mathcal{H}_0\) if and only if \(\tau_{\text{min}} < \frac{1}{2^n}\). The Type I error equals \[\mathbb{P}_0\left(\min_{e \in E} X_e < \frac{1}{2^n}\right) = 1 - \left(1-\frac{1}{2^n}\right)^{\binom{n}{2}} = 1-e^{-\binom{n}{2}\big[\frac{1}{2^n}+o\big(\frac{1}{2^n}\big)\big]} \to 0, \quad \text{ as } n\to \infty~.\] Next we consider the Type II error. For any \(n\), \[\mathbb{P}_1\left(\min_{e \in E} X_e \geq \frac{1}{2^n}\right) = \left(1-\frac{1}{2^n}\right)^{\binom{n}{2} - \binom{k_n}{2}} \left(1-\int_0^{\frac{1}{2^n}} q(x)dx\right)^{\binom{k_n}{2}} \leq e^{-\binom{k_n}{2}\int_0^{\frac{1}{2^n}} q(x)dx}~.\] Since \(k_n \geq k'_n\), \[\binom{k_n}{2}\int_0^{\frac{1}{2^n}} q(x)dx \geq \binom{k'_n}{2}\int_0^{\frac{1}{2^n}} q(x)dx = \frac{1}{2}\binom{k'_n}{2} \sum_{i=n}^\infty \left(\frac{1}{k'_i} - \frac{1}{k'_{i+1}}\right) = \frac{k'_n -1}{4} \to \infty~,\] as \(n \to \infty\). Thus, \[\lim_{n \to \infty}\mathbb{P}_1\left(\min_{e \in E} X_e \ge \frac{1}{2^n}\right) = 0~.\] The risk of the test given above approaches \(0\) as \(n \to \infty\). Hence, \(R(T_{\text{min}}) \to 0\) as \(n \to \infty\). ◻
Proof. Part (a): From Proposition 9(d), since \(\chi^2(Q||P)<\infty\), \(D_{\operatorname{KL}}(Q||P) < \infty\). Consider the test \(T_{\text{scan}}\) that rejects \(H_0\) if \[T_{\text{scan}} := \max_{\stackrel{S \subseteq [n]}{|S|=k}}\prod_{e\in E(S)} \frac{q(X_e)}{p(X_e)} \;> \; n^k~.\] By the union bound and the independence of edge weights, as \(k \to \infty\), \[\mathbb{P}_0\left(T_{\text{scan}} > n^k\right) \ \le \ \sum_{\stackrel{S \subseteq [n]}{|S|=k}} \mathbb{P}_0\Bigg(\prod_{e\in E(S)}\frac{q(X_e)}{p(X_e)} > n^k\Bigg) \ \le \ \frac{\binom{n}{k}}{n^k} \ \le \ \frac{1}{k!} \to 0~,\] where the second inequality is due to Markov’s inequality.
Now consider the Type II error. If \(T_{\text{scan}} \leq n^k\), then \(\prod_{e\in E(S^*)} \frac{q(X_e)}{p(X_e)} \;\le \; n^k\) for the chosen subset \(S^*\) containing \(k\) vertices under \(\mathcal{H}_1\). Thus, \[\begin{align} \mathbb{P}_1\bigg(T_{\text{scan}} \leq n^k\bigg) & \ \le \ \mathbb{P}_1\Bigg(\prod_{e\in E(S^*)} \frac{q(X_e)}{p(X_e)} \leq n^k \Bigg) \\ & \ = \ \mathbb{P}_1\Bigg(\frac{\binom{k}{2}}{\frac{k^2}{2}} \cdot\frac{1}{\binom{k}{2}}\sum_{e\in E(S^*)} \log \frac{q(X_e)}{p(X_e)} \leq \frac{2\log n}{k} \Bigg)~. \end{align}\] Conditionally on \(S^*\), the random variables \((X_e)_{e\in E(S^*)}\) are i.i.d. with distribution \(Q\). By the strong law of large numbers, conditional on \(S^*\), \(\frac{1}{\binom{k}{2}}\sum_{e\in E(S^*)} \log \frac{q(X_e)}{p(X_e)} \to \mathbb{E}_1 \Big[\log \frac{q(X_e)}{p(X_e)}\Big] = D_{\operatorname{KL}}(Q||P)\) almost surely as \(k \to \infty\). Since \(k\geq(2+\epsilon)\frac{\log n}{D_{\operatorname{KL}}(Q||P)}\) for some \(\epsilon > 0\). Then \(k\to \infty\) as \(n\to \infty\), and \(\frac{2\log n}{k} \leq \frac{D_{\operatorname{KL}}(Q||P)}{1+ \epsilon / 2}\). Therefore, using the strong law of large numbers and the bounded convergence theorem, \[\begin{align} \mathbb{P}_1\bigg(T_{\text{scan}} \leq n^k\bigg) \ \le \\mathbb{E}_{S^*} \Bigg[ \mathbb{P}_1\Bigg(\frac{\binom{k}{2}}{\frac{k^2}{2}} \cdot\frac{1}{\binom{k}{2}}\sum_{e\in E(S^*)} \log \frac{q(X_e)}{p(X_e)} \leq \frac{D_{\operatorname{KL}}(Q||P)}{1+ \epsilon / 2} \Bigg\vert S^*\Bigg) \Bigg] \to 0~, \end{align}\] as \(n \to \infty\). This proves Part (a) of the theorem. Note that when \(D_{\operatorname{KL}}(Q||P)\) is infinite, the same proof is valid giving \(R(T^*) \to 0\) as long as \(k=\Omega(\log n)\).
Part (b): Using the Cauchy-Schwarz inequality along with Proposition 10, we obtain \[R(T^*) \ge 1-\sqrt{\mathbb{E}_0[(L(\boldsymbol{X})-1)^2]} = 1-\sqrt{\mathbb{E}_0[L(\boldsymbol{X})^2]-1}~,\] since \(\mathbb{E}_0[L(\boldsymbol{X})] = 1\). We now evaluate \(\mathbb{E}_0[L(\boldsymbol{X})^2]\) as \[\begin{align} \mathbb{E}_0[L(\boldsymbol{X})^2] &= \frac{1}{\binom{n}{k}^2}\mathbb{E}_0\Bigg[\bigg(\sum_{|S|=k}\prod_{e\in E(S)} \frac{q(X_e)}{p(X_e)}\bigg)\bigg(\sum_{|T|=k}\prod_{e\in E(T)} \frac{q(X_e)}{p(X_e)}\bigg)\Bigg]\\ &= \frac{1}{\binom{n}{k}^2}\mathbb{E}_0\Bigg[\sum_{|S|=|T|=k}\Bigg(\prod_{e\in E(S)\backslash E(T)} \frac{q(X_e)}{p(X_e)}\prod_{e\in E(T)\backslash E(S)} \frac{q(X_e)}{p(X_e)}\prod_{e\in E(S)\cap E(T)} \Big(\frac{q(X_e)}{p(X_e)}\Big)^2\Bigg)\Bigg]\\ &=\frac{1}{\binom{n}{k}^2} \sum_{|S|=|T|=k} \prod_{e\in E(S)\backslash E(T)} \mathbb{E}_0\Bigg[\frac{q(X_e)}{p(X_e)}\Bigg]\prod_{e\in E(T)\backslash E(S)} \mathbb{E}_0\Bigg[\frac{q(X_e)}{p(X_e)}\Bigg]\prod_{e\in E(S)\cap E(T)} \mathbb{E}_0\Bigg[\Big(\frac{q(X_e)}{p(X_e)}\Big)^2\Bigg], \end{align}\] where we have used the independence of edges. Note that \(\mathbb{E}_0\Big[\frac{q(X)}{p(X)}\Big]=\int p(x)\frac{q(x)}{p(x)} \, dx=1\). Let \(\mathbb{E}_0\Big[\frac{q(X)}{p(X)}^2\Big]:=\rho\). Then \[\begin{align} \mathbb{E}_0[L(\boldsymbol{X})^2] &= \frac{1}{\binom{n}{k}^2} \sum_{|S|=|T|=k} \rho^{|E(S)\cap E(T)|}\\ &= \frac{1}{\binom{n}{k}^2} \sum_{i=0}^k \sum_{\stackrel{|S|=|T|=k}{|S\cap T|=i}} \rho^{\binom{i}{2}}\\ &= \frac{1}{\binom{n}{k}^2} \sum_{i=0}^k \binom{n}{k} \binom{k}{i} \binom{n-k}{k-i} \rho^{\binom{i}{2}} \end{align}\] Thus, \[\mathbb{E}_0[L(\boldsymbol{X})^2]-1 \le \sum_{i=1}^k \frac{\binom{k}{i} \binom{n-k}{k-i} }{\binom{n}{k}} \rho^{\binom{i}{2}}, \label{eq:lower95bd951}\tag{4}\] which converges to \(0\) whenever \(k<\lfloor\omega_n-\epsilon\rfloor\) where \(\omega_n= 2\log_\rho n-2\log_\rho \log_\rho n-1+2\log_\rho e\) (see [44]). This proves the theorem. Note that, \(\rho\) can be represented using the chi-squared divergence between the two distributions as \(\rho = \chi^2(Q,P)+1\) and also \(\rho > 1\) by Jensen’s inequality. ◻
Proof. Computing the mean of an entry of \(\mathbf{Z}\) under the null hypothesis, we have that \[\mathbb{E}_0Z_{ij} = \mathbb{E}_0[\phi(X_{ij})] = \mathbb{P}_0(X_{ij}\in \mathcal{A})= P(\mathcal{A}).\] Similarly, under the alternate hypothesis \(\mathbb{E}_1Z_{ij} = Q(\mathcal{A})< P(\mathcal{A})= \mathbb{E}_0Z_{ij}\). Thus, the mean of \(Z_{ij}\) is different under both hypotheses. Moreover, \(P(\mathcal{A})-Q(\mathcal{A}) =d_{\operatorname{TV}}(P,Q)\) from Proposition 9. Since \(Z_{ij}\) is distributed as a Bernoulli random variable with parameter \(Q(\mathcal{A})\) under the alternative hypothesis, using Theorem 8 with \([a,b] = [0,1]\), we obtain the statement of the present theorem. ◻
Proof. The key observation is that if \(Q\) is not absolutely continuous with respect tp \(P\), then there exists an interval that has \(P\)-measure zero, but positive \(Q\)-measure. The proposed test searches for an interval \(I\) for which there exists a set \(S\) of \(k\) vertices such that all edges whose weight falls in \(I\) are connecting vertices in \(S\). If there are sufficiently many such edges, then the test accepts the alternative hypothesis. More precisely, let \(T\) be the scan test over subsets of vertices \(S\) with size \(|S| = k\) as well as over intervals \(I \subset \mathbb{R}\). In particular, define \[\mathcal{E} = \left\{\exists S \subset [n] \text{ such that } |S| = k, \exists I\subset \mathbb{R}: \sum_{e \in E(S)} \boldsymbol{1}_{\{X_e \in I\}} \geq k \text{ and } \sum_{e \not \in E(S)}\boldsymbol{1}_{\{X_e \in I\}} = 0 \right\}~,\] and let \(T=1\) if and only if \(\mathcal{E}\) occurs. First, we bound the Type I error of \(T\) as follows. First note that by the union bound and by symmetry, for an arbitrary fixed set \(S\) of \(k\) vertices, \[\begin{align} \mathbb{P}_{0}(T = 1) &\leq \binom{n}{k} \mathbb{P}_{0}\left(\exists I :\sum_{e \in E(S)} \boldsymbol{1}_{\{X_e \in I\}} \geq k \text{ and } \sum_{e \not \in E(S)}\boldsymbol{1}_{\{X_e \in I\}} = 0\right)~. \end{align}\] Hence, it suffices to upper bound the probability on the right-hand side of the inequality above.
We do this by an argument similar to the proof of an inequality of Vapnik and Chervonenkis [45] (see also [46]). First note that since under the null hypothesis all edge weights are i.i.d. the probability is invariant to any permutation \((X_{\pi(e)})_{e\in E}\) of the weights. In particular, if \(\Pi\) is a random permutation of \(1,\ldots,\binom{n}{2}\), then \[\begin{align}\\ & = & \mathbb{E}_0 \left[\mathbb{P}\left(\left. \exists I :\sum_{e \in E(S)} \boldsymbol{1}_{\{X_{\Pi(e)} \in I\}} \geq k \text{ and } \sum_{e \not \in E(S)}\boldsymbol{1}_{\{X_{\Pi(e)} \in I\}} = 0 \right| X_1,\ldots,X_{\binom{n}{2}} \right)\right]~. \end{align}\] In order to bound the conditional probability, observe that once the set \(\mathcal{X}=\{X_1,\ldots,X_{\binom{n}{2}}\}\) of the weights is fixed, there are at most \(\binom{n}{2}(\binom{n}{2}+1)/2\le n^4\) different ways intervals can intersect this set. Let \(\mathcal{I}\) denote a class of at most \(n^4\) representative intervals (i.e., for any interval \(I\) in \(\mathbb{R}\) there is an interval \(I'\in \mathcal{I}\) such that \(I\cap \mathcal{X}=I'\cap \mathcal{X}\)). By the union bound, \[\begin{align} \\ & \le & \sum_{I\in \mathcal{I}} \mathbb{P}\left(\left. \sum_{e \in E(S)} \boldsymbol{1}_{\{X_{\Pi(e)} \in I\}} \geq k \text{ and } \sum_{e \not \in E(S)}\boldsymbol{1}_{\{X_{\Pi(e)} \in I\}} = 0 \right| X_1,\ldots,X_{\binom{n}{2}} \right)~. \end{align}\] Consider now an interval \(I\in \mathcal{I}\) with \(\sum_{e\in E} \boldsymbol{1}_{X_e \in I} =m\). If \(m< k\) or \(m>\binom{k}{2}\) then the probability above is clearly zero. Assume now that \(k\le m \le \binom{k}{2}\). Then the proportion of permutations such that \(\sum_{e \in E(S)} \boldsymbol{1}_{\{X_{\Pi(e)} \in I\}} \geq k\) and \(\sum_{e \not \in E(S)}\boldsymbol{1}_{\{X_{\Pi(e)} \in I\}} = 0\) is at most \[\frac{\left(\binom{n}{2}-m\right)! m!}{\binom{n}{2}!} \le \frac{1}{\binom{\binom{n}{2}}{k}}~.\] Summarizing, the Type I error may be bounded by \[\mathbb{P}_{0}(T = 1) \leq n^4 \frac{\binom{n}{k}}{\binom{\binom{n}{2}}{k}}~,\] which goes to zero when \(k\to \infty\).
Next, we bound the Type II error. Since \(Q\) is not absolutely continuous with respect to \(P\), there exists an interval \(I\subset \mathbb{R}\) such that \(P(I)=0\) and \(Q(I)>0\). Since \(k=k_n\to \infty\), for sufficiently large \(n\), we have \(Q(I)\ge 1/k\). Denoting the set of vertices of the planted clique by \(S\), for all such \(n\), we have \[\begin{align} \mathbb{P}_{1}(T = 0) &\leq \mathbb{P}_{1}\left(\sum_{e\in E(S)} \boldsymbol{1}_{\{X_e \in I\}} < k\right) \\ &\leq \mathbb{P}_{1}\left(\mathrm{Bin}\left(\binom{k}{2}, \frac{1}{k}\right) < k\right) \\ &\leq \exp\left(-\frac{k-1}{4}\left(1 - \frac{2k}{k-1}\right)^2\right) \to 0~, \end{align}\] as desired. ◻
Observe that the test proposed in the proof can be computed in polynomial time, since there are \(O(n^4)\) possible different intervals, and the defining property can be easily checked for each one of them.
Proof. The spectral norm of the centered weight matrix is defined as \[\|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\| \le \sup_{x\in \boldsymbol{S}^{n-1}}\;|\langle x,(\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}) x\rangle|,\] where \(\boldsymbol{S}^{n-1}\) is the unit sphere in \(\mathbb{R}^{n}\). Under the null hypothesis, construct an \(\epsilon\)-net \(\mathcal{N}\) with the property that for any \(x\in \boldsymbol{S}^{n-1}\), there exists a \(y\in \mathcal{N}\) such that \(\|x-y\|\le \frac{1}{4}\). From [21], it can be shown that \(|\mathcal{N}| \le 9^n\). Additionally, the supremum in the definition of \(\|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\|\) can be taken over the points in the countable set \(\mathcal{N}\) to produce \[\|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\| \le \sup_{x:x\in \mathcal{N}}\;|\langle x,(\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}) x\rangle|.\] Alternately, let \(x^*\) achieve the supremum in \(\mathcal{S}^{n-1}\). Let \(C=\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\). Then, we obtain for \(y\in \mathcal{N}\) such that \(\|x^*-y\| \le \frac{1}{4}\), \[\begin{align} \|C\| &= |\langle y,Cy\rangle +\langle x^*-y, Cx^*\rangle+\langle y,C(x^*-y)| \\ &\le |\langle y,Cy\rangle| +2 \|C\| \|x^*-y\|\\ &= |\langle y,Cy\rangle| +\frac{\|C\|}{2}. \end{align}\] where we use the Cauchy-Schwarz inequality. Since the weights are assumed to be bounded between \([a,b]\), \(C_{ij}y_iy_j \in [-(b-a)|y_iy_j|,(b-a)|y_iy_j|]\). Using Hoeffding’s inequality, we obtain \[\begin{align} \mathbb{P}_0(|\langle y,Cy \rangle| >t) & \ = \ \mathbb{P}_0\Big(\Big|\sum_{i<j} C_{ij}y_iy_j \Big| > \frac{t}{2}\Big)\\ & \ \le \ 2\exp\bigg(\frac{-t^2}{8\sum_{i<j}(b-a)^2y_i^2y_j^2}\bigg)\\ & \ \le \ 2\exp\bigg(\frac{-t^2}{4(b-a)^2}\bigg), \end{align}\] where we use \[\sum_{i<j} y_i^2y_j^2 = \frac{1}{2}\Big[\sum_{i\neq j \in [n]} y_i^2y_j^2\Big] \ \le \ \frac{1}{2}\Big[\sum_{i,j \in [n]} y_i^2y_j^2\Big] =\frac{1}{2}.\] Therefore \[\mathbb{P}_0(||C|| > t) \ \le \ 9^n \max_{y\in\mathcal{N}}\mathbb{P}_0\Big(|\langle y,Cy\rangle|\ge \frac{t}{2}\Big) \ \le \ 2 \cdot 9^n\cdot \exp\Big(\frac{-t^2}{16(b-a)^2}\Big) = \frac{\delta}{2} \label{eq:type195spectral}\tag{5}\] when \(t=4(b-a)\sqrt{(\log 9)n+\log (4/\delta)}\).
Under the alternative hypothesis, let \(S\) be the hidden clique. We can reorder the rows and coloumns of \(\boldsymbol{X}\) so that the entries corresponding to the vertices in \(S\) form the first \(k\times k\) submatrix. Note that \(\mathbb{E}_0\boldsymbol{X}= \mu_P (J-I)\) where \(J\) is a \(n\times n\) matrix with all \(1\)s and \(I\) is the identity matrix. Let \(x_S\) be a vector such that \((x_S)_{i} = \frac{1}{\sqrt{k}}\) if \(i \in S\) and \((x_S)_{i} = 0\) otherwise. Then, \[\begin{align} \|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\| &\ge |\langle x_S,(\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X})x_S\rangle| \nonumber\\ &= \bigg|\frac{1}{k} \sum_{i\neq j\in S} (X_{ij} - \mu_P) \bigg|\nonumber\\ &= \bigg| \frac{2}{k} \binom{k}{2}(\mu_Q-\mu_P)+\frac{2}{k} \sum_{i< j\in S} (X_{ij} - \mu_Q) \bigg|\nonumber\\ &\ge (k-1)\bigg[|\mu_Q-\mu_P|-\bigg|\frac{1}{\binom{k}{2}}\sum_{i< j\in S} (X_{ij} - \mu_Q)\bigg| \;\bigg]. \label{eq:alt95norm95diff} \end{align}\tag{6}\] Conditional on \(S\), the second term on the RHS in 6 is a sum of \(\binom{k}{2}\) independent centered random variables. Since \(Q\) has a bounded support, again using Hoeffding’s inequality \[\begin{align} \mathbb{P}_1\Bigg(\Big|\sum_{i< j\in S} (X_{ij} - \mu_Q)\Big| > \binom{k}{2}t\Bigg) &= \mathbb{E}_{S} \Bigg[ \mathbb{P}_1\Bigg(\Big|\sum_{i< j\in S} (X_{ij} - \mu_Q)\Big| > \binom{k}{2}t \Bigg\vert S \Bigg) \Bigg] \\ &\le 2\exp\bigg[\frac{-t^2 \binom{k}{2}}{2(b-a)^2}\bigg] \end{align}\] For any \(\delta>0\), taking \(t=(b-a)\sqrt{\frac{2}{\binom{k}{2}} \log \big(\frac{4}{\delta}\big)}\), and using 6 , we obtain \[\begin{align} \mathbb{P}_1\Bigg(\|\boldsymbol{X}-\mathbb{E}_0\boldsymbol{X}\| \ge (k-1) \Bigg[|\mu_Q-\mu_P|&- (b-a)\sqrt{\frac{2}{\binom{k}{2}}\log \Big(\frac{4}{\delta}\Big)}\;\Bigg]\Bigg) \nonumber\\ & \ \ge \\mathbb{P}_1\Bigg(\bigg|\frac{1}{\binom{k}{2}}\sum_{i< j\in S} (X_{ij} - \mu_Q)\bigg| \le (b-a)\sqrt{\frac{2}{\binom{k}{2}}\log \Big(\frac{4}{\delta}\Big)}\;\Bigg) \nonumber\\ & \ \ge \1-\frac{\delta}{2}. \label{eq:type295spectral95bdd} \end{align}\tag{7}\] Thus from 7 and 5 , we have that the risk \(R(T_2) <\delta\) whenever \[(k-1) \Bigg[|\mu_Q-\mu_P|- (b-a)\sqrt{\frac{2}{\binom{k}{2}}\log \Big(\frac{4}{\delta}\Big)}\;\Bigg] > 4(b-a)\sqrt{(\log 9)n+\log (4/\delta)}.\] or when \(k > (1+o_n(1)) \frac{4(b-a)\sqrt{(\log 9)n+\log (4/\delta)}}{|\mu_Q-\mu_P|}\). ◻
In this article, we investigate the problem of detecting a planted subset of \(k\) vertices sharing edge weights distributed according to \(Q\) within a complete graph of \(n\) vertices having edge weights distributed according to \(P\). Under complete and partial information on the distributions \(P\) and \(Q\), we obtain statistical limits on \(k\) when the clique can be detected and when it is impossible to detect it. We show that the critical value of \(k\) for which detection becomes possible is at most logarithmic in \(n\), regardless of the distributions. In some cases, much smaller planted cliques can be detected (e.g., when \(Q\) is not absolutely continuous with respect to \(P\)). We also show that when \(Q\) is absolutely continuous with respect to \(P\), then the critical clique size \(k\) converges to infinity, but any slow rate is possible, depending on \(P\) and \(Q\). We also provide polynomial time spectral tests that can detect the clique.
Our investigation of this problem leads to several interesting open questions.
Theorem 4 provides bounds on \(k\), when detection is possible and when it is impossible. However, there is a gap between the two bounds in parts (a) and (b) of the theorem, and it is unclear which of these, if any, is tight. More precisely, it is of interest to determine whether there is always a sharp transition when detection becomes possible. If it is the case, then it is of interest to determine the correct "divergence" between the distributions \(P\) and \(Q\) that governs the weighted clique detection problem. While in the case of the classical hidden clique problem the two divergences (\(D_{\operatorname{KL}}(Q||P)\) and \(\chi^2(Q||P)\)) coincide giving a sharp phase transition for clique detection, it is not obvious whether such a sharp transition exists for the weighted hidden clique problem.
The upper bound for the risk in Theorem 4(b) is obtained using a scan statistic that searches over all possible subsets of size \(k\). This procedure is computationally intensive but solves the detection problem 1 for \(k=\Omega(\log n)\). On the other hand, the spectral test proposed in Theorem 6 runs in polynomial time and works for \(k=\Omega(\sqrt{n})\). Can this statistical-computational gap be closed for some distribution pairs \((P,Q)\), or can it be shown that such a non-trivial gap is inherent to the problem?
In the present work, we only investigate the problem of detection. The problem of recovering the subset of anomalous \(k\) vertices is a natural extension. In particular, determining the statistical and computational thresholds for the recovery problem when there is partial or no information of the distributions is of interest. We leave these questions for future work.
The work was done in part during the workshop on the mathematical foundations of network models and their applications, as part of the BIRS-CMI pilot program organized by Louigi Addario-Berry, Siva Athreya, Shankar Bhamidi, Serte Donderwinkel and Soumik Pal. The workshop was held at the Chennai Mathematical Institute (CMI) from December 15-20, 2024 and the research school was conducted in the week preceding the BIRS event (December 9-13). The events were supported by BIRS, CMI, ICTS and NBHM.
UC acknowledges financial support from the Senior Research Fellowship Grant, Indian Statistical Institute, Kolkata.
KH was supported by the National Science Foundation under grant DGE 2146752.
VK has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement, Grant Agreement No 101034253.
GL acknowledges the support of the Spanish Ministry of Economy and Competitiveness grant PID2022-138268NB-I00, financed by MCIN/AEI/10.13039/501100011033, FSE+MTM2015-67304-P, and FEDER, EU.
NM is supported in part by the Netherlands Organisation for Scientific Research (NWO) through the Gravitation NETWORKS grant 024.002.003, and further supported by the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement no. 945045.
AM acknowledges financial support from the Senior Research Fellowship Grant, Indian Statistical Institute, Delhi.
MT acknowledges financial support from the Senior Research Fellowship Grant, Indian Statistical Institute, Delhi.
In this section, we recall a few standard results that are used to prove the main results.
Suppose \(P\) and \(Q\) admit densities \(p(\cdot)\) and \(q(\cdot)\) with respect to a common dominating measure on \(\mathbb{R}\). Under the null hypothesis, the likelihood of observing the weights \(\mathbf{x}\) is given by \[\frac{d\mathbb{P}_0}{d\mathbf{x}} \ = \ \prod_{e\in E} p(x_{e})~.\] Under the alternative hypothesis, the likelihood of \(\mathbf{x}\) is \[\frac{d\mathbb{P}_1}{d\mathbf{x}} \ = \ \frac{1}{\binom{n}{k}}\sum_{\stackrel{S\subset [n]}{|S|=k}} \prod_{e\in E(S)} q(x_{e}) \prod_{e\notin E(S)} p(x_{e})~.\] The likelihood ratio of the weighted graph \(\boldsymbol{X}\) is given by \[L(\boldsymbol{X}) = \frac{1}{\binom{n}{k}}\sum_{S:|S|=k}\prod_{e\in E(S)} \frac{q(X_e)}{p(X_e)}~. \label{eq:likelihood95ratio}\tag{8}\] Note that the existence of the densities with respect to the Lebesgue measure is not necessary. All our analysis holds even when the densities are with respect to some common dominating measure of \(P\) and \(Q\).
We recall a few divergence measures between distributions \(P\) and \(Q\) which are used in the statements of our theorems.
Definition 1. For any two distributions \(P, Q\) where \(Q\) is absolutely continuous with respect to \(P\), and having densities \(p(\cdot), q(\cdot)\) with respect to a common dominating measure \(\mu\) on \(\mathbb{R}\),
Total variation distance: \(d_{\operatorname{TV}}(Q,P) = \sup_A |Q(A)-P(A)|.\)
Kullback-Leibler (KL) divergence: \(D_{\operatorname{KL}}(Q||P) = \int q(x)\log \frac{q(x)}{p(x)} \, \mu(dx)\).
Chi-squared divergence: \(\chi^2(Q || P) = \int \big(\frac{q(x)}{p(x)} - 1\big)^2 \, \mu(dx)\).
Squared Hellinger distance: \(H^2(Q, P) = \frac{1}{2}\int \left(\sqrt{q(x)}-\sqrt{p(x)}\right)^2 \, \mu(dx)\).
Bhattacharyya coefficient: \(BC(Q, P) = \int\sqrt{q(x)p(x)} \, \mu(dx).\)
Next, we list some useful properties and relationships between these divergence measures that we invoke later. We omit the proof of this proposition since these are standard results (see, e.g. [47], [48].).
Proposition 9. For any two distributions \(P, Q\) where \(Q\) is absolutely continuous with respect to \(P\),
\(d_{\operatorname{TV}}(P,Q) = d_{\operatorname{TV}}(Q,P)\), \(H^2(P,Q) = H^2(Q,P)\).
\(D_{\operatorname{KL}}(Q||P) \ \le \ \log \big(1+\chi^2(Q||P)\big) \ \le \ \chi^2 (Q||P).\)
\(H^2(P,Q) \ \le \ d_{\operatorname{TV}}(P,Q) \ \le \ \sqrt{2}H(P,Q)\).
\(H^2(P,Q) = 1-BC(P,Q)\).
Additionally, if \(P, Q\) have densities \(p(\cdot)\) and \(q(\cdot)\) with respect to a measure \(\mu\), then
If \(\mathcal{A}= \{x:p(x)>q(x)\}\), then \(d_{\operatorname{TV}}(P,Q) = P(\mathcal{A})-Q(\mathcal{A})\).
\(d_{\operatorname{TV}}(P,Q) = \frac{1}{2} \int \big|p(x)-q(x)\big| \, \mu(dx)\).
Next, we recall some basic facts relating the risk and the likelihood ratio.
Proposition 10. \(R(T^*) = 1-d_{\operatorname{TV}}(\mathbb{P}_0,\mathbb{P}_1) = 1-\frac{1}{2}\mathbb{E}_0\big[|L(\boldsymbol{X})-1|\big]\)
Proof. See, e.g., [49]. ◻
Proposition 11. \(1-\sqrt{1-\big[\mathbb{E}_0\sqrt{L(\boldsymbol{X})}\, \big]^2} \le R(T^*) \le \mathbb{E}_0[\sqrt{L(\boldsymbol{X})}]\).
Proof. From Propositions 10 and 9(c)-(d), \(R(T^*) = 1-d_{\operatorname{TV}}(\mathbb{P}_0,\mathbb{P}_1) \le 1-H^2(\mathbb{P}_0,\mathbb{P}_1) = BC(\mathbb{P}_0,\mathbb{P}_1)\). Evaluating the Bhattacharyya coefficient \[\begin{align} BC(\mathbb{P}_0,\mathbb{P}_1) &= \int \sqrt{\frac{d\mathbb{P}_0}{d\mathbf{x}} \frac{d\mathbb{P}_1}{d\mathbf{x}} } \,d\mathbf{x}\\ &=\mathbb{E}_0\big[\sqrt{L(\boldsymbol{X})}\,\big]~. \end{align}\]
The lower bound follows from the following inequality \(d_{\operatorname{TV}}(\mathbb{P}_0, \mathbb{P}_1) \leq \sqrt{1 - BC(\mathbb{P}_0, \mathbb{P}_1)^2},\) which we now prove. For any \(a, b \in \mathbb{R}\) it is straightforward to check that \[|a-b| = (a+b)\sqrt{1-\left(\frac{2\sqrt{ab}}{a+b}\right)^{2}}~.\] Applying this to total variation distance yields \[\begin{align} d_{\operatorname{TV}}(\mathbb{P}_0, \mathbb{P}_1) &= \frac{1}{2} \int \left|\frac{d\mathbb{P}_0}{d \mathbf{x}} - \frac{d\mathbb{P}_1}{d\mathbf{x}} \right| d\mathbf{x}\\ &= \frac{1}{2}\int \left(\frac{d\mathbb{P}_0}{d \mathbf{x}} + \frac{d\mathbb{P}_1}{d\mathbf{x}}\right) \sqrt{1 - \left(\frac{2\sqrt{\frac{d\mathbb{P}_0}{d\mathbf{x}}\frac{d\mathbb{P}_1}{d\mathbf{x}}}}{\frac{d\mathbb{P}_0}{d\mathbf{x}} + \frac{d\mathbb{P}_1}{d\mathbf{x}}}\right)^2} d\mathbf{x}\\ &= \frac{1}{2}\int \sqrt{1 - \left(\frac{2\sqrt{\frac{d\mathbb{P}_0}{d\mathbf{x}}\frac{d\mathbb{P}_1}{d\mathbf{x}}}}{\frac{d\mathbb{P}_0}{d\mathbf{x}} + \frac{d\mathbb{P}_1}{d\mathbf{x}}}\right)^2} d\mu~, \end{align}\] where \(d\mu = \frac{d\mathbb{P}_0 + d\mathbb{P}_1}{2}\). By concavity of the mapping \(x\mapsto \sqrt{1-x^2}\) for \(x\in[-1,1]\), Jensen’s inequality yields \[d_{\operatorname{TV}}(\mathbb{P}_0, \mathbb{P}_1) \leq \sqrt{1 - \int\left(\frac{2\sqrt{\frac{d\mathbb{P}_0}{d\mathbf{x}}\frac{d\mathbb{P}_1}{d\mathbf{x}}}}{\frac{d\mathbb{P}_0}{d\mathbf{x}} + \frac{d\mathbb{P}_1}{d\mathbf{x}}}\right)^2 d\mu} = \sqrt{1 - BC(\mathbb{P}_0, \mathbb{P}_1)^2}= \sqrt{1 - \left[\mathbb{E}_0\sqrt{L(\boldsymbol{X})}\right]^2}~.\] ◻