Variational Graph Auto-Encoders

Thomas N. Kipf, Max Welling

A latent variable model for graph-structured data

We introduce the variational graph auto-encoder (VGAE), a framework for unsupervised learning on graph-structured data based on the variational auto-encoder (VAE) kingma2013auto ; rezende2014stochastic . This model makes use of latent variables and is capable of learning interpretable latent representations for undirected graphs (see Figure 1).

We demonstrate this model using a graph convolutional network (GCN) kipf2016semi encoder and a simple inner product decoder. Our model achieves competitive results on a link prediction task in citation networks. In contrast to most existing models for unsupervised learning on graph-structured data and link prediction tang2011leveraging ; perozzi2014deepwalk ; tang2015line ; grovernode2vec , our model can naturally incorporate node features, which significantly improves predictive performance on a number of benchmark datasets.

We are given an undirected, unweighted graph G=(V,E)\mathcal{G}=(\mathcal{V},\mathcal{E}) with N=∣V∣N=|\mathcal{V}| nodes. We introduce an adjacency matrix A\mathbf{A} of G\mathcal{G} (we assume diagonal elements set to 1, i.e. every node is connected to itself) and its degree matrix D\mathbf{D}. We further introduce stochastic latent variables zi\mathbf{z}_{i}, summarized in an N×FN\times F matrix Z\mathbf{Z}. Node features are summarized in an N×DN\times D matrix X\mathbf{X}.

Inference model

We take a simple inference model parameterized by a two-layer GCN:

Generative model

Our generative model is given by an inner product between latent variables:

where AijA_{ij} are the elements of A\mathbf{A} and σ(⋅)\sigma(\cdot) is the logistic sigmoid function.

Learning

We optimize the variational lower bound L\mathcal{L} w.r.t. the variational parameters Wi\mathbf{W}_{i}:

Non-probabilistic graph auto-encoder (GAE) model

For a non-probabilistic variant of the VGAE model, we calculate embeddings Z\mathbf{Z} and the reconstructed adjacency matrix A^\mathbf{\hat{A}} as follows:

Experiments on link prediction

We demonstrate the ability of the VGAE and GAE models to learn meaningful latent embeddings on a link prediction task on several popular citation network datastets aimag08 . The models are trained on an incomplete version of these datasets where parts of the citation links (edges) have been removed, while all node features are kept. We form validation and test sets from previously removed edges and the same number of randomly sampled pairs of unconnected nodes (non-edges).

We compare models based on their ability to correctly classify edges and non-edges. The validation and test sets contain 5%5\% and 10%10\% of citation links, respectively. The validation set is used for optimization of hyperparameters. We compare against two popular baselines: spectral clustering (SC) tang2011leveraging and DeepWalk (DW) perozzi2014deepwalk . Both SC and DW provide node embeddings Z\mathbf{Z}. We use Eq. 4 (left side) to calculate scores for elements of the reconstructed adjacency matrix. We omit recent variants of DW tang2015line ; grovernode2vec due to comparable performance. Both SC and DW do not support input features.

For VGAE and GAE, we initialize weights as described in glorot2010understanding . We train for 200 iterations using Adam kingma2014adam with a learning rate of 0.010.01. We use a 3232-dim hidden layer and 1616-dim latent variables in all experiments. For SC, we use the implementation from scikit-learn with an embedding dimension of 128128. For DW, we use the implementation provided by the authors of grovernode2vec with standard settings used in their paper, i.e. embedding dimension of 128128, 1010 random walks of length 8080 per node and a context size of 1010, trained for a single epoch.

Results for the link prediction task in citation networks are summarized in Table 1. GAE* and VGAE* denote experiments without using input features, GAE and VGAE use input features. We report area under the ROC curve (AUC) and average precision (AP) scores for each model on the test set. Numbers show mean results and standard error for 10 runs with random initializations on fixed dataset splits.

Both VGAE and GAE achieve competitive results on the featureless task. Adding input features significantly improves predictive performance across datasets. A Gaussian prior is potentially a poor choice in combination with an inner product decoder, as the latter tries to push embeddings away from the zero-center (see Figure 1). Nevertheless, the VGAE model achieves higher predictive performance on both the Cora and the Citeseer dataset.

Future work will investigate better-suited prior distributions, more flexible generative models and the application of a stochastic gradient descent algorithm for improved scalability.

Acknowledgments

We would like to thank Christos Louizos, Mart van Baalen, Taco Cohen, Dave Herman, Pramod Sinha and Abdul-Saboor Sheikh for insightful discussions. This project was funded by SAP Innovation Center Network.

References