|
| 1 | +Graph Auto-Encoders |
| 2 | +============ |
| 3 | + |
| 4 | +This is a TensorFlow implementation of the (Variational) Graph Auto-Encoder model as described in our paper: |
| 5 | + |
| 6 | +T. N. Kipf, M. Welling, [Variational Graph Auto-Encoders](https://arxiv.org/abs/1611.07308), NIPS Workshop on Bayesian Deep Learning (2016) |
| 7 | + |
| 8 | +Graph Auto-Encoders (GAEs) are end-to-end trainable neural network models for unsupervised learning, clustering and link prediction on graphs. |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +GAEs have successfully been used for: |
| 13 | +* Link prediction in large-scale relational data: M. Schlichtkrull & T. N. Kipf et al., [Modeling Relational Data with Graph Convolutional Networks](https://arxiv.org/abs/1703.06103) (2017), |
| 14 | +* Matrix completion / recommendation with side information: R. Berg et al., [Graph Convolutional Matrix Completion](https://arxiv.org/abs/1706.02263) (2017). |
| 15 | + |
| 16 | + |
| 17 | +GAEs are based on Graph Convolutional Networks (GCNs), a recent class of models for end-to-end (semi-)supervised learning on graphs: |
| 18 | + |
| 19 | +T. N. Kipf, M. Welling, [Semi-Supervised Classification with Graph Convolutional Networks](https://arxiv.org/abs/1609.02907), ICLR (2017). |
| 20 | + |
| 21 | +A high-level introduction is given in our blog post: |
| 22 | + |
| 23 | +Thomas Kipf, [Graph Convolutional Networks](http://tkipf.github.io/graph-convolutional-networks/) (2016) |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +## Installation |
| 28 | + |
| 29 | +```bash |
| 30 | +python setup.py install |
| 31 | +``` |
| 32 | + |
| 33 | +## Requirements |
| 34 | +* TensorFlow (1.0 or later) |
| 35 | +* python 2.7 |
| 36 | +* networkx |
| 37 | +* scikit-learn |
| 38 | +* scipy |
| 39 | + |
| 40 | +## Run the demo |
| 41 | + |
| 42 | +```bash |
| 43 | +python train.py |
| 44 | +``` |
| 45 | + |
| 46 | +## Data |
| 47 | + |
| 48 | +In order to use your own data, you have to provide |
| 49 | +* an N by N adjacency matrix (N is the number of nodes), and |
| 50 | +* an N by D feature matrix (D is the number of features per node) -- optional |
| 51 | + |
| 52 | +Have a look at the `load_data()` function in `input_data.py` for an example. |
| 53 | + |
| 54 | +In this example, we load citation network data (Cora, Citeseer or Pubmed). The original datasets can be found here: http://linqs.cs.umd.edu/projects/projects/lbc/ and here (in a different format): https://github.com/kimiyoung/planetoid |
| 55 | + |
| 56 | +You can specify a dataset as follows: |
| 57 | + |
| 58 | +```bash |
| 59 | +python train.py --dataset citeseer |
| 60 | +``` |
| 61 | + |
| 62 | +(or by editing `train.py`) |
| 63 | + |
| 64 | +## Models |
| 65 | + |
| 66 | +You can choose between the following models: |
| 67 | +* `gcn_ae`: Graph Auto-Encoder (with GCN encoder) |
| 68 | +* `gcn_vae`: Variational Graph Auto-Encoder (with GCN encoder) |
| 69 | + |
| 70 | +## Cite |
| 71 | + |
| 72 | +Please cite our paper if you use this code in your own work: |
| 73 | + |
| 74 | +``` |
| 75 | +@article{kipf2016variational, |
| 76 | + title={Variational Graph Auto-Encoders}, |
| 77 | + author={Kipf, Thomas N and Welling, Max}, |
| 78 | + journal={NIPS Workshop on Bayesian Deep Learning}, |
| 79 | + year={2016} |
| 80 | +} |
| 81 | +``` |
0 commit comments