SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.01277 · 2019

Wasserstein Weisfeiler-Lehman Graph Kernels

arXiv · PDF · Open in the Atlas

Code that ran

5 of 11 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 5 have no contract verdict; 0 failures of our instrument; 6 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/1906.01277.json · badge: /api/ran/1906.01277.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
BorgwardtLab/WWL canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
wenbintum/wwl-gpr community (classifier label)
classifier basis not recorded on the link
1 ran · 3 no recorded run
FunctionStatusWhere it lives
cal_node_weights Ran
ran on a synthesized input
wenbintum/wwl-gpr/wwlgpr/Utility.py
code served (permissive licence) · get_code("ba303ab69efaf9ca")
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 (5, 1) 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 igraph

# Create a simple stand-in Atom class
class Atom:
    def __init__(self, number):
        self.number = number

# Create a simple graph with igraph
# Graph structure: 5 nodes total
# Nodes 0-2 are light atoms (C, N, O with atomic numbers < 18)
# Nodes 3-4 are metal atoms (Fe, Cu with atomic numbers > 18)
# Add edges to create bonding relationships

graph = igraph.Graph(5)

# Add edges between light atoms and metal atoms
# Edge 0: light atom 0 to metal atom 3
graph.add_edges([(0, 3), (1, 4), (2, 3), (2, 4)])

# Create atoms list with appropriate atomic numbers
atoms = [
    Atom(6),   # Node 0: Carbon (number < 18)
    Atom(7),   # Node 1: Nitrogen (number < 18)
    Atom(8),   # Node 2: Oxygen (number < 18)
    Atom(26),  # Node 3: Iron (number > 18)
    Atom(29),  # Node 4: Copper (number > 18)
]

# Define parameters for cal_node_weights
cutoff = 3
inner_cutoff = 1
inner_weight = 2.0
outer_weight = 1.0

# Build ARGS dictionary
ARGS = {
    "graph": graph,
    "atoms": atoms,
    "cutoff": cutoff,
    "inner_cutoff": inner_cutoff,
    "inner_weight": inner_weight,
    "outer_weight": outer_weight,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
igraph, 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 (5, 1) — shape (5, 1) 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
compute_wasserstein_distance Ran
ran on a synthesized input
BorgwardtLab/WWL/experiments/wwl.py
code served (permissive licence) · get_code("f0bdc08b57eafabf")
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 3, 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 small sample label sequences
# Each sequence should be a 2D array where:
# - First dimension: number of nodes/labels in the graph
# - Second dimension: embedding size = (h + 1) * n_feat

h = 2
n_feat = 3
emb_size = (h + 1) * n_feat  # = 3 * 3 = 9

# Create 2 label sequences with different numbers of nodes
label_seq_1 = np.random.randn(4, emb_size).astype(np.float64)
label_seq_2 = np.random.randn(5, emb_size).astype(np.float64)

label_sequences = [label_seq_1, label_seq_2]

ARGS = {
    'label_sequences': label_sequences,
    'h': h,
    'sinkhorn': False,
    'discrete': False,
    'sinkhorn_lambda': 0.01
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, ot — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, dtype family float — 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
read_gml Ran
ran on a synthesized input
BorgwardtLab/WWL/experiments/utilities.py
code served (permissive licence) · get_code("2e18ef039fb12dd4")
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
import igraph as ig
import tempfile
import os

# Create a temporary GML file with a simple graph
temp_dir = tempfile.mkdtemp()
temp_gml = os.path.join(temp_dir, "test_graph.gml")

# Create a simple graph and write it to GML format
g = ig.Graph()
g.add_vertices(3)
g.add_edges([(0, 1), (1, 2)])
g.vs['label'] = ['a', 'b', 'c']
ig.write(g, temp_gml)

ARGS = {
    'filename': temp_gml
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
igraph, 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
read_labels Ran
ran on a synthesized input
BorgwardtLab/WWL/experiments/utilities.py
code served (permissive licence) · get_code("72df551d8c4af0e4")
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 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 tempfile
import os

# Create a temporary file with sample labels
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "labels.txt")

with open(temp_file, "w") as f:
    f.write("label1\n")
    f.write("label2\n")
    f.write("label3\n")

ARGS = {
    "filename": temp_file
}
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 float — 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
retrieve_graph_filenames Ran
ran on a synthesized input
BorgwardtLab/WWL/src/wwl/utilities.py
code served (permissive licence) · get_code("f057079b9895ba72")
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 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 os
import tempfile
import shutil

# Create a temporary directory with some test .gml files
temp_dir = tempfile.mkdtemp()
try:
    # Create some dummy .gml files
    open(os.path.join(temp_dir, "graph1.gml"), "w").close()
    open(os.path.join(temp_dir, "graph2.gml"), "w").close()
    open(os.path.join(temp_dir, "other_file.txt"), "w").close()
    open(os.path.join(temp_dir, "graph3.gml"), "w").close()
    
    ARGS = {
        "data_directory": temp_dir
    }
finally:
    pass
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 float — 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
ActiveSiteIndex Not yet run
unverified (harvested, no recorded run)
wenbintum/wwl-gpr/wwlgpr/Utility.py
code served (permissive licence) · get_code("62b399837d7b060b")
How it ran

no invocation recorded.

R_conv_attributes Not yet run
unverified (harvested, no recorded run)
wenbintum/wwl-gpr/wwlgpr/WWL_GPR.py
code served (permissive licence) · get_code("0098868d2b7d06f2")
How it ran

no invocation recorded.

multiprocessing_WD Not yet run
unverified (harvested, no recorded run)
wenbintum/wwl-gpr/wwlgpr/Utility.py
code served (permissive licence) · get_code("008f645125a4df09")
How it ran

no invocation recorded.

pairwise_wasserstein_distance Not yet run
unverified (harvested, no recorded run)
BorgwardtLab/WWL/src/wwl/wwl.py
code served (permissive licence) · get_code("f8ef354516fa701c")
How it ran

no invocation recorded.

wwl Not yet run
unverified (harvested, no recorded run)
BorgwardtLab/WWL/src/wwl/wwl.py
code served (permissive licence) · get_code("da6828d3a76384fd")
How it ran

no invocation recorded.

wwl_custom_grid_search_cv Not yet run
unverified (harvested, no recorded run)
BorgwardtLab/WWL/src/wwl/utilities.py
code served (permissive licence) · get_code("d889f576e7f6730e")
How it ran

no invocation recorded.

Also present in other papers' code

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

Most graph kernels are an instance of the class of $\mathcal{R}$-Convolution kernels, which measure the similarity of objects by comparing their substructures. Despite their empirical success, most graph kernels use a naive aggregation of the final set of substructures, usually a sum or average, thereby potentially discarding valuable information about the distribution of individual components. Furthermore, only a limited instance of these approaches can be extended to continuously attributed graphs. We propose a novel method that relies on the Wasserstein distance between the node feature vector distributions of two graphs, which allows to find subtler differences in data sets by considering graphs as high-dimensional objects, rather than simple means. We further propose a Weisfeiler-Lehman inspired embedding scheme for graphs with continuous node attributes and weighted edges, enhance it with the computed Wasserstein distance, and thus improve the state-of-the-art prediction performance on several graph classification tasks.

For agents

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

get_harvested_code_for_paper("1906.01277")
get_code_for_paper("1906.01277")
have("1906.01277")

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

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

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

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

Connect an agent — have() is free.