Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about graph embedding spaces #53

Open
matentzn opened this issue Jun 19, 2022 · 8 comments
Open

Question about graph embedding spaces #53

matentzn opened this issue Jun 19, 2022 · 8 comments

Comments

@matentzn
Copy link

Hey all, working on our RPPR aims and I stumbled across the following question. Lets say we have this graph here:

image

I am assuming now that in KG-embedding space (word and graph embeddings), all three species-specific eyes have the same distance from each other - correct me if this assumption is wrong.

If I now were to layer on top this graph another graph:

image

Am I correct in assuming that this would result in Monkey and Human eyes being closer in embedding space than Human and Bird eyes? Thank you for you help :)

@LucaCappelletti94
Copy link

Yes, generally speaking that should hold true for most topological embedding methods. We can test this experimentally rather easily, I'll try it out later this afternoon.

@LucaCappelletti94
Copy link

Should I close this issue?

@matentzn
Copy link
Author

Did you verify this experimentally, can you share the cosine similarity scores before and after?

@LucaCappelletti94
Copy link

Ah yes, sorry my brain skipped a bit. On it!

@LucaCappelletti94
Copy link

Ok so, so after having run a wide range of embeddings, I can say that there is no statistical difference.

More specifically:

  • I have run SkipGram, CBOW, GloVe and TransE from Ensmallen
  • I have run TransE and BoxE from PyKeen

In the small original graph, the nodes are all equally far apart. In the second graph, the cosine similarities change but not in a constant manner. In some runs and embeddings, the bird eye is closer than the human or monkey eye. I think it boils down to the fact that the three nodes have the same minimum path between each other, and that is what influences most the embedding, more than any other connection can.

@matentzn
Copy link
Author

Ahhhh very unfortunate! :/ I was hoping to be able to trick graph embeddings into being able to recognise taxonomic distance.. THANK you for checking.

@caufieldjh
Copy link
Contributor

What if we embed without the edges between "(species) eye" and "metazoan eye"?

@matentzn
Copy link
Author

I think this would be a big hack.. The edges do matter when you have a massive ontology like uPheno.. Maybe they would decrease in importance if the example was somewhat larger..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants