Giter VIP home page Giter VIP logo

gala_tf2.0's Introduction

Graph convolutional Autoencoder using LAplacian smoothing and sharpening (GALA)

  • These codes will work but they contain so many redundant and unclear things.
  • All the codes will be improved soon :).

Requirments

  • Python > 3.x
  • Tensorflow >= 2.0
  • Scipy
  • scikit-learn

Paper's Abstract

We propose a symmetric graph convolutional autoencoder which produces a low-dimensional latent representation from a graph. In contrast to the existing graph autoencoders with asymmetric decoder parts, the proposed autoencoder has a newly designed decoder which builds a completely symmetric autoencoder form. For the reconstruction of node features, the decoder is designed based on Laplacian sharpening as the counterpart of Laplacian smoothing of the encoder, which allows utilizing the graph structure in the whole processes of the proposed autoencoder architecture. In order to prevent the numerical instability of the network caused by the Laplacian sharpening introduction, we further propose a new numerically stable form of the Laplacian sharpening by incorporating the signed graphs. In addition, a new cost function which finds a latent representation and a latent affinity matrix simultaneously is devised to boost the performance of image clustering tasks. The experimental results on clustering, link prediction and visualization tasks strongly support that the proposed model is stable and outperforms various state-of-theart algorithms.

To do

  • Make the codes clear and efficient
  • Write a brief description of the paper.

Citation

@inproceedings{park2019symmetric,
               title={Symmetric graph convolutional autoencoder for unsupervised graph representation learning},
               author={Park, Jiwoong and Lee, Minsik and Chang, Hyung Jin and Lee, Kyuewang and Choi, Jin Young},
               booktitle={Proceedings of the IEEE International Conference on Computer Vision},
               pages={6519--6528},
               year={2019}
               }

gala_tf2.0's People

Contributors

sseung0703 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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gala_tf2.0's Issues

Validate.py won’t run

Hey,

You are using the GALA constructor without passing the DAD matrix to it in the validate.py which is a required arguement. Also, model.update_DAD function doesn’t exist in GALA model

Graph based data

Thank you for your contribution!

I would love to see the example code to reproduce the node clustering experiments mentioned in the paper (cora/citeseer/wiki/pubmed). I tried to reproduce the results but I'm off the track...

I uploaded my simple tf2 implementation (it can be run directly on colab along the cora.npz file):
https://github.com/daniel-unyi-42/GALA

Thank you for any help.

can't reproduce the result

Hello,
thanks for your brilliant works.
I tried to implement your idea with PyTorch since I'm not familiar with Tensorflow.
These 2 functions are my implementation of Laplacian Smoothing and Laplacian sharpening, where A is the adjacency matrix:
def laplacian_smooth(A):
"""
args:
A: batches of adjacency matrices of symmetric Interactions
size of A: [batch_size, num_edgeTypes, num_nodes, num_nodes]
return: A_norm = (D**-0.5)A(D**-0.5), where D is the diagonal matrix of A
"""
I = torch.eye(A.size(-1))
I = I.unsqueeze(0).unsqueeze(1)
I = I.expand(A.size(0), A.size(1), I.size(2), I.size(3))
#size: [batch_size, num_edgeTypes, num_atoms, num_atoms]
A_p = A+I
D_values = A_p.sum(-1) #Degree values; size: [batch_size, num_nodes]
D_values_p = torch.pow(D_values, -0.5)
D_p = torch.diag_embed(D_values_p) #size: [batch_size, num_nodes, num_nodes]
return torch.matmul(D_p, torch.matmul(A_p, D_p))

def laplacian_sharpen(A):
"""
args:
A; batches of adjacency matrices corresponding to edge types
size: [batch_size, num_edgeTypes, num_nodes, num_nodes]
"""
I = torch.eye(A.size(-1))
I = I.unsqueeze(0).unsqueeze(1)
I = I.expand(A.size(0), A.size(1), I.size(2), I.size(3))
#size: [batch_size, num_edgeTypes, num_atoms, num_atoms]
Ap = 2*I-A
D_values = A.sum(-1)+2 #shape: [batch_size, num_edgeTypes, num_atoms]
D_values_p = torch.pow(D_values, -0.5)
D_p = torch.diag_embed(D_values_p)

return torch.matmul(D_p, torch.matmul(Ap, D_p))

Are there any problems with my implementation?

I test the model on the Cora dataset.
I use the Frobenius norm as reconstruction error, i.e. torch.norm(X-X_rec, p="pro") to train the 2-layer encoder and 2-layer decoder to minimise the reconstruction error.
After training, I use K-Means(n_cluster=7) to cluster the latents and found the NMI of the clustering results is very low compared with the results in your paper. Could you tell me more details of your model, such as which activation function used in the output layer of the encoder, what are the dimensions of hidden layers and the output layer of the encoder?

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.