You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, in debugging codes, I found that some elements in array pv could be 0 (while using WikiCS for training). After executed torch.log(), min value of s_row and s_col will be -inf, resulted in all of weights became 0. At that time, the weights was meaningless.
The text was updated successfully, but these errors were encountered:
Hi thanks for your question! We find that some nodes in the WikiCS do not have incoming edges. Therefore we slightly change the computation from edge centrality to removal weights as follows 𝑠_𝑒 = log(𝑤_𝑒 + 1) to avoid zero values when there are no incoming edges in directed graphs. Empicially we find that such a modification has no obvious impact to the performance. We will upload a new version to arXiv very soon.
drop weightis is computed according to the folllowing codes in pGRACE/functional.py :
`def pr_drop_weights(edge_index, aggr: str = 'sink', k: int = 10):
pv = compute_pr(edge_index, k=k)
pv_row = pv[edge_index[0]].to(torch.float32)
pv_col = pv[edge_index[1]].to(torch.float32)
s_row = torch.log(pv_row)
s_col = torch.log(pv_col)
if aggr == 'sink':
s = s_col
elif aggr == 'source':
s = s_row
elif aggr == 'mean':
s = (s_col + s_row) * 0.5
else:
s = s_col
weights = (s.max() - s) / (s.max() - s.mean())
However, in debugging codes, I found that some elements in array
pv
could be 0 (while using WikiCS for training). After executed torch.log(), min value ofs_row
ands_col
will be-inf
, resulted in all ofweights
became 0. At that time, the weights was meaningless.The text was updated successfully, but these errors were encountered: