pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
20.54k stars 3.57k forks source link

Implementation of "Node Similarity Measures" #9359

Open lettlini opened 1 month ago

lettlini commented 1 month ago

🚀 The feature, motivation and pitch

I recently came across the paper A Survey on Oversmoothing in Graph Neural Networks and thougt that having a ready-to-use implementation of the Dirichlet energy and the Mean Average Distance would make diagnosing oversmoothing much easier.

Alternatives

I saw that PairNorm has been implemented but I think it'd be nice to be able to quantitatively examine the behavior of node similarity (at least for academic & research purposes).

Additional context

If this is something people would find useful if it was included in pytorch_geometric I could work on this.

Edit: Corrected paper link

rusty1s commented 1 month ago

I think this is a great feature request :)

lettlini commented 1 month ago

Great! You are welcome to assign this problem to me and I will try to work on it in the next 2 weeks.

lettlini commented 1 month ago

I now have a preliminary implementation of both the Dirichlet Energy and the Mean Average Distance. The code can be found here in my node_similarity_pyg repository (I plan to add a notebook on how to replicate some of the empirical results of the paper in a few days).

I don't really know where in pytorch-geometric these methods would fit best, maybe in torch_geometric.utils?

rusty1s commented 3 weeks ago

Nice :) Yes, they would fit best in torch_geometric.utils.