Skip to content
/ MECCH Public

MECCH: Metapath Context Convolution-based Heterogeneous Graph Neural Networks

Notifications You must be signed in to change notification settings

cynricfu/MECCH

Repository files navigation

MECCH

This repository provides a reference implementation of MECCH as described in the following paper.

MECCH: Metapath Context Convolution-based Heterogeneous Graph Neural Networks
Xinyu Fu, Irwin King
Neural Networks 170 (2024) 266-275

Also available at arXiv:2211.12792.

Dependencies

  • PyTorch 1.10
  • DGL 0.7
  • scikit-learn
  • tqdm

Datasets

Usage

python main.py [-h] --model MODEL --dataset DATASET [--task TASK] [--gpu GPU] [--config CONFIG] [--repeat REPEAT]
optional arguments:
  -h, --help            show this help message and exit
  --model MODEL, -m MODEL
                        name of model
  --dataset DATASET, -d DATASET
                        name of dataset
  --task TASK, -t TASK  type of task
  --gpu GPU, -g GPU     which gpu to use, specify -1 to use CPU
  --config CONFIG, -c CONFIG
                        config file for model hyperparameters
  --repeat REPEAT, -r REPEAT
                        repeat the training and testing for N times

Before running the script, you need to first download and extract the datasets into correct locations. Please refer to the respective dataset README above.

After data preparation, the code can be easily run. For example, to run MECCH on the IMDB dataset for node classification using GPU, use the following command:

python main.py -m MECCH -t node_classification -d imdb-gtn -g 0

To run MECCH on the LastFM dataset for link prediction using GPU, use the following command:

python main.py -m MECCH -t link_prediction -d lastfm -g 0

Citing

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

@article{fu2024mecch,
  author       = {Xinyu Fu and
                  Irwin King},
  title        = {{MECCH:} Metapath Context Convolution-based Heterogeneous Graph Neural
                  Networks},
  journal      = {Neural Networks},
  volume       = {170},
  pages        = {266--275},
  year         = {2024}
}

About

MECCH: Metapath Context Convolution-based Heterogeneous Graph Neural Networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published