Giter VIP home page Giter VIP logo

tip-gnn's Introduction

TIP-GNN

Authors: Tongya Zheng, Zunlei Feng, Tianli Zhang, Yunzhi Hao, Mingli Song, Xingen Wang, Xinyu Wang, Ji Zhao, Chun Chen

Code for Transition Propagation Graph Neural Networks for Temporal Networks.

Setup the Environment

  • conda create -n tip python=3.9 -y

  • pip install -r requirements.txt

  • My torch version is torch-1.10.2+cu113

Data Preprocess

We have preprocessed most temporal graphs in the data/format_data directory, and placed the JODIE datasets at Google drive, which can be downloaded and placed at the data/format_data.

bash init.sh

We use init.sh to make necessary directories for our experiments to store generated datasets by data/*, boost the training speed by gumbel_cache and sample_cache, record training details by log, record testing results by results and nc-results, save our trained models by ckpt and saved_models.

python data_unify.py -t datasplit
python data_unify.py -t datalabel

We use -t datasplit to split datasets into the training, validation and testing set according to the ratios.

Run the Script

Temporal Link Prediction (Transductive)

In the setting of transductive temporal link prediction, we use trainable node embeddings.

  • python exper_edge_np.py -d fb-forum

Temporal Link Prediction (Inductive)

In the setting of inductive temporal link prediction,, we firstly generate features for each node to perform inductive link prediction.

  • python inductive_util.py -d fb-forum

  • python inductive_edge_np.py -d fb-forum

Temporal Node Classification

In the setting of temporal node classification prediction, we use the edge features and freeze the node embeddings as all zeros.

Firstly, we have to train a pre-trained link prediction model following TGAT.

  • python exper_edge_np.py -d JODIE-wikipedia -t node -f

  • python exper_node_np.py -d JODIE-wikipedia -f --balance --binary

Cite us

@article{zheng2022transition,
  title={Transition Propagation Graph Neural Networks for Temporal Networks},
  author={Zheng, Tongya and Feng, Zunlei and Zhang, Tianli and Hao, Yunzhi and Song, Mingli and Wang, Xingen and Wang, Xinyu and Zhao, Ji and Chen, Chun},
  journal={IEEE Transactions on Neural Networks and Learning Systems},
  year={2022},
  pages={1--13},
  publisher={IEEE}
}

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.