SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.09517 · 2023

Transitivity-Preserving Graph Representation Learning for Bridging Local Connectivity and Role-based Similarity

arXiv · PDF · Open in the Atlas

Code that ran

19 of 26 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 12 have no contract verdict; 7 failures of our instrument; 7 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/2308.09517.json · badge: /api/ran/2308.09517.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
nslab-cuk/unified-graph-transformer canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
nslab-cuk/community-aware-graph-transformer community (classifier label)
classifier basis: plan_row
16 ran · 2 no recorded run
nslab-cuk/literalkg community (classifier label)
classifier basis not recorded on the link
0 ran · 2 no recorded run
FunctionStatusWhere it lives
DigitizeY Ran
ran; our contract draft was wrong, not the code
nslab-cuk/community-aware-graph-transformer/gnnutils.py
code served (permissive licence) · get_code("be384a8aa916b3d6")
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 MockPyGData. 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

torch.manual_seed(0)

class MockPyGData:
    def __init__(self, y):
        self.y = y

# Create a small tensor with values that will work with np.log10
# Values should be positive and in a reasonable range for log10
y_values = np.array([1.0, 5.0, 10.0, 50.0])
y_tensor = torch.from_numpy(y_values).float()

pyg_data = MockPyGData(y=y_tensor)

ARGS = {
    'pyg_data': pyg_data
}
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 MockPyGData — a MockPyGData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockPyGData 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
GetProbTranMat Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/util.py
code served (permissive licence) · get_code("3910837ba82ef07e")
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

# Construct a small adjacency matrix
# The function expects a square matrix Ak with shape (num_node, num_node)
num_node = 3
Ak = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0]
], dtype=np.float32)

ARGS = {
    "Ak": Ak,
    "num_node": num_node
}
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
MAE Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/metrics.py
code served (permissive licence) · get_code("8c3fd13fe72b290d")
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.functional as F

torch.manual_seed(0)

# The function MAE takes two parameters: scores and targets
# Both are used with F.l1_loss, so they should be tensors of the same shape
# Create small tensors with batch size 2 and feature dimension 4

scores = torch.randn(2, 4)
targets = torch.randn(2, 4)

ARGS = {
    "scores": scores,
    "targets": targets,
}
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
accuracy_MNIST_CIFAR Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/metrics.py
code served (permissive licence) · get_code("b202433545bfeddd")
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

torch.manual_seed(0)

# The function expects:
# - scores: a tensor that has .detach() method, .argmax(dim=1) method
#   The result should be comparable to targets with ==
# - targets: a tensor that can be compared with == to scores

# scores should have shape (batch_size, num_classes) to support argmax(dim=1)
# targets should have shape (batch_size,) with class indices

scores = torch.randn(2, 4)  # batch=2, num_classes=4
targets = torch.tensor([1, 3])  # batch=2, with class indices

ARGS = {
    "scores": scores,
    "targets": targets,
}
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
accuracy_TU Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/metrics.py
code served (permissive licence) · get_code("f064ff3b4454d19d")
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

torch.manual_seed(0)

# Create scores tensor with shape (batch_size=2, num_classes=4)
# This will be passed through argmax(dim=1) to get predicted classes
scores = torch.randn(2, 4)

# Create targets tensor with shape (batch_size=2,)
# This contains the ground truth class labels
targets = torch.tensor([0, 2])

ARGS = {
    "scores": scores,
    "targets": targets,
}
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
check_rm Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/datasets/bgp.py
code served (permissive licence) · get_code("f6a38e82cb7bacde")
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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - neighbors_set: iterated over with "for node in neighbors_set"
# - unlabeled_nodes: checked with "if node not in unlabeled_nodes"
# Both appear to be collections that support iteration and membership testing

# Create a simple case where check_rm returns True
# (all nodes in neighbors_set are in unlabeled_nodes)
neighbors_set = {1, 2, 3}
unlabeled_nodes = {1, 2, 3, 4, 5}

ARGS = {
    "neighbors_set": neighbors_set,
    "unlabeled_nodes": unlabeled_nodes
}
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 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
convert_ndarray Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/datasets/bgp.py
code served (permissive licence) · get_code("7984390414b770ba")
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 (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 numpy as np

def convert_ndarray(x):
    y = list(range(len(x)))
    for k, v in x.items():
        y[int(k)] = v
    return np.array(y)

# Construct a dict with string keys that can be converted to integers
# The function creates a list of length len(x), then populates it by iterating
# over the dict items, converting keys to integers and using them as indices
x_dict = {
    "0": 100,
    "1": 200,
    "2": 300,
    "3": 400
}

ARGS = {
    "x": x_dict
}
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 (4,) — shape (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
exp Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/models.py
code served (permissive licence) · get_code("157006cf12196817")
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 function. 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

torch.manual_seed(0)

# The function `exp` takes a parameter `field` (a string)
# and returns a function that operates on edges with a `.data` attribute
# that is a dict-like object containing tensors keyed by field names.

# We need to construct a mock edges object that has a `.data` attribute
# with a dict containing a tensor for the specified field.

class MockEdges:
    def __init__(self, data):
        self.data = data

# Create a small field name
field_name = "values"

# Create a tensor with shape (2, 4) - batch size 2, feature dim 4
tensor_data = torch.randn(2, 4)

# Create the mock edges object
mock_edges = MockEdges({field_name: tensor_data})

# Define ARGS
ARGS = {
    "field": field_name
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
filter_rels Ran
ran; our contract draft was wrong, not the code
nslab-cuk/community-aware-graph-transformer/exp.py
code served (permissive licence) · get_code("5e3663ee66aeb1d8")
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 MockData. 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 copy

torch.manual_seed(0)

class MockData:
    def __init__(self):
        self.edge_index = torch.tensor([[0, 1, 0, 1], [1, 0, 0, 1]], dtype=torch.long)
        self.edge_weight = torch.tensor([0.5, 0.7, 0.3, 0.9], dtype=torch.float32)
        self.edge_color = torch.tensor([1, 2, 3, 2], dtype=torch.long)

data = MockData()
r = 2

ARGS = {
    "data": data,
    "r": r,
}
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 MockData — a MockData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockData 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
getM_logM Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/util.py
code served (permissive licence) · get_code("7b2bf37d0a197712")
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 4, 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 networkx as nx

# Create a simple directed graph for testing
nx_g = nx.DiGraph()
num_nodes = 4

# Add nodes
for i in range(num_nodes):
    nx_g.add_node(i)

# Add edges to create a connected graph
nx_g.add_edge(0, 1)
nx_g.add_edge(1, 2)
nx_g.add_edge(2, 3)
nx_g.add_edge(3, 0)
nx_g.add_edge(0, 2)

# Define ARGS with all required parameters
ARGS = {
    'nx_g': nx_g,
    'num_nodes': num_nodes,
    'kstep': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, 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_degrees Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/datasets/airports.py
code served (permissive licence) · get_code("a093c2a5cfaf259d")
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 (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 networkx as nx
import numpy as np

# Create a small graph
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 0), (2, 3)])

ARGS = {
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, 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 (4,) — shape (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
get_distance Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/util.py
code served (permissive licence) · get_code("f33dcc24274d2ad3")
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

# The function takes two parameters: deg_A and deg_B
# Looking at the function body, it performs arithmetic operations on these values:
# - multiplies them together (deg_A * deg_B)
# - takes sqrt of the result
# - computes 1 divided by that value
# These should be numeric values (int, float, or numpy scalars)

deg_A = 4.0
deg_B = 9.0

ARGS = {
    "deg_A": deg_A,
    "deg_B": deg_B
}
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
imp_exp_attn Ran
ran; our contract draft was wrong, not the code
nslab-cuk/unified-graph-transformer/Graph_classification/layers/graph_transformer_edge_layer.py
code served (permissive licence) · get_code("700de849477f93ce")
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 function. 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)

# The function creates a closure that accesses edges.data[implicit_attn] and edges.data[explicit_edge]
# These are string keys used to access edge data in a DGL-like edge batch object
# We need to construct a mock edge batch object that has a .data dict

class MockEdgeBatch:
    def __init__(self):
        # Create mock data with tensors
        self.data = {
            'attn': torch.randn(2, 4),
            'edge_feat': torch.randn(2, 4)
        }

# Create the arguments
implicit_attn = 'attn'
explicit_edge = 'edge_feat'

ARGS = {
    'implicit_attn': implicit_attn,
    'explicit_edge': explicit_edge
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
load_info Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/exp.py
code served (permissive licence) · get_code("5514e4d11d611865")
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 torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory and file for the torch.load() call
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "test_data.pt")

# Create the dictionary with the expected keys
test_dict = {
    'M': torch.randn(2, 4),
    'logM': torch.randn(2, 4),
    'B': torch.randn(3, 5),
    'sim': torch.randn(2, 2),
    'phi': torch.randn(4, 6)
}

# Save it to the temporary file
torch.save(test_dict, temp_path)

ARGS = {
    'path': temp_path
}
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 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
mask_getitem Ran
ran; our contract draft was wrong, not the code
nslab-cuk/community-aware-graph-transformer/dataset.py
code served (permissive licence) · get_code("9a5805281d49fe0f")
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 MockDatum. 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 MockDatum(dict):
    """A dict subclass that supports __setitem__ for the function to use."""
    def __init__(self):
        super().__init__()
        self['data'] = torch.randn(2, 4)

class MockSelf:
    """Mock self object with train_mask, val_mask, test_mask attributes."""
    def __init__(self):
        self.train_mask = torch.tensor([True, False, True, False])
        self.val_mask = torch.tensor([False, True, False, True])
        self.test_mask = torch.tensor([False, False, True, True])

mock_self = MockSelf()
mock_datum = MockDatum()

ARGS = {
    'self': mock_self,
    'datum': mock_datum
}
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 MockDatum — a MockDatum output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockDatum 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
rm_useless Ran
ran on a synthesized input
nslab-cuk/community-aware-graph-transformer/datasets/bgp.py
code served (permissive licence) · get_code("4102c2d70e0e526f")
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 networkx as nx
import numpy as np

# Create a small graph with some nodes
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4), (4, 5)])

