Skip to content

graphnetz.datasets

The catalogue: loader functions organised by research category and task type. Every loader returns a PyTorch Geometric dataset, so anything in the catalogue can be handed straight to run_benchmark.

Three different counts

The catalogue contains 62 loaders (57 without the optional ogb extra); validate_loaders reports how many currently load end to end; and a subset is promoted to curated benchmark tasks in BENCHMARK_TASKS. See Dataset taxonomy.

Registry

datasets

Dataset registry, organized by research category and task.

Each category exposes thin loader functions that return a torch_geometric dataset (PyG built-in or Netz). The LOADER_REGISTRY table maps every loader to its category and the task it can serve, mirroring the structure used by BENCHMARK_TASKS ([category][task_type] -> [...]).

Categories
  • combinatorial: synthetic TSP, VRP, max-cut, max-flow, matching, coloring.
  • biology: MUTAG, PROTEINS, ENZYMES, PPI, Peptides (LRGB), C. elegans, connectomes, contact networks.
  • social: Cora, CiteSeer, PubMed, WikiCS, Heterophilous (Roman-empire, Amazon-ratings, Minesweeper, Tolokers, Questions), Karate, ego networks.
  • knowledge: FB15k-237, WordNet18-RR, Netz WordNet.
  • infrastructure: power grids, road and air networks.
  • finance: product space, board interlocks, patents, Elliptic Bitcoin.
  • computing: AS topology, Skitter, BGP route views.
  • vision: MNIST/CIFAR10 superpixel graphs, ModelNet.
  • physics: QM9, ZINC, Ising lattice.
  • security: terrorist association networks, MalNet-Tiny.
Tasks

node_cls, graph_cls, graph_reg, link_pred. A loader may serve more than one task type (e.g. cora is used for both node_cls and link_pred). Deep Graph Infomax is not a task: it is a self-supervised training objective whose metric is its own loss, so the benchmark routes unlabelled graphs through link_pred (a real held-out edge split with an AUC metric) instead. train_dgi and the DGIWrapper adapter remain available as utilities for users who want unsupervised pre-training on top of any encoder.

Functions:

Name Description
list_datasets

Return loader names organized by category and task.

Attributes:

Name Type Description
LOADER_REGISTRY dict[str, dict[str, list[tuple[str, object]]]]
CATEGORIES

Mapping of category name to the dataset module that implements it.

LOADER_REGISTRY module-attribute

LOADER_REGISTRY: dict[str, dict[str, list[tuple[str, object]]]] = {
    "combinatorial": {
        "link_pred": [
            ("random_bipartite_matching", combinatorial.random_bipartite_matching),
            ("random_tsp", combinatorial.random_tsp),
            ("random_vrp", combinatorial.random_vrp),
            ("random_coloring", combinatorial.random_coloring),
            ("random_maxcut", combinatorial.random_maxcut),
            ("random_maxflow", combinatorial.random_maxflow),
        ]
    },
    "biology": {
        "graph_cls": [
            ("mutag", biology.mutag),
            ("proteins", biology.proteins),
            ("enzymes", biology.enzymes),
            ("peptides_func", biology.peptides_func),
        ],
        "graph_reg": [("peptides_struct", biology.peptides_struct)],
        "link_pred": [
            ("celegans", biology.celegans),
            ("budapest_connectome", biology.budapest_connectome),
            ("hospital_contacts", biology.hospital_contacts),
            ("high_school_contacts", biology.high_school_contacts),
            ("ppi", biology.ppi),
        ],
    },
    "social": {
        "node_cls": [
            ("cora", social.cora),
            ("citeseer", social.citeseer),
            ("pubmed", social.pubmed),
            ("wikics", social.wikics),
            ("roman_empire", social.roman_empire),
            ("amazon_ratings", social.amazon_ratings),
            ("minesweeper", social.minesweeper),
            ("tolokers", social.tolokers),
            ("questions", social.questions),
        ],
        "link_pred": [
            ("cora", social.cora),
            ("citeseer", social.citeseer),
            ("pubmed", social.pubmed),
            ("movielens100k", social.movielens100k),
            ("karate", social.karate),
            ("facebook_friends", social.facebook_friends),
            ("dblp_coauthor", social.dblp_coauthor),
            ("dnc_emails", social.dnc_emails),
        ],
    },
    "knowledge": {
        "link_pred": [
            ("fb15k_237", knowledge.fb15k_237),
            ("wordnet18rr", knowledge.wordnet18rr),
            ("wordnet_netz", knowledge.wordnet_netz),
        ]
    },
    "infrastructure": {
        "link_pred": [
            ("power_grid", infrastructure.power_grid),
            ("euroroad", infrastructure.euroroad),
            ("us_roads", infrastructure.us_roads),
            ("eu_airlines", infrastructure.eu_airlines),
            ("london_transport", infrastructure.london_transport),
            ("urban_streets", infrastructure.urban_streets),
        ]
    },
    "finance": {
        "node_cls": [("elliptic_bitcoin", finance.elliptic_bitcoin)],
        "link_pred": [
            ("product_space", finance.product_space),
            ("board_directors", finance.board_directors),
            ("us_patents", finance.us_patents),
        ],
    },
    "computing": {
        "link_pred": [
            ("internet_as", computing.internet_as),
            ("topology", computing.topology),
            ("as_skitter", computing.as_skitter),
            ("route_views", computing.route_views),
        ]
    },
    "vision": {
        "graph_cls": [
            ("mnist_superpixels", vision.mnist_superpixels),
            ("cifar10_superpixels", vision.cifar10_superpixels),
            ("modelnet10", vision.modelnet10),
            ("modelnet40", vision.modelnet40),
        ]
    },
    "physics": {
        "graph_reg": [("qm9", physics.qm9), ("zinc", physics.zinc)],
        "link_pred": [("ising_lattice", physics.ising_lattice)],
    },
    "security": {
        "graph_cls": [("malnet_tiny", security.malnet_tiny)],
        "link_pred": [
            ("terrorists_911", security.terrorists_911),
            ("train_terrorists", security.train_terrorists),
        ],
    },
}

CATEGORIES module-attribute

CATEGORIES = {
    "combinatorial": combinatorial,
    "biology": biology,
    "social": social,
    "knowledge": knowledge,
    "infrastructure": infrastructure,
    "finance": finance,
    "computing": computing,
    "vision": vision,
    "physics": physics,
    "security": security,
}

Mapping of category name to the dataset module that implements it.

list_datasets

list_datasets(
    category: str | None = None, task: str | None = None
) -> dict[str, dict[str, list[str]]]

Return loader names organized by category and task.

Output shape: {category: {task_type: [loader_name, ...]}}. Pass category and/or task to restrict the view.

