Main-Krylov Structural Encoder
Implementation & benchmark of arXiv:2607.13577 — Trees with exactly three main eigenvalues
Source paper: Trees with exactly three main eigenvalues arXiv:2607.13577 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a structural positional channel formed from the Krylov sequence generated by the graph adjacency matrix and the all-ones vector. For graphs with k main eigenvalues, this sequence has rank k, so a GNN can retain all information obtainable from global walk counts using only k node features rather than storing many adjacency powers.
Formulas
Mathematical statement
Let G have adjacency matrix A in R^(n x n), all-ones vector j in R^n, distinct adjacency eigenvalues tau_i, and orthogonal projectors P_i onto their eigenspaces. The main angle is beta_i = ||P_i j|| divided by sqrt(n), and tau_i is main exactly when beta_i is nonzero. Define W_L(A) = [j, Aj, A^2j, ..., A^(L-1)j]. By spectral decomposition, A^t j = sum_i tau_i^t P_i j, so the columns of W_L are generated only by eigenspaces with nonzero main angle. If k is the number of main eigenvalues and L is at least k, then rank(W_L) = k. Consequently, there are coefficients c_0 through c_(k-1) satisfying A^k j = sum_{r=0}^{k-1} c_r A^r j. Compute an orthonormal basis Q for the columns of W_L and use each row Q_u as a structural embedding for node u. The paper gives an explicit rank-three example satisfying v_3 = A^3j = 7v_2 + 84v_1.
Implementation notes
Integrate the encoder during graph preprocessing, before the node-feature projection of a message-passing GNN. For each graph, let A be its sparse adjacency matrix and initialize w_0 = j. Repeatedly compute w_(t+1) = A w_t. Maintain an orthonormal basis Q using modified Gram-Schmidt: r_t = w_t - Q_t(Q_t^T w_t); if ||r_t||_2 divided by ||w_t||_2 is larger than epsilon, append r_t divided by ||r_t||_2 to Q; otherwise stop or continue until L_max if a fixed-size encoder is required. Pseudocode is: Q=[]; w=ones(n); for t in range(Lmax): r=w-Q@(Q.T@w); if norm(r)/norm(w)>eps: Q.append(r/norm(r)); w=A@w. Concatenate Q to the original node features and pass the result to the baseline GNN. Estimate the numerical rank k from the residual threshold epsilon; no eigendecomposition is required. Optionally solve the least-squares system W_k c approximately equal to A^k j, then generate later walk-count channels using the recurrence A^k j = sum_r c_r A^r j instead of additional sparse matrix multiplications. First run on synthetic diameter-five trees, where rank-three cases can be generated directly, and on a small TU graph-classification dataset. Use a 3-layer GIN baseline and compare against 8-step random-walk features and Laplacian eigenvector positional encodings. Measure validation accuracy, preprocessing time, positional-feature memory, and recurrence residual ||A^k j - W_k c|| divided by ||A^k j||. Success is equal or higher accuracy with fewer channels and lower preprocessing cost; for exact rank-three trees, the recurrence residual should approach floating-point precision.
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.