GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring
About
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.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Node Classification | Cora (test) | Mean Accuracy87.26 | 951 | |
| Node Classification | Citeseer (test) | Accuracy0.7819 | 945 | |
| Node Classification | Squirrel | Accuracy33.7 | 786 | |
| Node Classification | Cora | Accuracy80.8 | 583 | |
| Node Classification | Chameleon (test) | Mean Accuracy65.2 | 335 | |
| Node Classification | Cornell (test) | Mean Accuracy31.11 | 313 | |
| Node Classification | Texas (test) | Mean Accuracy30 | 312 | |
| Node Classification | Squirrel (test) | Mean Accuracy53.88 | 301 | |
| Node Classification | Actor (test) | Mean Accuracy0.2937 | 286 | |
| Node Classification | Wisconsin (test) | Mean Accuracy53.6 | 279 |