# Variational Graph Auto-Encoders

Variational graph auto-encoders learn node features and graph structure together

Thomas N. Kipf, Max Welling · arXiv · 2016-11-21

- **Problem** Unsupervised models for graph data and link prediction mostly cannot use node features. They therefore miss attribute information that sits alongside the graph structure.
- **Method** VGAE encodes each node with a two-layer GCN into a Gaussian latent vector. It decodes edges as a sigmoid of inner products and trains a variational lower bound.
- **Results** VGAE reaches an AUC of 91.4 ± 0.01 on Cora with input features, on the test set, and performs competitively on link prediction in citation networks.

## Gap in unsupervised graph embeddings

The study targets learning latent representations of an undirected graph, where each node is placed in a latent space and edges are expected to be predictable from those positions. The concrete test case is link prediction in citation networks, where held-out citation links must be separated from node pairs that are not connected. Many existing models for this setting cannot take node features as input, which the authors identify as the gap.

The proposed model is built so that features can enter the encoder directly, and the authors report that this improves predictive performance on several benchmark datasets.

## Encoder: a two-layer GCN

Each node i has a stochastic latent vector z\_i, and stacking these vectors gives the N by F matrix Z. The approximate posterior factorizes over nodes, and each factor is a Gaussian with a mean vector and a diagonal covariance. The mean and the log standard deviation for every node come from graph convolutional networks applied to the feature matrix X and the adjacency matrix A.

The network is two layers deep, \\(\\mathrm{GCN}(X,A)=\\tilde{A}\\,\\mathrm{ReLU}(\\tilde{A}XW\_0)W\_1\\), so each layer propagates information across edges through the normalized adjacency matrix before the next weight matrix is applied. For the featureless setting the feature matrix is dropped and replaced by the identity matrix, so the encoder receives only the graph structure.

## Decoder and training objective

The generative model defines the probability of each adjacency entry as the logistic sigmoid of the inner product of the two node latent vectors, \\(p(A\_{ij}=1\\mid z\_i,z\_j)=\\sigma(z\_i^\\top z\_j)\\). Entries are treated as conditionally independent given Z. Training maximizes the variational lower bound \\(\\mathcal{L}=\\mathbb{E}\_{q}\[\\log p(A\\mid Z)\]-\\mathrm{KL}\[q(Z\\mid X,A)\\,\\\|\\,p(Z)\]\\).

The first term rewards reconstructing A from sampled latents, and the second term keeps the posterior close to the prior. The prior is a standard normal placed on every node, \\(p(z\_i)=\\mathcal{N}(z\_i\\mid 0,I)\\). The expectation is estimated with the reparameterization trick, so the sampling step passes gradients back to the means and standard deviations, and the optimization is full-batch gradient descent.

Because A is very sparse, the authors re-weight the terms with \\(A\_{ij}=1\\) in the bound instead of sub-sampling the terms with \\(A\_{ij}=0\\). This is the choice used in the reported experiments.

## Non-probabilistic GAE variant

The non-probabilistic variant uses the GCN output directly as the embedding matrix, \\(Z=\\mathrm{GCN}(X,A)\\), with no sampling and no KL term. The reconstructed adjacency matrix is then \\(\\hat{A}=\\sigma(ZZ^\\top)\\), so edge scores come from the same inner product decoder applied to deterministic embeddings. GAE is the comparison point for VGAE in the results table, and both are run with and without features.

## Evaluation protocol

Models are trained on citation graphs from which some edges were removed, while all node features are kept. The validation and test sets contain 5% and 10% of the citation links, respectively, each paired with the same number of sampled non-edges. Test-set edges and non-edges are scored with AUC and average precision, and each reported number is a mean with standard error over 10 runs with random initializations on fixed dataset splits.

Spectral clustering and DeepWalk supply node embeddings, which are scored with the same inner product form as in the GAE variant. Neither baseline uses input features. The spectral clustering baseline uses an embedding dimension of 128, and the DeepWalk baseline uses 128 dimensions with 10 random walks of length 80 per node, a context size of 10, and a single training epoch.

VGAE and GAE are trained with Adam at a learning rate of 0.01 for 200 iterations, using a 32-dimensional hidden layer and 16-dimensional latent variables. The validation set is used to optimize hyperparameters.

## Results with and without node features

The authors describe both models as competitive on the featureless task. The Cora numbers support that description, while the Citeseer and Pubmed numbers show a gap to the baselines.

## Limits of the Gaussian prior

The authors suggest that a Gaussian prior may be a poor choice when combined with an inner product decoder, because the decoder pushes the embeddings away from the zero-centred prior. Better-suited prior distributions, more flexible generative models and stochastic gradient descent for improved scalability are named as future work. None of these is tested in the paper.

The experiments cover three citation networks, the link prediction task, and fixed dataset splits with 10 runs. Results on other graph types or tasks are not reported.

## Paper info

