wikillm

Paper · 2020-12-15 · stat.ML, cs.IT, cs.LG, eess.SP, math.ST

Spectral Methods for Data Science: A Statistical Perspective

Monograph on spectral methods: estimate a hidden matrix's top eigen- or singular vectors from a matrix built from data. Gives sin-Θ perturbation bounds, leave-one-out entrywise (ℓ∞, ℓ2,∞) guarantees, and spectral estimators for denoising, PCA, SBM clustering, ranking, phase retrieval and matrix and tensor completion. Results are proven bounds, not benchmarks.

Spectral methodsSpectral clusteringMatrix completionLeave-one-out analysisspectral-methodsmatrix-perturbationleave-one-out-analysiscommunity-detectionmatrix-completionphase-retrievalrankingpcamonograph

arXivPDFMarkdown15 min read

AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Many data problems hide the answer inside a large table of numbers: which people form a group in a social network, which items rank highest from pairwise comparisons, or the main directions along which data varies. A spectral method builds one matrix from the data, then reads the answer off the matrix's most important eigenvectors. It is simple, and it works well on its own or as a starting point for a more complicated fit.

This monograph explains why such methods work and how accurate they are. Its main habit is to treat the matrix the algorithm sees as the true matrix plus noise, and then ask how far the important directions can move. It goes beyond average error by asking about each individual entry, using a trick called leave-one-out: remove one piece of data, recompute, and compare. Each application chapter follows the same recipe.

TL;DR

Spectral methods build a matrix from data and use its top eigenvectors or singular vectors as the estimate of a hidden structure §1.1. The perturbation bounds of Davis–Kahan and Wedin control how far those vectors can move, with the size of the noise divided by the eigengap §2.3 §2.4. Leave-one-out arguments give per-entry error bounds that are tighter than the average-error bounds §4. The monograph applies this to denoising, PCA, community detection, ranking, phase retrieval, and matrix and tensor completion §3. It is a theory monograph: the results are proven bounds with unstated constants and log factors, not benchmark numbers.

Problem

The target is a hidden matrix M* whose eigenvectors or singular vectors reveal what is sought. The method forms a surrogate M from the data and computes the corresponding vectors of M §1.1, "unified theme". The monograph asks how many samples are needed for a target accuracy, and how stable the estimate is under random noise, missing entries and adversarial corruption §1.2.

Two error scales matter. The ℓ2 scale measures subspace distance, as in Davis–Kahan and Wedin §2.3 §2.4. The fine-grained scale measures ℓ∞ and ℓ2,∞ error per entry or per row §4. The authors note that for entrywise questions, a naive bound by the ℓ2 error is often loose by an order of magnitude §4, intro.

Assumptions that recur across chapters:

  • The target rank r is known §3.2 §3.8.
  • The eigengap or singular gap of the target is positive and larger than the noise, which the theorems state explicitly §2.3 §2.4.
  • Noise entries are independent in the ℓ∞ chapter; dependent noise is listed as an open problem §4 §5.
  • Matrix completion assumes uniform random sampling with probability p and incoherence §3.8.

Method

The monograph's "methods" are spectral estimators plus the analysis that goes with them. There is no training and no tuned network. The implementable parts are the estimators below.

Setting and distances §2.2

Subspace distances must account for rotation: UR spans the same space as U for any orthogonal R. The paper therefore uses distances that are invariant to rotation, namely the distance after optimal rotation, the distance between projection matrices UUᵀ − UUᵀ, and the sine of the principal angles (sin Θ) §2.2.

