Open theodorju opened 1 year ago
I spent some time looking into this, but I don't have a good answer yet. scipy.eigs
/scipy.eigsh
uses ARPACK internally, which is generally not that good at finding small eigenvalues. It also will create a random starting vector which will prevent determinism. The original code uses numpy
for eigenvector computation, see https://github.com/graphdeeplearning/benchmarking-gnns/blob/b6c407712fa576e9699555e1e035d1e327ccae6c/data/CSL.py#L205, which does not have these problems but is way slower in general. I am not sure if we should swap to this by default due to memory constraints. Maybe we can make it an option in the transform?
Hi @rusty1s, thanks for looking into this. Making it an option in the transform (maybe with a user warning regarding execution time overhead) sounds like a good idea to me.
I agree. Do you wanna give it a try? Otherwise, I can take a look. Just let me know.
Sure, I could give it a try.
Laplacian Eigenvector PE is not deterministic, i.e. it produces different encodings when applied to the same graph at different times even with everything seeded.
This is a code that reproduces it:
Environment
conda
,pip
, source): pip.torch-scatter
): None.