Repository for benchmarking graph neural networks

Overview

Benchmarking Graph Neural Networks


Updates

Nov 2, 2020

  • Project based on DGL 0.4.2. See the relevant dependencies defined in the environment yml files (CPU, GPU).
    • Numerical experiments report faster training times with DGL 0.4.2 compared to DGL 0.5.2.
    • For the version of the project compatible with DGL 0.5.2 and relevant dependencies, please use this branch.
  • Added ZINC-full dataset (249K molecular graphs) with scripts.

Jun 11, 2020

  • Second release of the project. Major updates :
    • Added experimental pipeline for Weisfeiler-Lehman-GNNs operating on dense rank-2 tensors.
    • Added a leaderboard for all datasets.
    • Updated PATTERN dataset.
    • Fixed bug for PATTERN and CLUSTER accuracy.
    • Moved first release to this branch.
  • New ArXiv's version of the paper.

Mar 3, 2020

  • First release of the project.

1. Benchmark installation

Follow these instructions to install the benchmark and setup the environment.


2. Download datasets

Proceed as follows to download the benchmark datasets.


3. Reproducibility

Use this page to run the codes and reproduce the published results.


4. Adding a new dataset

Instructions to add a dataset to the benchmark.


5. Adding a Message-passing GCN

Step-by-step directions to add a MP-GCN to the benchmark.


6. Adding a Weisfeiler-Lehman GNN

Step-by-step directions to add a WL-GNN to the benchmark.


7. Leaderboards

Leaderboards of GNN models on each dataset. Instructions to contribute to leaderboards.


8. Reference

ArXiv's paper

@article{dwivedi2020benchmarkgnns,
  title={Benchmarking Graph Neural Networks},
  author={Dwivedi, Vijay Prakash and Joshi, Chaitanya K and Laurent, Thomas and Bengio, Yoshua and Bresson, Xavier},
  journal={arXiv preprint arXiv:2003.00982},
  year={2020}
}




