StellarGraph demos

StellarGraph provides numerous algorithms for graph machine learning. This folder contains demos of all of them to explain how they work and how to use them as part of a TensorFlow Keras data science workflow.

The demo notebooks can be run without any installation of Python by using Binder or Google Colab - these both provide a cloud-based notebook environment. The whole set of demos can be opened in Binder Open in Binder or you can click the Binder and Colab badges within each notebook.

Find algorithms for a task

  • Introduction to StellarGraph and its graph machine learning workflow (with TensorFlow and Keras): GCN on Cora
  • Predicting attributes, such as classifying as a class or label, or regressing to calculate a continuous number:
  • Representation learning or computing embedding vectors (including unsupervised tasks):
    • For nodes/vertices/entities and edges/links/connections: embeddings
  • Time series or sequence prediction for nodes within a graph (including spatio-temporal data): time series
  • Ensembling models to reduce prediction variance: ensembles
  • Loading data into a StellarGraph object, with Pandas, Neo4j or NetworkX: basics
  • Experimental: running GraphSAGE on data stored in Neo4j: neo4j connector

Find a demo for an algorithm

Algorithm Heterogeneous Directed Edge weights Time-varying, temporal Node features Node classification Link prediction Unsupervised Inductive Graph classification
Graph Convolutional Network (GCN) see RGCN     see T-GCN yes demo demo UnsupervisedSampler, DeepGraphInfomax see Cluster-GCN demo
Cluster-GCN         yes demo yes   yes  
Relational GCN (RGCN) multiple edges types       yes demo yes      
Temporal GCN (T-GCN), implemented as GCN-LSTM       node features time series, sequence demo        
Graph ATtention Network (GAT)         yes demo yes UnsupervisedSampler, DeepGraphInfomax    
Simplified Graph Convolution (SGC)         yes demo yes      
Personalized Propagation of Neural Predictions (PPNP)         yes demo yes UnsupervisedSampler, DeepGraphInfomax    
Approximate PPNP (APPNP)         yes demo yes UnsupervisedSampler, DeepGraphInfomax    
GraphWave           via embedding vectors via embedding vectors demo    
Attri2Vec         yes demo demo demo    
GraphSAGE see HinSAGE demo     yes demo demo UnsupervisedSampler, DeepGraphInfomax demo  
HinSAGE yes       yes yes demo DeepGraphInfomax yes  
Node2Vec     demo     via embedding vectors via embedding vectors demo    
Metapath2Vec yes         via embedding vectors via embedding vectors demo    
Continuous-Time Dynamic Network Embeddings       yes   via embedding vectors via embedding vectors yes    
Watch Your Step           via embedding vectors via embedding vectors demo    
ComplEx multiple edges types yes       via embedding vectors demo yes    
DistMult multiple edges types yes       via embedding vectors demo yes    
Deep Graph CNN         yes         demo

See the root README or each algorithm’s documentation for the relevant citation(s).

Download the demos

You can run download a local copy of the demos using the curl command below:

curl -L https://github.com/stellargraph/stellargraph/archive/master.zip | tar -xz --strip=1 stellargraph-master/demos

The dependencies required to run most of our demo notebooks locally can be installed using one of the following:

  • Using pip: pip install stellargraph[demos]
  • Using conda: conda install -c stellargraph stellargraph

Table of contents