Abstract
The planted densest subgraph (PDS) detection problem asks whether a random graph contains a hidden subgraph of unusual density. While the statistical and computational barriers are well-understood for full graph observations, many real-world scenarios restrict access to the graph via local queries. In this paper, we determine the number of queries necessary and sufficient for detecting a planted subgraph. We prove that any algorithm requires $\Omega(\frac{n^2}{k^2\chi^4(p||q)}\log^2n)$ queries. We provide a matching quasi-polynomial-time algorithm and a polynomial-time algorithm requiring $O(\frac{n^3}{k^3\chi^2(p||q)}\log^3 n)$ queries. Our results identify a statistical-computational gap and resolve open questions regarding the query complexity of the planted clique problem.
Introduction
Detecting a "needle in a haystack"—a dense community hidden within a large, sparse network—is a cornerstone of network science. In the standard Planted Densest Subgraph (PDS) model, we observe a graph where most edges follow an Erdős-Rényi distribution $G(n, q)$, but a subset of $k$ vertices forms a subgraph with higher edge probability $p > q$.
However, in massive social networks or sensitive databases, we often cannot observe the entire adjacency matrix. Instead, we must "query" pairs of vertices to see if an edge exists. This paper explores the fundamental limits of this query-based model: How many queries are needed to reliably detect the hidden community, and how does this requirement change if we demand a computationally efficient (polynomial-time) algorithm?
Information-Theoretic Lower Bound
We first establish the absolute mathematical limit for detection. Using the Chi-Square distance $\chi^2(p||q)$ to measure the divergence between the background noise and the planted signal, we prove that any algorithm (even one with infinite computing power) must make at least: $$\mathsf{Q} = \Omega\left(\frac{n^2}{k^2\chi^4(p||q)}\log^2n\right)$$ adaptive queries on average to achieve a success probability greater than $1/2$. This bound defines the "Statistically Impossible" regime, where the signal of the dense subgraph is mathematically indistinguishable from the background noise.
Algorithmic Approaches
We analyze two primary strategies for detection, highlighting a trade-off between query efficiency and computational speed.
The Scan Test: Statistical Sufficiency
We demonstrate that the lower bound is tight by proposing the "Scan Test." This algorithm uses non-adaptive queries—meaning all pairs to be checked are chosen before any results are seen. By subsampling vertices and performing an exhaustive search, the Scan Test achieves detection with $O(\frac{n^2}{k^2\chi^4(p||q)}\log^2n)$ queries. While it reaches the information-theoretic limit, its quasi-polynomial running time makes it impractical for very large $n$. This establishes that non-adaptive queries are surprisingly as powerful as adaptive ones in reaching statistical limits.
The Degree Test: Computational Sufficiency
To find a practical alternative, we develop the "Degree Test." This polynomial-time algorithm counts high-degree vertices within a sampled subgraph. While significantly faster, it is less query-efficient, requiring: $$\mathsf{Q} = O\left(\frac{n^3}{k^3\chi^2(p||q)}\log^3 n\right)$$ queries. This result establishes the boundary for the "Computationally Easy" regime.
The Statistical-Computational Gap
A key insight of this research is the disparity in how query complexity scales with the Chi-Square distance. The optimal (but slow) Scan Test depends on the fourth power of the distance, $\chi^4(p||q)$, whereas the fast Degree Test depends only on the square, $\chi^2(p||q)$.
This mathematical nuance creates a "Hard" regime (or "Conjecturally Hard" for polynomial-time algorithms) where $\frac{n^2}{k^2} \ll \mathsf{Q} \ll \frac{n^3}{k^3}$. In this window, detection is theoretically possible but likely impossible for any fast algorithm. This finding aligns with the broader understanding of computational hardness in random graph problems but translates it into the specific constraints of edge queries.
Conclusion
This work provides a comprehensive characterization of the query complexity for the PDS problem. We show that non-adaptive queries are sufficient to reach the statistical limits of the problem, resolving conjectures from previous literature on the planted clique problem. Future work remains to bridge the constant factor gaps and to extend these findings from detection to the more challenging task of vertex recovery.
Summary updated