Abstract
Kernel methods are essential for modeling non-linear relationships in graph-structured data, yet they are frequently bottlenecked by the cubic time complexity ($O(N^3)$) required to compute the regularized Laplacian kernel. This paper introduces Graph Random Features (GRFs), a novel framework designed to linearize graph kernels. By utilizing randomized signature vectors generated through random walks, GRFs provide an unbiased estimator for complex kernels, transforming a computationally prohibitive task into an efficient, parallelizable process suitable for massive networks. Our results demonstrate that GRFs achieve significant speedups—reducing FLOP requirements by orders of magnitude—while maintaining high accuracy in downstream tasks like clustering.
Introduction
In the realm of machine learning, kernel methods allow us to measure similarities between data points in high-dimensional spaces. When applied to graphs, these kernels determine node similarity based on the underlying topology. However, the standard regularized Laplacian kernel requires inverting a large matrix, a process that scales poorly as the number of nodes ($N$) increases. For modern graphs with millions of nodes, this $O(N^3)$ complexity represents a "scalability wall."
While "Random Features" (RFs) have successfully scaled kernels for Euclidean data (such as the RBF kernel), a rigorous, unbiased equivalent for graph-structured data has historically been missing. This paper bridges that gap by introducing Graph Random Features, a method that treats random walks as a sampling mechanism to approximate the kernel function efficiently.
Methodology: Graph Random Features (GRFs)
The core innovation of this work is the linearization of graph kernels through the construction of node-specific "signature vectors." The process involves several key steps:
1. Signature Vector Generation
For every node $i$ in the graph, the algorithm computes a signature vector $\phi(i)$. This is achieved by initiating $m$ random walks from node $i$. Each walk carries a numerical "load" that is updated at every step and "deposited" into the signature vector at the index corresponding to the visited node. The authors prove that the dot product of two such vectors, $\phi(i)^\top \phi(j)$, serves as an unbiased estimator of the kernel value $K(i, j)$.
2. Dimensionality Reduction and Efficiency
To prevent signature vectors from becoming unmanageably large, the authors implement two primary optimization techniques:
- Anchor Points: Instead of tracking every node, signature vectors are only updated at a randomly sampled subset of $K$ nodes.
- Johnson-Lindenstrauss Transform (JLT): A random Gaussian projection is applied to compress the vectors while preserving their dot products, ensuring the memory footprint remains manageable.
3. Variance Reduction with q-GRFs
The authors also introduce q-GRFs, a variant utilizing reinforced random walks. These walks prioritize exploring unvisited regions of the graph, which theoretically reduces the variance of the estimator compared to standard random walks.
Key Insights
- Embarrassingly Parallel Execution: Because the signature vector for each node is computed independently, the algorithm can be distributed across thousands of machines without communication overhead, making it ideal for "Big Data" infrastructure.
- Sub-quadratic Inference: By leveraging GRFs, downstream tasks such as kernel-KMeans or solving linear systems can be performed in sub-quadratic time. This bypasses the need to ever explicitly construct the full $N \times N$ kernel matrix.
- Recursive Kernel Construction: The paper demonstrates that once an estimator for the 2-regularized Laplacian is established, it can be used to recursively build estimators for higher-order $d$-regularized kernels.
Empirical Results
The effectiveness of GRFs was evaluated across a variety of benchmarks, including synthetic Erdos-Renyi graphs, social networks (Dolphins, Karate Club), and citation networks (Citeseer).
Performance and Speed
In computational tests on a 3,000-node graph, the GRF approach required only 10.2 million FLOPs. In contrast, brute-force matrix inversion required 27 billion FLOPs, and standard iterative solvers like Gauss-Seidel required 90 million FLOPs. This represents a massive reduction in computational overhead.
Accuracy and Clustering
Despite the randomized nature of the algorithm, accuracy remains high. With a relatively small number of random walks ($m=80$), the relative error (Frobenius norm) compared to the ground-truth kernel dropped below 2% across nearly all tested graph types. Furthermore, in kernelized KMeans experiments on the Citeseer dataset, GRFs achieved clustering errors of <1% compared to results obtained using exact kernel calculations.
Limitations and Future Work
While GRFs offer a significant leap in scalability, several areas remain for future exploration. The authors note that while the estimators are unbiased, a rigorous analysis of concentration results—determining how tightly the estimate clusters around the true value—remains an open theoretical challenge. Additionally, while $q$-GRFs show promise for variance reduction, a full-scale empirical comparison against standard GRFs is still needed. Finally, the performance of the algorithm is sensitive to the termination probability ($p_{term}$) of the random walks; developing automated methods for tuning this hyperparameter based on graph topology is a key next step.
Summary updated