Edge predictor to learn new edges during training?

Suppose I have a graph with only a few nodes that have labels, and I want to build an edge predictor to learn the edges between unlabeled nodes and labeled nodes, then I use a classifier (e.g., GNN) to predict the label of those unlabeled nodes. Does DGL support this situation that adding/learning new edges to the input graph during training? so the augmented graph sending to the classifier will be different for each epoch.

In other words, I want to make an edge predictor transforming the information from labeled nodes to unlabeled nodes, and this might lead to adding edges into the input graph before sending it to the classifier. Each epoch the augmented graph might be different given the different predictions acquired from the edge predictor. In DGL, since in most cases we are always sending the same input graph to the model, I am wondering if DGL supports taking different augmented graphs as input for each epoch.

I am also attaching this paper here, which discusses the situation and the edge predictor: https://dl.acm.org/doi/pdf/10.1145/3447548.3467364.

Thank you in advance!

Hi, it is definitely doable. DGLGraph supports graph mutation operations such as add_nodes and add_edges. You can predict new edges, add them to the input graph and feed the augmented graph to the model again.

1 Like

Thank you for your reply. This is really helpful!