goose315 / Graph_Pooling_Benchmark

Official PyTorch implement for paper: A Comprehensive Graph Pooling Benchmark: Effectiveness, Robustness and Generalizability
4 stars 1 forks source link

This is a Pytorch implementation of A Comprehensive Graph Pooling Benchmark: Effectiveness, Robustness and Generalizability, which implements 15 pooling algorithms based on PYG. In order to facilitate subsequent researchers to use the code, we put the code for graph classification into the juypter notebook so that other researchers can quickly locate the graph pooling algorithm they need.

For graph classification tasks: Users can easily use any of the ipynb files in the classification folder, each clearly titled with all 15 types of graph pooling algorithms. All dependency functions are under specific subtitles. Since we have manually defined the functions that vary with PYG versions, you almost don't need to worry about PYG version issues and can easily reproduce all pooling methods. For example, if you want to use KMISPool, you can directly open any file, find it, and copy it to your codebase.

For regression tasks, we borrowed the MESPool's GIN model as the backbone model, but we encapsulated the 15 types of graph pooling methods into the baseline.py file. If you want to use graph regression, please run the run_regression.py file. You can also modify line 87 in the run_regression.py file to replace the model with any of AsymCheegerCut, Diff, MinCut, DMoN, Hosc, just_balance, TopK, SAG, ASAP, PAN, CO, CGI, KMIS, GSA, HGPSL to run the graph regression task. For more information about MESPool, please refer to: https://github.com/xfd997700/MESPool