-
Notifications
You must be signed in to change notification settings - Fork 17
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
The SSGC computation is not exactly right #3
Comments
Thank you very much for your help! You have no idea what's a big favour for me. Let me answer some questions.
and I checked there is no problem with the inplace issue in the debug setting of Pycharm.
|
Thanks for your kindly reply. You are right, and I totally agree with you about "SGC and SSGC are susceptible to weights decay", which also includes learning rate. Looking forward to your update on the code :). |
btw, because this code only involved in the parameter analysis I redo the experiments and found cora 83.5 citeseer 74.0 pubmed 80.2. |
Update: I see the following was discussed in #2 as well. @allenhaozhu can you confirm which version of the code you used for the results in the paper? If we assume the += issue is resolved (i.e. we use
Given that In my view, both the version that's currently in master (and posted in the comments above, not the OP - repeated below with formatting) are consistent with the paper. def sgc_precompute(features, adj, degree, alpha):
t = perf_counter()
feature_ori = features
feature_set = torch.zeros_like(features)
for i in range(degree):
features = torch.spmm(adj, features)
feature_set += (1-alpha)*features + alpha*feature_ori
# feature_set/=degree+1
feature_set /= degree #build for PPNA like 0.15 for cora and citeseer
precompute_time = perf_counter()-t
return feature_set, precompute_time |
Hi, allenhaozhu.
I have read your paper and the code, but I found that the SSGC computation is not exactly right, where
emb += features
is an inplaced operation and it will change the value offeatures
asemb = features
.It is better to replace it with
emb = emb + features
.SSGC/utils.py
Lines 93 to 103 in 7ecaf25
I did it and the accuracy on Cora was increased from 0.830 to 0.835, but it was decreased from 0.734 to 0.733 and 0.806 to 0.796 on Citeseer and Pubmed, respectively.
The text was updated successfully, but these errors were encountered: