-
Hi, I tried the tutorials for XAI, however, although PyG has been renewed, the tutorials of GNN has not been renewed yet. The example offered in this blog post has been deleted. https://medium.com/@pytorch_geometric/graph-machine-learning-explainability-with-pyg-ff13cffc23c2 This is the code I used to construct the GNN on MUTAG dataset. https://colab.research.google.com/drive/1fLJbFPz0yMCQg81DdCP5I8jXw9LoggKO?usp=sharing Then I applied code comes from the blog post: from torch_geometric.explain import Explainer, GNNExplainer
# Initialize explainer
explainer = Explainer(
model=model,
algorithm=GNNExplainer(epochs=200),
explanation_type='model',
node_mask_type='attributes',
edge_mask_type='object',
model_config=dict(
mode='multiclass_classification',
task_level='node',
return_type='log_probs',
),
) It couldn't offer explanation for me. Could you please offer examples of GNNExplainer for graph classification problem? Besides, could you please let me know how to visualize the subgraph of explanation? Thank you! -David |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Check out the example here. You need to call |
Beta Was this translation helpful? Give feedback.
Check out the example here. You need to call
visualize_graph
to visualize the explanations.