SWING: Unlocking Implicit Graph Representations for Graph Random Features
Alessandro Manenti, Avinava Dubey, Arijit Sehanobish, Cesare Alippi, Krzysztof Choromanski
TL;DR
SWING tackles the challenge of computing Graph Random Features on implicit graphs by replacing discrete node-walks with continuous space-walks in a $d$-dimensional embedding, enabling linear-time kernel actions without materializing edges. It combines Gumbel-softmax relaxations, random feature mappings, and Fourier analysis to approximate the graph kernel $\mathbf{K}_{\boldsymbol{\alpha}}(\mathbf{W})$ via a low-rank factorization $\mathbf{K}_{1}\mathbf{K}_{2}^{\top}$ and precomputed components, achieving $O(NTm)$ time. The framework provides systematic construction of maps $\phi_{f}$ and $\psi_{g}$, supports radial-basis and step-function kernels (including $\epsilon$-neighborhood graphs), and delivers substantial speedups with accurate kernel approximations across synthetic and real-world tasks. Empirically, SWING yields competitive or better performance than GRFs on downstream tasks like vertex normals and Vision Transformer attention, while reducing computational overhead, underscoring its practical impact for large-scale, implicitly defined graphs.
Abstract
We propose SWING: Space Walks for Implicit Network Graphs, a new class of algorithms for computations involving Graph Random Features on graphs given by implicit representations (i-graphs), where edge-weights are defined as bi-variate functions of feature vectors in the corresponding nodes. Those classes of graphs include several prominent examples, such as: $ε$-neighborhood graphs, used on regular basis in machine learning. Rather than conducting walks on graphs' nodes, those methods rely on walks in continuous spaces, in which those graphs are embedded. To accurately and efficiently approximate original combinatorial calculations, SWING applies customized Gumbel-softmax sampling mechanism with linearized kernels, obtained via random features coupled with importance sampling techniques. This algorithm is of its own interest. SWING relies on the deep connection between implicitly defined graphs and Fourier analysis, presented in this paper. SWING is accelerator-friendly and does not require input graph materialization. We provide detailed analysis of SWING and complement it with thorough experiments on different classes of i-graphs.
