SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.06706 · ICLR · 2024

CoRe-GD: A Hierarchical Framework for Scalable Graph Visualization with GNNs

Roger Wattenhofer, Florian Grötschla, Joël Mathys, Robert Veres

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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, 1 violated it and 0 have no contract verdict; 5 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/2402.06706.json · badge: /api/ran/2402.06706.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
floriangroetschla/core-gd canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
add_node_attr Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
floriangroetschla/core-gd/neuraldrawer/network/preprocessing.py
code served (permissive licence) · get_code("98ee59359a05002e")
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 Data. 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
from torch_geometric.data import Data

torch.manual_seed(0)

# Create a simple Data object with node features
data = Data(
    x=torch.randn(2, 4),  # 2 nodes, 4 features
    edge_index=torch.tensor([[0, 1], [1, 0]], dtype=torch.long).t().contiguous()
)

# Create a value tensor to add as node attribute
value = torch.randn(2, 3)  # 2 nodes, 3 features

ARGS = {
    "data": data,
    "value": value,
    "attr_name": None
}
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 Data — a Data 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
convert_for_stress Ran
ran; our contract draft was wrong, not the code
floriangroetschla/core-gd/neuraldrawer/datasets/transforms.py
code served (permissive licence) · get_code("f68262d93ce0d8d1")
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 Data. 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_geometric as pyg
import numpy as np
import networkx as nx
from torch_geometric.utils import to_networkx, to_undirected

torch.manual_seed(0)
np.random.seed(0)

# Create a small graph
edge_index = torch.tensor([[0, 1, 1, 2], [1, 0, 2, 1]], dtype=torch.long)
x = torch.randn(3, 4, dtype=torch.float)

# Create a pyg Data object
data = pyg.data.Data(x=x, edge_index=edge_index)

# Define a simple initializer function that returns a dict of node positions
def simple_initializer(G):
    positions = {}
    for node in G.nodes():
        positions[node] = np.array([np.random.randn(), np.random.randn()])
    return positions