ℓ2 perturbation (classical) §2.3 §2.4

  • Symmetric case. Let M = M* + E, with top-r eigenvectors U of M and U* of M*. If the eigenvalues of M* in the top block lie in an interval [α, β] and the rest lie at distance Δ from it, then dist(U, U*) ≤ √2 ‖sin Θ‖ ≤ √2 ‖E U*‖ / Δ ≤ √2 ‖E‖ / Δ, and the Frobenius version holds with a √r factor §2.3, Davis–Kahan theorem.
  • Simplified form. If ‖E‖ < (1 − 1/√2)(|λr*| − |λr+1*|), then dist(U, U*) ≤ 2‖E‖ / (|λr*| − |λr+1*|) §2.3, Corollary of Davis–Kahan.
  • Singular case. If ‖E‖ < σr* − σr+1*, then both the left and right singular subspaces are controlled by √2 max(‖Eᵀ U*‖, ‖E V*‖) / (σr* − σr+1* − ‖E‖) §2.4, Wedin theorem. Under ‖E‖ < (1 − 1/√2)(σr* − σr+1*), this becomes 2‖E‖ / (σr* − σr+1*) §2.4.
  • Why the gap matters. A 2×2 example shows that when the perturbation is as large as the eigengap, the leading eigenvector can rotate by a right angle, whatever the size of the perturbation §2.3, warm-up example.

Generic spectral estimate §1.1 §3.2

Pseudocode
# Spectral estimate of an unknown rank-r symmetric target  [§1.1] [§3.2]
# Input:  symmetric data matrix M (n, n), target rank r
# Output: U (n, r) estimated eigenspace, Lambda (r, r) its eigenvalues

def spectral_estimate(M, r):
    # Eigendecomposition of M; sort by absolute value, largest first  [§3.2]
    eigenvalues, eigenvectors = eigh(M)
    order = argsort(-abs(eigenvalues))
    # Keep the r eigenpairs with the largest magnitude  [§3.2]
    U = eigenvectors[:, order[:r]]
    Lambda = diag(eigenvalues[order[:r]])
    return U, Lambda

The paper sorts by absolute value for denoising §3.2. For problems whose leading eigenvalue is positive, such as PCA §3.3 and phase retrieval §3.7, "leading" means the largest eigenvalue.

Low-rank matrix denoising §3.2

  • Model: M = M* + E, with M* = UΛU*ᵀ of rank r and E symmetric with independent Gaussian entries of variance σ² on and below the diagonal §3.2.
  • Estimate: the rank-r leading eigenspace of M §3.2.
  • Noise bound: ‖E‖ ≤ 5σ√n with probability at least 1 − O(n⁻⁸) §3.2.
  • Guarantee: dist(U, U*) ≤ 10σ√n / |λr*|, provided σ√n ≤ ((1 − 1/√2)/5)|λr*| §3.2. The paper calls this order-wise optimal, citing a minimax lower bound for r = 1 §3.2.
  • Proof device: Gaussian entries are truncated at 5σ√(log n) before applying a matrix tail bound §3.2, proof of the noise bound.

PCA and factor models §3.3

  • Model: x_i ~ N(0, M*) with M* = UΛU*ᵀ + σ²I_p (spiked covariance) §3.3.
  • Estimate: M = (1/n) Σ_i x_i x_iᵀ, then the rank-r eigenspace U of M §3.3.
  • Guarantee: see Results §3.3, Theorem.
  • Missing data or heteroskedastic noise can change the diagonal of M*. The paper suggests adjusting the diagonal of M, and in §3.9 it uses diagonal deletion §3.3, remark.

Community detection in the SBM §3.4 §4.5

  • Model: n vertices in two equal groups. Each pair is connected with probability p if the vertices are in the same group, and q otherwise, with p > q > 0. Self-loops are absent §3.4.
  • Surrogate: M = A − ((p + q)/2) 1 1ᵀ + pI, where A is the adjacency matrix §3.4. Its mean M* = E[M] is rank one with leading eigenvalue (p − q)n/2 and eigenvector proportional to (1, …, 1, −1, …, −1) §3.4.
  • Estimate: the sign of the leading eigenvector of M, with ties sent to −1 §3.4.
  • The paper assumes, without loss of generality, that the first half of the vertices forms group 1 §3.4. Labels are recovered only up to a global sign §3.4.
Pseudocode
# Two-community spectral clustering for an SBM  [§3.4]
# Input:  adjacency A (n, n) with zero diagonal, edge probabilities p, q
# Output: labels (n,) in {+1, -1}, correct up to a global sign

def sbm_spectral_cluster(A, p, q):
    n = A.shape[0]
    # Subtract the mean level and add p on the diagonal  [§3.4] [eq. M]
    M = A - (p + q) / 2 * ones((n, n)) + p * eye(n)
    # Leading eigenpair of M (largest eigenvalue)  [§3.4]
    eigenvalues, eigenvectors = eigh(M)
    u = eigenvectors[:, argmax(eigenvalues)]
    # Sign rounding; zero counts as -1  [§3.4]
    return where(u > 0, 1, -1)
  • The paper also sketches a version that avoids p and q, using the second eigenvector of A, and cites Abbe et al. (2020) for it. It is not analyzed in this monograph §3.4, remark.

Clustering in Gaussian mixtures §3.5

  • The mean of the data matrix X has rank r, E[X] = Θ* Fᵀ, where F is block constant with groups of size n/r §3.5. The spectral method works on the spiked structure of X and of its Gram matrix §3.5.
  • Setup: centers θ_i* drawn from N(0, (Δ²/(2p)) I_p), with Δ the scale of the center separation §3.5. The paper's algorithm details are not summarized on this card; see §3.5.

Ranking from pairwise comparisons §1.1 §3.6

  • Model: Bradley–Terry–Luce. P(i beats j) = w_i / (w_i + w_j) with positive latent scores w §1.1.
  • Convention: for i < j, y_{i,j} = 1 means item j beat item i, and y_{i,j} = 1 − y_{j,i} otherwise §3.6.
  • Transition matrix: P_{ij} = y_{ij} / n for i ≠ j, and each diagonal entry makes its row sum to one §3.6.
  • The mean P* is reversible, with stationary distribution π* = w / (1ᵀw) §3.6.
  • Estimate: the leading left eigenvector π of P, which is an estimate of π*, and therefore of w up to a scale §3.6.
Pseudocode
# Spectral ranking from pairwise outcomes  [§3.6]
# Input:  y (n, n); y[i, j] = 1 if j beat i, 0 if i beat j, y[i, i] = 0
# Output: scores pi (n,), a probability vector proportional to w

def spectral_rank(y, n):
    # Off-diagonal transition probabilities: y / n  [§3.6] [eq. P]
    P = y / n
    # Diagonal fills each row to sum to one  [§3.6]
    P = P + diag(1 - P.sum(axis=1))
    # Leading left eigenvector: P^T pi = pi  [§3.6]
    eigenvalues, eigenvectors = eig(P.T)
    pi = eigenvectors[:, argmax(real(eigenvalues))]
    return real(pi) / sum(real(pi))

The pseudocode uses the paper's convention for y, which is the reverse of the usual "i beats j" reading (see Pitfalls). The eigenvector's sign is removed by normalizing it to sum to one.

Phase retrieval §3.7

  • Measurements: y_i = (a_iᵀ x*)², with design vectors a_i ~ N(0, I_n) i.i.d. §3.7.
  • Surrogate: M = (1/m) Σ_i y_i a_i a_iᵀ. Its mean is E[M] = 2 x* xᵀ + ‖x‖² I_n, with leading eigenvalue 3‖x*‖² and eigenvector ± x*/‖x*‖ §3.7.
  • Estimate: x = √(λ1/3) u1 §3.7. The paper also gives the alternative √(mean of y) · u1, which uses the sample mean of y as the scale §3.7.
  • Truncated variant, to reduce the sample requirement. Replace y_i by T(y_i) in the surrogate, where T can be a mean-based cutoff, a median-based cutoff, an order-statistic cutoff, or an optimal preprocessing function §3.7. The estimate keeps the √(mean of y) scale.
Pseudocode
# Truncated spectral initialization for phase retrieval  [§3.7]
# Input:  design vectors a (m, n), measurements y (m,) = (a_i . x*)^2
# Output: estimate x (n,), correct up to a global sign

def truncated_spectral_init(a, y, alpha1):
    m = a.shape[0]
    y_bar = mean(y)
    # Mean-based truncation: drop unusually large y_i  [§3.7] [eq. trimming]
    y_trunc = y * (y <= alpha1 * y_bar)
    # Weighted sample covariance of the design vectors  [§3.7] [eq. M_T]
    M_T = (a.T * y_trunc) @ a / m
    # Leading eigenvector  [§3.7]
    eigenvalues, eigenvectors = eigh(M_T)
    u1 = eigenvectors[:, argmax(eigenvalues)]
    # Restore the scale from the mean of y  [§3.7] [eq. estimate]
    return sqrt(y_bar) * u1

Matrix completion §3.8

  • Sampling: each entry of M* is observed independently with probability p §3.8, Assumption on random sampling.
  • Incoherence: μ = max{ n1 ‖U*‖²₂,∞ / r, n2 ‖V*‖²₂,∞ / r } §3.8, definition. The paper notes 1 ≤ μ ≤ n2 / r §3.8, remark. A single-entry matrix shows why incoherence is needed §3.8.
  • Surrogate: M = p⁻¹ P_Ω(M*), where P_Ω keeps observed entries and zeros the rest, so E[M] = M* §3.8.
  • Estimate: rank-r truncated SVD of M, giving U, Σ, V §3.8.
Pseudocode
# Spectral matrix completion  [§3.8]
# Input:  observed matrix (n1, n2) with values on the sampled set,
#         mask (n1, n2) of 0/1 for the sampled set, probability p, rank r
# Output: U (n1, r), Sigma (r, r), V (n2, r)

def spectral_completion(observed, mask, p, r):
    # Zero-fill unobserved entries and rescale by 1/p (unbiased)  [§3.8]
    M = (observed * mask) / p
    # Rank-r truncated SVD of the rescaled matrix  [§3.8]
    U_full, sigma, Vt_full = svd(M)
    U = U_full[:, :r]
    Sigma = diag(sigma[:r])
    V = Vt_full[:r, :].T
    return U, Sigma, V

Tensor completion §3.9

  • Unfold the n×n×n tensor T* into an n × n² matrix A*. Its rank is at most r §3.9.
  • Surrogate: M = p⁻² P_off-diag(A Aᵀ), the Gram matrix with its diagonal set to zero. The diagonal is removed because, for small p, the diagonal of A Aᵀ is large and not constant, which hides the low-rank part §3.9.
  • Estimate: the top-r eigenvectors of M, as the subspace estimate §3.9.

Fine-grained (ℓ∞ and ℓ2,∞) analysis §4

  • Leave-one-out idea. Remove the influence of one row or entry, recompute the estimate, and bound the difference. This decouples the statistical dependence that a direct analysis would have to handle §4, Notes. The paper credits El Karoui et al. and Abbe et al. for this technique §4, Notes.
  • Matrix sign. For a matrix Z = U_Z Σ_Z V_Zᵀ, sgn(Z) = U_Z V_Zᵀ. Aligning U to U* requires the rotation sgn(H) with H = Uᵀ U*, which is the best orthogonal alignment in Frobenius norm §4.2, definition and remark.
  • First-order approximation. Uniformly across rows, U sgn(H) is close to M U* (Λ*)⁻¹ = U* + E U* (Λ*)⁻¹ §4.2. The paper uses this to explain why the ℓ2,∞ error is smaller than the ℓ2 error §4.2.

Hyperparameters

NameValueWhereNotes
target rank rknown§3.2 §3.8Assumed known; no rank-selection rule is given.
sampling probability p (completion)known§3.8Needed for the 1/p rescaling; heterogeneous sampling is open §5.
edge probabilities p, q (SBM)known§3.4Used to build M; the model-agnostic alternative is not analyzed here §3.4.
mean truncation α1"sufficiently large", not stated§3.7Analysis constant.
median truncation α2"sufficiently large", not stated§3.7Analysis constant.
order-statistic cutoff α3"properly chosen", not stated§3.7Analysis constant.
noise truncation bound5σ√(log n)§3.2 (proof)Proof device, not an algorithm step.
eigengap condition factor1 − 1/√2§2.3 §2.4Explicit in the corollaries.
sample-size constants C, C₁, c₀, c₁, c₄, c₅"sufficiently large/small", not statedeach theoremNot given numerically.
failure probabilityO(n⁻⁸), O(n⁻¹⁰), O(n⁻⁵), etc.each theoremStated per theorem.

Results

Author-reported theorem bounds, not experiments. Each bound holds with the stated probability and conditions; constants are not given numerically. The figures (§1.1) are simulations: SBM success rate over 200 trials, eigenface, completion error against sampling rate, and ranking success against the score gap §1.1.

SettingGuaranteeConditionSource
Denoising, r ≥ 1dist(U, U*) ≤ 10σ√n / ‖λr*‖ w.p. ≥ 1 − O(n⁻⁸)σ√n ≤ ((1 − 1/√2)/5) · ‖λr*‖§3.2
PCA (spiked covariance)dist ≲ (σ/√λr* · √(κp/n) + σ²/λr* · √(p/n) + κ√(r/n)) · √log(n+p)n ≥ C(κ²r + r log²(n+p) + κσ²p/λr* + σ⁴p/(λr*)²) log³(n+p)§3.3
SBM, weak recoveryfraction of correct labels 1 − o(1), up to signp ≳ log n / n and √(p/n) = o(p − q)§3.4
SBM, exact recoveryall labels correct, up to sign, w.p. 1 − o(1)p = α log n/n, q = β log n/n, (√p − √q)² ≥ 2(1+ε) log n/n§4.5
SBM, information limitno algorithm exact below threshold(√p − √q)² ≤ 2(1−ε) log n/n§4.5 (cited to other papers)
Gaussian mixturemis-clustering rate o(1) w.p. ≥ 1 − O(p⁻¹⁰)r = O(1), p ≳ log³n, log(n+p) = o(Δ), (p log(n+p)/n)^{1/4} = o(Δ)§3.5
Ranking (BTL)‖π − π*‖₂ / ‖π*‖₂ ≲ κ^{2.5} √(log n / n) w.p. ≥ 1 − O(n⁻⁸)n ≥ C κ⁵ log n§3.6
Phase retrievalmin over sign of ‖x ∓ x*‖₂ ≤ 3c √(n log³m / m) ‖x*‖₂m ≥ C n log³m§3.7
Truncated phase retrievalrelative error ≤ ε w.p. ≥ 1 − O(n⁻²)m ≥ c₀ n; parameters α suitably chosen§3.7
Matrix completion, subspacemax(dist U, dist V) ≲ κ √(μ r log n₂ / (n₁ p))n₁p ≥ C₁ κ² μ r log n₂§3.8
Matrix completion, matrix (Frobenius)‖UΣVᵀ − M*‖_F ≲ √(μ r² log n₂ / (n₁p)) ‖M*‖n₂p ≥ C μ r log n₂§3.8
Tensor completion, subspacedist ≲ μ^{3/2}κ²r√log n/(n^{3/2}p) + √(μ²κ⁴r log n/(n²p)) + μκ²r/n w.p. ≥ 1 − O(n⁻⁷)μr²κ⁴ log n ≤ c₄n; p ≥ c₅ μ^{3/2}κ²r log^{2.5}n / n^{3/2}§3.9
Rank-1 denoising, entrywisedist∞(u, u*) ≲ σ(√log n + √μ)/λ* w.p. ≥ 1 − O(n⁻⁸)σ√n ≤ c₀λ*§4.1
General denoising, ℓ2,∞‖U sgn(H) − U*‖_2,∞ ≲ (σκ√(μr) + σ√(r log n)) / ‖λr*‖ w.p. ≥ 1 − O(n⁻⁵)σ√(n log n) ≤ c_σ · ‖λr*‖§4.2
General denoising, entrywise matrix‖UΛUᵀ − M*‖_∞ ≲ σκ²μr √(log n/n)σκ√(n log n) ≤ c₁ · ‖λr*‖§4.2
Matrix completion, ℓ2,∞ and ℓ∞ℓ2,∞ ≲ κ²√(μ³r³ log n / (n₁²p)); ℓ∞ ≲ κ²μ²r²√(log n / (n₁³p)) ‖M*‖ w.p. ≥ 1 − O(n⁻⁵)n₁p ≥ C κ⁴μ²r² log n, n = n₁ + n₂§4.4

The paper contrasts the ℓ2,∞ and ℓ∞ bounds with the ℓ2 bounds. The ℓ2,∞ error can be about √n₁ times smaller than the ℓ2 error, and the entrywise error about n₁ times smaller than the Euclidean matrix error §4.4. These are order statements; the paper does not claim sharp constants §1.3.

