Graph Classification

I am interested in performing Graph classification for N graphs. However, all the N graphs have the same structure (same adjacency matrix: each graph has the same M nodes and E edges). And the features on the nodes vary from one graph to another. And the node features are 1-dimensional.

What sort of GNN models should I be considering for performing this classification? Especially given that I have the same graph structure for all data samples.

Any suggestions are helpful.

Thanks,
Uday

Assuming that you are modeling without any prior knowledge on the graphs (other than the graphs have the same structure), the usual GIN or other graph classification models should work as usual, if you treat each graph as if they have a different structures.

Since DGL’s NN modules support multi-dimensional features (e.g. a node’s feature can be 2D), probably you can write a more efficient implementation of the same model:

  • You can first build a graph g with the said structure.
  • Your dataloader will instead iterate over the stacked node feature tensor (i.e. with size (N, M, 1)).
  • Modules like GINConv and SAGEConv should work even if you feed in 3D tensors.
  • After GNN, you will get a tensor with shape (N, M, D), where D is the hidden dimension. You can then do a pooling over the second dimension to get a (N, D) tensor as graph representation.

That being said, I would still suggest you try out the naive GIN/etc as if the graphs have different structure, as you can directly use our examples.

Thank you, @BarclayII for the reply.

I was wondering if I should even consider the traditional GNN approach. Because of these two things:

  • All the samples have same graph structure
  • Node features are just 1-dimensional.

I am very skeptical whether GNN will really learn from the data samples.

As of now, I am working on Graph Signal Processing (GSP) based framework where I am extracting Graph Fourier transform (GFT) as features from the graph structure and node features.

As you have suggested, I will try simple GCNs and GIN and see if I can get better result with the data I have.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.