Implementing graph embeddings to the NetworkX ecosystem #8378
Replies: 2 comments 4 replies
-
|
Interesting. I am not an expert in those algorithms -- though I have used e.g. We do have some embedding tools, but they mostly focus on 2D embeddings (drawing layouts). And we have some tools for higher dimensional embeddings, but nothing like the focus on high-dimensional embeddings that comes from the machine learning applications. Is that where these algorithms come from? I have a healthy respect for the mathematics behind the problems of approximating probabilities and generating random walks which these seem to rely on. It may be that getting them to work well is difficult enough to justify them being in separate libraries from networkx. That said, I am guessing a library that focused on embedding algorithms would be quite popular if only because people would have a go-to-library rather than having to try each of the tools out separately. And yes, it could be built on top of networkx (with probably many other tools from the Scientific Python toolset). A quick search shows a few existing discussions and repos that implement node2vec acting on a networkx graph. It might be worth spending some time looking through the current ecosystem to see where your efforts can give the biggest payoff. Building a library that brings together those algorithms may be something that others are willing to help out with. I can also imagine that some tooling in networkx would help those efforts. If you find something like that, we are interested in adding features to NetworkX which make constructing and combining these algorithms easier. But it feels like this is better as an upstream project rather than being housed in networkx. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much for the thoughtful reply and for explaining the scope so clearly. I would be interested in contributing graph tooling that can support machine learning workflows on top of NetworkX. For example a general random walk and sampling utility that supports weighted and biased walks and can be reused by node2vec and related methods link prediction experiments and other stochastic simulations on graphs. If this sort of tooling seems within scope for NetworkX I would love to prepare a small concrete proposal around random walk and sampling helpers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi NetworkX maintainers and community
I would like to contribute classic node embedding baselines to the NetworkX ecosystem.
Many users build graphs in NetworkX and then need embeddings for clustering, link prediction, or node classification, but today they must jump to external libraries, which fragments the workflow.
I am interested in implementing DeepWalk, node2vec, LINE, HOPE, GraRep, NetMF, and a Laplacian Eigenmaps style embedding function, behind a small consistent API that takes a NetworkX graph and returns an embedding matrix or dict, with optional SciPy or gensim dependencies where appropriate.
If this fits the project scope, I would love guidance on whether this belongs in core or as an affiliated package, and what API and testing expectations I should follow. I am happy to iterate with maintainers.
Beta Was this translation helpful? Give feedback.
All reactions