Coder Social home page Coder Social logo

brizzib / graph-classification-with-gcn Goto Github PK

View Code? Open in Web Editor NEW
38.0 4.0 10.0 20.99 MB

A simple implementation of a portion of GCN (Kipf & Welling) that can handle graph classification.

Python 100.00%
machinelearning-python graphs neural-networks-and-deep-learning representation-learning tensorflow

graph-classification-with-gcn's Introduction

Based on the article: Semi-Supervised Classification with Graph Convolutional Networks - Thomas N. Kipf, Max Welling. link: https://arxiv.org/abs/1609.02907

code: https://github.com/tkipf/gcn.

This Tensorflow implementation of GCN tries to handle graph-classification tasks in two (similar) ways:

  1. "global node" approach - for each graph, a global node is added, only global nodes are classified
  2. global mean pooling approacah - added a mean-pooling layer as the last layer (before softmax) in GCN

Both approaches start with a sparse, block-diagonal version of an adjacency matrix that gathers all the graphs in the dataset. See tkipf/gcn#4 (comment) for a better explanation - with figures

Results: on Protein dataset -with the settings in the code- i obtain an average classification accuracy of 78.8% with 2.7% as standard deviation (the two approaches yield very close results). This accuracy is an average of 100 result. Each test has been conducted using 1000 graphs in the training set and 100 in the test set - with random splits.

graph-classification-with-gcn's People

Contributors

brizzib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graph-classification-with-gcn's Issues

Memory size isn't big enough

Hey ,

first I want to thank you for providing this extraordinary framework , it helps a lot.

The thing I want to ask is about insufficient memory. I'm working on a dataset involve 400 graphs each with 128 nodes.
I use a 16G memory PC to run it and got killed because of insufficient memory.
I check the code and found out that the process of constructing .npz of adjency matrix would use so much memory.
I'm wondering were you encountered same problems and how did you solve it?
I've google the question, and tkipf have responded similar question and suggested to solve it with mini batch training, want to know that have you tried it or not and how can it be executed with your code.

I'd be glad to hear from you soon. Thanks a lot!

Featureless flag bug

Hello, When I only edit the "featureless" flag to be true and leave everything else the same, suddenly the training accuracy becomes 1.0 (on the default protein dataset). Help!

Results Replication and Sequence to run the files

hello, I have recently gone through your github repository and found your work very interesting. You have done a great work. I want to replicate your results and want to understand your work. As, there are five files here, file_utils.py, graph_classification.py, layers.py, neural_network.py and utils.py. Can you please tell me, in which sequence I can run your files. I also want to know, how I can regenerate these files "protein_adj_matrix_aug.npz", "protein_adj_matrix_basic.npz", "protein_feats_matrix_aug.npz", "protein_feats_matrix_basic.npz","protein_labels_aug.npy", and "protein_labels_basic.npy". Thankyou.

some questions about your code

Hello, i want to know the meaning about the "tol" and the "num_feats" in your code. It shows that "tol =num_nodes + num_graphs", but i don't know why to do this. Can you explain it for me, thank you!

Questions about the "global node" approach

Hi,
I have a question about the "global node" approach. Could you tell me more details about how to connect the global node with its graph?
Thanks for your great code!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.