Overview • Installation • Examples • Docs • Citation
Official code for OpenGSL: A Comprehensive Benchmark for Graph Structure Learning. OpenGSL is a comprehensive benchmark for Graph Structure Learning(GSL). GSL is a family of data-centric learning approaches which jointly optimize the graph structure and the corresponding GNN models. It has great potential in many real-world applications, including disease analysis, protein structure prediction, etc.
OpenGSL provides a fair and comprehensive platform to evaluate existing GSL works and facilitate future GSL research.
Note: OpenGSL depends on PyTorch, PyTorch Geometric, PyTorch Sparse and DEEP GRAPH LIBRARY (DGL). To streamline the installation, OpenGSL does NOT install these libraries for you. Please install them from the above links for running OpenGSL:
- torch>=1.9.1
- torch_geometric>=2.1.0
- torch_sparse>=0.6.12
- dgl>=0.9.0
Installing with Pip
pip install opengsl
Installation for local development:
git clone https://github.com/OpenGSL/OpenGSL
cd opengsl
pip install -e .
- Python 3.7+
- ruamel.yaml
- pandas
- scipy
- scikit-learn
- pyro-api
- pyro-ppl
- numba
You can use the command python examples/gcn_cora.py
or follow the 4 steps.
The following example shows you how to run GRCN on the Cora dataset.
import opengsl
conf = opengsl.config.load_conf(method="grcn", dataset="cora")
method :
gcn
, prognn
, idgl
, grcn
, gaug
, slaps
, nodeformer
, gen
, cogsl
, segsl
, sublime
, stable
, wsgnn
, glcn
, bmgcn
dataset :
cora
, pubmed
, citeseer
, blogcatalog
, flickr
, amazon-ratings
, questions
, minesweeper
, roman-empire
, wiki-cooc
, wikics
dataset = opengsl.data.Dataset("cora", n_splits=1, feat_norm=conf.dataset['feat_norm'])
solver = opengsl.method.GRCNSolver(conf,dataset)
exp = opengsl.ExpManager(solver)
exp.run(n_runs = 10)
OpenGSL provides an easy way to build GSL algorithm based on several components.
if you want to learn how to build own GSL method, see Build Your Own GSL.ipynb for more details.
2023.12.21 Update new method PASTEL(CIKM22).
2023.11.27 Update new method PROSE(KDD23).
2023.11.1 Version 0.0.6 available!
- A General GSL model added.
- New GSL methods WSGNN, GLCN and BMGCN added.
- New datasets including Wikics, Ogbn-arxiv and CSBM synthetic graphs.
- APPNP and GIN can be used as backbones for various GSL methods.
- Other minor updates.
As an active research topic, we are witnessing the rapid development of GSL methods. Hence, this project will be frequently updated, and we welcome everyone interested in this topic to contribute!
Please feel free to send PR or issue!
Our paper on this benchmark will be released soon!
If you use our benchmark in your works, we would appreciate citations to the paper:
@article{zhou2023opengsl,
title={OpenGSL: A Comprehensive Benchmark for Graph Structure Learning},
author={Zhiyao Zhou, Sheng Zhou, Bochao Mao, Xuanyi Zhou, Jiawei Chen, Qiaoyu Tan, Daochen Zha, Can Wang, Yan Feng, Chun Chen},
journal={arXiv preprint arXiv:2306.10280},
year={2023}
}