SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.08216 · 2020

Graph topology inference benchmarks for machine learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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 10 have no contract verdict; 0 failures 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/2007.08216.json · badge: /api/ran/2007.08216.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
cadurosar/benchmark_graphinference canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_snr Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/graph_denoising.py
code served (permissive licence) · get_code("606e1eec0c468ea0")
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 float32, 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 numpy as np

# Create sample signal and noisy signal
np.random.seed(0)

# Create a clean signal
signal = np.random.randn(100).astype(np.float32)

# Create a noisy version by adding noise
noise = np.random.randn(100).astype(np.float32) * 0.1
noisy_signal = signal + noise

ARGS = {
    "noisy_signal": noisy_signal,
    "signal": signal,
}
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 float32, 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
covariance Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/generate_graph.py
code served (permissive licence) · get_code("2e949edefabbe743")
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 2, dtype family float, shape (3, 3) 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 small matrix for testing
# The function operates on a 2D matrix and computes covariance
# matrix.shape[1] is used to create weight vectors
# The function sums along axis=1, so we need multiple rows
matrix = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [2.0, 3.0, 4.0, 5.0],
    [3.0, 4.0, 5.0, 6.0]
], dtype=np.float64)

ARGS = {
    "matrix": 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 2, dtype family float, shape (3, 3) — shape (3, 3) 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
create_directed_KNN_mask Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/nnk/graph_utils.py
code served (permissive licence) · get_code("39cd77e5e06834ca")
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 2, dtype family int, shape (5, 11) 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 small distance matrix
# Shape should be (n_samples, n_features) where we have distances
# Using shape (5, 15) to have enough elements for knn_param=10
np.random.seed(0)
D = np.random.rand(5, 15)

ARGS = {
    'D': D,
    'knn_param': 10,
    'D_type': 'distance'
}
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 2, dtype family int, shape (5, 11) — shape (5, 11) 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_train_val_test_split Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/semi_supervised_benchmark.py
code served (permissive licence) · get_code("83aaebabbedb20b2")
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

# Create a random state for reproducibility
random_state = np.random.RandomState(42)

# Create labels for a simple classification problem
# 3 classes (0, 1, 2), with enough samples per class
num_samples = 30
labels = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                   1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                   2, 2, 2, 2, 2, 2, 2, 2, 2, 2], dtype=np.int64)

ARGS = {
    'random_state': random_state,
    'labels': labels,
    'train_examples_per_class': 3,
    'val_examples_per_class': 2,
    'test_examples_per_class': 2,
    'train_size': None,
    'val_size': None,
    'test_size': None,
}
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 — 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
largest_connected_components Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/generate_graph.py
code served (permissive licence) · get_code("a9c1bf34eaa3d811")
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 scipy
import numpy as np

# Create a small sparse adjacency matrix
# This matrix represents a graph with 5 nodes
# We'll create a matrix with 2 connected components
row = np.array([0, 1, 1, 3, 4])
col = np.array([1, 0, 2, 4, 3])
data = np.array([1, 1, 1, 1, 1])
adj_matrix = scipy.sparse.csr_matrix((data, (row, col)), shape=(5, 5))

ARGS = {
    "adj_matrix": adj_matrix,
    "n_components": 1
}
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
lp_distance Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/nnk/graph_utils.py
code served (permissive licence) · get_code("c4cea419a523d0a1")
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

# Create two small points
pointA = np.array([1.0, 2.0, 3.0, 4.0])
pointB = np.array([5.0, 6.0, 7.0, 8.0])

# Create a norm parameter
p = 2

ARGS = {
    "pointA": pointA,
    "pointB": pointB,
    "p": p,
}
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
read_adjacence_matrix Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/generate_graph.py
code served (permissive licence) · get_code("b464ade7ef9df739")
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 2, dtype family float, shape (3, 3) 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
import gzip
import tempfile
import os

# Create a temporary gzip file with adjacency matrix data
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, "adjacency.txt.gz")

# Write sample adjacency matrix data to the gzip file
with gzip.open(file_path, 'wt') as f:
    f.write("0\t1\t0.5\n")
    f.write("1\t2\t0.7\n")
    f.write("2\t0\t0.3\n")
    f.write("1\t0\t0.9\n")

ARGS = {
    "nodes": 3,
    "file_path": file_path
}
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 2, dtype family float, shape (3, 3) — shape (3, 3) 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
run_kmeans Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/unsupervised_benchmark.py
code served (permissive licence) · get_code("096190cf7796c5c6")
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
import os
import tempfile
import sklearn.cluster
import sklearn.metrics

# Create a temporary directory for refined datasets
temp_dir = tempfile.mkdtemp()
refined_path = os.path.join(temp_dir, 'refined_datasets', 'features')
os.makedirs(refined_path, exist_ok=True)

# Create a minimal STL dataset file
stl_file_path = os.path.join(refined_path, 'stl.npz')
stl_features = np.random.rand(1000, 16).astype(np.float32)
stl_labels = np.random.randint(0, 10, 1000)
np.savez(stl_file_path, x=stl_features, y=stl_labels)

# Create graph path (doesn't need to exist for this function)
graph_dir = os.path.join(temp_dir, 'graph')
os.makedirs(graph_dir, exist_ok=True)
graph_path = os.path.join(graph_dir, 'STL_Cosine_False_0_None.gz')

ARGS = {
    'dataset': 'STL',
    'graph_path': graph_path,
    'refined_path': refined_path,
    'assign_labels': 'kmeans'
}
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
sample_per_class Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/semi_supervised_benchmark.py
code served (permissive licence) · get_code("15f8cdfa54391595")
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 (6,) 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 random state object
random_state = np.random.RandomState(42)

# Create labels array with 3 classes (0, 1, 2)
# We need at least num_examples_per_class samples per class
# Let's create 10 samples total: 4 of class 0, 3 of class 1, 3 of class 2
labels = np.array([0, 0, 0, 0, 1, 1, 1, 2, 2, 2], dtype=np.int64)

# Number of examples to sample per class
num_examples_per_class = 2

# Optional forbidden indices (set to None or a set of indices to exclude)
forbidden_indices = None

ARGS = {
    "random_state": random_state,
    "labels": labels,
    "num_examples_per_class": num_examples_per_class,
    "forbidden_indices": forbidden_indices,
}
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 (6,) — shape (6,) 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_regression Ran
ran on a synthesized input
cadurosar/benchmark_graphinference/semi_supervised_benchmark.py
code served (permissive licence) · get_code("fd9f96fc28a50a6b")
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 SimpleRegressionModel. 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)

class SimpleRegressionModel(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleRegressionModel(input_dim=4, output_dim=3)
train_features = torch.randn(2, 4)
train_labels = torch.randint(0, 3, (2,))
val_features = torch.randn(2, 4)
val_labels = torch.randint(0, 3, (2,))

ARGS = {
    "model": model,
    "train_features": train_features,
    "train_labels": train_labels,
    "val_features": val_features,
    "val_labels": val_labels,
    "epochs": 100,
    "weight_decay": 0,
    "lr": 0.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 SimpleRegressionModel — a SimpleRegressionModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleRegressionModel 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
create_distance_matrix Not yet run
unverified (harvested, no recorded run)
cadurosar/benchmark_graphinference/nnk/graph_utils.py
code served (permissive licence) · get_code("f37c9c6d56a70ef6")
How it ran

no invocation recorded.

knn_graph Not yet run
unverified (harvested, no recorded run)
cadurosar/benchmark_graphinference/nnk/graph_construction.py
code served (permissive licence) · get_code("618f5e1578a7d7af")
How it ran

no invocation recorded.

nnk_graph Not yet run
unverified (harvested, no recorded run)
cadurosar/benchmark_graphinference/nnk/graph_construction.py
code served (permissive licence) · get_code("4042027896566b30")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 13 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-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

Graphs are nowadays ubiquitous in the fields of signal processing and machine learning. As a tool used to express relationships between objects, graphs can be deployed to various ends: I) clustering of vertices, II) semi-supervised classification of vertices, III) supervised classification of graph signals, and IV) denoising of graph signals. However, in many practical cases graphs are not explicitly available and must therefore be inferred from data. Validation is a challenging endeavor that naturally depends on the downstream task for which the graph is learnt. Accordingly, it has often been difficult to compare the efficacy of different algorithms. In this work, we introduce several ease-to-use and publicly released benchmarks specifically designed to reveal the relative merits and limitations of graph inference methods. We also contrast some of the most prominent techniques in the literature.

For agents

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

get_harvested_code_for_paper("2007.08216")
get_code_for_paper("2007.08216")
have("2007.08216")

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

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

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

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

Connect an agent — have() is free.