Coder Social home page Coder Social logo

evolvegcn's Introduction

EvolveGCN

This repository contains the code for EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs, published in AAAI 2020.

Data

7 datasets were used in the paper:

Update on elliptic: The box link is no longer valid. Please see the instruction to manually prepare the preprocessed version.

For downloaded data sets please place them in the 'data' folder.

Requirements

  • PyTorch 1.0 or higher
  • Python 3.6

Set up with Docker

This docker file describes a container that allows you to run the experiments on any Unix-based machine. GPU availability is recommended to train the models. Otherwise, set the use_cuda flag in parameters.yaml to false.

Requirements

Installation

1. Build the image

From this folder you can create the image

sudo docker build -t gcn_env:latest docker-set-up/

2. Start the container

Start the container

sudo docker run -ti  --gpus all -v $(pwd):/evolveGCN  gcn_env:latest

This will start a bash session in the container.

Usage

Set --config_file with a yaml configuration file to run the experiments. For example:

python run_exp.py --config_file ./experiments/parameters_example.yaml

Most of the parameters in the yaml configuration file are self-explanatory. For hyperparameters tuning, it is possible to set a certain parameter to 'None' and then set a min and max value. Then, each run will pick a random value within the boundaries (for example: 'learning_rate', 'learning_rate_min' and 'learning_rate_max'). The 'experiments' folder contains one file for each result reported in the EvolveGCN paper.

Setting 'use_logfile' to True in the configuration yaml will output a file, in the 'log' directory, containing information about the experiment and validation metrics for the various epochs. The file could be manually analyzed, alternatively 'log_analyzer.py' can be used to automatically parse a log file and to retrieve the evaluation metrics at the best validation epoch. For example:

python log_analyzer.py log/filename.log

Reference

[1] Aldo Pareja, Giacomo Domeniconi, Jie Chen, Tengfei Ma, Toyotaro Suzumura, Hiroki Kanezashi, Tim Kaler, Tao B. Schardl, and Charles E. Leiserson. EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs. AAAI 2020.

BibTeX entry

Please cite the paper if you use this code in your work:

@INPROCEEDINGS{egcn,
  AUTHOR = {Aldo Pareja and Giacomo Domeniconi and Jie Chen and Tengfei Ma and Toyotaro Suzumura and Hiroki Kanezashi and Tim Kaler and Tao B. Schardl and Charles E. Leiserson},
  TITLE = {{EvolveGCN}: Evolving Graph Convolutional Networks for Dynamic Graphs},
  BOOKTITLE = {Proceedings of the Thirty-Fourth AAAI Conference on Artificial Intelligence},
  YEAR = {2020},
}

evolvegcn's People

Contributors

jiechenjiechen avatar stevemar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evolvegcn's Issues

Docker image has been unavailable

Hi team, the Dockerfile requires image nvidia/cuda:10.1-base-ubuntu16.04. However, this image has been unavailable on DockerHub. And Cuda 10.1 does not support newer GPUs such as Nvidia RTX 3080ti.

Any ideas?

Recommendation for Dynamic GNN project where new nodes are added per time-step

Hi,
I am currently trying to find the best example from this repository with application on graphs where new nodes are added at each time-step. For example, I would like to predict the number of new nodes added at future time steps, along with their positions (node features). Which example from this repository would be best to try out?

dimension problem

Hello~
Recently, I am reading your paper carefully. In model EGCU, I'm confused about how the dimension of the parameter matrix change, can you explain it?
looking forward to your reply.

The parameter "adj_mat_time_window" cannot be set to None.

When setting the parameter adj_mat_time_window: None in the parameters_example.yaml file, the experiment crashes with the error:

Traceback (most recent call last): File "/evolveGCN/run_exp.py", line 220, in <module> tasker = build_tasker(args,dataset) File "/evolveGCN/run_exp.py", line 122, in build_tasker return lpt.Link_Pred_Tasker(args,dataset) File "/evolveGCN/link_pred_tasker.py", line 38, in __init__ self.get_node_feats = self.build_get_node_feats(args,dataset) File "/evolveGCN/link_pred_tasker.py", line 98, in build_get_node_feats max_deg,_ = tu.get_max_degs(args,dataset) File "/evolveGCN/taskers_utils.py", line 60, in get_max_degs cur_adj = get_sp_adj(edges = dataset.edges, File "/evolveGCN/taskers_utils.py", line 96, in get_sp_adj subset = subset * (idx[:,ECOLS.time] > (time - time_window)) TypeError: unsupported operand type(s) for -: 'int' and 'str'

The explanation from the same file is: "# Time window to create the adj matrix for each timestep. Use None to use all the history (from 0 to t)". Is there another way to use all the history from 0 to t?

elliptic (not temporal) is missing

running an experiment on elliptic without temporal meaning setting 'data' parameter in yaml file as elliptic doesn't work.

Also the 'elliptic_dl' script is missing which is used in the 'run_exp.py'. Is it possible to upload the python script which handles the non temporal elliptic dataset?

On another note will the preprocessed version of the elliptic dataset be publicly available since Im trying to reproduce results, the following link is not publicly accessible

https://ibm.box.com/s/j04m8lwoqktjixke2gj7lgllrvvdidme

I am trying to produce results found in the following paper 'Anti-Money Laundering in Bitcoin: Experimenting with Graph
Convolutional Networks for Financial Forensics'

Use of mask

Mask is used to select topK nodes, while the operation is addition rather multiplication which is a common way of using mask. Could you plz answer this question or give an example of how mask influences the calculated score in topK selection.

A role of mask

Hi, It might be silly, but i'm just curious about mask for summerization.

What is the role of mask?
I think Top K could be enough.
Is there any reason of removing some nodes to generate summerized features?

Thanks

What does the adjacency matrix window size mean?

As per the title, what does the adj_mat_size_window mean exactly? (in the yaml parameters files) I know there's a clarification note but I'm still struggling to grasp what exactly this adjusts for

Build prepare node features

In the code for build_prepare_node_features in node_cls_tasker.py, the code says
else: def prepare_node_feats(node_feats): return node_feats[0] #I'll have to check this up

So what exactly should be returned?

Cannot output node embedding for link prediction task

I have tried to output node embedding for link prediction task with example data set sbm. However, I got the error message said that sbm_dataset object has no attribute 'contID_to_origID'. What is contID? How can I fix this problem?

Dynamic network data processing

I am working on dynamic social network ananlysis.
I see your data about bitcoin trading network on SNAP website. I know this is a dynamic network. But I don't know which data is the network data at the same time, and I don't know how to segment this network data. The data time includes month, year and day.
Can you tell me how to analyze this dynamic bitcoin network data?
Thank you!

batch size for the models

Hi,

Thanks for making this work public. I wanted to know if a batch size of more than 1 is supported. I saw in the example yaml not to change the batch size. I tried with the reddit yaml example and using batch size larger than 1 causes the program to crash. Is there a way to fix this issue to enable larger batches?. Thank you

About the datasplit settings

Hi, I'm trying to produce the results in the article, but I found the settings are different. In the splitter.py there is a special handling , so the train sets are args.num_hist_steps less than the numbers in the article. Is this code produce your results or the comment out?
#only the training one requires special handling on start, the others are fine with the split IDX.
start = tasker.data.min_time + args.num_hist_steps #-1 + args.adj_mat_time_window
I tried to use the comment out codes, but index errors come out, please help.

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.