divelab / DIG

A library for graph deep learning research
https://diveintographs.readthedocs.io/
GNU General Public License v3.0
1.88k stars 283 forks source link

Zero-padding in SubgraphX #15

Closed Gori-LV closed 3 years ago

Gori-LV commented 3 years ago

In SubgraphX, it is very inspiring that zero-padding is introduced.

I have the same observation that GNN is very very sensitive to topology perturbation. Thus I have some questions:

  1. Regarding setting features to be 0 - in MUTAG dataset, I suppose the default node feature 0 represents the atom is Carbon, do you set feature value to 0 in zero-padding part in a way that they actually all turn into Carbon or any other atom? (but after I think it through, I think you mean setting features all to zero given the node label is encoded in a one-hot way, such that setting zeros will deactivate the weights for node features, correct me if I'm wrong.)

  2. Compared with simply removing the nodes from the graph, how does zero-padding affect the model’s prediction in empirical study?

Thanks!

Nate1874 commented 3 years ago

Thanks for your questions.

  1. We did not use MUTAG dataset in our SubgraphX paper. For all molecular datasets, the initial node embeddings are one-hot vectors instead of original node label. Then using zero-paddings for a node will remove the node information and not contribute to its neighbor's information aggregation.

  2. We believe simply removing the nodes is not a good choice since graph data are very sensitive to the structural changes.

Gori-LV commented 3 years ago

I see, very innovative, thanks a lot!