Skip to content

raunakkmr/GraphSAGE-and-GAT-for-link-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphSAGE and Graph Attention Networks for Link Prediction

This is a PyTorch implementation of GraphSAGE from the paper Inductive Representation Learning on Large Graphs and of Graph Attention Networks from the paper Graph Attention Networks. The code in this repository focuses on the link prediction task. Although the models themselves do not make use of temporal information, the datasets that we use are temporal networks obtained from SNAP and Network Repository.

This is just some code I have been playing around with - there may be issues or bugs. If you use this code and find them, let me know!

Usage

In the src directory, edit the config_gat.json or config_graphsage file to specify arguments and flags. Then run python main.py --json config_{}.json.

Limitations

Although a nearly identical implementation of Graph Attention Networks performs well on the node classification task, I had trouble training them for the link prediction in these temporal networks. The GraphSAGE model seems to work pretty well, so there might be a bug in my code, or inadequate hyperparameter search.

References