Source code in src/graphnetz/datasets/__init__.py
def list_datasets(
    category: str | None = None,
    task: str | None = None,
) -> dict[str, dict[str, list[str]]]:
    """Return loader names organized by category and task.

    Output shape: ``{category: {task_type: [loader_name, ...]}}``. Pass
    ``category`` and/or ``task`` to restrict the view.
    """
    cats = [category] if category is not None else list(LOADER_REGISTRY)
    out: dict[str, dict[str, list[str]]] = {}
    for c in cats:
        per_cat = LOADER_REGISTRY.get(c, {})
        tasks = [task] if task is not None else list(per_cat)
        out[c] = {k: [name for name, _ in per_cat.get(k, [])] for k in tasks if k in per_cat}
    return out

Auditing the catalogue

datasets

Dataset registry, organized by research category and task.

Each category exposes thin loader functions that return a torch_geometric dataset (PyG built-in or Netz). The LOADER_REGISTRY table maps every loader to its category and the task it can serve, mirroring the structure used by BENCHMARK_TASKS ([category][task_type] -> [...]).

Categories
  • combinatorial: synthetic TSP, VRP, max-cut, max-flow, matching, coloring.
  • biology: MUTAG, PROTEINS, ENZYMES, PPI, Peptides (LRGB), C. elegans, connectomes, contact networks.
  • social: Cora, CiteSeer, PubMed, WikiCS, Heterophilous (Roman-empire, Amazon-ratings, Minesweeper, Tolokers, Questions), Karate, ego networks.
  • knowledge: FB15k-237, WordNet18-RR, Netz WordNet.
  • infrastructure: power grids, road and air networks.
  • finance: product space, board interlocks, patents, Elliptic Bitcoin.
  • computing: AS topology, Skitter, BGP route views.
  • vision: MNIST/CIFAR10 superpixel graphs, ModelNet.
  • physics: QM9, ZINC, Ising lattice.
  • security: terrorist association networks, MalNet-Tiny.
Tasks

node_cls, graph_cls, graph_reg, link_pred. A loader may serve more than one task type (e.g. cora is used for both node_cls and link_pred). Deep Graph Infomax is not a task: it is a self-supervised training objective whose metric is its own loss, so the benchmark routes unlabelled graphs through link_pred (a real held-out edge split with an AUC metric) instead. train_dgi and the DGIWrapper adapter remain available as utilities for users who want unsupervised pre-training on top of any encoder.

Functions:

Name Description
validate_loaders

Instantiate every catalogued loader and report a status matrix.

validate_loaders

validate_loaders(
    categories: Iterable[str] | None = None,
    *,
    root: str = "data/validate",
    seed: int = 0,
    allow_download: bool = True,
    only_cached: bool = False,
    skip: Iterable[str] | None = None,
    max_seconds: float | None = None,
    retries: int = 1,
    on_row: Callable[[dict[str, Any]], None] | None = None,
) -> Any

Instantiate every catalogued loader and report a status matrix.

Returns a pandas.DataFrame with one row per (category, loader): the task types it serves, its status, shape columns, elapsed seconds, and the error text when it failed. One row per unique loader name within a category -- a loader serving two task types is validated once and its tasks column lists both.

only_cached=True skips loaders whose root directory does not already exist, which is what a network-free CI job wants.

Auditing the whole catalogue downloads tens of gigabytes and can take hours, so the walk is resumable: pass already-audited loader names in skip and a wall-clock budget in max_seconds, and the call returns what it finished. Accumulating several bounded calls yields the same matrix as one long one, which is what makes the audit runnable in a constrained environment.

retries re-attempts a loader that failed to download, after clearing whatever half-written archive the attempt left behind; a loader that failed for any other reason is not retried, because the second attempt would fail the same way. Retries respect max_seconds.

on_row is invoked with each row as soon as that loader finishes. Resuming is only as good as what reached disk, so a caller that checkpoints here keeps its progress when the walk is interrupted -- which, over a multi-hour download, is the normal way for it to end.

Source code in src/graphnetz/datasets/_validate.py
def validate_loaders(
    categories: Iterable[str] | None = None,
    *,
    root: str = "data/validate",
    seed: int = 0,
    allow_download: bool = True,
    only_cached: bool = False,
    skip: Iterable[str] | None = None,
    max_seconds: float | None = None,
    retries: int = 1,
    on_row: Callable[[dict[str, Any]], None] | None = None,
) -> Any:
    """Instantiate every catalogued loader and report a status matrix.

    Returns a `pandas.DataFrame` with one row per (category, loader):
    the task types it serves, its status, shape columns, elapsed seconds, and
    the error text when it failed.  One row per *unique* loader name within a
    category -- a loader serving two task types is validated once and its
    ``tasks`` column lists both.

    ``only_cached=True`` skips loaders whose root directory does not already
    exist, which is what a network-free CI job wants.

    Auditing the whole catalogue downloads tens of gigabytes and can take hours,
    so the walk is resumable: pass already-audited loader names in ``skip`` and a
    wall-clock budget in ``max_seconds``, and the call returns what it finished.
    Accumulating several bounded calls yields the same matrix as one long one,
    which is what makes the audit runnable in a constrained environment.

    ``retries`` re-attempts a loader that failed to *download*, after clearing
    whatever half-written archive the attempt left behind; a loader that failed
    for any other reason is not retried, because the second attempt would fail
    the same way. Retries respect ``max_seconds``.

    ``on_row`` is invoked with each row as soon as that loader finishes. Resuming
    is only as good as what reached disk, so a caller that checkpoints here keeps
    its progress when the walk is interrupted -- which, over a multi-hour
    download, is the normal way for it to end.
    """
    import pandas as pd

    from graphnetz.datasets import LOADER_REGISTRY

    cats = list(categories) if categories is not None else list(LOADER_REGISTRY)
    already = set(skip or ())
    rows: list[dict[str, Any]] = []
    # Two clocks, deliberately separate: ``run_started`` bounds the whole call
    # against ``max_seconds``, ``loader_started`` times one loader for the
    # ``seconds`` column. Sharing one variable silently disabled the budget,
    # because each loader reset the clock the budget was measured against.
    run_started = time.perf_counter()
    exhausted = False

    for category in cats:
        per_cat = LOADER_REGISTRY.get(category, {})
        # loader name -> (callable, [task types])
        merged: dict[str, tuple[Callable[..., Any], list[str]]] = {}
        for task_type, entries in per_cat.items():
            for name, fn in entries:
                if name in merged:
                    merged[name][1].append(task_type)
                else:
                    merged[name] = (cast("Callable[..., Any]", fn), [task_type])

        for name, (fn, task_types) in merged.items():
            if name in already:
                continue
            if exhausted or (max_seconds is not None and time.perf_counter() - run_started >= max_seconds):
                exhausted = True
                break
            target = f"{root}/{category}/{name}"
            row: dict[str, Any] = {
                "category": category,
                "loader": name,
                "tasks": "+".join(sorted(task_types)),
                "status": "skipped",
                "seconds": 0.0,
                "error": "",
            }
            if only_cached and not Path(target).exists():
                row["error"] = "not cached and only_cached=True"
                rows.append(row)
                continue
            if not allow_download and not Path(target).exists():
                row["error"] = "would require a download and allow_download=False"
                rows.append(row)
                continue
            loader_started = time.perf_counter()
            # A transport failure says nothing about the loader, so one attempt
            # is not evidence. Most of the failures observed here were transient
            # -- a reset connection, a stalled mirror -- and cleared on a second
            # try against a cache the purge had just made clean.
            for attempt in range(retries + 1):
                try:
                    ds = _call(fn, target, seed)
                    row.update(_shape(ds))
                    row["status"] = "ok"
                    row["error"] = ""
                    break
                except BaseException as exc:
                    row["status"] = _classify(exc, target)
                    row["error"] = f"{type(exc).__name__}: {exc}"[:400]
                    if row["status"] != "download-failed":
                        break
                    cleared = _purge_partial_archives(target, row["error"])
                    if cleared:
                        row["error"] = f"{row['error']} [cleared partial: {', '.join(cleared[:3])}]"
                    if attempt == retries:
                        break
                    if max_seconds is not None and time.perf_counter() - run_started >= max_seconds:
                        row["error"] = f"{row['error']} [no retry: time budget spent]"
                        break
            row["seconds"] = round(time.perf_counter() - loader_started, 2)
            rows.append(row)
            if on_row is not None:
                on_row(row)

    frame = pd.DataFrame(rows)
    if not frame.empty:
        frame = frame.sort_values(["category", "loader"]).reset_index(drop=True)
    return frame

