Explainability of Link prediction in Heterogeneous Graph #7738
Replies: 3 comments 3 replies
-
I guess you are creating negative edges by setting the edge_label of some edges to 0. This is necessary for the IntegratedGradients algorithm to work, as it needs to be able to explain both positive and negative predictions. The error you are getting is because the IntegratedGradients algorithm expects the output of the model to be a 2D tensor. In your case, the output of the model is a 1D tensor, which is not supported by the algorithm. you can add a final linear layer to the model that maps the output of the 1D tensor to a 2D tensor.
|
Beta Was this translation helpful? Give feedback.
-
Also regarding negative edges, I am not sure how to create and where |
Beta Was this translation helpful? Give feedback.
-
This seems to be the same issue as #7702. Closing as duplicate. Feel free to re-open if that is not the case. We will try to fix this ASAP. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, I need your help. I'm trying to apply Captum explainer to link prediction on a heterogeneous graph to predict the existence or not of an edge. I started from the example provided in MovieLens and modified it because the objective in the example is regression. I have two main concerns: 1. Is the model I adopted suitable for link prediction to predict the existence or not of an edge? 2. Am I creating negative edges? Otherwise, I think it won't work well. I'm attaching model, training and evaluation and error I receive when apply explainer to model. The link to the Colab notebook is as follows: https://colab.research.google.com/drive/14DrEMHGgNCEc1xOVTKvkdjF01IitmZG6?usp=sharing . I appreciate any suggestions and advice on what to do.
Model:
Training and evaluation:
Explain:
Error:
AssertionError: Output must be 2D to select tensor of targets.
Beta Was this translation helpful? Give feedback.
All reactions