SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.03488 · 2020

Adversarial Attack on Large Scale Graph

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2009.03488.json · badge: /api/ran/2009.03488.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
EdisonLeeeee/SGAttack canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
ego_graph Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/ego_graph.py
code served (permissive licence) · get_code("ce035bcfdb106408")
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 tuple. 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 numpy as np
from scipy import sparse

# Create a small sparse adjacency matrix
# Using CSR format (indices, indptr, data)
# Build a simple graph: 0-1, 1-2, 2-3, 0-2, 1-3
row = np.array([0, 0, 1, 1, 2, 3], dtype=np.int32)
col = np.array([1, 2, 0, 3, 1, 1], dtype=np.int32)
data = np.array([1, 1, 1, 1, 1, 1], dtype=np.float32)

adj_matrix = sparse.csr_matrix((data, (row, col)), shape=(4, 4))

# Define arguments
ARGS = {
    'adj_matrix': adj_matrix,
    'targets': 0,
    'hops': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
evaluate Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/classifier/gcn.py
code served (permissive licence) · get_code("2c4323683a7d35f4")
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 tuple, ndim 1, 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
from sklearn.metrics import f1_score

# The function evaluate takes:
# - test_pred: predictions (array-like of class labels)
# - test_real: ground truth labels (array-like of class labels)
# Both are used with f1_score, which expects 1D arrays of integer labels

# Create small test data with distinct class labels
np.random.seed(0)

# 10 samples, 3 possible classes (0, 1, 2)
test_pred = np.array([0, 1, 2, 0, 1, 2, 0, 1, 0, 2])
test_real = np.array([0, 1, 1, 0, 2, 2, 0, 1, 1, 2])

ARGS = {
    'test_pred': test_pred,
    'test_real': test_real,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
extra_edges Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/ego_graph.py
code served (permissive licence) · get_code("ea3ce97f4a4d4ffe")
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 list, ndim 2, dtype family int; 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
from numba.typed import Dict
from numba import types

# Construct CSR sparse matrix representation
# indices: column indices for non-zero entries
# indptr: row pointer array
# This represents a small sparse graph

# Create a simple sparse adjacency matrix using CSR format
# Let's create a graph with 5 nodes and some edges
indptr = np.array([0, 2, 4, 6, 7, 9], dtype=np.int64)
indices = np.array([1, 2, 0, 3, 1, 4, 2, 0, 4], dtype=np.int64)

# last_level: set of nodes to explore from (at current BFS level)
last_level = np.array([0, 1], dtype=np.int64)

# seen: array tracking which nodes have been seen at which hop level
# Initialize with -1 (unseen), then set specific values
seen = np.full(5, -1, dtype=np.int64)
seen[0] = 0
seen[1] = 0
seen[2] = 1
seen[3] = 1
seen[4] = 2

# hops: the hop level we're looking for
hops = 1

ARGS = {
    'indices': indices,
    'indptr': indptr,
    'last_level': last_level,
    'seen': seen,
    'hops': hops
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
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
least_indices Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/attacker/sga.py
code served (permissive licence) · get_code("0dc4680e49fcd831")
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 tuple, ndim 2, dtype family int; 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

# Create a small 2D numpy array with distinct dimensions (4 rows, 3 columns)
# to allow shape probing later
array = np.array([
    [9.2, 1.5, 7.3],
    [2.1, 8.4, 3.6],
    [5.8, 0.9, 4.2],
    [6.1, 3.3, 2.7]
], dtype=np.float32)

# Number of least indices to find
n = 5

ARGS = {
    "array": array,
    "n": n
}
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 tuple, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
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
normalize Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/attacker/sga.py
code served (permissive licence) · get_code("7252d7027e14db0a")
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 (4,) 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

# Create small test data
np.random.seed(0)

# data: array of edge weights/values
data = np.array([1.0, 2.0, 3.0, 4.0])

# indices: 2D array of shape (n_edges, 2) containing row and column indices
indices = np.array([[0, 1], [1, 2], [2, 0], [0, 2]], dtype=np.int64)

# degree: 1D array of node degrees (length must be >= max index in indices)
# Max index in indices is 2, so we need at least 3 elements
degree = np.array([2.0, 2.0, 2.0])

ARGS = {
    "data": data,
    "indices": indices,
    "degree": degree
}
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 (4,) — shape (4,) 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
sample_targets Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/utils.py
code served (permissive licence) · get_code("52f1cfa8f8dc33d1")
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 (1000,) 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

# Create a list of node identifiers
nodes = np.arange(0, 5000)

# Define arguments for sample_targets
ARGS = {
    "nodes": nodes,
    "size": 1000,
    "seed": 2018
}
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 (1000,) — shape (1000,) 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
train_val_test_split_tabular Ran
ran on a synthesized input
EdisonLeeeee/SGAttack/src/utils.py
code served (permissive licence) · get_code("7c6646b095f8a748")
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 tuple. 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create a simple stratification array for testing
# This will be used to stratify the split
stratify_array = np.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1] * 5)  # 50 samples with binary classes

ARGS = {
    "N": 50,
    "train_size": 0.1,
    "val_size": 0.1,
    "test_size": 0.8,
    "stratify": stratify_array,
    "random_state": 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
load_npz Not yet run
unverified (harvested, no recorded run)
EdisonLeeeee/SGAttack/src/utils.py
code served (permissive licence) · get_code("3b49e3b820a0cded")
How it ran

no invocation recorded.

sparse_dropout Not yet run
unverified (harvested, no recorded run)
EdisonLeeeee/SGAttack/src/classifier/gcn.py
pointer only (licence: MIT); the stored copy get_code serves, from thumlp/tensorgcn, is pointer only (licence: NONE) · get_code("81be8a5f4732fe52")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from thumlp/tensorgcn, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. 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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 8 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
sparse_dropout 18 other papers
16 dated earlier, 2 later · 2 only as an assembly brick
1603.08861 (2016-03)
Revisiting Semi-Supervised Learning with Graph Embeddings
1606.09375 (2016-06)
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
1609.02907 (2016-09)
Semi-Supervised Classification with Graph Convolutional Networks
and 15 more not named here

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

Repositories linked to this paper

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

Abstract

Recent studies have shown that graph neural networks (GNNs) are vulnerable against perturbations due to lack of robustness and can therefore be easily fooled. Currently, most works on attacking GNNs are mainly using gradient information to guide the attack and achieve outstanding performance. However, the high complexity of time and space makes them unmanageable for large scale graphs and becomes the major bottleneck that prevents the practical usage. We argue that the main reason is that they have to use the whole graph for attacks, resulting in the increasing time and space complexity as the data scale grows. In this work, we propose an efficient Simplified Gradient-based Attack (SGA) method to bridge this gap. SGA can cause the GNNs to misclassify specific target nodes through a multi-stage attack framework, which needs only a much smaller subgraph. In addition, we present a practical metric named Degree Assortativity Change (DAC) to measure the impacts of adversarial attacks on graph data. We evaluate our attack method on four real-world graph networks by attacking several commonly used GNNs. The experimental results demonstrate that SGA can achieve significant time and memory efficiency improvements while maintaining competitive attack performance compared to state-of-art attack techniques. Codes are available via: https://github.com/EdisonLeeeee/SGAttack.

For agents

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

get_harvested_code_for_paper("2009.03488")
get_code_for_paper("2009.03488")
have("2009.03488")

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

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

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

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

Connect an agent — have() is free.