SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.15486 · 2022

Graph Neural Networks for Link Prediction with Subgraph Sketching

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 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 15 have no contract verdict; 0 failures of our instrument; 4 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/2209.15486.json · badge: /api/ran/2209.15486.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
melifluos/subgraph-sketching canonical (classifier label)
classifier basis not recorded on the link
15 ran · 4 no recorded run
FunctionStatusWhere it lives
drnl_hash_function Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/labelling_tricks.py
code served (permissive licence) · get_code("9e2fa228f0c7b99a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 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 torch

torch.manual_seed(0)

# Create small integer tensors representing shortest graph distances to source and destination
# The function expects Int Tensor[edges] for both parameters
dist2src = torch.tensor([0, 1, 1, 2], dtype=torch.int64)
dist2dst = torch.tensor([1, 0, 2, 1], dtype=torch.int64)

ARGS = {
    "dist2src": dist2src,
    "dist2dst": dist2dst,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 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
evaluate_auc Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/evaluation.py
code served (permissive licence) · get_code("bbb365889e4b165c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from sklearn.metrics import roc_auc_score

torch.manual_seed(0)

# Create small validation predictions and labels
val_pred = torch.tensor([0.1, 0.9, 0.3, 0.8], dtype=torch.float32)
val_true = torch.tensor([0, 1, 0, 1], dtype=torch.long)

# Create small test predictions and labels
test_pred = torch.tensor([0.2, 0.85, 0.4, 0.75], dtype=torch.float32)
test_true = torch.tensor([0, 1, 0, 1], dtype=torch.long)

ARGS = {
    'val_pred': val_pred,
    'val_true': val_true,
    'test_pred': test_pred,
    'test_true': test_true
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
evaluate_hits Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/evaluation.py
code served (permissive licence) · get_code("bc9abe71738a7d2f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

class MockEvaluator:
    """Mock OGB Evaluator that computes hits@K"""
    def __init__(self):
        self.K = 20
    
    def eval(self, input_dict):
        """
        Evaluate hits@K metric
        :param input_dict: dict with 'y_pred_pos' and 'y_pred_neg' tensors
        :return: dict with hits@K metric
        """
        y_pred_pos = input_dict['y_pred_pos']
        y_pred_neg = input_dict['y_pred_neg']
        
        # Simple hits@K computation: count how many negatives are ranked lower than positives
        pos_mean = y_pred_pos.mean().item()
        neg_mean = y_pred_neg.mean().item()
        
        # Mock hits calculation
        hits = float(pos_mean > neg_mean)
        
        return {f'hits@{self.K}': hits}

# Create mock evaluator
evaluator = MockEvaluator()

# Create small tensors for predictions
# Each should represent scores for edges
pos_train_pred = torch.randn(2)
neg_train_pred = torch.randn(3)
pos_val_pred = torch.randn(2)
neg_val_pred = torch.randn(3)
pos_test_pred = torch.randn(2)
neg_test_pred = torch.randn(3)

ARGS = {
    'evaluator': evaluator,
    'pos_train_pred': pos_train_pred,
    'neg_train_pred': neg_train_pred,
    'pos_val_pred': pos_val_pred,
    'neg_val_pred': neg_val_pred,
    'pos_test_pred': pos_test_pred,
    'neg_test_pred': neg_test_pred,
    'Ks': [20, 50, 100],
    'use_val_negs_for_train': True,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
evaluate_mrr Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/evaluation.py
code served (permissive licence) · get_code("4cff9116494e7bb9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create a minimal evaluator mock that implements the eval method
class MockEvaluator:
    def eval(self, input_dict):
        """
        Mock evaluator that computes MRR from pos and neg predictions.
        Returns a dict with 'mrr_list' key containing a tensor of MRR values.
        """
        y_pred_pos = input_dict['y_pred_pos']
        y_pred_neg = input_dict['y_pred_neg']
        
        # Compute MRR: rank of positive among negatives
        # y_pred_pos shape: [batch_size]
        # y_pred_neg shape: [batch_size, num_negatives]
        batch_size = y_pred_pos.shape[0]
        
        # For each positive, count how many negatives score higher
        y_pred_pos_expanded = y_pred_pos.unsqueeze(1)  # [batch_size, 1]
        ranks = (y_pred_neg > y_pred_pos_expanded).sum(dim=1) + 1  # [batch_size]
        
        mrr_list = 1.0 / ranks.float()
        
        return {'mrr_list': mrr_list}

# Create mock evaluator
evaluator = MockEvaluator()

# Create tiny tensors for predictions
# pos_train_pred: [2] - scores for 2 positive training edges
pos_train_pred = torch.tensor([0.9, 0.8], dtype=torch.float32)

# neg_train_pred: [2, 3] - scores for 3 negative samples per positive edge
neg_train_pred = torch.tensor([[0.1, 0.2, 0.3], [0.15, 0.25, 0.35]], dtype=torch.float32)

# pos_val_pred: [2] - scores for 2 positive validation edges
pos_val_pred = torch.tensor([0.85, 0.75], dtype=torch.float32)

# neg_val_pred: [2, 3] - scores for 3 negative samples per positive edge
neg_val_pred = torch.tensor([[0.05, 0.15, 0.25], [0.1, 0.2, 0.3]], dtype=torch.float32)

# pos_test_pred: [2] - scores for 2 positive test edges
pos_test_pred = torch.tensor([0.88, 0.78], dtype=torch.float32)

# neg_test_pred: [2, 3] - scores for 3 negative samples per positive edge
neg_test_pred = torch.tensor([[0.08, 0.18, 0.28], [0.12, 0.22, 0.32]], dtype=torch.float32)

ARGS = {
    'evaluator': evaluator,
    'pos_train_pred': pos_train_pred,
    'neg_train_pred': neg_train_pred,
    'pos_val_pred': pos_val_pred,
    'neg_val_pred': neg_val_pred,
    'pos_test_pred': pos_test_pred,
    'neg_test_pred': neg_test_pred,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
filter_by_year Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/data.py
code served (permissive licence) · get_code("f770abeaeee9beaa")
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
from torch_geometric.data import Data

torch.manual_seed(0)

# Create a minimal pyg Data object
data = Data()
data.edge_index = torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long)
data.edge_weight = torch.tensor([[1.0], [2.0], [3.0]])

# Create a split_edge dict with the required structure
split_edge = {
    'train': {
        'edge': torch.tensor([[0, 1], [1, 2], [2, 0]], dtype=torch.long),
        'weight': torch.tensor([1.0, 2.0, 3.0]),
        'year': torch.tensor([2015, 2018, 2020], dtype=torch.long)
    }
}

year = 2017

ARGS = {
    'data': data,
    'split_edge': split_edge,
    'year': year
}
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 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
get_drnl_lookup Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/labelling_tricks.py
code served (permissive licence) · get_code("5b712cca0e34a904")
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 torch

torch.manual_seed(0)

ARGS = {
    'max_dist': 3,
    'num_hops': 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 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
get_max_label Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/labelling_tricks.py
code served (permissive licence) · get_code("753dbda6996a11ba")
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 int, ndim 0, dtype family int, 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)

# Test case 1: 'drnl' method
method_1 = 'drnl'
max_dist_1 = 5
num_hops_1 = 3

# Test case 2: 'de' method
method_2 = 'de'
max_dist_2 = 10
num_hops_2 = 4

# Test case 3: 'de+' method
method_3 = 'de+'
max_dist_3 = 7
num_hops_3 = 2

# Using the first test case for ARGS
ARGS = {
    'method': 'drnl',
    'max_dist': 5,
    'num_hops': 3
}
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 int, ndim 0, dtype family int, 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_node_mapper Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/lcc.py
code served (permissive licence) · get_code("e486ff744db8e7ad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct a valid lcc (likely connected component) array
# The function iterates over nodes and maps them to counter values
# lcc should be a 1D numpy array of node identifiers
lcc = np.array([10, 20, 30, 40, 50])

ARGS = {
    "lcc": lcc
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_num_samples Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/utils.py
code served (permissive licence) · get_code("913ad556c3d22e64")
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 int, ndim 0, dtype family int, 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

# Example 1: sample_arg as percentage (< 1)
sample_arg_percentage = 0.5
dataset_len_1 = 100

# Example 2: sample_arg as count (>= 1)
sample_arg_count = 50
dataset_len_2 = 100

# Test case 1: percentage sampling
ARGS = {
    "sample_arg": 0.5,
    "dataset_len": 100
}
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 int, ndim 0, dtype family int, 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_pos_neg_edges Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/utils.py
code served (permissive licence) · get_code("0c02452b5464fd8f")
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 numpy as np

torch.manual_seed(0)

# Create a mock data object that mimics PyG's RandomLinkSplit output
class MockData:
    def __init__(self):
        # edge_index for message passing (device reference)
        self.edge_index = torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long)
        
        # edge_label_index: shape [2, num_edges] with node pairs
        self.edge_label_index = torch.tensor([
            [0, 0, 1, 1, 2, 2],
            [1, 2, 0, 2, 0, 1]
        ], dtype=torch.long)
        
        # edge_label: binary labels (1 for positive, 0 for negative)
        # 4 positive edges, 2 negative edges
        self.edge_label = torch.tensor([1, 1, 1, 1, 0, 0], dtype=torch.long)
    
    def __getitem__(self, key):
        return getattr(self, key)

data = MockData()

ARGS = {
    "data": data,
    "sample_frac": 1
}
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 — 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
get_seal_pos_neg_edges Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/datasets/seal.py
code served (permissive licence) · get_code("a4a4c600d0429619")
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 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
import numpy as np

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

# Case 1: 'edge' in split_edge['train']
# This is the first branch the function checks

num_nodes = 10
num_pos_edges = 4
num_neg_edges = 4

# Create edge_index for the graph
edge_index = torch.tensor([
    [0, 1, 2, 3, 4, 5],
    [1, 2, 3, 4, 5, 6]
], dtype=torch.long)

# Create split_edge with 'edge' structure
split_edge = {
    'train': {
        'edge': torch.tensor([
            [0, 1, 2, 3],
            [1, 2, 3, 4]
        ], dtype=torch.long)
    },
    'valid': {
        'edge': torch.tensor([
            [5, 6],
            [6, 7]
        ], dtype=torch.long),
        'edge_neg': torch.tensor([
            [0, 1],
            [8, 9]
        ], dtype=torch.long)
    },
    'test': {
        'edge': torch.tensor([
            [7, 8],
            [8, 9]
        ], dtype=torch.long),
        'edge_neg': torch.tensor([
            [2, 3],
            [4, 5]
        ], dtype=torch.long)
    }
}

ARGS = {
    'split': 'valid',
    'split_edge': split_edge,
    'edge_index': edge_index,
    'num_nodes': num_nodes,
    'percent': 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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 tuple, ndim 3, dtype family int — 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
initialise_wandb Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/wandb_setup.py
code served (permissive licence) · get_code("84b7101c953413ce")
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 Config. 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
from argparse import Namespace
from copy import deepcopy
import wandb

# Create a mock args object with all required attributes
args = Namespace(
    wandb=True,
    use_wandb_offline=True,
    wandb_entity='test_entity',
    wandb_project='test_project',
    wandb_group='test_group',
    wandb_run_name='test_run',
    wandb_track_grad_flow=False,
    other_param_1='value1',
    other_param_2=42
)

# Create an optional config dict
config = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'num_epochs': 10
}

ARGS = {
    'args': args,
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
wandb — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Config — a Config output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Config 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
remap_edges Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/lcc.py
code served (permissive licence) · get_code("bc63669ad631e647")
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)

# edges: list of tuples/lists where each element is [source, target]
edges = [[0, 1], [1, 2], [2, 0]]

# mapper: dict mapping old node indices to new node indices
mapper = {0: 10, 1: 20, 2: 30}

ARGS = {
    "edges": edges,
    "mapper": mapper,
}
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
sample_data Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/datasets/seal.py
code served (permissive licence) · get_code("fd09cb2e05ebf840")
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 torch
from math import inf

torch.manual_seed(0)

# Create a simple data object that supports indexing and len()
class SimpleData:
    def __init__(self, items):
        self.items = items
    
    def __len__(self):
        return len(self.items)
    
    def __getitem__(self, idx):
        if isinstance(idx, torch.Tensor):
            idx = idx.tolist()
        if isinstance(idx, list):
            return [self.items[i] for i in idx]
        return self.items[idx]

# Create sample data with 10 items
data = SimpleData([torch.randn(4, 3) for _ in range(10)])

# Create valid arguments
ARGS = {
    "data": data,
    "sample_arg": 0.5  # Sample 50% of data
}
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 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
select_embedding Ran
ran on a synthesized input
melifluos/subgraph-sketching/src/utils.py
code served (permissive licence) · get_code("dedcc84d698c5384")
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 Embedding. 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 argparse import Namespace

torch.manual_seed(0)

# Create a small pretrained embedding weight tensor for the pretrained case
pretrained_weight = torch.randn(10, 4)

# Define ARGS with all parameter values
ARGS = {
    "args": Namespace(
        train_node_embedding=True,
        pretrained_node_embedding=None,
        hidden_channels=4
    ),
    "num_nodes": 10,
    "device": "cpu"
}
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 Embedding — a Embedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Embedding 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
AA Not yet run
unverified (harvested, no recorded run)
melifluos/subgraph-sketching/src/heuristics.py
code served (permissive licence) · get_code("b87b2124cd8a4b25")
How it ran

no invocation recorded.

CN Not yet run
unverified (harvested, no recorded run)
melifluos/subgraph-sketching/src/heuristics.py
code served (permissive licence) · get_code("de33161146663fe9")
How it ran

no invocation recorded.

RA Not yet run
unverified (harvested, no recorded run)
melifluos/subgraph-sketching/src/heuristics.py
code served (permissive licence) · get_code("0016582cc5b1db72")
How it ran

no invocation recorded.

get_largest_connected_component Not yet run
unverified (harvested, no recorded run)
melifluos/subgraph-sketching/src/lcc.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ssjcode/FSD-CAP, is pointer only (licence: NONE) · get_code("b36878b25e3455a3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ssjcode/FSD-CAP, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 18 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
get_largest_connected_component 6 other papers
3 dated earlier, 3 later
1911.05485 (2019-11)
Diffusion Improves Graph Learning
2111.12128 (2021-11)
On the Unreasonable Effectiveness of Feature propagation in Learning on Graphs with Missing Node Features
2206.10991 (2022-06)
Understanding convolution on graphs via energies
and 3 more not named here

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

Many Graph Neural Networks (GNNs) perform poorly compared to simple heuristics on Link Prediction (LP) tasks. This is due to limitations in expressive power such as the inability to count triangles (the backbone of most LP heuristics) and because they can not distinguish automorphic nodes (those having identical structural roles). Both expressiveness issues can be alleviated by learning link (rather than node) representations and incorporating structural features such as triangle counts. Since explicit link representations are often prohibitively expensive, recent works resorted to subgraph-based methods, which have achieved state-of-the-art performance for LP, but suffer from poor efficiency due to high levels of redundancy between subgraphs. We analyze the components of subgraph GNN (SGNN) methods for link prediction. Based on our analysis, we propose a novel full-graph GNN called ELPH (Efficient Link Prediction with Hashing) that passes subgraph sketches as messages to approximate the key components of SGNNs without explicit subgraph construction. ELPH is provably more expressive than Message Passing GNNs (MPNNs). It outperforms existing SGNN models on many standard LP benchmarks while being orders of magnitude faster. However, it shares the common GNN limitation that it is only efficient when the dataset fits in GPU memory. Accordingly, we develop a highly scalable model, called BUDDY, which uses feature precomputation to circumvent this limitation without sacrificing predictive performance. Our experiments show that BUDDY also outperforms SGNNs on standard LP benchmarks while being highly scalable and faster than ELPH.

For agents

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

get_harvested_code_for_paper("2209.15486")
get_code_for_paper("2209.15486")
have("2209.15486")

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

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

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

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

Connect an agent — have() is free.