Spectral latent geometry for sparse attention
Implementation & benchmark of arXiv:2607.14304 — Spectral Concentration and Recovery in Sparse High-Dimensional Random Geometric Graphs
Source paper: Spectral Concentration and Recovery in Sparse High-Dimensional Random Geometric Graphs arXiv:2607.14304 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Build a sparse graph by thresholding normalized token or item inner products, then use the leading eigenvectors of its centered adjacency matrix as geometric features or a low-rank attention-logit bias. The graph avoids storing all pairwise similarities, while the paper's spectral bound supplies a concrete signal-to-noise test for deciding whether the resulting embedding is trustworthy.
Formulas
Mathematical statement
In the spherical model, latent vectors U_1,...,U_n are independent and uniform on the unit sphere S^{d-1}. Vertices i and j are adjacent when their inner product exceeds threshold tau, with p = P(<U_i,U_j> >= tau). A is the resulting n by n adjacency matrix, E[A] is its expectation, n is the number of vertices, d is the latent dimension, p is the edge density, and ||.||_op is the spectral norm. The paper gives the high-probability estimate ||A-E[A]||_op = O(sqrt(n p log n) + n p tau) at the connectivity scale n p = Omega(log n). It also states that leading-eigenspace vector and relative-Gram recovery errors vanish when log(1/p) << d << n p log(1/p)/log n in the spherical model. The adaptation centers the graph with C = A - p(J-I), where J is the all-ones matrix, computes its top r eigenvectors V_r, and forms Z = sqrt(n) V_r. The estimated noise floor is sigma_hat = sqrt(n p log n) + n p tau; spectral coordinates are used only when the smallest retained eigenvalue exceeds kappa sigma_hat, with kappa typically 2 or 3.
Implementation notes
(1) Integrate this at the input of a transformer, sparse-attention block, or graph neural network. For token or item vectors X in R^(n by d), normalize each row as U_i = X_i/(||X_i||_2 + epsilon). Construct a symmetric sparse graph using A_ij = 1[U_i^T U_j >= tau] for i != j and A_ii = 0. The threshold tau should be selected from a sampled empirical quantile so that approximately a target fraction p of pairs are retained. Use p between 4 log(n)/n and 0.05 for the first sweep. (2) Form the centered operator C(v) = A v - p((1^T v)1 - v), without materializing the dense matrix pJ. Run randomized Lanczos or subspace iteration for r eigenvectors, producing V_r, and set Z = sqrt(n)V_r. Concatenate Z with X before the network, or add the low-rank bias B = alpha Z Z^T/sqrt(r) to sparse-attention logits. (3) Compute sigma_hat = sqrt(n p log n) + n p tau from the paper's bound. Estimate the smallest retained eigenvalue lambda_hat_r and gate the feature when lambda_hat_r <= kappa sigma_hat. The theorem-derived quantities are the threshold graph, centering, spectral noise proxy, and density diagnostic; the useful rank r, scale alpha, and kappa are tuned on validation data. (4) First test on a small transformer for CIFAR-100 patches or a Cora graph, comparing dense attention, standard top-k similarity sparsification, and this method at matched average degree. Record validation accuracy, peak memory, graph-build time, eigen-solver time, spectral ratio lambda_hat_r/sigma_hat, and loss at equal wall-clock time. Success is comparable or better accuracy with lower memory and near-linear sparse aggregation cost; deliberately lowering p below the connectivity scale should cause the predicted spectral collapse.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.