Shen-Lab / GraphCL

[NeurIPS 2020] "Graph Contrastive Learning with Augmentations" by Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, Yang Shen
MIT License
547 stars 103 forks source link

Bug Report of permute_edges in unsupervised_TU #7

Closed Somedaywilldo closed 3 years ago

Somedaywilldo commented 3 years ago

Dear Authors,

The permute_edges in unsupervised_TU/aug.py is not adding the edges, the "idx_add" variable is not used. https://github.com/Shen-Lab/GraphCL/blob/aedd92a049af1a9fb591d7dc2f1ab4260e9048e4/unsupervised_TU/aug.py#L330

I think your implementation in semisupervised_TU is correct, so may I ask why there are different implementations, why not just use a same set of augmentation implementation and just import them in different tasks? https://github.com/Shen-Lab/GraphCL/blob/aedd92a049af1a9fb591d7dc2f1ab4260e9048e4/semisupervised_TU/pre-training/tu_dataset.py#L211

yyou1996 commented 3 years ago

Hi @Somedaywilldo,

Thanks for pointing it out. I double check the original messy code for unsupervised_TU/aug.py and found that you are right, it is not entire same implementation as semisupervised_TU. Since unsupervised_TU was performed much more earlier than others for proof of concept experiments, the implementation way might somehow differ, leading to some inconsistence, while I think the rest semisupervised_TU, transfer_learning and adversarial_robustness experiments should be consistent. Another thing is that you can try to replace line 343 with line 342 in https://github.com/Shen-Lab/GraphCL/blob/master/unsupervised_TU/aug.py and this should make the same implementation, and I feel the results should be similar

Somedaywilldo commented 3 years ago

Thank you!