Abstract
Spatial Message Passing Graph Neural Networks (MPGNNs) are widely used for learning on graph-structured data. However, key limitations of $l$-step MPGNNs are that their "receptive field" is typically limited to the $l$-hop neighborhood of a node and that information exchange between distant nodes is limited by over-squashing. Motivated by these limitations, we propose Spatio-Spectral Graph Neural Networks ($S^2GNNs$)—a new modeling paradigm for Graph Neural Networks (GNNs) that synergistically combines spatially and spectrally parametrized graph filters. Parameterizing filters partially in the frequency domain enables global yet efficient information propagation. We show that $S^2GNNs$ vanquish over-squashing and yield strictly tighter approximation-theoretic error bounds than MPGNNs. Further, rethinking graph convolutions at a fundamental level unlocks new design spaces. For example, $S^2GNNs$ allow for free positional encodings that make them strictly more expressive than the 1-Weisfeiler-Lehman (WL) test. Moreover, to obtain general-purpose $S^2GNNs$, we propose spectrally parametrized filters for directed graphs. $S^2GNNs$ outperform spatial MPGNNs, graph transformers, and graph rewirings, e.g., on the peptide long-range benchmark tasks, and are competitive with state-of-the-art sequence modeling. On a 40 GB GPU, $S^2GNNs$ scale to millions of nodes.
Introduction
Most Graph Neural Networks (GNNs) rely on Spatial Message Passing (MPGNNs), where nodes update their states by aggregating information from immediate neighbors. While effective for local patterns, this approach struggles with long-range dependencies. To "see" a node 10 hops away, a model requires 10 layers, which often leads to over-squashing: information from distant parts of the graph gets compressed into a fixed-size vector bottleneck, losing critical detail.
While Graph Transformers offer a global view, they are often computationally expensive ($O(n^2)$) and can struggle to capture the underlying graph topology without complex positional encodings. The $S^2GNN$ framework addresses this by finding a "best of both worlds" approach: a model that is spatially local but spectrally global.
The $S^2GNN$ Framework
The core innovation of $S^2GNNs$ is the synergistic combination of two filter types:
- Spatial Filters: Standard message passing that captures local neighborhood structures.
- Spectral Filters: Filters explicitly parameterized in the frequency domain using a partial eigendecomposition (EVD) of the graph Laplacian.
Key Technical Components
- Partial Eigendecomposition: Instead of computing all $n$ eigenvalues (an $O(n^3)$ operation), $S^2GNNs$ compute only the $k$ lowest eigenvalues and vectors ($k \ll n$). This allows the model to capture the "coarse" global structure of the graph efficiently.
- Stable Positional Encodings (PE): The framework introduces a new spectral PE using the $k$ lowest eigenvalues and the adjacency matrix. This makes the model strictly more expressive than the standard 1-Weisfeiler-Lehman (WL) graph isomorphism test.
- Magnetic Laplacian: To handle directed graphs, $S^2GNNs$ utilize the Magnetic Laplacian, which uses complex numbers to encode edge directionality in the spectral domain.
- Gaussian Smearing: Gaussian kernels are used to parameterize the spectral filters, providing numerical stability and preventing overfitting to specific eigenvalue noise.
Theoretical Advantages
Spectral filters are inherently spatially unbounded. Unlike spatial layers limited by hop-count, a spectral filter can observe the entire graph simultaneously. Even with a small number of eigenvalues, it can propagate information globally in a single step.
Furthermore, the authors provide theoretical proof that $S^2GNNs$ maintain a lower bound on Jacobian sensitivity between distant nodes. This effectively "vanquishes" over-squashing, ensuring that information does not wash out as it travels across the graph. By incorporating the adjacency matrix into spectral Positional Encodings, $S^2GNNs$ also break the symmetries that cause pure spectral filters to fail on certain degree-regular graphs, achieving higher expressivity than standard GNNs.
Experimental Results
The $S^2GNN$ framework was evaluated across a diverse set of benchmarks, demonstrating both performance and scalability.
Long-Range and Large-Scale Performance
- Peptides Benchmark: On the peptides-func task (LRGB), $S^2GCN$ achieved a score of 0.7311 AP, outperforming the previous state-of-the-art (0.7156) while using approximately 40% fewer parameters than competing Graph Transformers.
- Scalability: The model successfully trained on the OGB Products graph (2.5 million nodes) on a single 40GB GPU, proving that spectral methods can be computationally viable for massive datasets.
- Distance Prediction: In synthetic Directed Acyclic Graph (DAG) distance regression tasks, $S^2GNNs$ maintained high accuracy for distances exceeding 30 hops, where standard spatial GNNs failed completely.
Sequence Modeling
On associative recall tasks, $S^2GNNs$ performed on par with specialized sequence models like Hyena and Mamba. This suggests that the spatio-spectral approach is an excellent general-purpose learner for structured data beyond traditional graph tasks.
Conclusion and Future Work
$S^2GNNs$ represent a significant step forward in resolving the local-global tension in graph representation learning. By leveraging the hierarchy of frequency—where low frequencies capture communities and high frequencies capture local details—the model achieves superior performance on long-range tasks without the quadratic cost of Transformers.
Future research may address the "data hunger" of these models, as detecting non-spurious long-range interactions often requires larger training samples. Additionally, while the partial EVD is efficient ($O(km)$), moving this preprocessing step from CPU to GPU could further streamline the pipeline for extremely large-scale applications.
Summary updated