Apply GNN to multiple graphs of a same structure

Hello
Suppose we are doing a link prediction task in DGL. As far as I checked, all the link prediction datasets provided by DGL consider one snapshot of the graph (1 sample of the graph).
Now let’s say we have many samples for each feature. One way to consider this is to add another dimension to the node’s feature matrix and have a new dimension of (N, B, d), where N is the number of nodes, B is the number of samples for each feature, and d is the number of features.

Question#1: Is there any function in DGL to handle this type of matrices as the input of GNN?
Question#2: Is there any other way in DGL, except the way I mentioned, to consider many samples for a graph of a same structure?

Thank you

Does using one graph and change its ndata every batch work in your case? One possible similar scenario we’ve met is in reinforcement learning. They create graph before hand and change the features at every batch

Yes, it works for me!

How I can do this? Is there any package for this?
Which part of DGL documentation should I look at?

https://docs.dgl.ai/en/latest/generated/dgl.DGLGraph.ndata.html#dgl.DGLGraph.ndata=

As I checked, this is for heterogeneous graphs. While I am working on homogenous graphs.

The first example is for homogenous(single node type) in the above link and the second example is heterogeneous

There’s no package so far as I know. It’s just we’ve been asked with similar problems

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