š¤ AI Summary
This work addresses the limitations of spectral positional encodings for directed graphs, which suffer from the high computational complexity (O(n³)) of the magnetic Laplacian and the gauge ambiguity of complex eigenvectors. The authors propose a learnable spectral positional encoding method that intrinsically incorporates gauge invariance by applying matrix functions of the magnetic normalized operator to random probe blocks, thereby avoiding explicit eigendecomposition. Leveraging Hermitian block Krylov subspace techniques, the approach efficiently approximates these matrix functions using only sparse matrix-vector multiplications and introduces a structured low-dimensional response function to enhance generalization and mitigate overfitting. Theoretical analysis via covering numbers supports the model's generalization capacity, and experiments demonstrate significant performance gains over existing baselines on both symmetric-informationless directed stochastic block models and heterophilic graph benchmarks, with accuracy approaching that of exact spectral decomposition as model depth increases.
š Abstract
Spectral positional encodings (PEs) for \emph{directed} graphs face two obstacles: magnetic Laplacians require an $O(n^3)$ Hermitian eigendecomposition per potential, and their complex eigenvectors are defined only up to unitary gauge, which prior work handles with basis-invariant architectures. We propose learnable spectral PEs of the form $h_Īø(A_q)\,R$, where $A_q$ is a normalized magnetic operator, $h_Īø$ a learnable scalar spectral response, and $R$ a block of random probes. Because the PE is a \emph{matrix function} of the operator, it is gauge-invariant by construction. We compute it in a Hermitian block Krylov subspace from sparse matrix--vector products only, prove that $k = O(\log(1/\varepsilon))$ block steps suffice uniformly over heat--resolvent response families, and give a covering-number argument for why low-dimensional structured families generalize where free per-eigenvalue weights overfit. On a directed SBM whose symmetrization is uninformative by construction, direction-blind PEs stay at chance while magnetic Krylov PEs converge to the exact-eigendecomposition oracle as the depth grows. The same probes yield gauge-invariant pairwise features with $1/\sqrt{s}$ Monte-Carlo error, and the undirected $q{=}0$ case improves heterophilous benchmarks over no-PE and polynomial baselines.