Abstract: Graph spectra are an important class of structural features on graphs that have shown promising results in enhancing Graph Neural Networks (GNNs). Despite their widespread practical use, the theoretical understanding of the power of spectral invariants—particularly their contribution to GNNs—remains incomplete. In this paper, we address this fundamental question through the lens of homomorphism expressivity, providing a comprehensive and quantitative analysis of the expressive power of spectral invariants. Specifically, we prove that spectral invariant GNNs can homomorphism-count exactly a class of specific tree-like graphs which we refer to as parallel trees. We highlight the significance of this result in various contexts, including establishing a quantitative expressiveness hierarchy across different architectural variants, offering insights into the impact of GNN depth, and understanding the subgraph counting capabilities of spectral invariant GNNs.
Introduction
Standard message-passing Graph Neural Networks (MPNNs) face a fundamental limitation: their expressive power is bounded by the 1-dimensional Weisfeiler-Lehman (1-WL) isomorphism test. This "glass ceiling" prevents them from distinguishing basic structural motifs like cycles or triangles. To overcome this, researchers have turned to spectral invariants—features derived from the eigenvalues and projection matrices of a graph's adjacency or Laplacian matrix. While Spectral GNNs have shown empirical success, a precise theoretical characterization of their power was previously missing. This work provides the first comprehensive characterization using the framework of homomorphism expressivity, proving that these networks are exactly as powerful as counting a specific class of "tree-like" graphs called parallel trees.
Theoretical Framework: Parallel Trees and Homomorphism Expressivity
The authors define a GNN's power by the set of graphs $\mathcal{F}$ for which the GNN can count homomorphisms (adjacency-preserving mappings). The central discovery is the "parallel tree" structure. A parallel tree is formed by taking a base tree and replacing its edges with "parallel edges"—multiple simple paths sharing the same endpoints.
Key technical contributions include:
- Equivalence Proof: A $d$-layer Spectral Invariant GNN can count homomorphisms for any parallel tree with a depth of at most $d$.
- Spectral Pebble Games: To establish that this characterization is maximal, the authors adapted classic pebble games from finite model theory to the spectral setting.
- Walk-Encoding Equivalence: The information provided by spectral projections is shown to be equivalent to encoding all $k$-step walk counts between node pairs.
Key Insights: A Geometric Intuition for Expressivity
The introduction of parallel trees provides a geometric intuition for the advantages of spectral information. Just as standard MPNNs are characterized by their ability to count trees, Spectral GNNs extend this to parallel trees. This allows the network to "see" through cycles that are part of these parallel path structures.
The paper establishes a clear hierarchy of power: Spectral GNNs are strictly stronger than 1-WL but strictly weaker than 2-FWL. Furthermore, the authors prove that increasing the number of layers ($d$) strictly increases expressive power, with each additional layer enabling the network to distinguish a deeper class of parallel trees. This settles an open question regarding the impact of GNN depth on spectral expressivity.
Empirical Results and Subgraph Counting
The theory was validated through both synthetic and real-world benchmarks:
- Cycle and Homomorphism Counting: Spectral GNNs achieved near-zero error (MAE ~0.05) on tasks they were theoretically predicted to solve (e.g., counting cycles up to 6 vertices with 1 iteration), while standard MPNNs failed (MAE ~0.30).
- ZINC Dataset: On molecular property prediction, Spectral GNNs significantly outperformed standard MPNNs and matched the performance of more complex Subgraph GNNs. This validates that the ability to count cycles and parallel tree structures translates to better performance on chemical graphs.
Conclusion and Future Directions
While this work provides a definitive characterization for standard spectral GNNs, challenges remain. The $O(n^3)$ computational cost of eigen-decomposition is a bottleneck for large-scale applications. Future work will explore the homomorphism expressivity of even more powerful higher-order spectral invariants and address the gap between the discrete theoretical assumptions and the continuous nature of practical GNN implementations.
Summary updated