Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems that the perturbations are not updated, which is simply added into the parameters #4

Closed
cszhangzhen opened this issue May 23, 2022 · 4 comments

Comments

@cszhangzhen
Copy link

Hi,

Thanks for sharing your code.

After reading your code (simgrace.py in unsupervised TU), I found that the perturbations are not updated and they are just simply added into the GNN model's parameters. So in this case, how can you guarantee it is a positive sample? If I do not understand correctly, please correct me.

@junxia97
Copy link
Owner

Hi,

Thanks for your interest! The perturbations are updated indeed due to the the random sampling from Guassian distribution. From my perspective, the positive samples are not necessarily from data augmentations [1]. On the other hand, we set the mean of Guassian distribution as zero and std of Guassian distribution as the std of the parameters of corresponding layer in case that it will alter the semantics of original graphs too much.

[1] SimCSE: Simple Contrastive Learning of Sentence Embeddings (https://arxiv.org/abs/2104.08821, EMNLP 2021)

Best,
Jun.

@cszhangzhen
Copy link
Author

Thanks for your reply.

I understand that the perturbations are "changed" during the training procedure, but they are not updated by gradient ascent and they are randomly sampled from Gaussian distribution. To be honest, this is not consistent with what you have claimed in the paper. And, I'm not quite sure whether it can guarantee the constraint $\Vert \mathbf{x}_i^{'} - \mathbf{x}_i \Vert \le \mathbf{\epsilon}$.

@junxia97
Copy link
Owner

You mean AT-SimGRACE while I mean SimGRACE. In fact, we conduct adversarial perturbations in AT-SimGRACE. For SimGRACE, the random perturbations are sampled from Gaussian distribution. We encourage you to refer to our paper more throughly. The code of AT-SimGRACE can be found here: https://github.com/junxia97/SimGRACE/tree/main/adversarial_robustness.

@cszhangzhen
Copy link
Author

Oh, I see. AT-SimGRACE is tested on synthetic data not the TU datasets. I made a mistake and think they are implemented in TU datasets. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants