Simple reference implementation of GraphSAGE.
Basic reference PyTorch implementation of GraphSAGE. This reference implementation is not as fast as the TensorFlow version for large graphs, but the code is easier to read and it performs better (in terms of speed) on small-graph benchmarks. The code is also intended to be simpler, more extensible, and easier to work with than the TensorFlow version.
Currently, only supervised versions of GraphSAGE-mean and GraphSAGE-GCN are implemented.
pytorch >0.2 is required.
python -m graphsage.modelto run the Cora example. It assumes that CUDA is not being used, but modifying the run functions in
model.pyin the obvious way can change this. There is also a pubmed example (called via the
run_pubmedfunction in model.py).