- **Authors**: Thomas N. Kipf, Max Welling
- **Venue**: arXiv · Preprint
- **First published**: 2016-11-21
- **Added**: 2026-11-12
- **Updated**: 2016-11-21
- **Version**: v1
- **arXiv**: 1611.07308
- **Category**: stat.ML · cs.LG
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1611.07308v1) · [PDF ↗](https://arxiv.org/pdf/1611.07308v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Thomas N. Kipf, Max Welling (2016). Variational Graph Auto-Encoders. arXiv:1611.07308v1. https://arxiv.org/abs/1611.07308v1

**BibTeX**

```
@misc{kipf2016variational,
  title = {{Variational Graph Auto-Encoders}},
  author = {Thomas N. Kipf and Max Welling},
  year = {2016},
  eprint = {1611.07308},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1611.07308v1}
}
```

## Other paper commentary

- [Variational Inference: A Review for Statisticians](https://refivu.com/en/papers/9499b5e2-6ec4-4fcc-8d8e-4709801c41a4-variational-inference-a-review-for-statisticians.md)
- [High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs](https://refivu.com/en/papers/ad89d7a4-6049-4da7-8901-5fe971c7ff30-high-resolution-image-synthesis-and-semantic-manipulation.md)
- [ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks](https://refivu.com/en/papers/ebad818e-19ed-4df9-8fcf-6d62836fa124-esrgan-enhanced-super-resolution-generative-adversarial.md)
- [Least Squares Generative Adversarial Networks](https://refivu.com/en/papers/de7adb03-4a8a-4e01-93e9-d9d8b2434300-least-squares-generative-adversarial-networks.md)
- [Progressive Growing of GANs for Improved Quality, Stability, and Variation](https://refivu.com/en/papers/8be12dd7-41d4-4ddd-8e8c-ec44b2d70443-progressive-growing-of-gans-for-improved-quality-stability.md)
- [Hierarchical Text-Conditional Image Generation with CLIP Latents](https://refivu.com/en/papers/a54e72c7-9aba-4f0a-b093-9f8704564243-hierarchical-text-conditional-image-generation-with-clip.md)
- [Generating Sequences With Recurrent Neural Networks](https://refivu.com/en/papers/020e79e6-6670-4128-89ca-087f5c0a8dc9-generating-sequences-with-recurrent-neural-networks.md)
- [Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results](https://refivu.com/en/papers/db4b57dd-c8b9-4380-b088-3186a676efaf-mean-teachers-are-better-role-models-weight-averaged.md)
- [FlowNet: Learning Optical Flow with Convolutional Networks](https://refivu.com/en/papers/e84affff-15cf-442c-afeb-bff13701eb83-flownet-learning-optical-flow-with-convolutional-networks.md)
- [Learning to Compare: Relation Network for Few-Shot Learning](https://refivu.com/en/papers/2b9dfd30-f9fd-420e-be01-a1907e2778c5-learning-to-compare-relation-network-for-few-shot.md)
- [Residual Dense Network for Image Super-Resolution](https://refivu.com/en/papers/01bf3f14-f3f5-49d6-9844-02a897713390-residual-dense-network-for-image-super-resolution.md)
- [AutoAugment: Learning Augmentation Policies from Data](https://refivu.com/en/papers/4b6d74c6-1851-4ea4-8417-b325823c633e-autoaugment-learning-augmentation-policies-from-data.md)

## Terms in this paper

- [ADAM](https://refivu.com/en/terms/0e9ad0199e08-adam)
- [AUC](https://refivu.com/en/terms/017a335bbf0e-auc)
- [Average Precision](https://refivu.com/en/terms/1764eaa249a6-average-precision)
- [Citeseer](https://refivu.com/en/terms/2ecb70be7c40-citeseer)
- [GCN](https://refivu.com/en/terms/6be0326c6c22-gcn)
- [Kullback-Leibler divergence](https://refivu.com/en/terms/3aa99486ee6b-kullback-leibler-divergence)
- [link prediction](https://refivu.com/en/terms/f029f4345f8f-link-prediction)
- [reparameterization trick](https://refivu.com/en/terms/67c18035066e-reparameterization-trick)
- [Cora](https://refivu.com/en/terms/46f85e717c38-cora)
- [DeepWalk](https://refivu.com/en/terms/6f5bcebcffef-deepwalk)
- [spectral clustering](https://refivu.com/en/terms/21fd8dbd5474-spectral-clustering)
- [GAE](https://refivu.com/en/terms/911dea6feff4-gae)
- [latent variables](https://refivu.com/en/terms/d92f0ab757d0-latent-variables)
- [Gaussian prior](https://refivu.com/en/terms/a6179e3c32c2-gaussian-prior)
- [VGAE](https://refivu.com/en/terms/04851a6f75ed-vgae)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/68c3cbf9-0251-40aa-bdb7-85593b91a6b5-variational-graph-auto-encoders)
