Implementation of Graph Convolutional Networks in TensorFlow
Latest commit 193c099 Feb 20, 2017 @tkipf committed on GitHub Merge pull request #7 from liyaguang/patch-1
Changes to named arguments. (Fix for tf 1.0.0)
Failed to load latest commit information.
gcn Fix typo for named argument Feb 20, 2017
.gitignore Updated gitignore Nov 14, 2016
LICENCE Initial commit Nov 11, 2016 Removed 2016 reference Feb 8, 2017 Minor fix for python 3 support Jan 23, 2017

Graph Convolutional Networks

This is a TensorFlow implementation of Graph Convolutional Networks for the task of (semi-supervised) classification of nodes in a graph, as described in our paper:

Thomas N. Kipf, Max Welling, Semi-Supervised Classification with Graph Convolutional Networks (ICLR 2017)

For a high-level explanation, have a look at our blog post:

Thomas Kipf, Graph Convolutional Networks (2016)


python install


  • tensorflow (>0.12)
  • networkx

Run the demo



In order to use your own data, you have to provide

  • an N by N adjacency matrix (N is the number of nodes),
  • an N by D feature matrix (D is the number of features per node), and
  • an N by E binary label matrix (E is the number of classes).

Have a look at the load_data() function in for an example.

In this example, we load citation network data (Cora, Citeseer or Pubmed). The original datasets can be found here: In our version (see data folder) we use dataset splits provided by (Zhilin Yang, William W. Cohen, Ruslan Salakhutdinov, Revisiting Semi-Supervised Learning with Graph Embeddings, ICML 2016).

You can specify a dataset as follows:

python --dataset citeseer

(or by editing


You can choose between the following models:


Please cite our paper if you use this code in your own work:

  title={Semi-Supervised Classification with Graph Convolutional Networks},
  author={Kipf, Thomas N and Welling, Max},
  journal={arXiv preprint arXiv:1609.02907},