Coder Social home page Coder Social logo

dyglib_tgb's Introduction

An Empirical Evaluation of Temporal Graph Benchmark

Overview

The DyGLib_TGB repository is developed upon Dynamic Graph Library (DyGLib) and Temporal Graph Benchmark (TGB). We extend DyGLib to TGB, which additionally includes several popular dynamic graph learning methods for more exhaustive comparisons. Details of DyGLib_TGB is available here. Feedback from the community is highly welcomed for further improvements of this repository.

Dynamic Graph Learning Models

Eleven dynamic graph learning methods are included in DyGLib_TGB, including JODIE, DyRep, TGAT, TGN, CAWN, EdgeBank, TCL, GraphMixer, DyGFormer, Persistent Forecast, and Moving Average.

Evaluation Tasks

DyGLib_TGB supports both dynamic link property prediction and dynamic node property prediction tasks on TGB.

Environments

PyTorch 2.0.1, py-tgb, numpy, and tqdm.

Executing Scripts

Scripts for Dynamic Link Property Prediction

Dynamic link property prediction could be performed on five datasets, including tgbl-wiki, tgbl-review, tgbl-coin, tgbl-comment, and tgbl-flight.

Model Training

  • Example of training DyGFormer on tgbl-wiki dataset:
python train_link_prediction.py --dataset_name tgbl-wiki --model_name DyGFormer --patch_size 1 --max_input_sequence_length 32 --num_runs 5 --gpu 0
  • If you want to use the best model configurations to train DyGFormer on tgbl-wiki dataset, run
python train_link_prediction.py --dataset_name tgbl-wiki --model_name DyGFormer --load_best_configs --num_runs 5 --gpu 0

Model Evaluation

  • Example of evaluating DyGFormer on tgbl-wiki dataset:
python evaluate_link_prediction.py --dataset_name tgbl-wiki --model_name DyGFormer --patch_size 1 --max_input_sequence_length 32 --num_runs 5 --gpu 0
  • If you want to use the best model configurations to evaluate DyGFormer on tgbl-wiki dataset, run
python evaluate_link_prediction.py --dataset_name tgbl-wiki --model_name DyGFormer --load_best_configs --num_runs 5 --gpu 0

Scripts for Dynamic Node Property Prediction

Dynamic node property prediction could be performed on three datasets, including tgbn-trade, tgbn-genre, and tgbn-reddit. Note that if you train or evaluate on a dynamic node property prediction dataset for the first time, the data pre-processing will take a while. However, this is a one-time process.

Model Training

  • Example of training DyGFormer on tgbn-trade dataset:
python train_node_classification.py --dataset_name tgbn-trade --model_name DyGFormer --patch_size 1 --max_input_sequence_length 32 --num_runs 5 --gpu 0
  • If you want to use the best model configurations to train DyGFormer on tgbn-trade dataset, run
python train_node_classification.py --dataset_name tgbn-trade --model_name DyGFormer --load_best_configs --num_runs 5 --gpu 0

Model Evaluation

  • Example of evaluating DyGFormer on tgbn-trade dataset:
python evaluate_node_classification.py --dataset_name tgbn-trade --model_name DyGFormer --patch_size 1 --max_input_sequence_length 32 --num_runs 5 --gpu 0
  • If you want to use the best model configurations to evaluate DyGFormer on tgbn-trade dataset, run
python evaluate_node_classification.py --dataset_name tgbn-trade --model_name DyGFormer --load_best_configs --num_runs 5 --gpu 0

Citations

Please consider citing the following related references when using this project.

@article{yu2023empirical,
  title={An Empirical Evaluation of Temporal Graph Benchmark},
  author={Yu, Le},
  journal={arXiv preprint arXiv:2307.12510},
  year={2023}
}
@article{yu2023towards,
  title={Towards Better Dynamic Graph Learning: New Architecture and Unified Library},
  author={Yu, Le and Sun, Leilei and Du, Bowen and Lv, Weifeng},
  journal={arXiv preprint arXiv:2303.13047},
  year={2023}
}
@article{huang2023temporal,
  title={Temporal Graph Benchmark for Machine Learning on Temporal Graphs},
  author={Huang, Shenyang and Poursafaei, Farimah and Danovitch, Jacob and Fey, Matthias and Hu, Weihua and Rossi, Emanuele and Leskovec, Jure and Bronstein, Michael and Rabusseau, Guillaume and Rabbany, Reihaneh},
  journal={arXiv preprint arXiv:2307.01026},
  year={2023}
}

dyglib_tgb's People

Contributors

yule-buaa avatar

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.