Netzschleuder access

datasets

Dataset registry, organized by research category and task.

Each category exposes thin loader functions that return a torch_geometric dataset (PyG built-in or Netz). The LOADER_REGISTRY table maps every loader to its category and the task it can serve, mirroring the structure used by BENCHMARK_TASKS ([category][task_type] -> [...]).

Categories
  • combinatorial: synthetic TSP, VRP, max-cut, max-flow, matching, coloring.
  • biology: MUTAG, PROTEINS, ENZYMES, PPI, Peptides (LRGB), C. elegans, connectomes, contact networks.
  • social: Cora, CiteSeer, PubMed, WikiCS, Heterophilous (Roman-empire, Amazon-ratings, Minesweeper, Tolokers, Questions), Karate, ego networks.
  • knowledge: FB15k-237, WordNet18-RR, Netz WordNet.
  • infrastructure: power grids, road and air networks.
  • finance: product space, board interlocks, patents, Elliptic Bitcoin.
  • computing: AS topology, Skitter, BGP route views.
  • vision: MNIST/CIFAR10 superpixel graphs, ModelNet.
  • physics: QM9, ZINC, Ising lattice.
  • security: terrorist association networks, MalNet-Tiny.
Tasks

node_cls, graph_cls, graph_reg, link_pred. A loader may serve more than one task type (e.g. cora is used for both node_cls and link_pred). Deep Graph Infomax is not a task: it is a self-supervised training objective whose metric is its own loss, so the benchmark routes unlabelled graphs through link_pred (a real held-out edge split with an AUC metric) instead. train_dgi and the DGIWrapper adapter remain available as utilities for users who want unsupervised pre-training on top of any encoder.

Functions:

Name Description
download_all_networks_netz

Download and process every network in a Netzschleuder dataset.

Netz

Netz(
    root: str,
    dataset_name: str = "urban_streets",
    network_name: str = "brasilia",
    transform: Callable | None = None,
    pre_transform: Callable | None = None,
    multigraph: bool = False,
)

Bases: InMemoryDataset

Netzschleuder network dataset.

Parameters:

Name Type Description Default
root str

Root directory where the dataset should be saved.

required
dataset_name str

Name of the dataset from the Netzschleuder repository.

'urban_streets'
network_name str

Name of the network within the dataset.

'brasilia'
transform callable

Standard PyG transform hooks.

None
pre_transform callable

Standard PyG transform hooks.

None

Examples:

>>> dataset = Netz(
...     root="data", dataset_name="urban_streets", network_name="brasilia"
... )
>>> dataset[0]
Data(...)
References

Tiago P. Peixoto. (2020). The Netzschleuder network catalogue and repository. https://networks.skewed.de/

Source code in src/graphnetz/datasets/_netz.py
def __init__(
    self,
    root: str,
    dataset_name: str = "urban_streets",
    network_name: str = "brasilia",
    transform: Callable | None = None,
    pre_transform: Callable | None = None,
    multigraph: bool = False,
) -> None:
    self.dataset_name = dataset_name
    self.network_name = network_name
    self.network_url = f"{NETZ_FILES}/{dataset_name}/files/{network_name}.csv.zip"
    # ``multigraph=True`` preserves parallel edges and self-loops (needed for
    # multiplex / transit / airline networks); the default collapses them
    # via `networkx.Graph` for compatibility with existing PyG flows.
    self.multigraph = multigraph
    super().__init__(root, transform, pre_transform)
    self.load(self.processed_paths[0])

download_all_networks_netz

download_all_networks_netz(
    root: str,
    dataset_name: str,
    transform: Callable | None = None,
    pre_transform: Callable | None = None,
) -> None

Download and process every network in a Netzschleuder dataset.

Source code in src/graphnetz/datasets/_netz.py
def download_all_networks_netz(
    root: str,
    dataset_name: str,
    transform: Callable | None = None,
    pre_transform: Callable | None = None,
) -> None:
    """Download and process every network in a Netzschleuder dataset."""
    response = requests.get(f"{NETZ_API}/{dataset_name}", timeout=60)
    response.raise_for_status()
    for network_name in response.json()["nets"]:
        Netz(root, dataset_name, network_name, transform, pre_transform)

Per-category loaders

combinatorial

Combinatorial-optimization graph datasets.

All instances are synthetic; canonical PyG benchmarks do not cover this category. The library provides:

  • RandomTSP / random_tsp — Euclidean TSP (k-NN over 2D points).
  • RandomVRP / random_vrp — Capacitated VRP (multi-depot k-NN).
  • RandomMaxFlow / random_maxflow — random capacitated networks with a single source/sink, suitable for max-flow / min-cut benchmarks.
  • RandomBipartiteMatching / random_bipartite_matching — bipartite assignment instances with random weights.
  • RandomColoring / random_coloring — random Erdos-Renyi graphs for graph-coloring / max-cut experiments.
  • RandomMaxCut / random_maxcut — alias of RandomColoring.

RandomTSP

RandomTSP(
    root: str, num_graphs: int = 128, num_nodes: int = 50, k: int = 5, seed: int = 0
)

