SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.12403 · ICML · 2023

Cooperative Minibatching in Graph Neural Networks

Muhammed Fatih Balın, Dominique Lasalle, Ümit Çatalyürek

arXiv · PDF · Open in the Atlas

Code that ran

1 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.12403.json · badge: /api/ran/2310.12403.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
gt-tdalab/dgl-coop application (classifier label)
classifier basis: classifier_2025
1 ran · 8 no recorded run
FunctionStatusWhere it lives
LazyFeature Ran
ran on a synthesized input · constructed an object; no result was computed
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("6ff1ab6414e7e081")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned LazyFeature: the class was constructed and called, and the call returned an instance of its own class. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

class LazyFeature(object):
    """Placeholder for feature prefetching.

    One can assign this object to ``ndata`` or ``edata`` of the graphs returned by various
    samplers' :attr:`sample` method.  When DGL's dataloader receives the subgraphs
    returned by the sampler, it will automatically look up all the ``ndata`` and ``edata``
    whose data is a LazyFeature, replacing them with the actual data of the corresponding
    nodes/edges from the original graph instead.  In particular, for a subgraph returned
    by the sampler has a LazyFeature with name ``k`` in ``subgraph.ndata[key]``:

    .. code:: python

       subgraph.ndata[key] = LazyFeature(k)

    Assuming that ``graph`` is the original graph, DGL's dataloader will perform

    .. code:: python

       subgraph.ndata[key] = graph.ndata[k][subgraph.ndata[dgl.NID]]

    DGL dataloader performs similar replacement for ``edata``.
    For heterogeneous graphs, the replacement is:

    .. code:: python

       subgraph.nodes[ntype].data[key] = graph.nodes[ntype].data[k][
           subgraph.nodes[ntype].data[dgl.NID]]

    For MFGs' ``srcdata`` (and similarly ``dstdata``), the replacement is

    .. code:: python

       mfg.srcdata[key] = graph.ndata[k][mfg.srcdata[dgl.NID]]

    Parameters
    ----------
    name : str
        The name of the data in the original graph.
    id_ : Tensor, optional
        The ID tensor.
    """
    __slots__ = ['name', 'id_']

    def __init__(self, name=None, id_=None):
        self.name = name
        self.id_ = id_

    def to(self, *args, **kwargs):
        """No-op.  For compatibility of :meth:`Frame.to` method."""
        return self

    @property
    def data(self):
        """No-op.  For compatibility of :meth:`Frame.__repr__` method."""
        return self

    def pin_memory_(self):
        """No-op.  For compatibility of :meth:`Frame.pin_memory_` method."""

    def unpin_memory_(self):
        """No-op.  For compatibility of :meth:`Frame.unpin_memory_` method."""

    def record_stream(self, stream):
        """No-op.  For compatibility of :meth:`Frame.record_stream` method."""


INIT_ARGS = {
    'name': 'feature_x',
    'id_': torch.tensor([0, 1, 2, 3], dtype=torch.int64)
}

ARGS = {
    'args': ('cpu',),
    'kwargs': {}
}

METHOD = 'to'

if __name__ == '__main__':
    lazy_feature = LazyFeature(**INIT_ARGS)
    result = lazy_feature.to(*ARGS['args'], **ARGS['kwargs'])
    print(f"LazyFeature name: {lazy_feature.name}")
    print(f"LazyFeature id_: {lazy_feature.id_}")
    print(f"to() result is same object: {result is lazy_feature}")
    print(f"data property: {lazy_feature.data}")
    lazy_feature.pin_memory_()
    lazy_feature.unpin_memory_()
    lazy_feature.record_stream(None)
    print("All methods executed successfully")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LazyFeature — the call returned an instance of its own class, which has no array shape; none is stated — the instrument coerces any output to an array; for a LazyFeature output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
BlockSampler Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("de458b1316b1fe0a")
How it ran

no invocation recorded.

LaborSampler Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("9c87070ebf6e4293")
How it ran

no invocation recorded.

Sampler Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("228613fed63ef133")
How it ran

no invocation recorded.

_set_lazy_features Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("ff1a37b98c3aa234")
How it ran

no invocation recorded.

choice Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("7dc7bd1ca50e4bf6")
How it ran

no invocation recorded.

set_dst_lazy_features Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("b1bea8639ec3c94d")
How it ran

no invocation recorded.

set_edge_lazy_features Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("807604b26b54e099")
How it ran

no invocation recorded.

set_src_lazy_features Not yet run
unverified (harvested, no recorded run)
gt-tdalab/dgl-coop/python/dgl/dataloading/labor_sampler.py
code served (permissive licence) · get_code("a6432514a13e95ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Training large scale Graph Neural Networks (GNNs) requires significant computational resources, and the process is highly data-intensive. One of the most effective ways to reduce resource requirements is minibatch training coupled with graph sampling. GNNs have the unique property that items in a minibatch have overlapping data. However, the commonly implemented Independent Minibatching approach assigns each Processing Element (PE, i.e., cores and/or GPUs) its own minibatch to process, leading to duplicated computations and input data access across PEs. This amplifies the Neighborhood Explosion Phenomenon (NEP), which is the main bottleneck limiting scaling. To reduce the effects of NEP in the multi-PE setting, we propose a new approach called Cooperative Minibatching. Our approach capitalizes on the fact that the size of the sampled subgraph is a concave function of the batch size, leading to significant reductions in the amount of work as batch sizes increase. Hence, it is favorable for processors equipped with a fast interconnect to work on a large minibatch together as a single larger processor, instead of working on separate smaller minibatches, even though global batch size is identical. We also show how to take advantage of the same phenomenon in serial execution by generating dependent consecutive minibatches. Our experimental evaluations show up to 4x bandwidth savings for fetching vertex embeddings, by simply increasing this dependency without harming model convergence. Combining our proposed approaches, we achieve up to 64% speedup over Independent Minibatching on single-node multi-GPU systems, using same resources.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.12403")
get_code_for_paper("2310.12403")
have("2310.12403")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.12403.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.12403.svg)](https://syntology.ai/paper/2310.12403)

Connect an agent — have() is free.