SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.00949 · 2022

GAP: Differentially Private Graph Neural Networks with Aggregation Perturbation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2203.00949.json · badge: /api/ran/2203.00949.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
sisaman/gap canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
boolean Ran
ran, violated the contract we drafted
sisaman/gap/core/args/utils.py
code served (permissive licence) · get_code("657a879da36808ce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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
from typing import Union

torch.manual_seed(0)

ARGS = {
    "v": "true"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: none by the harness; any seed is in the setup block
bootstrap Ran
ran; our contract draft was wrong, not the code
sisaman/gap/core/utils.py
code served (permissive licence) · get_code("3083dc7c7310cba3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (100,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np
from typing import Callable, Optional

def custom_func(data: np.ndarray) -> np.ndarray:
    """A simple custom function that computes the median."""
    return np.array([np.median(data)])

# Create sample data
data = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])

ARGS = {
    "data": data,
    "func": np.mean,
    "n_boot": 100,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (100,) — shape (100,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: none by the harness; any seed is in the setup block
confidence_interval Ran
ran; our contract draft was wrong, not the code
sisaman/gap/core/utils.py
code served (permissive licence) · get_code("f5e502a8909df4a3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

ARGS = {
    "data": np.array([1.2, 2.3, 3.1, 4.5, 5.2, 6.1, 7.3, 8.2, 9.1, 10.5]),
    "func": np.mean,
    "size": 1000,
    "ci": 95,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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: none by the harness; any seed is in the setup block
pairwise Ran
ran; our contract draft was wrong, not the code
sisaman/gap/core/utils.py
code served (permissive licence) · get_code("e2521bda2312168c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned zip. 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
import numpy as np
from itertools import tee

def pairwise(iterable):
    a, b = tee(iterable)
    next(b, None)
    return zip(a, b)

# The function takes an iterable and returns pairs of consecutive elements
# We need to provide a valid iterable as the argument

# Simple list iterable
test_iterable = [1, 2, 3, 4, 5]

ARGS = {
    "iterable": test_iterable
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type zip — a zip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a zip 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: none by the harness; any seed is in the setup block
remove_prefix Ran
ran; our contract draft was wrong, not the code
sisaman/gap/core/args/utils.py
code served (permissive licence) · get_code("08a161ae49cfc264")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. 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

torch.manual_seed(0)

# The function remove_prefix takes:
# 1. kwargs: dict - a dictionary with string keys
# 2. prefix: str - a string prefix to filter and remove from keys

# The function filters kwargs to only include entries where the key starts with prefix,
# then removes that prefix from the keys.

# Constructing valid arguments:
kwargs_input = {
    "model_name": "bert",
    "model_config": {"hidden_size": 768},
    "model_layers": 12,
    "other_param": "value",
    "data_path": "/path/to/data"
}

prefix_input = "model_"

ARGS = {
    "kwargs": kwargs_input,
    "prefix": prefix_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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: none by the harness; any seed is in the setup block
strip_kwargs Ran
ran; our contract draft was wrong, not the code
sisaman/gap/core/args/utils.py
code served (permissive licence) · get_code("e14dcc590e6d88f1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. 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
import inspect
from typing import Annotated, Callable, Literal, Union, get_args, get_origin

def strip_kwargs(callable: Callable, kwargs: dict, prefix: str='') -> dict[str, object]:
    signature = inspect.signature(callable)
    parameters = signature.parameters
    out_kwargs = {}
    for arg, value in kwargs.items():
        if arg.startswith(prefix) and arg[len(prefix):] in parameters:
            out_kwargs[arg] = value
    for _, param in parameters.items():
        annotation = param.annotation
        if get_origin(annotation) is Annotated:
            metadata = get_args(annotation)[1]
            bases = metadata.get('bases', [])
            prefixes = metadata.get('prefixes', [''] * len(bases))
            for base_callable, pr in zip(bases, prefixes):
                out_kwargs.update(strip_kwargs(base_callable, kwargs, prefix=prefix + pr))
        elif param.kind == inspect.Parameter.VAR_KEYWORD:
            return kwargs
    return out_kwargs

# Build a simple callable for testing
def simple_func(x: int, y: str) -> None:
    pass

# Build a callable with Annotated parameters
def annotated_func(
    z: Annotated[int, {'bases': [simple_func], 'prefixes': ['test_']}]
) -> None:
    pass

# Create test kwargs dictionary with various keys
test_kwargs = {
    'callable': simple_func,
    'x': 42,
    'y': 'hello',
    'test_x': 10,
    'test_y': 'world',
    'unrelated': 'value'
}

ARGS = {
    'callable': simple_func,
    'kwargs': test_kwargs,
    'prefix': ''
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
boolean 1 other paper
1 later
2307.06422 (2023-07)
Differentially Private Decoupled Graph Convolutions for Multigranular Topology Protection
bootstrap 1 other paper
1 later
2307.06422 (2023-07)
Differentially Private Decoupled Graph Convolutions for Multigranular Topology Protection
confidence_interval 1 other paper
1 later
2307.06422 (2023-07)
Differentially Private Decoupled Graph Convolutions for Multigranular Topology Protection
pairwise 1 other paper
1 later
2307.06422 (2023-07)
Differentially Private Decoupled Graph Convolutions for Multigranular Topology Protection
remove_prefix 1 other paper
1 later
2307.06422 (2023-07)
Differentially Private Decoupled Graph Convolutions for Multigranular Topology Protection
strip_kwargs 1 other paper
1 later
2307.06422 (2023-07)
Differentially Private Decoupled Graph Convolutions for Multigranular Topology Protection

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

In this paper, we study the problem of learning Graph Neural Networks (GNNs) with Differential Privacy (DP). We propose a novel differentially private GNN based on Aggregation Perturbation (GAP), which adds stochastic noise to the GNN's aggregation function to statistically obfuscate the presence of a single edge (edge-level privacy) or a single node and all its adjacent edges (node-level privacy). Tailored to the specifics of private learning, GAP's new architecture is composed of three separate modules: (i) the encoder module, where we learn private node embeddings without relying on the edge information; (ii) the aggregation module, where we compute noisy aggregated node embeddings based on the graph structure; and (iii) the classification module, where we train a neural network on the private aggregations for node classification without further querying the graph edges. GAP's major advantage over previous approaches is that it can benefit from multi-hop neighborhood aggregations, and guarantees both edge-level and node-level DP not only for training, but also at inference with no additional costs beyond the training's privacy budget. We analyze GAP's formal privacy guarantees using Rényi DP and conduct empirical experiments over three real-world graph datasets. We demonstrate that GAP offers significantly better accuracy-privacy trade-offs than state-of-the-art DP-GNN approaches and naive MLP-based baselines. Our code is publicly available at https://github.com/sisaman/GAP.

For agents

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

get_harvested_code_for_paper("2203.00949")
get_code_for_paper("2203.00949")
have("2203.00949")

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

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

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

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

Connect an agent — have() is free.