{"id":13444227,"url":"https://github.com/tkipf/gcn","last_synced_at":"2025-05-14T06:09:40.669Z","repository":{"id":37601775,"uuid":"73470551","full_name":"tkipf/gcn","owner":"tkipf","description":"Implementation of Graph Convolutional Networks in TensorFlow","archived":false,"fork":false,"pushed_at":"2023-04-14T08:09:28.000Z","size":5210,"stargazers_count":7240,"open_issues_count":124,"forks_count":2003,"subscribers_count":155,"default_branch":"master","last_synced_at":"2025-04-11T00:47:18.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkipf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-11T10:59:21.000Z","updated_at":"2025-04-10T11:38:45.000Z","dependencies_parsed_at":"2023-01-31T05:30:53.294Z","dependency_job_id":"92fe038f-94b3-464f-9e2a-5a63591a6d7b","html_url":"https://github.com/tkipf/gcn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkipf%2Fgcn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkipf%2Fgcn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkipf%2Fgcn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkipf%2Fgcn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkipf","download_url":"https://codeload.github.com/tkipf/gcn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254079715,"owners_count":22011239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:02:22.414Z","updated_at":"2025-05-14T06:09:40.611Z","avatar_url":"https://github.com/tkipf.png","language":"Python","funding_links":[],"categories":["Graph Embedding","Python","Implement:","[Label Inference Methods](#content)","TensorFlow Implementations","图卷积网络","📚 Project Purpose"],"sub_categories":["Graph Embedding Approaches","网络服务_其他","Machine Learning (Intermediate-Level"],"readme":"# Graph Convolutional Networks\n\nThis 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:\n \nThomas N. Kipf, Max Welling, [Semi-Supervised Classification with Graph Convolutional Networks](http://arxiv.org/abs/1609.02907) (ICLR 2017)\n\nFor a high-level explanation, have a look at our blog post:\n\nThomas Kipf, [Graph Convolutional Networks](http://tkipf.github.io/graph-convolutional-networks/) (2016)\n\n## Installation\n\n```bash\npython setup.py install\n```\n\n## Requirements\n* tensorflow (\u003e0.12)\n* networkx\n\n## Run the demo\n\n```bash\ncd gcn\npython train.py\n```\n\n## Data\n\nIn order to use your own data, you have to provide \n* an N by N adjacency matrix (N is the number of nodes), \n* an N by D feature matrix (D is the number of features per node), and\n* an N by E binary label matrix (E is the number of classes).\n\nHave a look at the `load_data()` function in `utils.py` for an example.\n\nIn this example, we load citation network data (Cora, Citeseer or Pubmed). The original datasets can be found here: http://www.cs.umd.edu/~sen/lbc-proj/LBC.html. In our version (see `data` folder) we use dataset splits provided by https://github.com/kimiyoung/planetoid (Zhilin Yang, William W. Cohen, Ruslan Salakhutdinov, [Revisiting Semi-Supervised Learning with Graph Embeddings](https://arxiv.org/abs/1603.08861), ICML 2016). \n\nYou can specify a dataset as follows:\n\n```bash\npython train.py --dataset citeseer\n```\n\n(or by editing `train.py`)\n\n## Models\n\nYou can choose between the following models: \n* `gcn`: Graph convolutional network (Thomas N. Kipf, Max Welling, [Semi-Supervised Classification with Graph Convolutional Networks](http://arxiv.org/abs/1609.02907), 2016)\n* `gcn_cheby`: Chebyshev polynomial version of graph convolutional network as described in (Michaël Defferrard, Xavier Bresson, Pierre Vandergheynst, [Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering](https://arxiv.org/abs/1606.09375), NIPS 2016)\n* `dense`: Basic multi-layer perceptron that supports sparse inputs\n\n## Graph classification\n\nOur framework also supports batch-wise classification of multiple graph instances (of potentially different size) with an adjacency matrix each. It is best to concatenate respective feature matrices and build a (sparse) block-diagonal matrix where each block corresponds to the adjacency matrix of one graph instance. For pooling (in case of graph-level outputs as opposed to node-level outputs) it is best to specify a simple pooling matrix that collects features from their respective graph instances, as illustrated below:\n\n![graph_classification](https://user-images.githubusercontent.com/7347296/34198790-eb5bec96-e56b-11e7-90d5-157800e042de.png)\n\n\n## Cite\n\nPlease cite our paper if you use this code in your own work:\n\n```\n@inproceedings{kipf2017semi,\n  title={Semi-Supervised Classification with Graph Convolutional Networks},\n  author={Kipf, Thomas N. and Welling, Max},\n  booktitle={International Conference on Learning Representations (ICLR)},\n  year={2017}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkipf%2Fgcn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkipf%2Fgcn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkipf%2Fgcn/lists"}