SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.07984 · 2018

Adversarial Attacks on Neural Networks for Graph Data

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-23; 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/1805.07984.json · badge: /api/ran/1805.07984.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
danielzuegner/nettack community (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_alpha Ran
ran on a synthesized input
danielzuegner/nettack/nettack/nettack.py
code served (permissive licence) · get_code("3dfa8f8448457f20")
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

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

# Case 1: scalar inputs
n_scalar = 100
S_d_scalar = 450.5
d_min_scalar = 2

# Case 2: array inputs
n_array = np.array([50, 100, 150])
S_d_array = np.array([200.3, 450.5, 750.2])
d_min_array = 2

# Create ARGS dict with scalar values
ARGS = {
    "n": n_scalar,
    "S_d": S_d_scalar,
    "d_min": d_min_scalar
}
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
connected_after Ran
ran on a synthesized input
danielzuegner/nettack/nettack/nettack.py
code served (permissive licence) · get_code("e76a55dd6370c052")
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
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - u: integer (compared with v and checked against -1 implicitly through delta)
# - v: integer (compared with u)
# - connected_before: boolean (returned when u != v)
# - delta: integer (compared with -1)

ARGS = {
    "u": 0,
    "v": 1,
    "connected_before": True,
    "delta": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, numpy, 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
largest_connected_components Ran
ran, honoured the contract we drafted
danielzuegner/nettack/nettack/utils.py
code served (permissive licence) · get_code("f18b6a502c85b70f")
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 1, 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 scipy.sparse import csr_matrix

# Create a simple sparse adjacency matrix
# We'll create a graph with some connected components
# Component 1: nodes 0-2 (size 3)
# Component 2: nodes 3-4 (size 2)
# Component 3: node 5 (size 1)
row = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4])
col = np.array([1, 2, 0, 2, 0, 1, 4, 4, 3, 3])
data = np.ones(len(row))
adj = csr_matrix((data, (row, col)), shape=(6, 6))

ARGS = {
    'adj': adj,
    'n_components': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
load_npz Ran
ran on a synthesized input
danielzuegner/nettack/nettack/utils.py
code served (permissive licence) · get_code("3a0244a98c124e9a")
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 scipy.sparse as sp
import numpy as np
import tempfile
import os

# Create a temporary directory and file for the npz
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_graph.npz")

# Create sparse matrix data for adjacency matrix (4x4)
adj_data = np.array([1, 2, 3, 4], dtype=np.float32)
adj_indices = np.array([0, 1, 2, 3], dtype=np.int32)
adj_indptr = np.array([0, 1, 2, 3, 4], dtype=np.int32)
adj_shape = (4, 4)

# Create sparse matrix data for attribute matrix (4x3)
attr_data = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], dtype=np.float32)
attr_indices = np.array([0, 1, 2, 0, 1, 2], dtype=np.int32)
attr_indptr = np.array([0, 2, 4, 6, 6], dtype=np.int32)
attr_shape = (4, 3)

# Create labels
labels = np.array([0, 1, 0, 1], dtype=np.int32)

# Save to npz file
np.savez(
    temp_file,
    adj_data=adj_data,
    adj_indices=adj_indices,
    adj_indptr=adj_indptr,
    adj_shape=adj_shape,
    attr_data=attr_data,
    attr_indices=attr_indices,
    attr_indptr=attr_indptr,
    attr_shape=attr_shape,
    labels=labels
)

