arXiv:2608.22769quant-phAug 2026

Manuscript Offprint

arXiv:2608.22769

Classical and quantum spectral density estimation under local graph access

Rong-Hua Li, Meihao Liao, Yichun Yang

RONG-HUA LI, MEIHAO LIAO, AND YICHUN YANG

ABSTRACT. We study spectral density estimation for the normalized adjacency matrix of an unweighted graph under local access model. Previously, Cohen-Steiner et al. [KDD 2018] proposed an algorithm for ε\varepsilon-approximate spectral density estimation in the Wasserstein-1 distance, using 2Ω(1/ε)2^{\Omega(1/\varepsilon)} local queries to the graph. In this paper, we prove that every constant-success estimator with Wasserstein-1 error at most ε\varepsilon requires 2Ω(1/ε)2^{\Omega(1/\varepsilon)} queries, showing that the Cohen-Steiner algorithm is optimal up to constant in the exponent. This resolves the open problem left by previous researches Jin et al. [COLT 2023] and Peng et al. [COLT 2026].

We then turn to quantum local access model. We give an O~(ε−3)\widetilde{\mathrm{O}}(\varepsilon^{-3})-query algorithm estimating the spectral density with Wasserstein-1 error at most ε\varepsilon. Finally, we prove a Ω~(ε−4/3)\widetilde{\Omega}(\varepsilon^{-4/3}) quantum lower bound when the graph is sufficiently large. As a result, quantum local access model changes the dependence on ε\varepsilon from exponential to polynomial.

1. INTRODUCTION

The empirical spectral distribution of a large graph encodes global information about expansion, mixing, geometry, and the prevalence of closed walks. Computing it by diagonalizing the normalized adjacency matrix is prohibitively expensive when the graph is too large to read. This motivates spectral density estimation: output a succinct probability measure that approximates the distribution on the eigenvalues while using only local graph queries. Spectral densities have found applications in various fields such as characterizing the structure of complex networks [FDBV01, EG17, VGCG23], numerical linear algebra [LSY16, UCS17] and (graph) machine learning [DBV16, KW17, GKX19, MM19].

Let G=(V,E)\mathbf{G} = (\mathbf{V}, \mathbf{E}) be a finite simple unweighted graph, let n=∣V∣\mathbf{n} = |\mathbf{V}| and m=∣E∣\mathbf{m} = |\mathbf{E}|, AG\mathbf{A}_{\mathbf{G}} be the adjacency matrix and DG\mathbf{D}_{\mathbf{G}} be the diagonal degree matrix, we write the normalized adjacency matrix as

NG=DG−1/2AGDG−1/2.\mathsf{N}_{\mathsf{G}}=\mathsf{D}_{\mathsf{G}}^{-1/2}\mathsf{A}_{\mathsf{G}}\mathsf{D}_{\mathsf{G}}^{-1/2}.

Given the eigenvalues λ1⩾λ2⩾…⩾λn\lambda_1 \geqslant \lambda_2 \geqslant \ldots \geqslant \lambda_n of NGN_G, the spectral density is defined as

ρG=1n∑j=1nδλj.\rho_{\mathrm{G}}=\frac{1}{\mathsf{n}}\sum_{\mathrm{j}=1}^{\mathsf{n}}\delta_{\lambda_{\mathrm{j}}}.

We denote δλ\delta_\lambda to be the Dirac delta function centered at λ\lambda. We measure the computation error by the Wasserstein–1 distance W1W_1. That is, we want to output a probability density function ρ~\tilde{\rho} such that W1(ρ~,ρG)⩽εW_1(\tilde{\rho}, \rho_G) \leqslant \varepsilon. Equivalently [CSKSV18], the goal is to compute (succinct representations of) estimates λ~1⩾λ~2⩾…⩾λ~n\tilde{\lambda}_1 \geqslant \tilde{\lambda}_2 \geqslant \ldots \geqslant \tilde{\lambda}_n such that

1n∑i=1n∣λi−λ~i∣⩽ε.\frac{1}{\mathsf{n}}\sum_{\mathsf{i}=1}^{\mathsf{n}}|\lambda_{\mathsf{i}}-\tilde{\lambda}_{\mathsf{i}}|\leqslant\varepsilon.

We note that the W1W_1 metric is weak enough to permit a succinct O(1/ε)\mathrm{O}(1/\varepsilon)-point output [CSKSV18], but strong enough to control the average error of each eigenvalue estimation.

(Rong-Hua Li) SCHOOL OF COMPUTER SCIENCE, BEIJING INSTITUTE OF TECHNOLOGY, BEIJING, CHINA

(Meihao Liao) SCHOOL OF COMPUTER SCIENCE, BEIJING INSTITUTE OF TECHNOLOGY, BEIJING, CHINA

(Yichun Yang) SCHOOL OF COMPUTER SCIENCE, BEIJING INSTITUTE OF TECHNOLOGY, BEIJING, CHINA

1.1. Classical local access. Under classical local graph access model [BR02], the algorithm is allowed to the following operations in O(1)\mathrm{O}(1) time: (i) sample a uniform vertex, (ii) query the degree dv\mathrm{d}_v of a vertex vv, (iii) query the ii-th neighbor of vertex vv with i∈[dv]i \in [d_v]. In this direction, Cohen-Steiner, Kong, Sohler, and Valiant [CSKSV18] gave an algorithm with 2O(1/ε)2^{\mathrm{O}(1/\varepsilon)} query complexity via sampling random walks from uniformly random nodes. Subsequent lines of researches developed sublinear and near-linear tradeoffs in this direction [BKM22, JMSS23, JKM+^+24, BJM+^+25, MMRS25, PWYY26]. Specifically, [BKM22] gave a O(n⋅ε−7)\mathrm{O}(\mathrm{n} \cdot \varepsilon^{-7}) sublinear time algorithm that ε\varepsilon-approximates the spectral density. Their algorithm was later improved to O(n⋅ε−2)\mathrm{O}(\mathrm{n} \cdot \varepsilon^{-2}) query complexity and O(n⋅ε−3)\mathrm{O}(\mathrm{n} \cdot \varepsilon^{-3}) time by [JKM+^+24]. Comparison with Cohen-Steiner et al. [CSKSV18], these algorithms depends only polynomial on ε−1\varepsilon^{-1}, but at the cost of linearly depends on n\mathrm{n}. Besides, there are also algorithms that use O(ε−1)\mathrm{O}(\varepsilon^{-1}) queries to the matrix-vector multiplication to approximate the spectral density [BKM22, BJM+^+25, MMRS25]. However, the query complexity of matrix-vector multiplication is O(m)\mathrm{O}(\mathrm{m}) in the local access model.

From the lower bound perspective, the key question is to ask whether the exponential dependence on ε−1\varepsilon^{-1} is necessary. In this direction, Jin, Musco, Sidford, and Singh [JMSS23] showed that no algorithm can compute an ε\varepsilon-approximation of the spectral density under W1W_1 with constant success probability even when given 2Ω(1/ε)2^{\Omega(1/\varepsilon)} random walks of length 2Ω(1/ε)2^{\Omega(1/\varepsilon)} started from uniformly random nodes. However, their lower bound is only constraint to random walk sampling from uniformly random nodes, and is constraint to weighted graphs. Later, Peng, Wang, Yang, and Yang [PWYY26] extend to a 2Ω(1/ε1/6)2^{\Omega(1/\varepsilon^{1/6})} lower bound for unweighted graphs when sampling random walks from uniformly random nodes. It was left open whether one can extend their lower bounds to the general local access model [BR02].

Our first result resolves this question. So the algorithm proposed by Cohen-Steiner et al. [CSKSV18] is already optimal up to constant in the exponent under local access model when ε\varepsilon is small constant. Table 1 summarizes the main classical upper and lower bounds, including our result.

Theorem 1. There are universal constants c,ε0>0\mathrm{c}, \varepsilon_0 > 0 such that, for every 0<ε<ε00 < \varepsilon < \varepsilon_0, any randomized algorithm under local access model that outputs an ε\varepsilon-approximation of spectral density with probability at least 2/32/3 on simple unweighted graph requires at least 2c/ε2^{\mathrm{c}/\varepsilon} queries in the worst case.

TABLE 1. Classical algorithms and lower bounds for ε\varepsilon-approximate spectral density estimation under W1W_1. The algorithms are assumed with ε=Ω~(1/n)\varepsilon = \tilde{\Omega}(1/\sqrt{\mathrm{n}}). We denote matvec to be the matrix-vector multiplication, σ1\sigma_1 to be the l-th largest singular value of NG\mathrm{N_G}. Non-adaptive RW refers to random walks started from uniformly random nodes.

