Node classification

StellarGraph provides numerous algorithms for doing node classification on graphs. 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.

A node classification task predicts an attribute of each node in a graph. For instance, labelling each node with a categorical class (binary classification or multiclass classification), or predicting a continuous number (regression). It is supervised or semi-supervised, where the model is trained using a subset of nodes that have ground-truth labels.

Node classification can also be done as a downstream task from node representation learning/embeddings, by training a supervised or semi-supervised classifier against the embedding vectors. Unsupervised algorithms that can be used in this manner include random walk-based methods like Metapath2Vec. StellarGraph provides demos of unsupervised algorithms, some of which include a node classification downstream task.

Find algorithms and demos for a graph

This table lists all node classification demos, including the algorithms trained, the types of graph used, and the tasks demonstrated.

Demo Algorithm(s) Node features Heterogeneous Directed Edge weights Inductive Node embeddings
GCN GCN yes         yes
Cluster-GCN Cluster-GCN yes         yes
RGCN RGCN yes yes, multiple edge types       yes
GAT GAT yes         yes
SGC SGC yes         yes
PPNP & APPNP PPNP, APPNP yes          
Attri2Vec Attri2Vec yes         yes
GraphSAGE on Cora GraphSAGE yes         yes
Inductive GraphSAGE GraphSAGE yes       yes yes
Directed GraphSAGE GraphSAGE yes   yes     yes
Node2Vec Node2Vec           yes
Weighted Node2Vec Node2Vec       yes   yes

See the root README or each algorithm’s documentation for the relevant citation(s). See the demo index for more tasks, and a summary of each algorithm.