Time to event (survival) prediction using GNNs

Hi! I wanted to bring a discussion to the forum regarding the possibility of doing graph level prediction and, in this case, survival (or time to event) prediction.

Has someone tried it before? Any suggestions? I’ve seen some examples using CNNs in pytorch (this one for example) but I am struggling to make it work with graphs.

Thanks in advance!

DGL has temporal graph examples as:

What is the task you are working on? From what I understand of survival prediction, it is a link prediction or a edge regression task rather than a graph classification task. Examples include Know-Evolve and DyRep.

Thanks so much @VoVAllen and @BarclayII for your help! I think I didn’t explain myself correctly. I am not doing spatial evolution of graphs :frowning: I have different graphs (only one time point) whose labels are survival times (i.e. if the event happens and how long it takes for the event to happen).

So I would like to use GNNs to predict that. I thought it would be as “simple” as replacing the BinaryCrossEntropy loss from classification to a LogisticHazard or Cox-like loss but I ran into some issues when coding it. Have you seen someone doing something similar? I would be really happy to hear any suggestions :blush:

Indeed it should be, as it is just a kind of regression (dgl-lifesci package offers some graph-level regression, for molecules though). What was your issue?

Dear @BarclayII and @VoVAllen , thanks for your suggestions and help! Indeed, it was not a difficult task. I have been working on it a bit these days and got it working. You can check the notebook in here in case it is relevant for the community :smiley: (kudos to havakv that iterated over it)

Fantastic! Thanks for your effort!