SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1803.00816 · 2018

NetGAN: Generating Graphs via Random Walks

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 3 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/1803.00816.json · badge: /api/ran/1803.00816.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/netgan community (classifier label)
classifier basis not recorded on the link
3 ran · 3 no recorded run
FunctionStatusWhere it lives
edges_to_sparse Ran
ran; our contract draft was wrong, not the code
danielzuegner/netgan/netgan/utils.py
code served (permissive licence) · get_code("f0dc10a300cbac89")
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 numpy as np
import scipy.sparse as sp

# Create small test data for edges_to_sparse
edges = np.array([
    [0, 1],
    [1, 2],
    [2, 0],
    [1, 1]
], dtype=np.int32)

N = 3

values = np.array([1.5, 2.0, 0.5, 1.0], dtype=np.float32)

ARGS = {
    "edges": edges,
    "N": N,
    "values": values
}
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
largest_connected_components Ran
ran, honoured the contract we drafted
danielzuegner/netgan/netgan/utils.py
code served (permissive licence) · get_code("134a930a34a58173")
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 small sparse adjacency matrix for testing
# This will have multiple connected components
# Component 1: nodes 0, 1
# Component 2: nodes 2, 3
# Component 3: node 4
row = np.array([0, 1, 0, 2, 3, 2])
col = np.array([1, 0, 1, 3, 2, 3])
data = np.array([1, 1, 1, 1, 1, 1])
adj = csr_matrix((data, (row, col)), shape=(5, 5))

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/netgan/netgan/utils.py
code served (permissive licence) · get_code("a21cb3c39009ec5c")
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 for the test file
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_graph")

# Create sample sparse matrices
rows = np.array([0, 1, 2, 2])
cols = np.array([1, 2, 0, 1])
data = np.array([1.0, 2.0, 3.0, 4.0])
adj_shape = (3, 3)

# Create adjacency matrix in CSR format
adj_matrix = sp.csr_matrix((data, (rows, cols)), shape=adj_shape)

# Create attribute matrix
attr_rows = np.array([0, 1, 2])
attr_cols = np.array([0, 1, 0])
attr_data = np.array([1.0, 2.0, 3.0])
attr_shape = (3, 2)
attr_matrix = sp.csr_matrix((attr_data, (attr_rows, attr_cols)), shape=attr_shape)

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

# Build the loader dictionary with sparse matrix components
loader_dict = {
    'adj_data': adj_matrix.data,
    'adj_indices': adj_matrix.indices,
    'adj_indptr': adj_matrix.indptr,
    'adj_shape': adj_matrix.shape,
    'attr_data': attr_matrix.data,
    'attr_indices': attr_matrix.indices,
    'attr_indptr': attr_matrix.indptr,
    'attr_shape': attr_matrix.shape,
    'labels': labels
}

# Save to npz file
np.savez(temp_file, np.array(loader_dict, dtype=object))

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
gumbel_softmax_sample Not yet run
unverified (harvested, no recorded run)
danielzuegner/netgan/netgan/netgan.py
code served (permissive licence) · get_code("e88d13c54d340cc0")
How it ran

no invocation recorded.

make_noise Not yet run
unverified (harvested, no recorded run)
danielzuegner/netgan/netgan/netgan.py
code served (permissive licence) · get_code("10237b0f4a86379d")
How it ran

no invocation recorded.

sample_gumbel Not yet run
unverified (harvested, no recorded run)
danielzuegner/netgan/netgan/netgan.py
code served (permissive licence) · get_code("6f813d47c4badfd6")
How it ran

no invocation recorded.

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, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 4 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
largest_connected_components 6 other papers
6 later
1805.07984 (2018-05)
Adversarial Attacks on Neural Networks for Graph Data
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
edges_to_sparse 1 other paper
1 later
2410.21634 (2024-10)
Faster Local Solvers for Graph Diffusion Equations

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

We propose NetGAN - the first implicit generative model for graphs able to mimic real-world networks. We pose the problem of graph generation as learning the distribution of biased random walks over the input graph. The proposed model is based on a stochastic neural network that generates discrete output samples and is trained using the Wasserstein GAN objective. NetGAN is able to produce graphs that exhibit well-known network patterns without explicitly specifying them in the model definition. At the same time, our model exhibits strong generalization properties, as highlighted by its competitive link prediction performance, despite not being trained specifically for this task. Being the first approach to combine both of these desirable properties, NetGAN opens exciting avenues for further research.

For agents

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

get_harvested_code_for_paper("1803.00816")
get_code_for_paper("1803.00816")
have("1803.00816")

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

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

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

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

Connect an agent — have() is free.