Bases: InMemoryDataset

Euclidean TSP instances as k-NN graphs over 2D points.

Source code in src/graphnetz/datasets/combinatorial.py
def __init__(self, root: str, num_graphs: int = 128, num_nodes: int = 50, k: int = 5, seed: int = 0) -> None:
    self.num_graphs, self.num_nodes, self.k, self.seed = num_graphs, num_nodes, k, seed
    super().__init__(root)
    self.load(self.processed_paths[0])

RandomVRP

RandomVRP(
    root: str,
    num_graphs: int = 128,
    num_customers: int = 40,
    num_depots: int = 3,
    k: int = 6,
    seed: int = 0,
)

Bases: InMemoryDataset

Capacitated VRP instances: customers + multiple depots, k-NN connectivity.

Node features are [x, y, demand, is_depot]. Demands are zero for depots and uniform on (0, 1] for customers.

Source code in src/graphnetz/datasets/combinatorial.py
def __init__(
    self,
    root: str,
    num_graphs: int = 128,
    num_customers: int = 40,
    num_depots: int = 3,
    k: int = 6,
    seed: int = 0,
) -> None:
    self.num_graphs = num_graphs
    self.num_customers = num_customers
    self.num_depots = num_depots
    self.k = k
    self.seed = seed
    super().__init__(root)
    self.load(self.processed_paths[0])

RandomMaxFlow

RandomMaxFlow(
    root: str,
    num_graphs: int = 128,
    num_nodes: int = 30,
    edge_prob: float = 0.2,
    seed: int = 0,
)

Bases: InMemoryDataset

Random capacitated networks with a marked source/sink for max-flow tasks.

Nodes 0 and num_nodes - 1 are designated source and sink. Edges carry a positive capacity stored in edge_attr.

Source code in src/graphnetz/datasets/combinatorial.py
def __init__(
    self,
    root: str,
    num_graphs: int = 128,
    num_nodes: int = 30,
    edge_prob: float = 0.2,
    seed: int = 0,
) -> None:
    self.num_graphs = num_graphs
    self.num_nodes = num_nodes
    self.edge_prob = edge_prob
    self.seed = seed
    super().__init__(root)
    self.load(self.processed_paths[0])

RandomBipartiteMatching

RandomBipartiteMatching(
    root: str,
    num_graphs: int = 128,
    size: int = 25,
    edge_prob: float = 0.4,
    seed: int = 0,
)

Bases: InMemoryDataset

Random bipartite assignment instances with weighted edges.

Two sides of size size are connected by a Bernoulli mask of probability edge_prob; edge weights are uniform on (0, 1] and stored in edge_attr. Node features mark each node's side.

Source code in src/graphnetz/datasets/combinatorial.py
def __init__(
    self,
    root: str,
    num_graphs: int = 128,
    size: int = 25,
    edge_prob: float = 0.4,
    seed: int = 0,
) -> None:
    self.num_graphs = num_graphs
    self.size = size
    self.edge_prob = edge_prob
    self.seed = seed
    super().__init__(root)
    self.load(self.processed_paths[0])

RandomColoring

RandomColoring(
    root: str,
    num_graphs: int = 128,
    num_nodes: int = 40,
    edge_prob: float = 0.15,
    seed: int = 0,
)

Bases: InMemoryDataset

Random Erdos-Renyi graphs for graph-coloring and max-cut benchmarks.

Source code in src/graphnetz/datasets/combinatorial.py
def __init__(
    self,
    root: str,
    num_graphs: int = 128,
    num_nodes: int = 40,
    edge_prob: float = 0.15,
    seed: int = 0,
) -> None:
    self.num_graphs = num_graphs
    self.num_nodes = num_nodes
    self.edge_prob = edge_prob
    self.seed = seed
    super().__init__(root)
    self.load(self.processed_paths[0])

biology

Health and biology datasets.

Coverage:

  • Molecular: PyG TUDataset (MUTAG, PROTEINS, ENZYMES).
  • Long-range peptides: PyG LRGBDataset (Peptides-func graph classification, Peptides-struct graph regression — Dwivedi et al., NeurIPS 2022 long-range graph benchmark).
  • Protein-protein interaction: PyG PPI (inductive multi-graph).
  • Metabolic: Netzschleuder celegans_metabolic.
  • Brain connectomes: Netzschleuder budapest_connectome.
  • Epidemiology: Netzschleuder sp_hospital and sp_high_school contact graphs.
  • Open Graph Benchmark (optional ogb extra): ogbg_molhiv (~41 K molecules, binary HIV-inhibition), ogbg_molpcba (~438 K molecules, 128 binary bioassay tasks). Both also need the chem extra for RDKit featurisation.

Patient-disease-treatment knowledge graphs have no canonical free dataset and are intentionally omitted.

Functions:

Name Description
mutag

Mutagenicity: 188 molecules, binary class.

proteins

Proteins: 1113 graphs, binary class.

enzymes

Enzymes: 600 graphs, 6 classes.

ppi

Protein-protein interaction (inductive node multi-label classification).

celegans

C. elegans metabolic network (Netzschleuder).

budapest_connectome

Budapest reference connectome (mean connectivity across 100 subjects).

hospital_contacts

Sociopatterns hospital ward face-to-face contact network.

high_school_contacts

Sociopatterns high-school contact network.

peptides_func

Peptides-func: long-range graph classification (10-way multilabel).

peptides_struct

Peptides-struct: long-range graph regression (11 structural targets).

ogbg_molhiv

OGB MolHIV: ~41 K molecules, binary HIV-inhibition labels.

ogbg_molpcba

OGB MolPCBA: ~438 K molecules, 128 binary bioassay labels.

mutag

mutag(root: str) -> TUDataset

Mutagenicity: 188 molecules, binary class.

Source code in src/graphnetz/datasets/biology.py
def mutag(root: str) -> TUDataset:
    """Mutagenicity: 188 molecules, binary class."""
    return TUDataset(root=root, name="MUTAG")

proteins

proteins(root: str) -> TUDataset

Proteins: 1113 graphs, binary class.

Source code in src/graphnetz/datasets/biology.py
def proteins(root: str) -> TUDataset:
    """Proteins: 1113 graphs, binary class."""
    return TUDataset(root=root, name="PROTEINS")

enzymes

enzymes(root: str) -> TUDataset

Enzymes: 600 graphs, 6 classes.

Source code in src/graphnetz/datasets/biology.py
def enzymes(root: str) -> TUDataset:
    """Enzymes: 600 graphs, 6 classes."""
    return TUDataset(root=root, name="ENZYMES")

ppi

ppi(root: str, split: str = 'train') -> PPI

Protein-protein interaction (inductive node multi-label classification).

Source code in src/graphnetz/datasets/biology.py
def ppi(root: str, split: str = "train") -> PPI:
    """Protein-protein interaction (inductive node multi-label classification)."""
    return PPI(root=root, split=split)

celegans

celegans(root: str) -> Netz

C. elegans metabolic network (Netzschleuder).

Source code in src/graphnetz/datasets/biology.py
def celegans(root: str) -> Netz:
    """C. elegans metabolic network (Netzschleuder)."""
    return Netz(root=root, dataset_name="celegans_metabolic", network_name="celegans_metabolic")

budapest_connectome

budapest_connectome(root: str, network_name: str = 'all_20k') -> Netz

Budapest reference connectome (mean connectivity across 100 subjects).

Source code in src/graphnetz/datasets/biology.py
def budapest_connectome(root: str, network_name: str = "all_20k") -> Netz:
    """Budapest reference connectome (mean connectivity across 100 subjects)."""
    return Netz(root=root, dataset_name="budapest_connectome", network_name=network_name)

hospital_contacts

hospital_contacts(root: str) -> Netz

Sociopatterns hospital ward face-to-face contact network.

Source code in src/graphnetz/datasets/biology.py
def hospital_contacts(root: str) -> Netz:
    """Sociopatterns hospital ward face-to-face contact network."""
    return Netz(root=root, dataset_name="sp_hospital", network_name="sp_hospital")

high_school_contacts

high_school_contacts(root: str, network_name: str = 'proximity') -> Netz

Sociopatterns high-school contact network.

The dataset bundles four relations among the same students; proximity is the face-to-face contact network, the others being reported diaries, a friendship survey and Facebook ties.

Source code in src/graphnetz/datasets/biology.py
def high_school_contacts(root: str, network_name: str = "proximity") -> Netz:
    """Sociopatterns high-school contact network.

    The dataset bundles four relations among the same students; ``proximity`` is
    the face-to-face contact network, the others being reported diaries, a
    friendship survey and Facebook ties.
    """
    return Netz(root=root, dataset_name="sp_high_school", network_name=network_name)

peptides_func

peptides_func(root: str, split: str = 'train') -> LRGBDataset

Peptides-func: long-range graph classification (10-way multilabel).

Source code in src/graphnetz/datasets/biology.py
def peptides_func(root: str, split: str = "train") -> LRGBDataset:
    """Peptides-func: long-range graph classification (10-way multilabel)."""
    return LRGBDataset(root=root, name="Peptides-func", split=split)

peptides_struct

peptides_struct(root: str, split: str = 'train') -> LRGBDataset

Peptides-struct: long-range graph regression (11 structural targets).

Source code in src/graphnetz/datasets/biology.py
def peptides_struct(root: str, split: str = "train") -> LRGBDataset:
    """Peptides-struct: long-range graph regression (11 structural targets)."""
    return LRGBDataset(root=root, name="Peptides-struct", split=split)

ogbg_molhiv

ogbg_molhiv(root: str) -> Any

OGB MolHIV: ~41 K molecules, binary HIV-inhibition labels.

Source code in src/graphnetz/datasets/biology.py
def ogbg_molhiv(root: str) -> Any:
    """OGB MolHIV: ~41 K molecules, binary HIV-inhibition labels."""
    return load_ogb_graph("ogbg-molhiv", root)

ogbg_molpcba

ogbg_molpcba(root: str) -> Any

OGB MolPCBA: ~438 K molecules, 128 binary bioassay labels.

Source code in src/graphnetz/datasets/biology.py
def ogbg_molpcba(root: str) -> Any:
    """OGB MolPCBA: ~438 K molecules, 128 binary bioassay labels."""
    return load_ogb_graph("ogbg-molpcba", root)

social

Social and information network datasets.

Coverage:

  • Social: karate, facebook_friends (Netzschleuder).
  • Citation/collaboration: Planetoid (Cora, CiteSeer, PubMed) + Netz dblp_coauthor.
  • Web/hyperlink: PyG WikiCS.
  • Heterophilic node classification: PyG HeterophilousGraphDataset (Roman-empire, Amazon-ratings, Minesweeper, Tolokers, Questions) — the current SOTA stress test for GNNs whose accuracy collapses outside the homophilic Planetoid setting (Platonov et al., NeurIPS 2023).
  • Communication: Netz dnc (Democratic National Committee email leak).
  • Recommendation: PyG MovieLens100K.
  • Open Graph Benchmark (optional ogb extra): ogbn_arxiv (arXiv citation network for node classification), ogbl_collab (collaboration network for link prediction).

Functions:

Name Description
cora

Cora citation network (2708 nodes, 7 classes).

citeseer

CiteSeer citation network (3327 nodes, 6 classes).

pubmed

PubMed citation network (19717 nodes, 3 classes).

karate

Zachary's karate club (the canonical small social network).

facebook_friends

Facebook ego friendship network (Netzschleuder).

dblp_coauthor

DBLP co-authorship network (Netzschleuder).

wikics

Wikipedia computer-science article hyperlink graph.

dnc_emails

DNC email communication network (Netzschleuder).

movielens100k

MovieLens 100K user-item bipartite ratings graph.

roman_empire

Roman-empire heterophilic node-classification benchmark.

amazon_ratings

Amazon-ratings heterophilic node-classification benchmark.

minesweeper

Minesweeper heterophilic node-classification benchmark.

tolokers

Tolokers heterophilic node-classification benchmark.

questions

Questions heterophilic node-classification benchmark.

ogbn_arxiv

OGB arXiv citation network (~169 K nodes, 40 subject classes).

ogbl_collab

OGB collaboration network (~235 K author nodes, 128-d features).

cora

cora(root: str) -> Planetoid

Cora citation network (2708 nodes, 7 classes).

Source code in src/graphnetz/datasets/social.py
def cora(root: str) -> Planetoid:
    """Cora citation network (2708 nodes, 7 classes)."""
    return Planetoid(root=root, name="Cora")

citeseer

citeseer(root: str) -> Planetoid

CiteSeer citation network (3327 nodes, 6 classes).

Source code in src/graphnetz/datasets/social.py
def citeseer(root: str) -> Planetoid:
    """CiteSeer citation network (3327 nodes, 6 classes)."""
    return Planetoid(root=root, name="CiteSeer")

pubmed

pubmed(root: str) -> Planetoid

PubMed citation network (19717 nodes, 3 classes).

Source code in src/graphnetz/datasets/social.py
def pubmed(root: str) -> Planetoid:
    """PubMed citation network (19717 nodes, 3 classes)."""
    return Planetoid(root=root, name="PubMed")

karate

karate(root: str, network_name: str = '78') -> Netz

Zachary's karate club (the canonical small social network).

Source code in src/graphnetz/datasets/social.py
def karate(root: str, network_name: str = "78") -> Netz:
    """Zachary's karate club (the canonical small social network)."""
    return Netz(root=root, dataset_name="karate", network_name=network_name)

