Enforce predictions to be equal to known values at specific nodes in classification/regression

Hi everyone, I am just getting started with GNNs and I apologize in advance if my question is obvious or ill-posed. Suppose that we know the label of some nodes in a classification/regression problem on a graph at test time. Is there any way of enforcing the prediction by the GNN to be exactly equal to the given label for those nodes of the graph?

To give you some context, I am trying to train a network to reproduce simulation data on a mesh similarly to what’s done in https://arxiv.org/pdf/2010.03409.pdf. Given the value of the solution at a timestep, I want to find the next solution but I would also like to exploit the fact that I know the value of the next solution at some nodes (because the boundary conditions are provided),

I would think the other way around. How about treating the known labels as inputs and formulating the problem as a completion problem, i.e., given a part of the node labels, predict the rest? In this case, you could train your model in this way: you mask away some of the node labels in the training set, and you use the rest of the labels to predict the labels you have masked.

Thanks for your suggestion, it does sound like a good idea. Just to clarify: in your view, the input of the GNN would still be a tensor with number of rows equal to the number of nodes in the graph but in which the only non masked entries (e.g., the non zero components of the tensor) correspond to the nodes with known labels?


(Minimum 20 characters)