Skip to content

Latest commit

 

History

History

MAGNN

MAGNN code

Adapted from cynricfu/MAGNN.

We add GCN and GAt comparison under DBLP dataset for now. Ohter experiments to be completed.

running environment

  • torch 1.4.0 cuda 10.1
  • dgl 0.4.3 cuda 10.1
  • networkx 2.3
  • scikit-learn 0.23.2
  • scipy 1.5.2

running procedure

  • Download DBLP_processed.zip from tsinghua-cloud or google-drive
  • mkdir checkpoint
  • mkdir data
  • mkdir data/preprocessed
  • unzip DBLP_Processed.zip to data/preprocessed
  • run run_DBLP_gnn.py
python run_DBLP_gnn.py --model gat
python run_DBLP_gnn.py --model gcn

performance report

GCN is not good enough for now. Try to modify and tune later.

micro f1 score macro f1 score
MAGNN ~93.5 ~93
GCN ~83.5 ~83
GAT ~94.5 ~94

The following content is from the initial cynricfu/MAGNN repo.

MAGNN

This repository provides a reference implementation of MAGNN as described in the paper:

MAGNN: Metapath Aggregated Graph Neural Network for Heterogeneous Graph Embedding.
Xinyu Fu, Jiani Zhang, Ziqiao Meng, Irwin King.
The Web Conference, 2020.

Available at arXiv:2002.01680.

Dependencies

Recent versions of the following packages for Python 3 are required:

  • PyTorch 1.2.0
  • DGL 0.3.1
  • NetworkX 2.3
  • scikit-learn 0.21.3
  • NumPy 1.17.2
  • SciPy 1.3.1

Dependencies for the preprocessing code are not listed here.

Datasets

The preprocessed datasets are available at:

The GloVe word vectors are obtained from GloVe. Here is the direct link for the version we used in DBLP preprocessing.

Usage

  1. Create checkpoint/ and data/preprocessed directories
  2. Extract the zip file downloaded from the section above to data/preprocessed
    • E.g., extract the content of IMDB_processed.zip to data/preprocessed/IMDB_processed
  3. Execute one of the following three commands from the project home directory:
    • python run_IMDB.py
    • python run_DBLP.py
    • python run_LastFM.py

For more information about the available options of the model, you may check by executing python run_IMDB.py --help

Citing

If you find MAGNN useful in your research, please cite the following paper:

@inproceedings{fu2020magnn,
 title={MAGNN: Metapath Aggregated Graph Neural Network for Heterogeneous Graph Embedding},
 author={Xinyu Fu and Jiani Zhang and Ziqiao Meng and Irwin King},
 booktitle = {WWW},
 year={2020}
}