Help with the Concept of Sampling in Graphs in DGL

I’ve been researching how the Deep Graph Library (DGL) works and I’ve gone through the documentation and several examples. However, I still don’t fully understand the concept of “sampling” in graphs. From what I’ve understand, GraphSAGE uses sampling, but I’ve also seen that there’s a function dgl.sampling.sample_neighbors(...).
Could someone please explain the idea of sampling in graphs and specifically how it is applied in DGL?

Thank you!

Sampling was proposed in the paper Inductive Representation Learning on Large Graphs. However, it has been widely adopted in GNNs to make them scalable and circumvent the problem of neighbourhood explosion while training. You can read more about neighbourhood explosion problem here [1].

1 Like

You might want to also look at this sampling tutorial in our documentation: Neighbor Sampling Overview — DGL 2.3.0 documentation