diffpool icon indicating copy to clipboard operation
diffpool copied to clipboard

Cluster assignments learning for Graph classification

Open ahmedmazariML opened this issue 6 years ago • 2 comments

Hi @RexYing ,

Thank you for your work and for the code.

I have a question related to cluster assignments in the context of graph classification.

How do you initialize the number C of clusters and how to get the assignments cluster for each node.

Given x of dimension (30,256) where 30 is the number of nodes and 256 the dimension of features. Where x is the output of my convolutional layer. A is an adjacency matrix of dimension (30,30).

How can l get S the assignments matrix of dimension (30,C) given x and A.

Thank you

ahmedmazariML avatar Feb 21 '19 18:02 ahmedmazariML

C is chosen to be, e.g. assign-ratio * num nodes, where assign-ratio could be 0.1, 0.25 etc. In practice, since graph sizes vary, it might not be the best number of clusters for a particular graph data in the dataset. However, we observe that by encouraging sparsity, only a few clusters out of C maximum number of clusters are used. Depending the the objective, the assignment network can find suitable number of clusters/hyper-node for each different input graph.

The weight matrix in your example should be of dimension (30, C) for the assignment network, so that the output matches the number of clusters.

RexYing avatar Feb 22 '19 00:02 RexYing

@RexYing Could you maybe elaborate on how you encourage the sparsity in your network?

zgojcic avatar Feb 03 '20 23:02 zgojcic