🤖 AI Summary
This work addresses the degradation in generalization performance of Graph Neural Networks (GNNs) caused by over-squashing. We propose a community- and feature-similarity-guided graph rewiring framework. For the first time, we theoretically establish that minimizing the graph spectral gap enhances GNN generalization, and accordingly design three interpretable rewiring strategies: ComMa (preserving community structure), FeaSt (enhancing local feature homophily), and ComFy (jointly optimizing both). Our method integrates stochastic block model analysis, Louvain community detection, cosine similarity-based feature affinity measurement, and spectral-graph-theory-driven message-passing modeling. On benchmark datasets including Cora and Citeseer, ComFy achieves average accuracy gains of 2.3%–4.1%, while its rewiring efficiency is 5.8× higher than that of pure spectral-gap optimization.
📝 Abstract
Maximizing the spectral gap through graph rewiring has been proposed to enhance the performance of message-passing graph neural networks (GNNs) by addressing over-squashing. However, as we show, minimizing the spectral gap can also improve generalization. To explain this, we analyze how rewiring can benefit GNNs within the context of stochastic block models. Since spectral gap optimization primarily influences community strength, it improves performance when the community structure aligns with node labels. Building on this insight, we propose three distinct rewiring strategies that explicitly target community structure, node labels, and their alignment: (a) community structure-based rewiring (ComMa), a more computationally efficient alternative to spectral gap optimization that achieves similar goals; (b) feature similarity-based rewiring (FeaSt), which focuses on maximizing global homophily; and (c) a hybrid approach (ComFy), which enhances local feature similarity while preserving community structure to optimize label-community alignment. Extensive experiments confirm the effectiveness of these strategies and support our theoretical insights.