# Create feature matrix: 6 nodes, 4 features each
feats = np.random.randn(6, 4)

# Create class map: 6 nodes, 3 classes
class_map = np.array([0, 1, 2, 0, 1, 2], dtype=np.int32)

# Define which nodes are unlabeled (to be removed)
unlabeled_nodes = [3, 4]

# Number of layers parameter
num_layers = 2

ARGS = {
    'G': G,
    'feats': feats,
    'class_map': class_map,
    'unlabeled_nodes': unlabeled_nodes,
    'num_layers': num_layers
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, 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
scaled_exp Ran
ran; our contract draft was wrong, not the code
nslab-cuk/unified-graph-transformer/Graph_classification/layers/graph_transformer_layer.py
code served (permissive licence) · get_code("654acacaf00954fb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned function. 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

torch.manual_seed(0)

# The function returns a callable that expects edges with a .data attribute
# edges.data[field] should be a tensor that can be divided by scale_constant
# We need to create a mock edges object

class MockEdges:
    def __init__(self, field_name, tensor_data):
        self.data = {field_name: tensor_data}

# Create a small tensor for the field
field_name = "attention_scores"
tensor_data = torch.randn(2, 4)

# The function will be called with edges, so we need to set up the arguments
# that scaled_exp expects
scale_constant = 2.0

ARGS = {
    "field": field_name,
    "scale_constant": scale_constant
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
scaling Ran
ran; our contract draft was wrong, not the code
nslab-cuk/unified-graph-transformer/Graph_classification/layers/graph_transformer_edge_layer.py
code served (permissive licence) · get_code("a3fb87a259b15eae")
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 function. 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)

# The function `scaling` returns a function that expects an object with a `data` attribute
# The `data` attribute should be a dict-like object with the field specified
# We need to create an object that mimics what DGL uses (an edge batch object)

class MockEdges:
    def __init__(self):
        self.data = {
            'features': torch.tensor([[1.0, 2.0, 3.0, 4.0],
                                      [5.0, 6.0, 7.0, 8.0]])
        }

ARGS = {
    'field': 'features',
    'scale_constant': 2.0
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
src_dot_dst Ran
ran; our contract draft was wrong, not the code
nslab-cuk/community-aware-graph-transformer/models.py
code served (permissive licence) · get_code("23fba400cff6fafa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned function. 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

torch.manual_seed(0)

# The function src_dot_dst returns a function that operates on edges
# It expects edges to have .src and .dst attributes with dictionaries
# containing src_field and dst_field keys respectively
# The returned function computes dot product and stores in out_field

# We need to provide field names as strings
src_field = "h"
dst_field = "h" 
out_field = "score"

ARGS = {
    "src_field": src_field,
    "dst_field": dst_field,
    "out_field": out_field
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
build_multigraph_from_layers Not yet run
unverified (harvested, no recorded run)
nslab-cuk/unified-graph-transformer/Graph_classification/build_multigraph.py
code served (permissive licence) · get_code("92c17eab0627285b")
How it ran

no invocation recorded.

even_quantile_labels Not yet run
unverified (harvested, no recorded run)
nslab-cuk/community-aware-graph-transformer/dataset.py
code served (permissive licence) · get_code("be162bddd27d9fac")
How it ran

no invocation recorded.

exp Not yet run
unverified (harvested, no recorded run)
nslab-cuk/unified-graph-transformer/Graph_classification/models.py
code served (permissive licence) · get_code("5a6826903f8b965a")
How it ran

no invocation recorded.

fine_tuning_train Not yet run
unverified (harvested, no recorded run)
nslab-cuk/literalkg/main_finetuning.py
code served (permissive licence) · get_code("3d892bb81f72affb")
How it ran

no invocation recorded.

fine_tuning_train Not yet run
unverified (harvested, no recorded run)
nslab-cuk/literalkg/main_finetuning_BCE.py
code served (permissive licence) · get_code("47ca8a31d787e6e4")
How it ran

no invocation recorded.

load_Cora_ML Not yet run
unverified (harvested, no recorded run)
nslab-cuk/community-aware-graph-transformer/gnnutils.py
code served (permissive licence) · get_code("699ec24a50a1213a")
How it ran

no invocation recorded.

src_dot_dst Not yet run
unverified (harvested, no recorded run)
nslab-cuk/unified-graph-transformer/Graph_classification/layers/graph_transformer_edge_layer.py
code served (permissive licence) · get_code("9408c2ca6e799410")
How it ran

no invocation recorded.

Also present in other papers' code

Of 26 samples lifted from this paper's linked repositories, 26 carry a function identity and 0 do not. Of the 26 distinct functions with an identity, 17 are also present in other papers whose code we hold (14 with at least one paper dated earlier, 3 the same month, 8 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
even_quantile_labels 8 other papers
3 dated earlier, 5 later
2210.07606 (2022-10)
Revisiting Heterophily For Graph Neural Networks
2302.01524 (2023-02)
Ordered GNN: Ordering Message Passing to Deal with Heterophily and Over-smoothing
2306.08274 (2023-06)
A Simple and Scalable Graph Neural Network for Large Directed Graphs
and 5 more not named here
scaling 6 other papers
2 dated earlier, 1 the same month, 3 later
2110.07875 (2021-10)
Graph Neural Networks with Learnable Structural and Positional Representations
2201.09332 (2022-01)
How Expressive are Transformers in Spectral Domain for Graphs?
2308.08173 (2023-08)
Expressivity of Graph Neural Networks Through the Lens of Adversarial Robustness
and 3 more not named here
src_dot_dst 6 other papers
2 dated earlier, 1 the same month, 3 later
2110.07875 (2021-10)
Graph Neural Networks with Learnable Structural and Positional Representations
2201.09332 (2022-01)
How Expressive are Transformers in Spectral Domain for Graphs?
2308.08173 (2023-08)
Expressivity of Graph Neural Networks Through the Lens of Adversarial Robustness
and 3 more not named here
imp_exp_attn 5 other papers
2 dated earlier, 1 the same month, 2 later
2110.07875 (2021-10)
Graph Neural Networks with Learnable Structural and Positional Representations
2201.09332 (2022-01)
How Expressive are Transformers in Spectral Domain for Graphs?
2308.08173 (2023-08)
Expressivity of Graph Neural Networks Through the Lens of Adversarial Robustness
and 2 more not named here
scaled_exp 4 other papers
4 dated earlier
1902.10191 (2019-02)
EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs
2012.09699 (2020-12)
A Generalization of Transformer Networks to Graphs
2211.11979 (2022-11)
Learnable Spectral Wavelets on Dynamic Graphs to Capture Global Interactions
and 1 more not named here
src_dot_dst 4 other papers
4 dated earlier
1902.10191 (2019-02)
EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs
2012.09699 (2020-12)
A Generalization of Transformer Networks to Graphs
2211.11979 (2022-11)
Learnable Spectral Wavelets on Dynamic Graphs to Capture Global Interactions
and 1 more not named here
filter_rels 2 other papers
1 dated earlier, 1 later
2106.06586 (2021-06)
Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patterns
2412.15589 (2024-12)
Pre-training Graph Neural Networks on Molecules by Using Subgraph-Conditioned Graph Information Bottleneck
DigitizeY 1 other paper
1 later
2601.11135 (2026-01)
Context-aware Graph Causality Inference for Few-Shot Molecular Property Prediction
MAE 1 other paper
1 dated earlier
aaai_16112 (2021 (year only))
RNA Secondary Structure Representation Network for RNA-proteins Binding Prediction
accuracy_MNIST_CIFAR 1 other paper
1 dated earlier
aaai_16112 (2021 (year only))
RNA Secondary Structure Representation Network for RNA-proteins Binding Prediction
accuracy_TU 1 other paper
1 dated earlier
aaai_16112 (2021 (year only))
RNA Secondary Structure Representation Network for RNA-proteins Binding Prediction
check_rm 1 other paper
1 dated earlier
2106.06586 (2021-06)
Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patterns
convert_ndarray 1 other paper
1 dated earlier
2106.06586 (2021-06)
Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patterns
get_degrees 1 other paper
1 dated earlier
2106.06586 (2021-06)
Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patterns
load_Cora_ML 1 other paper
1 later
2601.11135 (2026-01)
Context-aware Graph Causality Inference for Few-Shot Molecular Property Prediction
mask_getitem 1 other paper
1 later
2601.11135 (2026-01)
Context-aware Graph Causality Inference for Few-Shot Molecular Property Prediction
rm_useless 1 other paper
1 dated earlier
2106.06586 (2021-06)
Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patterns

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 representation learning (GRL) methods, such as graph neural networks and graph transformer models, have been successfully used to analyze graph-structured data, mainly focusing on node classification and link prediction tasks. However, the existing studies mostly only consider local connectivity while ignoring long-range connectivity and the roles of nodes. In this paper, we propose Unified Graph Transformer Networks (UGT) that effectively integrate local and global structural information into fixed-length vector representations. First, UGT learns local structure by identifying the local substructures and aggregating features of the $k$-hop neighborhoods of each node. Second, we construct virtual edges, bridging distant nodes with structural similarity to capture the long-range dependencies. Third, UGT learns unified representations through self-attention, encoding structural distance and $p$-step transition probability between node pairs. Furthermore, we propose a self-supervised learning task that effectively learns transition probability to fuse local and global structural features, which could then be transferred to other downstream tasks. Experimental results on real-world benchmark datasets over various downstream tasks showed that UGT significantly outperformed baselines that consist of state-of-the-art models. In addition, UGT reaches the expressive power of the third-order Weisfeiler-Lehman isomorphism test (3d-WL) in distinguishing non-isomorphic graph pairs. The source code is available at https://github.com/NSLab-CUK/Unified-Graph-Transformer.

For agents

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

get_harvested_code_for_paper("2308.09517")
get_code_for_paper("2308.09517")
have("2308.09517")

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

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

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

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

Connect an agent — have() is free.