Learning nodes and edges characteristics

Hi all,

I need some suggestions for my graph problem.
I have a graph with nodes that represent words. I have labelled all the nodes with 5 categories/classes and each node is also annotated with some features (e.g. a number of letters, numerics, and symbols, size of fonts, etc). All the edges in my graph are labelled with some weight too.

My question is, how can I create a model to learn/extract characteristics (or relationship) between categories/classes in my graph?
So that if I have an unlabelled graph, the model can predict which node belongs to which classes.
A simple line of codes/flowchart as an example can hugely help me too.

Thanks a lot all and sorry if this seems trivial for some of you.

best

Hi, did you check our example of GCN, which essentially performs the node classification task you described here.

Thanks @mufeili for the response. I tried the example before which (I think) is similar to https://docs.dgl.ai/tutorials/basics/1_first.html#step-3-define-a-graph-convolutional-network-gcn.

But my understanding is the example only considers the structure of the graph (e.g. the number of neighbours, neighbours of neighbours), and not the features in the node itself (e.g. text size, how many symbols in the node, etc.). Correct me if I’m wrong.

So, is it possible to incorporate the features of node too into GCN?

Thanks so much @mufeili.

The example is slightly different from the tutorial, where we do use the node features in place of inputs in the tutorial.