HazyResearch / hgcn

Hyperbolic Graph Convolutional Networks in PyTorch.
583 stars 107 forks source link

Where does the proj(x, c) function in "hyperboloid" come from? #34

Open hujilin1229 opened 2 years ago

hujilin1229 commented 2 years ago

Hi,

Thanks for sharing the code for your paper. I have read your paper and code, but the implementation of proj(x, c) function in "hyperboloid" confuses me. As far as I understanding from your paper of Eq. 5, the point is already being projected to the Hyperboloid space when you do the "expmap0" operation. But why do you need to do twice "proj" operations after the operation of Eq. 5? And Where does this "proj" operation come from? I can find a similar equation in your appendix, which is Eq. 16, but this is from Euclidean space to Hyperboloid space, right?

Kind Regards, Jilin

ruilialice commented 2 years ago

Hi, you could read the paper here. Formula (6) in this paper says that if x has (n+1) dimension, and x is in hyperboloid manifold, then x has the constraint of (6). The "proj" operation in hyperboloid only make sure that x satisfies the above constraint. Eq. 16 in the appendix of Hyperbolic Graph Convolutional Neural Networks actually refers to the same thing. Eq. 16 means that x is a vector that has (d+1) dimensions, and we can project x on the d dimensional hyperboloid manifold through Eq. 16. It doesn't mean that x is in Euclidean space with d+1 dimensions, and we use Eq. 16 to project x from the Euclidean space to Hyperboloid space. The R^{d+1} only means the dimension is (d+1), it doesn't mean that x is in Euclidean space. The "R" here is a little bit misleading.

By the way, although "proj" operation is called twice, I feel that the result is the same. Comparing with the result that proj is called only once, the result is the same if proj is called twice.