SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.12827 · 2026

GraphIP-Bench: How Hard Is It to Steal a Graph Neural Network, and Can We Stop It?

Yushun Dong, Kaixiang Zhao, Bolin Shen, Shayok Chakraborty, Yuyang Dai

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2605.12827.json · badge: /api/ran/2605.12827.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
LabRAI/GraphIP-Bench canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
generate_trigger_graph Ran
ran; our contract draft was wrong, not the code
LabRAI/GraphIP-Bench/pygip/models/defense/ImperceptibleWM.py
code served (permissive licence) · get_code("9be58a337ab1cb3c")
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 GraphData. 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 torch.nn as nn
import copy

torch.manual_seed(0)

# Create a simple data class to mimic graph data structure
class GraphData:
    def __init__(self, x, edge_index, y, num_nodes):
        self.x = x
        self.edge_index = edge_index
        self.y = y
        self.num_nodes = num_nodes
        self.train_mask = torch.zeros(num_nodes, dtype=torch.bool)
        self.val_mask = torch.zeros(num_nodes, dtype=torch.bool)
        self.test_mask = torch.zeros(num_nodes, dtype=torch.bool)

# Create a simple generator model
class SimpleGenerator(nn.Module):
    def __init__(self, in_features, out_features):
        super().__init__()
        self.linear = nn.Linear(in_features, out_features)
    
    def forward(self, x, edge_index):
        # Generator produces features for trigger nodes
        return self.linear(x)

# Create a simple target model
class SimpleTargetModel(nn.Module):
    def __init__(self, in_features, num_classes):
        super().__init__()
        self.linear = nn.Linear(in_features, num_classes)
    
    def forward(self, x, edge_index):
        # Target model outputs class probabilities
        return self.linear(x)

# Set up parameters
num_nodes = 5
num_features = 4
num_classes = 3

# Create node features
x = torch.randn(num_nodes, num_features)

# Create edge index (undirected graph edges)
edge_index = torch.tensor([[0, 1, 2, 1], [1, 0, 3, 2]], dtype=torch.long)

# Create node labels
y = torch.tensor([0, 1, 2, 0, 1], dtype=torch.long)

# Create data object
data = GraphData(x, edge_index, y, num_nodes)

# Create generator and target model
generator = SimpleGenerator(num_features, num_features)
target_model = SimpleTargetModel(num_features, num_classes)

# Define arguments for the function
ARGS = {
    "data": data,
    "generator": generator,
    "target_model": target_model,
    "num_triggers": 2
}
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 GraphData — a GraphData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GraphData 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
get_current_neighbors_1 Ran
ran, violated the contract we drafted
LabRAI/GraphIP-Bench/pygip/models/attack/CEGA.py
code served (permissive licence) · get_code("9f6153c1bb3c0e9e")
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 int, shape (5,) 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

# cur_nodes: should be an array-like or list of node indices
# adj_matrix: should be a 2D numpy array representing adjacency

# Create a small adjacency matrix (5x5 for a graph with 5 nodes)
adj_matrix = np.array([
    [0, 1, 0, 1, 0],
    [1, 0, 1, 0, 1],
    [0, 1, 0, 1, 0],
    [1, 0, 1, 0, 1],
    [0, 1, 0, 1, 0]
])

# cur_nodes: list of current node indices to query neighbors for
cur_nodes = [0, 2]

ARGS = {
    "cur_nodes": cur_nodes,
    "adj_matrix": adj_matrix
}
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 int, shape (5,) — shape (5,) 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
get_current_neighbors_dense Ran
ran, violated the contract we drafted
LabRAI/GraphIP-Bench/pygip/models/attack/CEGA.py
code served (permissive licence) · get_code("97275894290edc01")
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 int, shape (5,) 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

# The function takes:
# - cur_nodes: a collection of node indices (used with list() and shape[0])
# - adj_matrix2: a 2D array supporting indexing and sum operations

# Create a small adjacency matrix (5x5 for a small graph)
adj_matrix2 = np.array([
    [1, 1, 0, 0, 0],
    [1, 0, 1, 0, 0],
    [0, 1, 1, 1, 0],
    [0, 0, 1, 0, 1],
    [0, 0, 0, 1, 1]
], dtype=np.int32)

# Create cur_nodes as a list of node indices
cur_nodes = [0, 2, 4]

ARGS = {
    "cur_nodes": cur_nodes,
    "adj_matrix2": adj_matrix2
}
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 int, shape (5,) — shape (5,) 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
get_receptive_fields_dense Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LabRAI/GraphIP-Bench/pygip/models/attack/CEGA.py
code served (permissive licence) · get_code("fbbff48d19cf596b")
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
import torch

torch.manual_seed(0)

# Analyzing the function:
# - cur_neighbors: used in addition operation with adj_matrix2[selected_node]
# - selected_node: used as index into adj_matrix2
# - weighted_score: has .dot() method, so numpy array
# - adj_matrix2: indexed with selected_node, supports != 0 operation

# Create small numpy arrays for the parameters
cur_neighbors = np.array([1, 0, 1, 0], dtype=np.int32)

selected_node = 1

weighted_score = np.array([0.5, 0.3, 0.2, 0.1], dtype=np.float32)

# adj_matrix2 should be a 2D array where we can index by selected_node
# Shape: (num_nodes, num_features) - using 3 nodes, 4 features
adj_matrix2 = np.array([
    [1, 0, 1, 0],
    [0, 1, 1, 1],
    [1, 1, 0, 0]
], dtype=np.int32)

ARGS = {
    "cur_neighbors": cur_neighbors,
    "selected_node": selected_node,
    "weighted_score": weighted_score,
    "adj_matrix2": adj_matrix2
}
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 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
dgl_to_tg Not yet run
unverified (harvested, no recorded run)
LabRAI/GraphIP-Bench/pygip/datasets/datasets.py
code served (permissive licence) · get_code("dc4ced2e4e0487cb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 2 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
get_current_neighbors_1 1 other paper
1 dated earlier
2506.17709 (2025-06)
CEGA: A Cost-Effective Approach for Graph-Based Model Extraction and Acquisition
get_current_neighbors_dense 1 other paper
1 dated earlier
2506.17709 (2025-06)
CEGA: A Cost-Effective Approach for Graph-Based Model Extraction and Acquisition
get_receptive_fields_dense 1 other paper
1 dated earlier
2506.17709 (2025-06)
CEGA: A Cost-Effective Approach for Graph-Based Model Extraction and Acquisition

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-24.

Repositories linked to this paper

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

Abstract

Graph neural networks (GNNs) deployed as cloud services can be stolen through model-extraction attacks, which train a surrogate from query responses to reproduce the target's behaviour, and a growing line of ownership defenses tries to prevent or trace such theft. The title of this paper asks two questions: how hard is it to steal a GNN?, and can we stop it? Prior work cannot answer either, because experiments use inconsistent datasets, threat models, and metrics. We introduce GraphIP-Bench, a unified benchmark which evaluates both sides under a single black-box protocol. It integrates twelve extraction attacks, twelve defenses spanning watermarking, output-perturbation, and query-pattern-detection families, ten public graphs covering homophilic, heterophilic, and large-scale regimes, three GNN backbones, and three graph-learning tasks, and it reports fidelity, task utility, ownership verification, and computational cost on shared splits, queries, and budgets. We further add a joint attack-and-defense track which runs every attack on every defended target and measures watermark verification on the resulting surrogate, which exposes the protection that a defense retains after extraction. The empirical picture is short: stealing a GNN is easy at medium query budgets and most defenses do not change this; several watermarks verify reliably on the protected model but lose most of their verification signal on the extracted surrogate, which exposes a gap that singlemodel evaluations miss; and heterophilic graphs are systematically harder to steal, while a cross-architecture mismatch between target and surrogate reduces but does not prevent extraction. We release GraphIP-Bench with reproducible scripts and configurations, and integrate the attacks and defenses into the PyGIP library. github.com/LabRAI/GraphIP-Bench labrai.github.io/PyGIP

For agents

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

get_harvested_code_for_paper("2605.12827")
get_code_for_paper("2605.12827")
have("2605.12827")

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

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

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

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

Connect an agent — have() is free.