Skip to main content

A comprehensive benchmark for Graph Structure Learning.

Project description


OverviewInstallationExamplesDocsCitation

Documentation Status license version

OpenGSL

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.

Overview of the Benchmark

OpenGSL provides a fair and comprehensive platform to evaluate existing GSL works and facilitate future GSL research.

timeline

Installation

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 .

Required Dependencies:

  • Python 3.7+
  • ruamel.yaml
  • pandas
  • scipy
  • scikit-learn
  • pyro-api
  • pyro-ppl
  • numba

🚀Quick Start

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.

Step 1: Load configuration

import opengsl
conf = opengsl.config.load_conf(method="grcn", dataset="cora")
Method and Dataset parameters in Built-in configuration (Updated Frequently)

methodgcn, prognn, idgl, grcn, gaug, slaps, nodeformer, gen, cogsl, segsl, sublime, stable, wsgnn, glcn, bmgcn

datasetcora, pubmed, citeseer, blogcatalog, flickr, amazon-ratings, questions, minesweeper, roman-empire, wiki-cooc, wikics

Step 2: Load data

dataset = opengsl.data.Dataset("cora", n_splits=1, feat_norm=conf.dataset['feat_norm'])

Step 3: Build Model

solver = opengsl.method.GRCNSolver(conf,dataset)

Step 4: Training and Evaluation

exp = opengsl.ExpManager(solver)
exp.run(n_runs = 10)

⚙️Build Your Own GSL

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.

📱️Updates

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.

How to Contribute

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!

Citation

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}
}

Reference

ID Paper Method Conference
1 Semi-supervised classification with graph convolutional networks GCN ICLR 2017
2 Learning Discrete Structures for Graph Neural Networks LDS ICML 2019
3 Graph Structure Learning for Robust Graph Neural Networks ProGNN KDD 2020
4 Iterative Deep Graph Learning for Graph Neural Networks: Better and Robust Node Embeddings IDGL NeurIPS 2020
5 Graph-Revised Convolutional Network GRCN ECML-PKDD 2020
6 Data Augmentation for Graph Neural Networks GAug(O) AAAI 2021
7 SLAPS: Self-Supervision Improves Structure Learning for Graph Neural Networks SLAPS ICML 2021
8 Variational Inference for Training Graph Neural Networks in Low-Data Regime through Joint Structure-Label Estimation WSGNN KDD 2022
9 Nodeformer: A scalable graph structure learning transformer for node classification Nodeformer NeurIPS 2022
10 Graph Structure Estimation Neural Networks GEN WWW 2021
11 Compact Graph Structure Learning via Mutual Information Compression CoGSL WWW 2022
12 SE-GSL: A General and Effective Graph Structure Learning Framework through Structural Entropy Optimization SEGSL WWW 2023
13 Towards Unsupervised Deep Graph Structure Learning SUBLIME WWW 2022
14 Reliable Representations Make A Stronger Defender: Unsupervised Structure Refinement for Robust GNN STABLE KDD 2022
15 Semi-Supervised Learning With Graph Learning-Convolutional Networks GLCN CVPR 2019
15 Block Modeling-Guided Graph Convolutional Neural Networks BM-GCN AAAI 2022

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opengsl-0.0.55.tar.gz (109.8 kB view details)

Uploaded Source

Built Distribution

opengsl-0.0.55-py3-none-any.whl (353.8 kB view details)

Uploaded Python 3

File details

Details for the file opengsl-0.0.55.tar.gz.

File metadata

  • Download URL: opengsl-0.0.55.tar.gz
  • Upload date:
  • Size: 109.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for opengsl-0.0.55.tar.gz
Algorithm Hash digest
SHA256 d82d27ca163a79dd5e65f0d40f212ed4ae52c25030267153d2cc061047ab22ce
MD5 b0dad2560be3f41ff6b41acb694474b9
BLAKE2b-256 a6ea04666b61e2c6637dd1010c7adf7eee4710b6bfd3154f0251a2d3062f0127

See more details on using hashes here.

File details

Details for the file opengsl-0.0.55-py3-none-any.whl.

File metadata

  • Download URL: opengsl-0.0.55-py3-none-any.whl
  • Upload date:
  • Size: 353.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for opengsl-0.0.55-py3-none-any.whl
Algorithm Hash digest
SHA256 ad988ba921de47a46c2d2be1d71b7aec4dc73a0d63154bf3c79077bece88379a
MD5 d9dc25985d055705137f8592be945af3
BLAKE2b-256 31d17bab00eaecd97eeb573c26dbe54f262209007db0b205f85a4033197c24e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page