Using different feature vectors for different nodes in GNNs?

Lets say you have a graph, that there are two types of nodes, type 1 has 500 dimension feature vectors and type 2 has 200 dimension feature vectors, and they are completely different.

is there any GNN that can help me work with such graph? i read about RGCN but based on what i understood, it seems like it doesn’t work if the features for different types of nodes are completely different.

The most straightforward way is to use two linear layers to first project the features of type-1 nodes and type-2 nodes to tensors of a same size. You can then use them as in normal GNNs.

You can refer to https://github.com/dmlc/dgl/blob/a3d86376d94687f5b87f1073a2d604b47c889d9e/examples/pytorch/rgcn/model.py#L51 for how to deal with nodes with different input feature size.

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