GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring

Celia Rubio-Madrigal, Adarsh Jamadandi, Rebekka Burkholz
2/12/2026

No official code found. Best implementation: RelationalML/ComFy (4 stars, MIT, last commit 2025-04-04).

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.

View on arXivView PDF

Code Implementations(1)

RelationalML/ComFyCommunity100%
MIT

GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring (ICLR 2025)

42Shell, PythonFeb 7, 20251 years agoMIT
graph-neural-networksgraph-rewiring

Similar Papers

Cite this paper

@article{rubiomadrigal2026gnns,
  title  = {GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring},
  author = {Celia Rubio-Madrigal and Adarsh Jamadandi and Rebekka Burkholz},
  year   = {2026},
  eprint = {2502.04891},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.04891},
  journal = {ICLR 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.04891.svg)](https://codeofpaper.com/paper/2502.04891)

Discussion