AlgorithmComplexityQuery modelErrorGraph Type
Local[CSKSV18]2O(1/ε)2^{\mathrm{O}(1/\varepsilon)}local accessW1⩽εW_1\leqslant \varepsilonUnweighted
Sublinear[BKM22]O(n⋅ε−7)\mathrm{O}(\mathrm{n}\cdot \varepsilon^{-7})local accessW1⩽εW_1\leqslant \varepsilonUnweighted
[JKM+^+24]O(n⋅ε−3)\mathrm{O}(\mathrm{n}\cdot \varepsilon^{-3})local accessW1⩽εW_1\leqslant \varepsilonWeighted or Unweighted
Linear[BKM22, MMRS25]O(m⋅ε−1)\mathrm{O}(\mathrm{m}\cdot \varepsilon^{-1})matvecW1⩽εW_1\leqslant \varepsilonWeighted or Unweighted
[BJM+^+25]O~(m⋅(ε−1+l))\widetilde{\mathrm{O}}(\mathrm{m}\cdot(\varepsilon^{-1}+\mathrm{l}))matvecW1⩽εσ1+1W_1\leqslant \varepsilon \sigma_{1+1}Weighted or Unweighted
Lower bound[JMSS23]2O(1/ε)2^{\mathrm{O}(1/\varepsilon)}non-adaptive RWW1⩽εW_1\leqslant \varepsilonWeighted
[PWYY26]2O(1/ε1/6)2^{\mathrm{O}(1/\varepsilon^{1/6})}non-adaptive RWW1⩽εW_1\leqslant \varepsilonUnweighted
Ours2O(1/ε)2^{\mathrm{O}(1/\varepsilon)}local accessW1⩽εW_1\leqslant \varepsilonUnweighted

1.2. Quantum local access. We next extend the classical local access model to the quantum setting. In the quantum model, vertices are represented by ⌈log⁡n⌉\lceil \log \mathrm{n} \rceil bits. The following classical graph functions are exposed as reversible XOR oracles and we assume they can be implemented in O(1) time:

Odeg∣ν,z⟩=∣ν,z⊕dν⟩,\mathrm{O}_{\mathrm{d e g}}|\nu,z\rangle=|\nu,z\oplus\mathrm{d}_{\nu}\rangle, Onbr∣ν,i,z⟩=∣ν,i,z⊕nbr(ν,i)⟩,\mathrm{O}_{\mathrm{n b r}}|\nu,\mathrm{i},z\rangle=|\nu,\mathrm{i},z\oplus\mathrm{n b r}(\nu,\mathrm{i})\rangle, Opair∣u,ν,z⟩=∣u,ν,z⊕Auν⟩.\mathrm{O}_{\mathrm{p a i r}}|\mathfrak{u},\nu,z\rangle=|\mathfrak{u},\nu,z\oplus\mathcal{A}_{\mathfrak{u}\nu}\rangle.

Here nbr(v,i)\text{nbr}(v, i) is the neighbor occupying port i∈[dv]i \in [d_v] in an arbitrary but fixed adjacency-list ordering. This model is typical in previous researches [ADW22, JP26]; see Section 2 for further details. We obtain the following result, which shows the spectral density can be estimated with query complexity only poly(1/ε)\text{poly}(1/\varepsilon).

Theorem 2. In the quantum local access model, there is an algorithm with O~(ε−3)\widetilde{\mathrm{O}}(\varepsilon^{-3}) quantum query complexity and additional O~(ε−2)\widetilde{\mathrm{O}}(\varepsilon^{-2}) classical runtime that ε\varepsilon-approximates the spectral density under W1W_1 with probability at least 2/3, where the O~(⋅)\widetilde{\mathrm{O}}(\cdot) only hides the poly (log⁡1ε)(\log \frac{1}{\varepsilon}) factor.

We complement the algorithm by a quantum query lower bound.

Theorem 3. Every spectral density estimator in the quantum local access model with W1W_1 error at most ε\varepsilon and success probability at least 2/3 uses Ω~(ε−4/3)\widetilde{\Omega}(\varepsilon^{-4/3}) queries in the worst case. The Ω~(⋅)\widetilde{\Omega}(\cdot) hides only poly( log⁡1ε\log \frac{1}{\varepsilon}) factor.

1.3. Model comparison. The quantum local access model contains the classical local access model: the three operations in the classic access model [BR02] can be implemented from the quantum coherent XOR oracles at O(1) cost. The quantum model is therefore at least as strong, and in fact strictly more powerful. The coherent superposition queries enable quantum walk-based phase estimation that produces samples from the approximation of spectral density ρG\rho_G. Our quantum upper bound is built on this capability. By contrast, Theorem 1 shows that in the classical local access model no algorithm can output an ε\varepsilon-approximation of ρG\rho_G with constant success probability using fewer than 2Ω(1/ε)2^{\Omega(1/\varepsilon)} queries. In particular, the classical model does not admit a comparably efficient procedure for sampling from ρG\rho_G. Spectral density estimation therefore exhibits a quantum advantage.

1.4. AI disclaimer. The main idea of the construction of lower bounds are inspired by the interaction with GPT-5.6 Sol. All proofs are human written or have been heavily revised by the authors.

References (28)