SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.07758 · ICML · 2023

Generated Graph Detection

Yang Zhang, Ning Yu, Yun Shen, Yihan Ma, Zhikun Zhang, Xinlei He, Michael Backes

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, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 0 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/2306.07758.json · badge: /api/ran/2306.07758.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
yvonnemamama/ggd canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
element_l1 Ran
ran on a synthesized input
yvonnemamama/ggd/GraphCL.py
code served (permissive licence) · get_code("a1924ebf19f35d6d")
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 Tensor, ndim 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Create two small embedding tensors
embedding_1 = torch.randn(2, 4)  # batch size 2, embedding dimension 4
embedding_2 = torch.randn(2, 4)  # batch size 2, embedding dimension 4

ARGS = {
    "embedding_1": embedding_1,
    "embedding_2": embedding_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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
gen_avg Ran
ran on a synthesized input
yvonnemamama/ggd/preprocessing.py
code served (permissive licence) · get_code("a56349749a9029ed")
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 random

# Test case 1: Using expected_avg, n, a, b with class_name='int'
ARGS = {
    "expected_avg": 50,
    "n": 20,
    "a": 10,
    "b": 90,
    "class_name": "int",
    "distribution": {}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
getaverageoflist Ran
ran on a synthesized input
yvonnemamama/ggd/preprocessing.py
code served (permissive licence) · get_code("5aed458d495ec5a3")
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 float, 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)

# Analyze the function: getaverageoflist takes a list parameter
# and iterates through items, summing them and dividing by length
# The items must support += operation and division must be valid

# Create a simple list of numbers
list_of_numbers = [1, 2, 3, 4, 5]

ARGS = {
    "list": list_of_numbers
}
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 float, 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
make_gin_conv Ran
ran on a synthesized input
yvonnemamama/ggd/GraphCL.py
code served (permissive licence) · get_code("90f70700ceae8231")
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 GINConv. 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

torch.manual_seed(0)

# Define arguments for make_gin_conv
input_dim = 4
out_dim = 3

ARGS = {
    "input_dim": input_dim,
    "out_dim": out_dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GINConv — a GINConv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GINConv 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
train Ran
ran on a synthesized input
yvonnemamama/ggd/GraphCL.py
code served (permissive licence) · get_code("17d49558f559cb3d")
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 float, 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 torch.nn as nn
from torch.optim import Adam

torch.manual_seed(0)

# Create a minimal Data class that mimics PyG Data
class Data:
    def __init__(self, x, edge_index, batch):
        self.x = x
        self.edge_index = edge_index
        self.batch = batch
    
    def to(self, device):
        self.x = self.x.to(device) if self.x is not None else None
        self.edge_index = self.edge_index.to(device) if self.edge_index is not None else None
        self.batch = self.batch.to(device)
        return self

# Minimal encoder model
class EncoderModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Module()
        self.encoder.project = nn.Linear(4, 4)
        self.linear1 = nn.Linear(3, 4)
        self.linear2 = nn.Linear(4, 4)
    
    def forward(self, x, edge_index, batch):
        # Returns 6 values: 5 unused + g1, g2
        g1 = self.linear1(torch.randn(2, 3))  # random embeddings
        g2 = self.linear2(torch.randn(2, 4))
        return None, None, None, None, g1, g2

# Minimal contrast model
class ContrastModel(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, g1, g2, batch):
        # Return a scalar loss
        return torch.tensor(0.5, requires_grad=True)

# Create instances
encoder_model = EncoderModel()
contrast_model = ContrastModel()
device = torch.device('cpu')

# Create minimal dataloader with 2 samples
data1 = Data(
    x=None,
    edge_index=torch.tensor([[0, 1], [1, 0]], dtype=torch.long),
    batch=torch.tensor([0, 0], dtype=torch.long)
)
data2 = Data(
    x=None,
    edge_index=torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long),
    batch=torch.tensor([0, 0, 1], dtype=torch.long)
)
dataloader = [data1, data2]

# Create optimizer
optimizer = Adam(encoder_model.parameters(), lr=0.001)

ARGS = {
    'datasetname': 'test_dataset',
    'encoder_model': encoder_model,
    'contrast_model': contrast_model,
    'dataloader': dataloader,
    'optimizer': optimizer,
    'device': device
}
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 float, 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
tu2networkx Ran
ran on a synthesized input
yvonnemamama/ggd/preprocessing.py
code served (permissive licence) · get_code("2089debaf779945d")
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 os
import tempfile
import json

# Create temporary directories and files to simulate the dataset structure
tmpdir = tempfile.mkdtemp()
datasetname = 'test_dataset'

# Create the datasets directory structure
os.makedirs(f'{tmpdir}/datasets/{datasetname}', exist_ok=True)
os.makedirs(f'{tmpdir}/datasets/processed/{datasetname}', exist_ok=True)

# Create graph_indicator.txt - maps nodes to graphs
graph_indicator_path = f'{tmpdir}/datasets/{datasetname}/{datasetname}_graph_indicator.txt'
with open(graph_indicator_path, 'w') as f:
    # Node 1 -> Graph 1, Node 2 -> Graph 1, Node 3 -> Graph 2, Node 4 -> Graph 2
    f.write('1\n1\n2\n2\n')

# Create A.txt - edge list
edge_list_path = f'{tmpdir}/datasets/{datasetname}/{datasetname}_A.txt'
with open(edge_list_path, 'w') as f:
    # Edges within graph 1: (1,2)
    f.write('1,2\n')
    # Edges within graph 2: (3,4)
    f.write('3,4\n')

# Change to temporary directory to make relative paths work
original_cwd = os.getcwd()
os.chdir(tmpdir)

# Update datasetname to just the name part
datasetname = 'test_dataset'

ARGS = {
    'datasetname': datasetname
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

Graph generative models become increasingly effective for data distribution approximation and data augmentation. While they have aroused public concerns about their malicious misuses or misinformation broadcasts, just as what Deepfake visual and auditory media has been delivering to society. Hence it is essential to regulate the prevalence of generated graphs. To tackle this problem, we pioneer the formulation of the generated graph detection problem to distinguish generated graphs from real ones. We propose the first framework to systematically investigate a set of sophisticated models and their performance in four classification scenarios. Each scenario switches between seen and unseen datasets/generators during testing to get closer to real-world settings and progressively challenge the classifiers. Extensive experiments evidence that all the models are qualified for generated graph detection, with specific models having advantages in specific scenarios. Resulting from the validated generality and oblivion of the classifiers to unseen datasets/generators, we draw a safe conclusion that our solution can sustain for a decent while to curb generated graph misuses. 1

For agents

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

get_harvested_code_for_paper("2306.07758")
get_code_for_paper("2306.07758")
have("2306.07758")

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

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

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

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

Connect an agent — have() is free.