README.md 1.24 KB
Newer Older
hbsun2113's avatar
hbsun2113 committed
1
2
3
4
5
6
7
Inductive Representation Learning on Large Graphs (GraphSAGE)
============

- Paper link: [http://papers.nips.cc/paper/6703-inductive-representation-learning-on-large-graphs.pdf](http://papers.nips.cc/paper/6703-inductive-representation-learning-on-large-graphs.pdf)
- Author's code repo: [https://github.com/williamleif/graphsage-simple](https://github.com/williamleif/graphsage-simple). Note that the original code is 
simple reference implementation of GraphSAGE.

8
9
Advanced usages, including how to run pure GPU sampling, how to train with PyTorch Lightning, etc., are in the `advanced` directory.

hbsun2113's avatar
hbsun2113 committed
10
11
12
Requirements
------------

13
```bash
14
pip install requests torchmetrics
15
```
hbsun2113's avatar
hbsun2113 committed
16
17
18
19

Results
-------

20
21
### Full graph training

hbsun2113's avatar
hbsun2113 committed
22
23
Run with following (available dataset: "cora", "citeseer", "pubmed")
```bash
24
python3 train_full.py --dataset cora --gpu 0    # full graph
hbsun2113's avatar
hbsun2113 committed
25
26
```

27
28
29
* cora: ~0.8330 
* citeseer: ~0.7110
* pubmed: ~0.7830
30

31
### Minibatch training for node classification
32

33
Train w/ mini-batch sampling for node classification on OGB-products:
34
35

```bash
36
37
python3 node_classification.py
python3 multi_gpu_node_classification.py
38
39
```

40
### Minibatch training for link prediction
41

42
Train w/ mini-batch sampling for link prediction on OGB-Citation2:
43
44

```bash
45
python3 link_pred.py
46
```