matenure / FastGCN

The sample codes for our ICLR18 paper "FastGCN: Fast Learning with Graph Convolutional Networks via Importance Sampling""
519 stars 111 forks source link

How can gcn (batched) reduce memory usage? #23

Closed Yihan-zz closed 4 years ago

Yihan-zz commented 4 years ago

Hi, thanks for your great work! But I have two question 1. The paper said:"The nonbatched version of GCN runs out of memory on the large graph Reddit". How can gcn (batched) reduce memory usage? Don't we need to load the adjacency matrix in gcn(batched)?

  1. GCN is a method for transductive. How does it work on Reddit as it is a inductive dataset in previous work.

matenure commented 4 years ago
  1. The batched version does not load all the adjacency matrix in the memory. Instead, it only loads a batch of rows A[i:j].
  2. You can only train GCN on the training data (instead of the whole graph), and then use the same parameter for the test data. IN this way you can also use GCN in an inductive setting.
Yihan-zz commented 4 years ago

Thanks for replying,I have another question. I saw the training speed of GraphSAGE on Reddit on your paper is 0.4260s/batch. But I ran the official code on GPU and the speed is about 0.1s/batch. Did you ran it on CPU or Did I miss anything ?

matenure commented 4 years ago

We compared all methods on CPU. On GPU it should have a similar trend. BTW, difference environments will cause different computing time. Even on GPUs, difference graphic cards will have huge speed difference.

Yihan-zz commented 4 years ago

thanks !