Unsupervised representation learning

StellarGraph provides numerous algorithms for doing unsupervised node, edge and graph representation learning 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 representation learning task computes a representation or embedding vector for each node in a graph. These vectors capture latent/hidden information about the nodes and edges, and can be used for (semi-)supervised downstream tasks like node classification and link prediction, or unsupervised ones like community detection or similarity searches. Representation learning is typically an unsupervised task, where the model is trained on data that does not have any ground-truth labels.

Node representations can also be computed from (semi-)supervised models, using the output of a hidden layer as the embedding vector for nodes or edges. StellarGraph provides some demonstrations of node classification and link prediction, some of which include computing and visualising node or edge embeddings.

Similarly, a graph representation learning task computes a representation or embedding vector for a whole graph. These vectors capture latent/hidden information about the whole graph, and can be used for (semi-)supervised downstream tasks like graph classification, or the same unsupervised ones as above.

Find algorithms and demos for a graph

This table lists all representation learning demos, including the algorithms trained, how they are trained, the types of graph used, and the tasks demonstrated.

demo

algorithm(s)

training method

node features

downstream tasks shown

Deep Graph Infomax

GCN, GAT, PPNP, APPNP, GraphSAGE, HinSAGE, RGCN, Cluster-GCN

DeepGraphInfomax (mutual information)

yes

visualisation, node classification

Unsupervised GraphSAGE

GraphSAGE

UnsupervisedSampler (link prediction)

yes

visualisation, node classification

Attri2Vec

Attri2Vec

UnsupervisedSampler (link prediction)

yes

visualisation

Metapath2Vec

Metapath2Vec

natively unsupervised

visualisation

Node2Vec

Node2Vec

natively unsupervised

visualisation

Watch Your Step

Watch Your Step

natively unsupervised

visualisation, node classification

GraphWave

GraphWave

natively unsupervised

visualisation, node classification

Unsupervised Graph Classification

GCN, Graph classification

Pairs of graphs, ground-truth distance

yes

visualisation, graph classification

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.