zealscott / HAKG

Source code for HAKG: Hierarchy-Aware Knowledge Gated Network for Recommendation. SIGIR 2022.
https://arxiv.org/abs/2204.04959
Apache License 2.0
27 stars 3 forks source link

公式(7)与代码实现疑问? #3

Closed sanyu6 closed 2 years ago

sanyu6 commented 2 years ago

你好,我注意到你在庞加莱圆盘模型上计算实体embedding时,论文中公式是: image 这里说明embedding是在圆盘上面的,而你代码上面: image 我直观上理解为: 每次计算时都将嵌入先投影到圆盘模型上面,然后进行Mobius addition,再投回切空间进行聚合,这样的话其实实体embedding结果不应该还是在切空间吗?这样和论文里的公式是不是有点不符合

zealscott commented 2 years ago

Hi SunYu,

We map the embedding into the hyperbolic space for Mobius addition (context aggregation), and then map back them into tangent space for optimization. We describle our optimization details in sec 4.1.4.

In fact, you are free to choose to initialize the embeddings in Eculidean space or hyperbolic space. Due to the precision issue, the performance can be different a little bit (but very marginal). You can try it on with hyperbolic optimization technique, like Riemannian SGD.

sanyu6 commented 2 years ago

thanks