Giter Site home page Giter Site logo

lirongwu / md-gnn Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 88.1 MB

Code for NCAA paper "Multi-level Disentanglement Graph Neural Network"

License: MIT License

Python 100.00%
deep-learning graph neural-networks disentanglement-learning relation-learning semi-supervised-learning node-classification

md-gnn's Introduction

Multi-level Disentanglement Graph Neural Network (MD-GNN)

This is a PyTorch implementation of the MD-GNN, and the code includes the following modules:

  • Datasets (Cora, Citeseer, Pubmed, Synthetic, and ZINC)

  • Training paradigm for node classification, graph classification, and graph regression tasks

  • Visualization

  • Evaluation metrics

Main Requirements

  • dgl==0.4.3.post2
  • networkx==2.4
  • numpy==1.18.1
  • ogb==1.1.1
  • scikit-learn==0.22.2.post1
  • scipy==1.4.1
  • torch==1.5.0

Description

  • train.py

    • main() -- Train a new model for node classification task on the Cora, Citeseer, and Pubmed datasets
    • evaluate() -- Test the learned model for node classification task on the Cora, Citeseer, and Pubmed datasets
    • main_synthetic() -- Train a new model for graph classification task on the Synthetic dataset
    • evaluate_synthetic() -- Test the learned model for graph classification task on the Synthetic dataset
    • main_zinc() -- Train a new model for graph regression task on the ZINC datasets
    • evaluate_zinc() -- Test the learned model for graph regression task on the ZINC datasets
  • dataset.py

    • load_data() -- Load data of selected dataset
  • MDGNN.py

    • MDGNN() -- model and loss
  • utils.py

    • evaluate_att() -- Evaluate attribute-level disentanglement with the visualization of relation-related attributes
    • evaluate_corr() -- Evaluate node-level disentanglement with the correlation analysis of latent features
    • evaluate_graph() -- Evaluate graph-level disentanglement with the visualization of disentangled relation graphs

Running the code

  1. Install the required dependency packages and unzip files in the data folder.

  2. We use DGL to implement all the GNN models on three citation datasets (Cora, Citeseer, and Pubmed). In order to evaluate the model with different splitting strategy (fewer and harder label rates), you need to replace the following file with the citation_graph.py provided.

dgl/data/citation_graph.py

  1. To get the results on a specific dataset, run with proper hyperparameters
python train.py --dataset data_name

where the data_name is one of the five datasets (cora, citeseer, pubmed, synthetic, and zinc). The model as well as the training log will be saved to the corresponding dir in ./log for evaluation.

  1. The evaluation the performance of three-level disentanglement performance, run
python utils.py

Citation

If you find this project useful for your research, please use the following BibTeX entry.

@article{wu2022multi,
  title={Multi-level disentanglement graph neural network},
  author={Wu, Lirong and Lin, Haitao and Xia, Jun and Tan, Cheng and Li, Stan Z},
  journal={Neural Computing and Applications},
  pages={1--15},
  year={2022},
  publisher={Springer}
}

md-gnn's People

Contributors

lirongwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

md-gnn's Issues

To reproduce the results on Cora, PubMed, and Citeseer

I have tried to use the (default) hyperparameters under the param directory to reproduce the results on zinc, cora, pubmed, citeseer datasets. While the hyperparameters for zinc work well, all of the rest three groups of hyperparameters fail to catch up with the accuracies reported in the paper.

Could you please show the hyperparameters of MD-GNN on cora, pubmed, and citeseer to the interested researchers like me.

Thx :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.