HazyResearch / hgcn

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

How is the value of curvature set? #10

Closed AdarshMJ closed 4 years ago

AdarshMJ commented 4 years ago

Thank you for the code and its an excellent paper. My query is - how is the value of curvature set? Like the paper talks about trainable curvature, in the code, is curvature = number of layers? If yes, then the curvature value is set heuristically?

Thank you in advance!

Screenshot 2020-05-09 at 6 54 12 PM
ines-chami commented 4 years ago

In the code snippet above, n_curvatures is the number of curvature parameters in the model, which is set to the number of layers since we have one curvature parameter per-layer.

The curvatures' values are either initialized to 1.0 and learned during optimization, or they can be fixed and specified by the user with args.c.

AdarshMJ commented 4 years ago

Thank you for the information. As a follow-up question, so theoretically its possible to keep on increasing the curvature value? Is there some range of acceptable values that can be determined or is it set heuristically depending on the experiment we are doing?

ines-chami commented 4 years ago

curvatures in our code is a list with absolute curvatures' values. The absolute curvatures have to be strictly positive and can be increased for more curved spaces. Curvatures closer to zero recover the Euclidean geometry.

To avoid tuning curvatures, we learn them as model parameters (with args.c = None).

AdarshMJ commented 4 years ago

Thank you for the explanation! Thats was helpful.

jianing-sun commented 4 years ago

In the code snippet above, n_curvatures is the number of curvature parameters in the model, which is set to the number of layers since we have one curvature parameter per-layer.

The curvatures' values are either initialized to 1.0 and learned during optimization, or they can be fixed and specified by the user with args.c.

Why the curvature values have to be positive? Shouldn't we set it to a constant negative value if we use hyperbolic as the model? Poincare Ball has constant positive curvature, but hyperboloid model should have negative curvature. Correct me if I'm wrong. Thank you very much.

ines-chami commented 4 years ago

Hi, args.c in the code is used to specify the absolute curvature value.

jianing-sun commented 4 years ago

Hi, args.c in the code is used to specify the absolute curvature value.

Thank you for the reply! Then did you take its negative value to use for the hyperboloid model somewhere in the code? I didnt find it, let me know if I'm missing here.

Thanks again.

x-zb commented 3 years ago

Hi jianning, chami's response said the 'absolute curvature' should be positive, which may be the absolute value of the curvature, though I'm not sure.