GithubHelp home page GithubHelp logo

jayadratha / tgn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kimmeen/tgn

0.0 0.0 0.0 72 KB

A PyTorch annotated replication of the paper: https://arxiv.org/abs/2006.10637

License: MIT License

Python 100.00%

tgn's Introduction

TGN

A PyTorch annotated replication of twitter-research/tgn

Paper: Temporal Graph Networks for Deep Learning on Dynamic Graphs

Requirements

Python >= 3.6

pandas==1.1.0
torch==1.6.0
scikit_learn==0.23.1

Preprocess datasets

Download the public data

Download the sample datasets (eg. wikipedia and reddit) from here and store their csv files in a folder named ./data

Preprocess the data

We use the dense npy format to save the features in binary format. If edge features or nodes features are absent, they will be replaced by a vector of zeros.

python utils/preprocess_data.py --data wikipedia
python utils/preprocess_data.py --data reddit

Model training

Self-supervised learning using the link prediction task:

# TGN-attn: self-supervised learning on the wikipedia dataset
python link_prediction.py --data wikipedia --embedding_module graph_sum --use_memory --memory_update_at_start

# TGN-attn-reddit: self-supervised learning on the reddit dataset
python link_prediction.py --data reddit --embedding_module graph_sum --use_memory --memory_update_at_start

** Check more commands with --help

TODOs

  • Add code for training on the downstream node-classification task (semi-supervised setting)

Cite the paper

@inproceedings{tgn_icml_grl2020,
    title={Temporal Graph Networks for Deep Learning on Dynamic Graphs},
    author={Emanuele Rossi and Ben Chamberlain and Fabrizio Frasca and Davide Eynard and Federico 
    Monti and Michael Bronstein},
    booktitle={ICML 2020 Workshop on Graph Representation Learning},
    year={2020}
}

tgn's People

Contributors

kimmeen 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.