DeepGraphLearning / KnowledgeGraphEmbedding

MIT License
1.24k stars 264 forks source link

N-1 and 1-N relations #45

Closed Walker-ZD closed 3 years ago

Walker-ZD commented 3 years ago

  Thanks for your work,I'm a beginner of KGE.   While reading this paper,I have a problem: for N-1 relation r, it should be x1· r = y and x2· r = y,r corresponds to a counterclockwise rotation, so x1 is close to x2 , which has the same issue with TransE.   I'm not sure whether my understanding is true, it seems that RotatE can't model N-1 relation and 1-N relation properly.   Looking forword to your reply, thank you.

Edward-Sun commented 3 years ago

Yes, RotatE doesn't consider N-1 and 1-N relations.

Walker-ZD commented 3 years ago

Yes, RotatE doesn't consider N-1 and 1-N relations.

  Thanks for your reply. Now I wonder if there is a method to visualize RotatE.   For example, if I train a dataset with TransE, maybe the dimension is 100. Then, for every entity vector, I can use t-SNE to reduce their dimension to 2 and plot these entity vectors in plane coordinate system. Theoretically, if two entities have similar meanings, they are close in plane coordinate system. It works in my experiment, and there are many clusters in picture.   Considering that RotatE is constructed in complex space, each dimension includes real and imaginary parts. Maybe an n-dimension entity vector is stored in this form: [re1, re2, ......, ren, im1, im2, ......, imn ], which can not directly use t-SNE to reduce dimision.   I try to reduce the dimension of real and imaginary parts to 1 separately, and then plot them in plane coordinate system, but it's not work, maybe too much information was lost. Do you have any ideas? Thank you.

Edward-Sun commented 3 years ago

I think you should concatenate the dimension of real and imaginary and project it to 2.