Comments
  • Inconsistent performance by setting dgl_builtin=True in GCNLayer

    Inconsistent performance by setting dgl_builtin=True in GCNLayer

    Hi,

    Thank you for the great work! This work is really wonderful. When I try to use GCN model for node classification by running: python main_SBMs_node_classification.py --dataset SBM_PATTERN --gpu_id 0 --seed 41 --config 'configs/SBMs_node_clustering_GCN_PATTERN_100k.json' I found that when I set dgl_builtin to false, the test acc is 63.77, which is consistent with the results reported in the paper; however, when I set dgl_builtin to true, the test acc became 85.56.

    I do not think this behavior is normal. But I did not figure out why the performances are so different after struggling for some time. I would appreciate it if you could help me. Thank you! Have a nice day!

    Best, Yongcheng

    opened by ycjing 15
  • pickle.load error

    pickle.load error

    Hi, I encountered an error when I loaded the MNIST.pkl and CIFAR10.pkl

    
    <stdout>:cuda available with GPU: Tesla P100-PCIE-16GB
    <stdout>:[I] Loading dataset CIFAR10...
    <stderr>:Traceback (most recent call last):
    <stderr>:  File "tools/train_superpixels_graph_classification.py", line 444, in <module>
    <stderr>:    main() 
    <stderr>:  File "tools/train_superpixels_graph_classification.py", line 325, in main
    <stderr>:    dataset = LoadData(DATASET_NAME, data_dir=args.dataDir)
    <stderr>:  File "/var/storage/shared/nextmsra/sys/jobs/application_1583577754071_28152/gnn/data/data.py", line 18, in LoadData
    <stderr>:    return SuperPixDataset(DATASET_NAME, data_dir)
    <stderr>:  File "/var/storage/shared/nextmsra/sys/jobs/application_1583577754071_28152/gnn/data/superpixels.py", line 271, in __init__
    <stderr>:    f = pickle.load(f)
    <stderr>:  File "/tmp/cache/python/lib/python3.7/site-packages/dgl/graph_index.py", line 53, in __setstate__
    <stderr>:    num_nodes, readonly, src, dst = state
    <stderr>:ValueError: too many values to unpack (expected 4)
    

    Here is my environment. cuda version :10.0 pytorch version : pytorch 1.4 with cudatoolkit 10.0 dgl version: v0.4.3

    I wonder if the new dgl version causes the inconsistency. Because I can run well when dgl is v0.4.2., but now I don't find how to downgrade my dgl to v0.4.2 explicitly. Thanks for solving this :) Or can you publish your code of how to generate the dgl graph from CIFAR and MNIST dataset? Thank you

    opened by hust-nj 9
  • k-nn edge filter

    k-nn edge filter

    Hi,

    First of all, congratulations on your great work.

    Maybe I've caught a minor mistake. It seems that you're leaving out the nearest neighbor when computing the edges list in the file data/superpixels.py (method: compute_edges_list):

    knns = np.argpartition(A, new_kth - 1, axis=-1)[:, new_kth:-1] 
    knn_values = np.partition(A, new_kth - 1, axis=-1)[:, new_kth:-1]  
    

    I think it should be

    knns = np.argpartition(A, new_kth, axis=-1)[:, new_kth+1:] 
    knn_values = np.partition(A, new_kth, axis=-1)[:, new_kth+1:]  
    

    Could you please verify that?

    Thanks.

    opened by amauriholanda 8
  • Questin About semisupervised_MNIST_CIFAR10 dataset

    Questin About semisupervised_MNIST_CIFAR10 dataset

    I have a question about these two datasets. there are three subset trainset, valset, and testset. How to combine these datasets into one whole set? Thank you.

    opened by Austinzhenghua 6
  • Results fluctuate heavily

    Results fluctuate heavily

    Hi, thanks for creating this awesome project. However, I've encountered some problems on reproduction of results present in the paper and the leaderboard. Generally speaking, results are very unstable in my experiments.

    1. Results fluctuate heavily.

    On ZINC dataset, here are my results of GAT model :

    • Trial 1: Mean test MAE = 0.38158. Under each seed (95, 41, 12, 35 and the same below): 0.3972, 0.3788, 0.3800, 0.3703
    • Trial 2: Mean test MAE = 0.37115. Under each seed: 0.3636, 0.3785, 0.3769, 0.3656.

    My results of GCN model:

    • Trial 1: Mean test MAE = 0.37575. Under each seed: 0.3770, 0.3659, 0.3742, 0.3859
    • Trial 2: Mean test MAE = 0.38070. Under each seed: 0.3946, 0.3668, 0.3764, 0.3850

    I think we can not neglect these fluctuating errors since sometimes errors are around 0.01. And some recent SOTA models only outperform 0.01 over the best model in the benchmark paper.

    It seems setting random seeds does not really work in this case. Is there any other requirements for reproduction? Do you think such fluctuation is tolerable?

    2. I cannot reproduce results using checkpoints.

    After I trained a GCN model on ZINC dataset, I reload the latest checkpoint and then try to reproduce test MAE through evaluate_network_sparse function. Unfortunately, test MAE from the checkpoint (0.3670) is different than test MAE from the result file (0.3757). Can we reproduce results via checkpoints? Could you please provide me some code of testing pipeline in case that I missed some important steps during reproduction?

    Note: I changed readout to 'sum'. Besides, I didn't modify other hyper-parameters. My experiments are conducted on Quadro P6000.

    opened by yuehaowang 6
  • GNN for weighted graph clustering

    GNN for weighted graph clustering

    Hello, which GNN model can be applied on weighted graph? like take into consideration the edge features/weights? and is there any GNN for unsupervised clustering? and what's the largest my graph can be?(not semi supervised). Your answer will be much appreciated :))

    opened by AmalNammouchi 6
  • Additional Mirror for Datasets

    Additional Mirror for Datasets

    Thanks for providing the benchmark!

    As a Ph.D student working on GNNs in China, I'd like to ask you considering providing additional mirror for the datasets, e.g., on github or other websites, since dropbox may not be accessble for us.

    (Just to mention, similar problems have happend in other packages as well, e.g., see https://github.com/rusty1s/pytorch_geometric/issues/1116#issuecomment-612580946)

    opened by ZW-ZHANG 5
  • Can you provide the SMILES with labels for the ZINC dataset?

    Can you provide the SMILES with labels for the ZINC dataset?

    Thank you for your work in providing a standard repository for graph benchmarking

    Some applications might require using the SMILES to build different types of graphs than the one provided by the benchmarking platform. I know that the ZINC dataset come from the JT-VAE paper where the SMILES are provided. However, this paper is only a subset of the original dataset, and the train-val-test split is different.

    I tried going from the DGLGraph back to SMILES, but it is not possible since I don't know which node label corresponds to which atom.

    opened by DomInvivo 4
  • Use builtin reducers for 0.5.2

    Use builtin reducers for 0.5.2

    This PR changes the reducers of GraphSage/GCN/GatedGCN from user-defined functions to builtin functions. Such changes brought a significant speedup for both 0.5.2 and 0.4.2 on these models:

    EDIT: The dataset is SBM_PATTERN-100k and I ran the benchmark on a g3.16x AWS instance.

    | Model | 0.4.2 w/ UDF | 0.4.2 w/ builtin reducers | DGL-master w/ UDF | DGL-master w/ builtin reducers | |:-:|:-:|:-:|:-:|:-:| | GraphSage | 326.21 | 43.0335 | 316.99 | 17.8404 | | GatedGCN | 573.42 | 207.3135 | 598.05 | 177.4308 |

    DGL-master represents the current master branch of DGL that incorporated some performance optimization on graph batching and readouts (today). The code should be available in the upcoming nightly build 201125.

    This PR is for DGL 0.5.2. I'll submit a separate PR for 0.4.2 once this PR has been reviewed since the code changes are exactly the same.

    opened by BarclayII 4
  • Graph features

    Graph features

    Is it possible to add a graph feature (a vector for each graph) to be used togheter with the graph itself to predict the label, in the graph classification/ graph regression settings? If it is, how can I do so? I'm not very experienced with torch and tensorflow. Thank you in advance.

    opened by giacomolc 4
  • The question about directed and undirected graphs

    The question about directed and undirected graphs

    Hi, I see your code in https://github.com/graphdeeplearning/benchmarking-gnns/blob/92c762a5a8713f5804c69c1808128a6b3e8f4535/data/superpixels.py#L114-L144

    , find the superpixel graph is directed graph not an undirected graph? Isn't it true? I see Figure 1 of your paper, you draw MNIST and CIFAR10 as undirected graphs, but it should be directed graphs based on your code?

    opened by hust-nj 4
  • Can you share the code about how to convert SMILES to .pkl file for zinc dataset?

    Can you share the code about how to convert SMILES to .pkl file for zinc dataset?

    Thank you for your work in such a meaningful job.

    I tried going from zinc SMILES to .pkl file, but it is not possible since I don't know how to get the right format.Could you please provide the code about how to prepare the data?

    Thanks for your time.

    opened by 1q84er 0
  • When I run the superpixel graph_classification experiment, I got the error

    When I run the superpixel graph_classification experiment, I got the error"'Column' object has no attribute 'deferred_dtype'"

    Just as the title said, when I run the 'main_superpixels_graph_classification.py', I got the error"'Column' object has no attribute 'deferred_dtype'" in the file 'superpixels.py' when getting the feature of the graph data at lin290. line290for idx, graph in enumerate(graphs): line291 graphs[idx].ndata['feat'] = graph.ndata['feat'].float() line292 graphs[idx].edata['feat'] = graph.edata['feat'].float() line293batched_graph = dgl.batch(graphs) Unfortunately, I can't tackle this by myself. Have you encountered the same error? I indeed need your help. Thank you greatly! image

    opened by weihai-98 1
Owner
NTU Graph Deep Learning Lab
We investigate fundamental techniques in Graph Deep Learning, a new framework that combines graph theory and deep neural networks.
NTU Graph Deep Learning Lab
A static analysis library for computing graph representations of Python programs suitable for use with graph neural networks.

python_graphs This package is for computing graph representations of Python programs for machine learning applications. It includes the following modu

Google Research 258 Dec 29, 2022
The source code of the paper "Understanding Graph Neural Networks from Graph Signal Denoising Perspectives"

GSDN-F and GSDN-EF This repository provides a reference implementation of GSDN-F and GSDN-EF as described in the paper "Understanding Graph Neural Net

Guoji Fu 18 Nov 14, 2022
Some tentative models that incorporate label propagation to graph neural networks for graph representation learning in nodes, links or graphs.

Some tentative models that incorporate label propagation to graph neural networks for graph representation learning in nodes, links or graphs.

zshicode 1 Nov 18, 2021
On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks

On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks We provide the code (in PyTorch) and datasets for our paper "On Size-Orient

Zemin Liu 4 Jun 18, 2022
This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CNPs), Neural Processes (NPs), Attentive Neural Processes (ANPs).