ARGS = {
    "file_name": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
preprocess_graph Ran
ran; our contract draft was wrong, not the code
danielzuegner/nettack/nettack/utils.py
code served (permissive licence) · get_code("fc3b508e487bb7c6")
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 csr_matrix. 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 scipy.sparse as sp
import numpy as np

# Create a small sparse adjacency matrix
# The function expects a scipy sparse matrix
n_nodes = 4
# Create a simple sparse graph as CSR matrix
row = np.array([0, 1, 2, 3, 0, 2])
col = np.array([1, 2, 3, 0, 3, 1])
data = np.array([1, 1, 1, 1, 1, 1], dtype=float)
adj = sp.csr_matrix((data, (row, col)), shape=(n_nodes, n_nodes))

ARGS = {
    'adj': adj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type csr_matrix — a csr_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csr_matrix 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
compute_new_a_hat_uv Not yet run
unverified (harvested, no recorded run)
danielzuegner/nettack/nettack/nettack.py
code served (permissive licence) · get_code("f7fada718dfb80fa")
How it ran

no invocation recorded.

eval_class Not yet run
unverified (harvested, no recorded run)
danielzuegner/nettack/nettack/GCN.py
code served (permissive licence) · get_code("fe0c7932ba49e99d")
How it ran

no invocation recorded.

sparse_dropout Not yet run
unverified (harvested, no recorded run)
danielzuegner/nettack/nettack/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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 7 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 7 later) and 1 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
3 dated earlier, 15 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
largest_connected_components 6 other papers
1 dated earlier, 5 later
1803.00816 (2018-03)
NetGAN: Generating Graphs via Random Walks
1902.08412 (2019-02)
Adversarial Attacks on Graph Neural Networks via Meta Learning
2002.04784 (2020-02)
Graph Universal Adversarial Attacks: A Few Bad Actors Ruin Graph Learning Models
and 3 more not named here
compute_new_a_hat_uv 3 other papers
3 later
2005.06149 (2020-05)
DeepRobust: A PyTorch Library for Adversarial Attacks and Defenses
2005.11079 (2020-05)
Graph Random Neural Networks for Semi-Supervised Learning on Graphs
2110.14038 (2021-10)
Robustness of Graph Neural Networks at Scale
connected_after 3 other papers
3 later
2005.06149 (2020-05)
DeepRobust: A PyTorch Library for Adversarial Attacks and Defenses
2005.11079 (2020-05)
Graph Random Neural Networks for Semi-Supervised Learning on Graphs
2110.14038 (2021-10)
Robustness of Graph Neural Networks at Scale
preprocess_graph 3 other papers
3 later
1902.08412 (2019-02)
Adversarial Attacks on Graph Neural Networks via Meta Learning
2004.13825 (2020-04)
Scalable Attack on Graph Data by Injecting Vicious Nodes
2005.11079 (2020-05)
Graph Random Neural Networks for Semi-Supervised Learning on Graphs
compute_alpha 2 other papers
2 later
2005.11079 (2020-05)
Graph Random Neural Networks for Semi-Supervised Learning on Graphs
2110.14038 (2021-10)
Robustness of Graph Neural Networks at Scale
load_npz 1 other paper
1 later
2005.11079 (2020-05)
Graph Random Neural Networks for Semi-Supervised Learning on Graphs

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

Repositories linked to this paper

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

Abstract

Deep learning models for graphs have achieved strong performance for the task of node classification. Despite their proliferation, currently there is no study of their robustness to adversarial attacks. Yet, in domains where they are likely to be used, e.g. the web, adversaries are common. Can deep learning models for graphs be easily fooled? In this work, we introduce the first study of adversarial attacks on attributed graphs, specifically focusing on models exploiting ideas of graph convolutions. In addition to attacks at test time, we tackle the more challenging class of poisoning/causative attacks, which focus on the training phase of a machine learning model. We generate adversarial perturbations targeting the node's features and the graph structure, thus, taking the dependencies between instances in account. Moreover, we ensure that the perturbations remain unnoticeable by preserving important data characteristics. To cope with the underlying discrete domain we propose an efficient algorithm Nettack exploiting incremental computations. Our experimental study shows that accuracy of node classification significantly drops even when performing only few perturbations. Even more, our attacks are transferable: the learned attacks generalize to other state-of-the-art node classification models and unsupervised approaches, and likewise are successful even when only limited knowledge about the graph is given.

For agents

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

get_harvested_code_for_paper("1805.07984")
get_code_for_paper("1805.07984")
have("1805.07984")

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

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

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

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

Connect an agent — have() is free.