"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "a9a5b14f3560596e34ce960e74ff29cc6b6a22e1"
Unverified Commit 7e49ccef authored by Muhammed Fatih BALIN's avatar Muhammed Fatih BALIN Committed by GitHub
Browse files

Update Labor sampler docs, add NeurIPS acceptance (#6369)

parent 7cc59bba
...@@ -28,8 +28,8 @@ from .base import BlockSampler ...@@ -28,8 +28,8 @@ from .base import BlockSampler
class LaborSampler(BlockSampler): class LaborSampler(BlockSampler):
"""Sampler that builds computational dependency of node representations via """Sampler that builds computational dependency of node representations via
labor sampling for multilayer GNN from labor sampling for multilayer GNN from the NeurIPS 2023 paper
`(LA)yer-neigh(BOR) Sampling: Defusing Neighborhood Explosion in GNNs `Layer-Neighbor Sampling -- Defusing Neighborhood Explosion in GNNs
<https://arxiv.org/abs/2210.13339>`__ <https://arxiv.org/abs/2210.13339>`__
This sampler will make every node gather messages from a fixed number of This sampler will make every node gather messages from a fixed number of
......
...@@ -437,8 +437,9 @@ class CSCSamplingGraph: ...@@ -437,8 +437,9 @@ class CSCSamplingGraph:
probs_name: Optional[str] = None, probs_name: Optional[str] = None,
) -> SampledSubgraphImpl: ) -> SampledSubgraphImpl:
"""Sample neighboring edges of the given nodes and return the induced """Sample neighboring edges of the given nodes and return the induced
subgraph via layer-neighbor sampling from arXiv:2210.13339: subgraph via layer-neighbor sampling from the NeurIPS 2023 paper
"Layer-Neighbor Sampling -- Defusing Neighborhood Explosion in GNNs" `Layer-Neighbor Sampling -- Defusing Neighborhood Explosion in GNNs
<https://arxiv.org/abs/2210.13339>`__
Parameters Parameters
---------- ----------
......
...@@ -122,6 +122,11 @@ class NeighborSampler(SubgraphSampler): ...@@ -122,6 +122,11 @@ class NeighborSampler(SubgraphSampler):
@functional_datapipe("sample_layer_neighbor") @functional_datapipe("sample_layer_neighbor")
class LayerNeighborSampler(NeighborSampler): class LayerNeighborSampler(NeighborSampler):
""" """
Sampler that builds computational dependency of node representations via
labor sampling for multilayer GNN from the NeurIPS 2023 paper
`Layer-Neighbor Sampling -- Defusing Neighborhood Explosion in GNNs
<https://arxiv.org/abs/2210.13339>`__
Layer-Neighbor sampler is responsible for sampling a subgraph from given Layer-Neighbor sampler is responsible for sampling a subgraph from given
data. It returns an induced subgraph along with compacted information. In data. It returns an induced subgraph along with compacted information. In
the context of a node classification task, the neighbor sampler directly the context of a node classification task, the neighbor sampler directly
...@@ -131,10 +136,13 @@ class LayerNeighborSampler(NeighborSampler): ...@@ -131,10 +136,13 @@ class LayerNeighborSampler(NeighborSampler):
positive and negative node pairs, and employs these nodes as the seed nodes positive and negative node pairs, and employs these nodes as the seed nodes
for subsequent steps. for subsequent steps.
Implements the approach described in https://arxiv.org/abs/2210.13339, Implements the approach described in Appendix A.3 of the paper. Similar to
Appendix A.3. Similar to dgl.dataloading.LaborSampler but this uses dgl.dataloading.LaborSampler but this uses sequential poisson sampling
sequential poisson sampling instead of poisson sampling to keep the count instead of poisson sampling to keep the count of sampled edges per vertex
of sampled edges per vertex deterministic. deterministic like NeighborSampler. Thus, it is a drop-in replacement for
NeighborSampler. However, unlike NeighborSampler, it samples fewer vertices
and edges for multilayer GNN scenario without harming convergence speed with
respect to training iterations.
""" """
def __init__( def __init__(
......
...@@ -44,9 +44,9 @@ def sample_labors( ...@@ -44,9 +44,9 @@ def sample_labors(
output_device=None, output_device=None,
): ):
"""Sampler that builds computational dependency of node representations via """Sampler that builds computational dependency of node representations via
labor sampling for multilayer GNN from labor sampling for multilayer GNN from the NeurIPS 2023 paper
`(LA)yer-neigh(BOR) Sampling: Defusing Neighborhood Explosion in GNNs `Layer-Neighbor Sampling -- Defusing Neighborhood Explosion in GNNs
<https://arxiv.org/abs/2210.13339>` <https://arxiv.org/abs/2210.13339>`__
This sampler will make every node gather messages from a fixed number of neighbors This sampler will make every node gather messages from a fixed number of neighbors
per edge type. The neighbors are picked uniformly with default parameters. For every vertex t per edge type. The neighbors are picked uniformly with default parameters. For every vertex t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment