flyingdoog / PGExplainer

Parameterized Explainer for Graph Neural Network
128 stars 15 forks source link

About the readout operation in graph classification #6

Closed Radical3-HeZhang closed 3 years ago

Radical3-HeZhang commented 3 years ago

Dear author,

I hit upon that it seems like the global pooling operation in graph classification is on the wrong axis. For example, when reading out the "out" ( graph_num, node_size, fea_num) with axis=-1, the resulting shape is (graph_num, node_size) but not the desired (graph_num, fea_num).

flyingdoog commented 3 years ago

Thanks for report the bug. I have fixed it and will update the explamlar usage later.

Radical3-HeZhang commented 3 years ago

The BA-2motifs.ipynb seems like unavailable now. The modification from axis=-1 to axis=1 raises new ValueError: Tensor's shape (50, 2) is not compatible with supplied shape [40, 2].

flyingdoog commented 3 years ago

Just delete the saved GNN model and re-run the train-BA-2motifs to get an updated GNN model for the explanation.

Radical3-HeZhang commented 3 years ago

re-run the train_BA-2motif seems don't work well in acc items image

flyingdoog commented 3 years ago

I have fixed it, please refer to the updated train_BA-2motifs and BA-2motifs.

The reason is that the early_stop should be large in order to get an accurate GNN model.

I am now working on the MUTAG dataset and will update it later.

Radical3-HeZhang commented 3 years ago

I have fixed it, please refer to the updated train_BA-2motifs and BA-2motifs.

The reason is that the early_stop should be large in order to get an accurate GNN model.

I am now working on the MUTAG dataset and will update it later.

Thanks for the quick reply. But it seems like the BA-2motifs don't work well in terms of AUC after the modification. image

flyingdoog commented 3 years ago

Did you delete the saved checkpoint file and re-run both train-BA-2motifs and BA-2motifs? I have updated my results in BA-2motifs.ipynb and it's correct.

Radical3-HeZhang commented 3 years ago

I just re-download the whole code and try to reproduce the result. Did you have finished the update of BA-2motifs? It seems like it is the BA-2motif but not BA-2motifs is updated. image And I also find the error below when run BA-2motif in cell 9 image

flyingdoog commented 3 years ago

Sorry for the late response late. I have fixed it and upload the files.
Actually, you can just delete ori_pred in line 18 and it will work.

flyingdoog commented 3 years ago

Since this issue has been solved, I will close it. Any comments are welcomed.