facebook_friends

facebook_friends(root: str) -> Netz

Facebook ego friendship network (Netzschleuder).

Source code in src/graphnetz/datasets/social.py
def facebook_friends(root: str) -> Netz:
    """Facebook ego friendship network (Netzschleuder)."""
    return Netz(root=root, dataset_name="facebook_friends", network_name="facebook_friends")

dblp_coauthor

dblp_coauthor(root: str) -> Netz

DBLP co-authorship network (Netzschleuder).

Source code in src/graphnetz/datasets/social.py
def dblp_coauthor(root: str) -> Netz:
    """DBLP co-authorship network (Netzschleuder)."""
    return Netz(root=root, dataset_name="dblp_coauthor", network_name="dblp_coauthor")

wikics

wikics(root: str) -> WikiCS

Wikipedia computer-science article hyperlink graph.

Source code in src/graphnetz/datasets/social.py
def wikics(root: str) -> WikiCS:
    """Wikipedia computer-science article hyperlink graph."""
    return WikiCS(root=root)

dnc_emails

dnc_emails(root: str) -> Netz

DNC email communication network (Netzschleuder).

Source code in src/graphnetz/datasets/social.py
def dnc_emails(root: str) -> Netz:
    """DNC email communication network (Netzschleuder)."""
    return Netz(root=root, dataset_name="dnc", network_name="dnc")

movielens100k

movielens100k(root: str) -> MovieLens100K

MovieLens 100K user-item bipartite ratings graph.

Source code in src/graphnetz/datasets/social.py
def movielens100k(root: str) -> MovieLens100K:
    """MovieLens 100K user-item bipartite ratings graph."""
    return MovieLens100K(root=root)

roman_empire

roman_empire(root: str) -> HeterophilousGraphDataset

Roman-empire heterophilic node-classification benchmark.

Source code in src/graphnetz/datasets/social.py
def roman_empire(root: str) -> HeterophilousGraphDataset:
    """Roman-empire heterophilic node-classification benchmark."""
    return HeterophilousGraphDataset(root=root, name="Roman-empire")

amazon_ratings

amazon_ratings(root: str) -> HeterophilousGraphDataset

Amazon-ratings heterophilic node-classification benchmark.

Source code in src/graphnetz/datasets/social.py
def amazon_ratings(root: str) -> HeterophilousGraphDataset:
    """Amazon-ratings heterophilic node-classification benchmark."""
    return HeterophilousGraphDataset(root=root, name="Amazon-ratings")

minesweeper

minesweeper(root: str) -> HeterophilousGraphDataset

Minesweeper heterophilic node-classification benchmark.

Source code in src/graphnetz/datasets/social.py
def minesweeper(root: str) -> HeterophilousGraphDataset:
    """Minesweeper heterophilic node-classification benchmark."""
    return HeterophilousGraphDataset(root=root, name="Minesweeper")

tolokers

tolokers(root: str) -> HeterophilousGraphDataset

Tolokers heterophilic node-classification benchmark.

Source code in src/graphnetz/datasets/social.py
def tolokers(root: str) -> HeterophilousGraphDataset:
    """Tolokers heterophilic node-classification benchmark."""
    return HeterophilousGraphDataset(root=root, name="Tolokers")

questions

questions(root: str) -> HeterophilousGraphDataset

Questions heterophilic node-classification benchmark.

Source code in src/graphnetz/datasets/social.py
def questions(root: str) -> HeterophilousGraphDataset:
    """Questions heterophilic node-classification benchmark."""
    return HeterophilousGraphDataset(root=root, name="Questions")

ogbn_arxiv

ogbn_arxiv(root: str) -> Data

OGB arXiv citation network (~169 K nodes, 40 subject classes).

Source code in src/graphnetz/datasets/social.py
def ogbn_arxiv(root: str) -> Data:
    """OGB arXiv citation network (~169 K nodes, 40 subject classes)."""
    return load_ogb_node("ogbn-arxiv", root)

ogbl_collab

ogbl_collab(root: str) -> Data

OGB collaboration network (~235 K author nodes, 128-d features).

Returns a single PyG Data graph; the benchmark runner re-splits via RandomLinkSplit rather than using OGB's official edge split.

Source code in src/graphnetz/datasets/social.py
def ogbl_collab(root: str) -> Data:
    """OGB collaboration network (~235 K author nodes, 128-d features).

    Returns a single PyG ``Data`` graph; the benchmark runner re-splits
    via ``RandomLinkSplit`` rather than using OGB's official edge split.
    """
    return load_ogb_link("ogbl-collab", root)

knowledge

Knowledge graph and language datasets.

Wraps PyG knowledge-graph benchmarks for relational link prediction.

Functions:

Name Description
fb15k_237

FB15k-237 relational link prediction benchmark.

wordnet18rr

WordNet18-RR relational link prediction benchmark.

wordnet_netz

WordNet semantic graph (Netzschleuder).

fb15k_237

fb15k_237(root: str) -> RelLinkPredDataset

FB15k-237 relational link prediction benchmark.

Source code in src/graphnetz/datasets/knowledge.py
def fb15k_237(root: str) -> RelLinkPredDataset:
    """FB15k-237 relational link prediction benchmark."""
    return RelLinkPredDataset(root=root, name="FB15k-237")

wordnet18rr

wordnet18rr(root: str) -> _WordNet18RRRel

WordNet18-RR relational link prediction benchmark.

Source code in src/graphnetz/datasets/knowledge.py
def wordnet18rr(root: str) -> _WordNet18RRRel:
    """WordNet18-RR relational link prediction benchmark."""
    return _WordNet18RRRel(WordNet18RR(root=root))

wordnet_netz

wordnet_netz(root: str) -> Netz

WordNet semantic graph (Netzschleuder).

Source code in src/graphnetz/datasets/knowledge.py
def wordnet_netz(root: str) -> Netz:
    """WordNet semantic graph (Netzschleuder)."""
    return Netz(root=root, dataset_name="wordnet", network_name="wordnet")

infrastructure

Infrastructure and physical-system networks (Netzschleuder).

Functions:

Name Description
power_grid

US Western power grid.

euroroad

European road network.

us_roads

US road network for a given state (e.g. DC, CA).

eu_airlines

European airline route multiplex.

london_transport

London transport multiplex (rail + bus + underground).

urban_streets

Urban street network for a given city (e.g. brasilia, manhattan).

power_grid

power_grid(root: str) -> Netz

US Western power grid.

Source code in src/graphnetz/datasets/infrastructure.py
6
7
8
def power_grid(root: str) -> Netz:
    """US Western power grid."""
    return Netz(root=root, dataset_name="power", network_name="power")

euroroad

euroroad(root: str) -> Netz