ARGS = {
    "data": data,
    "use_real_edges": True,
    "initializer": simple_initializer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Data — a Data 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
filter_connected Ran
ran, violated the contract we drafted
floriangroetschla/core-gd/neuraldrawer/datasets/transforms.py
code served (permissive licence) · get_code("96c3a45691a1a48d")
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 torch.nn as nn
import networkx as nx
from torch_geometric.data import Data

torch.manual_seed(0)

# Create a connected graph with at least 8 nodes
# We'll create a simple connected graph using edge_index and node features
num_nodes = 10
num_edges = 12

# Create edge indices that form a connected graph
edge_index = torch.tensor([
    [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9],
    [1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8]
], dtype=torch.long)

# Create node features (required by PyG Data object)
x = torch.randn(num_nodes, 4)

# Create a PyG Data object
data = Data(x=x, edge_index=edge_index, num_nodes=num_nodes)

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, torch, torch_geometric — 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
get_full_edges Ran
ran; our contract draft was wrong, not the code
floriangroetschla/core-gd/neuraldrawer/network/losses.py
code served (permissive licence) · get_code("011508da9211511d")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Construct node_pos: tensor of shape (num_nodes, feature_dim)
# Using distinct dimensions: 5 nodes, 4 features
node_pos = torch.randn(5, 4)

# Construct batch object with full_edge_index attribute
# full_edge_index should be a tensor of shape (2, num_edges) containing node indices
class BatchStandIn:
    def __init__(self):
        # Create edge indices: 3 edges, each edge connects two nodes
        # Shape: (2, 3) - first row is source nodes, second row is target nodes
        self.full_edge_index = torch.tensor([
            [0, 1, 2],  # source nodes
            [1, 2, 3]   # target nodes
        ])

batch = BatchStandIn()

ARGS = {
    "node_pos": node_pos,
    "batch": batch
}
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 tuple, ndim 3, 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
get_mtx_graphs Ran
ran; our contract draft was wrong, not the code
floriangroetschla/core-gd/neuraldrawer/datasets/datasets.py
code served (permissive licence) · get_code("4d17dbc0ea6b348e")
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. 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 networkx as nx
import numpy as np
from scipy.io import mmwrite
from torch_geometric.utils import remove_self_loops, to_networkx, to_undirected, from_networkx

# Create temporary directory structure with .mtx files
tmpdir = tempfile.mkdtemp()

# Create a couple of folder structures with .mtx files
folder1 = os.path.join(tmpdir, "graph1")
folder2 = os.path.join(tmpdir, "graph2")
os.makedirs(folder1, exist_ok=True)
os.makedirs(folder2, exist_ok=True)

# Create a small connected graph (200 nodes, ~300 edges)
# Using a grid graph which is guaranteed to be connected
G1 = nx.grid_2d_graph(14, 14)  # 196 nodes
G1 = nx.convert_node_labels_to_integers(G1)
A1 = nx.to_scipy_sparse_array(G1, format='coo')
mmwrite(os.path.join(folder1, "graph.mtx"), A1)

# Create another connected graph (150 nodes)
G2 = nx.grid_2d_graph(12, 12)  # 144 nodes
G2 = nx.convert_node_labels_to_integers(G2)
A2 = nx.to_scipy_sparse_array(G2, format='coo')
mmwrite(os.path.join(folder2, "graph.mtx"), A2)

ARGS = {
    "mtx_folders": ["graph1", "graph2"],
    "destpath": tmpdir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
random_delaunay_graph Ran
ran; our contract draft was wrong, not the code
floriangroetschla/core-gd/neuraldrawer/datasets/datasets.py
code served (permissive licence) · get_code("c6b017b6b4816d2c")
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 Data. 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 numpy as np
import networkx as nx
from torch_geometric.utils import remove_self_loops, to_networkx, to_undirected, from_networkx
from scipy.spatial import Delaunay

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    "num_nodes": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy, torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Data — a Data 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
triplet_to_edge_index Ran
ran, honoured the contract we drafted
floriangroetschla/core-gd/neuraldrawer/network/model.py
code served (permissive licence) · get_code("0a4ee371c1593a1a")
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 2, 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 torch

torch.manual_seed(0)

# The function takes triplets as input
# It expects triplets to be iterable, where each element i has indices [0], [1], [2]
# The simplest structure is a list of tuples or lists

triplets = [
    (0, 1, 2),
    (1, 2, 3),
    (2, 3, 0)
]

ARGS = {
    "triplets": triplets
}
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 list, ndim 2, 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
compute_positional_encodings Not yet run
unverified (harvested, no recorded run)
floriangroetschla/core-gd/neuraldrawer/network/preprocessing.py
code served (permissive licence) · get_code("6027bed0a4dd101f")
How it ran

no invocation recorded.

go_to_coarser_graph Not yet run
unverified (harvested, no recorded run)
floriangroetschla/core-gd/runtime_comparison.py
code served (permissive licence) · get_code("21b9c8c049b80480")
How it ran

no invocation recorded.

pmds_layout Not yet run
unverified (harvested, no recorded run)
floriangroetschla/core-gd/neuraldrawer/datasets/transforms.py
code served (permissive licence) · get_code("c4336565afb22bf2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 9 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
add_node_attr 1 other paper
1 later
2407.20912 (2024-07)
What Are Good Positional Encodings for Directed 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-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

Graph Visualization, also known as Graph Drawing, aims to find geometric embeddings of graphs that optimize certain criteria. Stress is a widely used metric; stress is minimized when every pair of nodes is positioned at their shortest path distance. However, stress optimization presents computational challenges due to its inherent complexity and is usually solved using heuristics in practice. We introduce a scalable Graph Neural Network (GNN) based Graph Drawing framework with sub-quadratic runtime that can learn to optimize stress. Inspired by classical stress optimization techniques and force-directed layout algorithms, we create a coarsening hierarchy for the input graph. Beginning at the coarsest level, we iteratively refine and un-coarsen the layout, until we generate an embedding for the original graph. To enhance information propagation within the network, we propose a novel positional rewiring technique based on intermediate node positions. Our empirical evaluation demonstrates that the framework achieves state-of-theart performance while remaining scalable.

For agents

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

get_harvested_code_for_paper("2402.06706")
get_code_for_paper("2402.06706")
have("2402.06706")

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

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

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

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

Connect an agent — have() is free.