Paper vs code

No official code.

Searched: the arXiv metadata and the LaTeX source for code or project links (none; the only URLs are publisher and journal links). GitHub repository search through the API for "spectral methods statistical perspective" and "leave-one-out spectral yuxin chen" returned no results. The pseudocode above follows the paper's text, not any implementation.

Pitfalls

  • Eigengap is essential. The theory needs the eigengap to exceed the noise §2.3. The 2×2 example shows that the leading eigenvector can change completely when the perturbation is comparable to the gap §2.3. The paper lists small eigengaps as an open problem §5.
  • Rotation and sign. Estimates are only defined up to a global rotation or sign. To compare with the truth, align with sgn(H) or compare projection matrices §2.2 §4.2. The ranking scale is not recoverable: the model is invariant to scaling w §3.6. SBM and phase retrieval labels are up to global sign §3.4 §3.7.
  • Ranking convention. The comparison outcome y_{i,j} = 1 means j beat i, which is the opposite of the usual reading §3.6. Reversing the convention gives the reversed ranking.
  • Matrix completion. The 1/p rescaling is unbiased but noisy when p is small. Incoherence is required; a matrix with mass on a single entry can make recovery impossible §3.8. The sampling must be uniform. Heterogeneous sampling patterns are an open problem §5.
  • Log terms depend on the chapter. The ℓ2 results use log n₂ with n₁ ≤ n₂. The ℓ∞ results use log n with n = n₁ + n₂ §3.8 §4.4.
  • Phase retrieval's plain estimator fails at small m. When m is about n log m or less, ‖M‖ is dominated by the largest y_i, so ‖M − M*‖ is not small §3.7. Use a truncation. The truncation constants α1, α2, α3 are not stated.
  • Phase retrieval's log factor. The plain estimator needs m ≳ n log³ m. The paper cites tighter analyses that reach m ≳ n log n, and does not carry them out itself §3.7.
  • Leading means different things. Denoising sorts by |λ| §3.2. For positive leading eigenvalues (PCA, phase retrieval), leading means largest value §3.3 §3.7. Mixing these up picks the wrong eigenvectors when the spectrum has negative eigenvalues.
  • SBM needs p and q to build M. The paper's version with unknown p, q is not analyzed in the monograph §3.4.
  • SBM exact recovery is a threshold result. Below p < log n / n, isolated vertices make exact recovery impossible §4.5. The constants α > β > 0 may depend on ε §4.5, footnote.
  • Diagonal handling. For PCA with missing data and for tensor completion, the diagonal of the Gram matrix must be adjusted, or it hides the low-rank part §3.3 §3.9.
  • Independent entries only. The ℓ∞ and ℓ2,∞ theory assumes independent entries. Blind deconvolution and coded diffraction phase retrieval are dependent cases that the paper leaves open §5.
  • Heavy tails. The paper's discussion of heavy-tailed noise is commented out in the source §5. The results assume sub-Gaussian or bounded noise.
  • Tightness. The paper does not aim for sharp log factors or pre-constants §1.3 §5. Do not use these bounds to compare two algorithms that differ only by a log factor.

Lineage

  • Builds on: Davis–Kahan (1970) for the eigenspace bound and Wedin (1972) for singular subspaces §2.3 §2.4. Leave-one-out analysis draws on El Karoui et al. (2013) and El Karoui (2015) for M-estimation §4, Notes.
  • Entrywise eigenvector analysis follows Abbe, Fan, Wang and Zhong (2020) §4, Notes.
  • Spectral matrix completion originates in Achlioptas and McSherry (2007) and Keshavan, Montanari and Oh (2010) §3.8.
  • Ranking from the spectral method originates in Negahban, Oh and Shah §3.6.
  • Truncated phase retrieval is due to Chen and Candès (2015) §3.7.
  • Compared against: minimax lower bounds for denoising §3.2 and information-theoretic SBM limits §4.5.

Source and license

Adapted from “Spectral Methods for Data Science: A Statistical Perspective” by Yuxin Chen, Yuejie Chi, Jianqing Fan, Cong Ma (arXiv:2012.08496), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.