Hacker News new | ask | show | jobs
by 101101001010 1999 days ago
They serve different purposes. PyTorch-BigGraph (BG) implements a set of algorithms for learning node embeddings (vector representations of each node in the graph) based on the edges (relations) present on a single graph.

dgl is a library for graph neural networks (GNNs). The algorithms present in BG can be implemented in dgl, albeit much less efficiently but the reverse might not be true.

More specifically GNNs are a set of methods based on what is called "Message Passing" algorithm, where the embedding of each node is a function (parameterized over the model weights) of its neighborhood and the edges that connect the node to it.

Additionally GNNs target learning functions that work on multiple graphs for example graphs of molecules to predict their properties, not just a single graph.

dgl can be compared to PyTorch Geometric. The former works on both TF 2.0 and Pytorch while the latter is only for PyTorch.

Both are almost equivalent, although dgl has some institutions backing it. PyTorch Geometric might feel a bit more lightweight to integrate in existing codebases.