European road network.

Source code in src/graphnetz/datasets/infrastructure.py
def euroroad(root: str) -> Netz:
    """European road network."""
    return Netz(root=root, dataset_name="euroroad", network_name="euroroad")

us_roads

us_roads(root: str, network_name: str = 'DC') -> Netz

US road network for a given state (e.g. DC, CA).

Source code in src/graphnetz/datasets/infrastructure.py
def us_roads(root: str, network_name: str = "DC") -> Netz:
    """US road network for a given state (e.g. ``DC``, ``CA``)."""
    return Netz(root=root, dataset_name="us_roads", network_name=network_name)

eu_airlines

eu_airlines(root: str) -> Netz

European airline route multiplex.

Source code in src/graphnetz/datasets/infrastructure.py
def eu_airlines(root: str) -> Netz:
    """European airline route multiplex."""
    return Netz(root=root, dataset_name="eu_airlines", network_name="eu_airlines")

london_transport

london_transport(root: str) -> Netz

London transport multiplex (rail + bus + underground).

Source code in src/graphnetz/datasets/infrastructure.py
def london_transport(root: str) -> Netz:
    """London transport multiplex (rail + bus + underground)."""
    return Netz(root=root, dataset_name="london_transport", network_name="london_transport")

urban_streets

urban_streets(root: str, network_name: str = 'brasilia') -> Netz

Urban street network for a given city (e.g. brasilia, manhattan).

Source code in src/graphnetz/datasets/infrastructure.py
def urban_streets(root: str, network_name: str = "brasilia") -> Netz:
    """Urban street network for a given city (e.g. ``brasilia``, ``manhattan``)."""
    return Netz(root=root, dataset_name="urban_streets", network_name=network_name)

finance

Finance and economics networks.

Coverage:

  • Trade: product_space (economic complexity).
  • Ownership / corporate control: board_directors (Norwegian boards).
  • Innovation: us_patents citation network.
  • Transactions / fraud / AML: PyG EllipticBitcoinDataset (illicit-wallet detection on Bitcoin transactions).
  • Open Graph Benchmark (optional ogb extra): ogbn_products (Amazon co-purchase graph for node classification, ~2.4 M nodes, 47 product categories).

Inter-bank exposure datasets are typically confidential and have no canonical public benchmark.

Functions:

Name Description
product_space

Product space of international trade (economic complexity).

board_directors

Norwegian boards of directors interlock network (snapshot).

us_patents

US patents citation network.

elliptic_bitcoin

Elliptic Bitcoin transactions dataset for illicit-wallet detection.

ogbn_products

OGB Amazon product co-purchase network (~2.4 M nodes, 47 classes).

product_space

product_space(root: str, network_name: str = 'SITC') -> Netz

Product space of international trade (economic complexity).

Netzschleuder publishes this dataset as two networks rather than one: SITC (Standard International Trade Classification, 774 products) and HS (Harmonized System, 866 products). SITC is the default because it is the classification used by the original product-space analysis.

Source code in src/graphnetz/datasets/finance.py
def product_space(root: str, network_name: str = "SITC") -> Netz:
    """Product space of international trade (economic complexity).

    Netzschleuder publishes this dataset as two networks rather than one:
    ``SITC`` (Standard International Trade Classification, 774 products) and
    ``HS`` (Harmonized System, 866 products). ``SITC`` is the default because
    it is the classification used by the original product-space analysis.
    """
    return Netz(root=root, dataset_name="product_space", network_name=network_name)

board_directors

board_directors(root: str, network_name: str = 'net1m_2002-05-01') -> Netz

Norwegian boards of directors interlock network (snapshot).

Source code in src/graphnetz/datasets/finance.py
def board_directors(root: str, network_name: str = "net1m_2002-05-01") -> Netz:
    """Norwegian boards of directors interlock network (snapshot)."""
    return Netz(root=root, dataset_name="board_directors", network_name=network_name)

us_patents

us_patents(root: str) -> Netz

US patents citation network.

Source code in src/graphnetz/datasets/finance.py
def us_patents(root: str) -> Netz:
    """US patents citation network."""
    return Netz(root=root, dataset_name="us_patents", network_name="us_patents")

elliptic_bitcoin

elliptic_bitcoin(root: str) -> EllipticBitcoinDataset

Elliptic Bitcoin transactions dataset for illicit-wallet detection.

Source code in src/graphnetz/datasets/finance.py
def elliptic_bitcoin(root: str) -> EllipticBitcoinDataset:
    """Elliptic Bitcoin transactions dataset for illicit-wallet detection."""
    return EllipticBitcoinDataset(root=root)

ogbn_products

ogbn_products(root: str) -> Data

OGB Amazon product co-purchase network (~2.4 M nodes, 47 classes).

Larger than ogbn_arxiv — full-graph training is feasible on a workstation GPU but slow; reduce epochs for quick iteration.

Source code in src/graphnetz/datasets/finance.py
def ogbn_products(root: str) -> Data:
    """OGB Amazon product co-purchase network (~2.4 M nodes, 47 classes).

    Larger than ``ogbn_arxiv`` — full-graph training is feasible on a
    workstation GPU but slow; reduce ``epochs`` for quick iteration.
    """
    return load_ogb_node("ogbn-products", root)

computing

Computing and systems networks (Netzschleuder).

Internet topology, autonomous-system graphs, and routing snapshots.

Functions:

Name Description
internet_as

Internet AS-level topology snapshot (Karrer-Newman-Zdeborová, 2014).

as_skitter

CAIDA Skitter AS-level network.

topology

Internet router-level topology.

route_views

Route Views BGP snapshot.

internet_as

internet_as(root: str, network_name: str = 'internet_as') -> Netz

Internet AS-level topology snapshot (Karrer-Newman-Zdeborová, 2014).

Source code in src/graphnetz/datasets/computing.py
def internet_as(root: str, network_name: str = "internet_as") -> Netz:
    """Internet AS-level topology snapshot (Karrer-Newman-Zdeborová, 2014)."""
    return Netz(root=root, dataset_name="internet_as", network_name=network_name)

as_skitter

as_skitter(root: str) -> Netz

CAIDA Skitter AS-level network.

Source code in src/graphnetz/datasets/computing.py
def as_skitter(root: str) -> Netz:
    """CAIDA Skitter AS-level network."""
    return Netz(root=root, dataset_name="as_skitter", network_name="as_skitter")

topology

topology(root: str) -> Netz

Internet router-level topology.

Source code in src/graphnetz/datasets/computing.py
def topology(root: str) -> Netz:
    """Internet router-level topology."""
    return Netz(root=root, dataset_name="topology", network_name="topology")

route_views

route_views(root: str, network_name: str = '20000102') -> Netz

Route Views BGP snapshot.

The catalogue holds 733 daily snapshots spanning 1997-11-08 to 2000-01-02, named by date; the default is the last one (6,474 ASes, 13,895 links). The previous default, 20030701, is outside that range and always 404'd.

Source code in src/graphnetz/datasets/computing.py
def route_views(root: str, network_name: str = "20000102") -> Netz:
    """Route Views BGP snapshot.

    The catalogue holds 733 daily snapshots spanning 1997-11-08 to 2000-01-02,
    named by date; the default is the last one (6,474 ASes, 13,895 links). The
    previous default, ``20030701``, is outside that range and always 404'd.
    """
    return Netz(root=root, dataset_name="route_views", network_name=network_name)

vision

Geometry and vision datasets.

Coverage: - Image-derived superpixel graphs: MNISTSuperpixels, CIFAR10 (GNN benchmark). - Meshes / point clouds: PyG ModelNet (10/40 classes).

ShapeNet part segmentation was dropped from the catalogue: its only host, shapenet.cs.stanford.edu, answers neither ICMP nor TCP, upstream PyG still points at it, and the alternative its maintainers document requires an account. Rather than advertise a loader that cannot fetch its data, or repoint it at an unofficial mirror and silently change the dataset's provenance and licence, the entry is removed. Restoring it means adding a loader whose source can be downloaded.

Functions:

Name Description
mnist_superpixels

MNIST images converted to 75-superpixel graphs.

cifar10_superpixels

CIFAR10 superpixel graphs (GNN benchmark suite).

modelnet10

ModelNet10 3D shapes (10 classes).

modelnet40

ModelNet40 3D shapes (40 classes).

mnist_superpixels

mnist_superpixels(root: str, train: bool = True) -> MNISTSuperpixels

MNIST images converted to 75-superpixel graphs.

Source code in src/graphnetz/datasets/vision.py
def mnist_superpixels(root: str, train: bool = True) -> MNISTSuperpixels:
    """MNIST images converted to 75-superpixel graphs."""
    return MNISTSuperpixels(root=root, train=train)

cifar10_superpixels

cifar10_superpixels(root: str, split: str = 'train') -> GNNBenchmarkDataset

CIFAR10 superpixel graphs (GNN benchmark suite).

Source code in src/graphnetz/datasets/vision.py
def cifar10_superpixels(root: str, split: str = "train") -> GNNBenchmarkDataset:
    """CIFAR10 superpixel graphs (GNN benchmark suite)."""
    return GNNBenchmarkDataset(root=root, name="CIFAR10", split=split)

modelnet10

modelnet10(root: str, train: bool = True) -> ModelNet

ModelNet10 3D shapes (10 classes).

Source code in src/graphnetz/datasets/vision.py
def modelnet10(root: str, train: bool = True) -> ModelNet:
    """ModelNet10 3D shapes (10 classes)."""
    return ModelNet(root=root, name="10", train=train)

modelnet40

modelnet40(root: str, train: bool = True) -> ModelNet

ModelNet40 3D shapes (40 classes).

Source code in src/graphnetz/datasets/vision.py
def modelnet40(root: str, train: bool = True) -> ModelNet:
    """ModelNet40 3D shapes (40 classes)."""
    return ModelNet(root=root, name="40", train=train)

physics

Physics and chemistry datasets.

Coverage: - Molecules: PyG QM9, ZINC. - Spin systems / lattices: synthetic 2D Ising lattice graphs (IsingLattice).

Feynman diagrams, reaction networks, and large crystal-structure databases lack canonical PyG-format datasets and are intentionally omitted.

Functions:

Name Description
qm9

QM9 quantum-chemistry benchmark (134k small molecules).

zinc

ZINC molecular regression benchmark.

IsingLattice

IsingLattice(
    root: str,
    num_graphs: int = 64,
    side: int = 10,
    temperature: float = 2.27,
    seed: int = 0,
)

Bases: InMemoryDataset

Synthetic 2D Ising lattice ensemble.

Each graph is an L x L square lattice with periodic-free boundaries; node features are Bernoulli spins drawn at temperature temperature (Glauber-style independent sampling -- not a thermalised configuration but a cheap proxy useful for representation-learning benchmarks).

Source code in src/graphnetz/datasets/physics.py
def __init__(
    self,
    root: str,
    num_graphs: int = 64,
    side: int = 10,
    temperature: float = 2.27,
    seed: int = 0,
) -> None:
    self.num_graphs = num_graphs
    self.side = side
    self.temperature = temperature
    self.seed = seed
    super().__init__(root)
    self.load(self.processed_paths[0])

qm9

qm9(root: str) -> QM9

QM9 quantum-chemistry benchmark (134k small molecules).

Source code in src/graphnetz/datasets/physics.py
def qm9(root: str) -> QM9:
    """QM9 quantum-chemistry benchmark (134k small molecules)."""
    return QM9(root=root)

zinc

zinc(root: str, subset: bool = True, split: str = 'train') -> ZINC

ZINC molecular regression benchmark.

Source code in src/graphnetz/datasets/physics.py
def zinc(root: str, subset: bool = True, split: str = "train") -> ZINC:
    """ZINC molecular regression benchmark."""
    return ZINC(root=root, subset=subset, split=split)

security

Security-related graph datasets.

Coverage:

  • Terrorism association networks (Krebs 9/11; Madrid 2004 train bombings) via Netzschleuder.
  • Malware function call graphs: PyG MalNetTiny (5 malware families).

Generic attack graphs and threat-intelligence/IoC graphs lack canonical public benchmarks and are intentionally omitted.

Functions:

Name Description
terrorists_911

Krebs 9/11 terrorist association network.

train_terrorists

Madrid 2004 train bombing terrorist network.

malnet_tiny

MalNet-Tiny: 5 malware family function-call graphs.

terrorists_911

terrorists_911(root: str) -> Netz

Krebs 9/11 terrorist association network.

Source code in src/graphnetz/datasets/security.py
def terrorists_911(root: str) -> Netz:
    """Krebs 9/11 terrorist association network."""
    return Netz(root=root, dataset_name="terrorists_911", network_name="terrorists_911")

train_terrorists

train_terrorists(root: str) -> Netz

Madrid 2004 train bombing terrorist network.

Source code in src/graphnetz/datasets/security.py
def train_terrorists(root: str) -> Netz:
    """Madrid 2004 train bombing terrorist network."""
    return Netz(root=root, dataset_name="train_terrorists", network_name="train_terrorists")

malnet_tiny

malnet_tiny(root: str, split: str = 'train') -> MalNetTiny

MalNet-Tiny: 5 malware family function-call graphs.

Source code in src/graphnetz/datasets/security.py
def malnet_tiny(root: str, split: str = "train") -> MalNetTiny:
    """MalNet-Tiny: 5 malware family function-call graphs."""
    return MalNetTiny(root=root, split=split)