Skip to content

Commit ab7d5f6

Browse files
authoredFeb 7, 2025
Merge pull request #1 from RelationalML/main
Update Readme
2 parents 5547f45 + e8e8acd commit ab7d5f6

File tree

2 files changed

+50
-5
lines changed

2 files changed

+50
-5
lines changed
 

‎ComFy.jpg

395 KB
Loading

‎README.md

+50-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,63 @@
1-
# ComFy
2-
Community+Feature Similarity based Graph Rewiring
1+
# GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring (ICLR 2025)
32

4-
Requirements -
3+
Celia Rubio-Madrigal \*, Adarsh Jamadandi \*, Rebekka Burkholz
4+
5+
\* Equal Contribution
6+
7+
This repository contains the code for the paper "GNNs Getting ComFy: Community and Feature Similarity Guided Rewiring", which has been accepted at ICLR 2025!
8+
9+
[OpenReview](https://openreview.net/forum?id=g6v09VxgFw)
10+
11+
#### Abstract
12+
13+
>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.
14+
15+
![ComFy](https://github.com/RelationalML/ComFy/blob/main/ComFy.jpg)
16+
17+
## Requirements
18+
19+
The following libraries are required to run the code and reproduce the results:
520

621
```Python
722
1. Pytorch = 2.2.1
823
2. Pytorch-Geometric - 2.5.2
924
3. DGL - 2.2.1+cu121
1025
```
1126

12-
ComFy has following directories -
27+
## Structure
28+
29+
ComFy has the following directories:
1330

1431
1. Comm+Sim - this has all the code need to reproduce results for rewiring based on maximizing the feature similarity (FeaSt) and Community detection plus feature similarity based rewiring (ComFy).
1532

1633
2. CommunityRewiring - contains code to delete/add inter-class edges/intra-class edges directly based on communities detected.
1734

18-
3. Spectral - contains codes to maximize/minimise spectral gap and add/delete edges.
35+
3. Spectral - contains codes to maximize/minimise spectral gap and add/delete edges (based on our previous work [(Jamadandi et al., 2024)](https://github.com/RelationalML/SpectralPruningBraess)).
36+
37+
## Citation
38+
39+
If you found this work helpful, please consider citing our paper:
40+
41+
```bibtex
42+
@inproceedings{
43+
rubio-madrigal2025gnns,
44+
title={{GNN}s Getting ComFy: Community and Feature Similarity Guided Rewiring},
45+
author={Celia Rubio-Madrigal and Adarsh Jamadandi and Rebekka Burkholz},
46+
booktitle={The Thirteenth International Conference on Learning Representations},
47+
year={2025},
48+
url={https://openreview.net/forum?id=g6v09VxgFw}
49+
}
50+
```
51+
52+
The spectral gap optimization [code](https://github.com/RelationalML/SpectralPruningBraess) is based on our previous work accepted at NeurIPS 2024:
53+
54+
```bibtex
55+
@inproceedings{
56+
jamadandi2024spectral,
57+
title={Spectral Graph Pruning Against Over-Squashing and Over-Smoothing},
58+
author={Adarsh Jamadandi and Celia Rubio-Madrigal and Rebekka Burkholz},
59+
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
60+
year={2024},
61+
url={https://openreview.net/forum?id=EMkrwJY2de}
62+
}
63+
```

0 commit comments

Comments
 (0)
Please sign in to comment.