The Neural Process Family This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CN

DeepMind 892 Dec 28, 2022
This repository is an implementation of paper : Improving the Training of Graph Neural Networks with Consistency Regularization

CRGNN Paper : Improving the Training of Graph Neural Networks with Consistency Regularization Environments Implementing environment: GeForce RTX™ 3090

THUDM 1 Dec 9, 2021
Complex-Valued Neural Networks (CVNN)Complex-Valued Neural Networks (CVNN)

Complex-Valued Neural Networks (CVNN) Done by @NEGU93 - J. Agustin Barrachina Using this library, the only difference with a Tensorflow code is that y

youceF 1 Nov 12, 2021
FedScale: Benchmarking Model and System Performance of Federated Learning

FedScale: Benchmarking Model and System Performance of Federated Learning (Paper) This repository contains scripts and instructions of building FedSca

null 268 Jan 1, 2023
Pip-package for trajectory benchmarking from "Be your own Benchmark: No-Reference Trajectory Metric on Registered Point Clouds", ECMR'21

Map Metrics for Trajectory Quality Map metrics toolkit provides a set of metrics to quantitatively evaluate trajectory quality via estimating consiste

Mobile Robotics Lab. at Skoltech 31 Oct 28, 2022
PyTorch code for EMNLP 2021 paper: Don't be Contradicted with Anything! CI-ToD: Towards Benchmarking Consistency for Task-oriented Dialogue System

Don’t be Contradicted with Anything!CI-ToD: Towards Benchmarking Consistency for Task-oriented Dialogue System This repository contains the PyTorch im

Libo Qin 25 Sep 6, 2022
RobustART: Benchmarking Robustness on Architecture Design and Training Techniques

The first comprehensive Robustness investigation benchmark on large-scale dataset ImageNet regarding ARchitecture design and Training techniques towards diverse noises.

null 132 Dec 23, 2022
PyTorch code for EMNLP 2021 paper: Don't be Contradicted with Anything! CI-ToD: Towards Benchmarking Consistency for Task-oriented Dialogue System

PyTorch code for EMNLP 2021 paper: Don't be Contradicted with Anything! CI-ToD: Towards Benchmarking Consistency for Task-oriented Dialogue System

Libo Qin 12 Sep 26, 2021
Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking

Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking We revisit and address issues with Oxford 5k and Paris 6k image retrieval benchm

Filip Radenovic 188 Dec 17, 2022
Molecular Sets (MOSES): A benchmarking platform for molecular generation models

Molecular Sets (MOSES): A benchmarking platform for molecular generation models Deep generative models are rapidly becoming popular for the discovery

Neelesh C A 3 Oct 14, 2022
Official codebase for "B-Pref: Benchmarking Preference-BasedReinforcement Learning" contains scripts to reproduce experiments.

B-Pref Official codebase for B-Pref: Benchmarking Preference-BasedReinforcement Learning contains scripts to reproduce experiments. Install conda env

null 48 Dec 20, 2022
Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models

Molecular Sets (MOSES): A benchmarking platform for molecular generation models Deep generative models are rapidly becoming popular for the discovery

MOSES 656 Dec 29, 2022
ColossalAI-Benchmark - Performance benchmarking with ColossalAI

Benchmark for Tuning Accuracy and Efficiency Overview The benchmark includes our

HPC-AI Tech 31 Oct 7, 2022
Code for the paper "Benchmarking and Analyzing Point Cloud Classification under Corruptions"

ModelNet-C Code for the paper "Benchmarking and Analyzing Point Cloud Classification under Corruptions". For the latest updates, see: sites.google.com

Jiawei Ren 45 Dec 28, 2022