Consecutive edge prediction and classification tasks on the same dataset

I’m working on a problem that requires two GNN tasks: first link prediction and then edge classification of the previously predicted edges. Would it be possible to first perform a link prediction task and then use the same data with the newly predicted edges and pass it on to an edge classification tasks? What would be the best way to do it?

Hi, this is entirely possible. You could use the add_edges API to include the newly predicted edges and pass the new graph to the edge classification model.

Thanks, I’m not sure where the transition between the tasks should take place, though. Using those two tutorials as an example (Link prediction and Edge classification), where would the add_edges API be implemented and how should the graph be passed on?

Once you have a model trained for link prediction, you can use this model to score node pairs for link prediction. You can take the node pairs whose score exceeds a threshold and treat them as the predicted edges. You can then use add_edges to add these new edges to the original graph.

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