SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.03894 · 2019

GNNExplainer: Generating Explanations for Graph Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

18 of 22 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 14 have no contract verdict; 4 failures of our instrument; 4 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/1903.03894.json · badge: /api/ran/1903.03894.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
RexYing/gnn-model-explainer canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
tsy935/readmit-stgnn community (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
AlexDuvalinho/GNNE_eval community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
ipolharvard/readmit-stgnn community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
Aditya239233/GNNExplainer community (classifier label)
classifier basis: plan_row
1 ran · 0 no recorded run
FunctionStatusWhere it lives
create_filename Ran
ran on a synthesized input
RexYing/gnn-model-explainer/utils/io_utils.py
code served (permissive licence) · get_code("b5d664d8043db74c")
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 str. 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

class Args:
    def __init__(self):
        self.bmname = None
        self.dataset = "cora"
        self.method = "gcn"
        self.hidden_dim = 64
        self.output_dim = 7
        self.bias = True
        self.name_suffix = ""

ARGS = {
    'save_dir': '/tmp/test_save',
    'args': Args(),
    'isbest': False,
    'num_epochs': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
date_ranges_to_days Ran
ran on a synthesized input
ipolharvard/readmit-stgnn/stgnn/preprocess_ehr.py
code served (permissive licence) · get_code("9d2a8b77cbe3adb0")
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 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 pandas as pd
from datetime import datetime, timedelta

class MockRow:
    def __init__(self):
        self.admittime = datetime(2023, 1, 1, 10, 30, 0)
        self.dischtime = datetime(2023, 1, 5, 14, 15, 0)

row = MockRow()

ARGS = {
    'row': row
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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 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
denoise_graph Ran
ran on a synthesized input
AlexDuvalinho/GNNE_eval/plots.py
code served (permissive licence) · get_code("ea9f4e76fa4b2cdf")
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 DiGraph. 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.data import Data

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

# Create a small graph dataset
num_nodes = 10
num_edges = 15

edge_index = torch.tensor([
    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5],
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 4, 5, 6, 7]
], dtype=torch.long)

x = torch.randn(num_nodes, 4)

data = Data(x=x, edge_index=edge_index)

node_idx = 0
neighbours = torch.tensor([1, 2, 3, 4, 5], dtype=torch.long)

node_explanations = np.array([0.9, 0.7, 0.5, 0.3, 0.1])

weighted_edge_mask = torch.ones(edge_index.shape[1])

feat = x

label = torch.randint(0, 3, (num_nodes,))

threshold_num = 3

ARGS = {
    'data': data,
    'weighted_edge_mask': weighted_edge_mask,
    'node_explanations': node_explanations,
    'neighbours': neighbours,
    'node_idx': node_idx,
    'feat': feat,
    'label': label,
    'threshold_num': threshold_num
}
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 DiGraph — a DiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DiGraph output the recorded ndim 1 and dtype family int 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
exp_moving_avg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
RexYing/gnn-model-explainer/utils/math_utils.py
code served (permissive licence) · get_code("07dd564321cae261")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a sequence x and a decay parameter
# x should be indexable (list or tensor) with at least one element
# It iterates through x[1:] and accesses x[0]
# The decay parameter is a float between 0 and 1

x_data = [
    torch.tensor(5.0),
    torch.tensor(3.0),
    torch.tensor(7.0),
    torch.tensor(4.0),
]

decay_value = 0.9

ARGS = {
    "x": x_data,
    "decay": decay_value,
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_icd_group Ran
ran on a synthesized input
tsy935/readmit-stgnn/ehr/get_mimic_cohort.py
code served (permissive licence) · get_code("3e89f6550fc6950a")
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 str. 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 pandas as pd
import numpy as np

# Create a sample ICD dataframe with the required columns
df_icd = pd.DataFrame({
    'SUBGROUP': [
        'A00-A09',
        'A10-A19',
        'B00-B09',
        'B10-B19',
        'C00-C09',
        'C10-C19',
        'D00-D09',
        'D10-D19',
        'E00-E09',
        'E10-E19'
    ],
    'START_IDX': [
        '0',
        '10',
        '0',
        '10',
        '0',
        '10',
        '0',
        '10',
        '0',
        '10'
    ],
    'END_IDX': [
        '9',
        '19',
        '9',
        '19',
        '9',
        '19',
        '9',
        '19',
        '9',
        '19'
    ]
})

# Test codes
code_numeric = 'A05.5'  # Will match A00-A09 (numeric case)
code_alphanumeric = 'B1X'  # Will match B10-B19 (non-numeric case)

ARGS = {
    'df_icd': df_icd,
    'code': code_numeric
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gen_explainer_prefix Ran
ran on a synthesized input
RexYing/gnn-model-explainer/utils/io_utils.py
code served (permissive licence) · get_code("4d79e3489891364a")
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 str. 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

class SimpleArgs:
    def __init__(self):
        self.bmname = None
        self.dataset = "cora"
        self.method = "gcn"
        self.hidden_dim = 64
        self.output_dim = 7
        self.bias = True
        self.name_suffix = "test"
        self.explainer_suffix = "attention"

ARGS = {
    "args": SimpleArgs()
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gen_prefix Ran
ran on a synthesized input
RexYing/gnn-model-explainer/utils/io_utils.py
code served (permissive licence) · get_code("b787b2d1149916ac")
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 str. 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

# Create a simple args object with all required attributes
class Args:
    def __init__(self):
        self.bmname = None  # Will use dataset instead
        self.dataset = "cora"
        self.method = "gcn"
        self.hidden_dim = 64
        self.output_dim = 7
        self.bias = True
        self.name_suffix = "test_run"

ARGS = {
    "args": Args()
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_logger Ran
ran on a synthesized input
tsy935/readmit-stgnn/utils.py
code served (permissive licence) · get_code("725051c1c5a70fdf")
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 Logger. 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 logging
import os
import tempfile
import shutil

# Create a temporary directory for logging
temp_log_dir = tempfile.mkdtemp()

ARGS = {
    "log_dir": temp_log_dir,
    "name": "test_logger"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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_save_dir Ran
ran on a synthesized input
tsy935/readmit-stgnn/utils.py
code served (permissive licence) · get_code("cd9f64817c619200")
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 str. 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 shutil

# Create a temporary base directory for testing
temp_base_dir = tempfile.mkdtemp()

# Define arguments for get_save_dir
ARGS = {
    'base_dir': temp_base_dir,
    'training': True,
    'id_max': 5000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_transform Ran
ran on a synthesized input
tsy935/readmit-stgnn/cxr/extract_cxr_features.py
code served (permissive licence) · get_code("d95d163bbf721125")
How it ran

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

import torch
import torchvision.transforms as transforms

torch.manual_seed(0)

class MockArgs:
    def __init__(self):
        self.maintain_ratio = True
        self.img_size = 224
        self.rotate = 15
        self.crop = 64
        self.standardize = True
        self.rgb = True

ARGS = {
    "args": MockArgs(),
    "training": True,
    "standardize": True,
    "rgb": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
join_graph Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Aditya239233/GNNExplainer/gengraph.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from bupt-gamma/igm, is pointer only (licence: NONE) · get_code("9e838e040242f5eb")
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 bupt-gamma/igm, 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. A run is recorded.

last_relevant_pytorch Ran
ran on a synthesized input
tsy935/readmit-stgnn/utils.py
code served (permissive licence) · get_code("7dfa7b4c71704350")
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 2, dtype family float, shape (2, 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)

# Construct arguments for last_relevant_pytorch
# The function expects:
# - output: a tensor with shape (time, batch, features) or (batch, time, features)
# - lengths: a tensor with sequence lengths for each batch
# - batch_first: boolean flag

batch_size = 2
time_steps = 5
feature_dim = 4

# Create output tensor - using (time, batch, features) shape for batch_first=False case
output = torch.randn(time_steps, batch_size, feature_dim)

# Create lengths tensor - must have valid indices (0 to time_steps-1)
# Using distinct values to be clear about what's happening
lengths = torch.tensor([3, 4], dtype=torch.int64)

batch_first = False

ARGS = {
    "output": output,
    "lengths": lengths,
    "batch_first": batch_first,
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
load_cxrs_moco_single_split Ran
ran on a synthesized input
tsy935/readmit-stgnn/cxr/extract_cxr_features.py
code served (permissive licence) · get_code("362713dfa016e305")
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 DataLoader. 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 pandas as pd
import tempfile
import os
from PIL import Image
import io
from torchvision import transforms

torch.manual_seed(0)

# Create a minimal transform
transform = transforms.Compose([
    transforms.ToTensor(),
])

# Create a temporary CSV file with image paths
temp_dir = tempfile.mkdtemp()

# Create minimal PNG images and save them
def create_minimal_image():
    img = Image.new('RGB', (4, 3), color='red')
    return img

# Create two minimal image files
img_paths = []
for i in range(2):
    img_path = os.path.join(temp_dir, f'image_{i}.png')
    img = create_minimal_image()
    img.save(img_path)
    img_paths.append(img_path)

# Create CSV file
csv_file = os.path.join(temp_dir, 'metadata.csv')
df = pd.DataFrame({
    'file_path': img_paths
})
df.to_csv(csv_file, index=False)

ARGS = {
    'batch_size': 2,
    'transform': transform,
    'csv_file': csv_file,
    'file_col_name': 'file_path',
    'num_workers': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, pandas, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
neighborhoods Ran
ran on a synthesized input
RexYing/gnn-model-explainer/utils/graph_utils.py
code served (permissive licence) · get_code("aeb67cb379f56302")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family int, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# adj: an adjacency matrix (2D array-like)
# n_hops: number of hops for the power adjacency
# use_cuda: boolean flag for CUDA usage

adj = np.array([
    [0, 1, 1, 0],
    [1, 0, 1, 1],
    [1, 1, 0, 0],
    [0, 1, 0, 0]
], dtype=float)

n_hops = 2

use_cuda = False

ARGS = {
    "adj": adj,
    "n_hops": n_hops,
    "use_cuda": use_cuda
}
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 ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 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
perturb Ran
ran; our contract draft was wrong, not the code
RexYing/gnn-model-explainer/gengraph.py
code served (permissive licence) · get_code("11e1d48886273577")
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 networkx as nx
import numpy as np

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

G2 = nx.Graph()
G2.add_edges_from([(0, 1), (1, 2)])

graph_list = [G1, G2]
p = 0.5

ARGS = {
    "graph_list": graph_list,
    "p": p,
}
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 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
plot_dist Ran
ran on a synthesized input
AlexDuvalinho/GNNE_eval/plots.py
code served (permissive licence) · get_code("2da026cd7d9d780d")
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 Axes. 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 seaborn as sns
import matplotlib.pyplot as plt

# Set seed for reproducibility
torch.manual_seed(0)
np.random.seed(0)

# Create valid arguments for plot_dist
noise_feats = [0.2, 1.5, 2.3, 0.8, 3.1, 1.2, 2.7, 0.5]
label = "Noise Features"
ymax = 1.1
color = "blue"
title = "Distribution of Noisy Features in Explanations"
save_path = None  # No file I/O in sandbox

ARGS = {
    "noise_feats": noise_feats,
    "label": label,
    "ymax": ymax,
    "color": color,
    "title": title,
    "save_path": save_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, seaborn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Axes — a Axes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Axes 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
str2bool Ran
ran on a synthesized input
ipolharvard/readmit-stgnn/stgnn/args.py
code served (permissive licence) · get_code("f2e7e16c79c41137")
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

torch.manual_seed(0)

ARGS = {
    'x': 'true'
}
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 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
tv_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
RexYing/gnn-model-explainer/utils/math_utils.py
code served (permissive licence) · get_code("c872f4cd90fce281")
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 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:
# - input: a tensor where input[0, 0, :] extracts a 2D image
# - tv_beta: a numeric value for the power operation

# Create a small 4D tensor: [batch=1, channels=1, height=4, width=3]
# This allows indexing [0, 0, :] to get a 2D image of shape [4, 3]
input_tensor = torch.randn(1, 1, 4, 3)

# tv_beta is a numeric parameter for the power operation
tv_beta = 2.0

ARGS = {
    "input": input_tensor,
    "tv_beta": tv_beta,
}
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 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
preprocess_input_graph Not yet run
unverified (harvested, no recorded run)
RexYing/gnn-model-explainer/gengraph.py
code served (permissive licence) · get_code("5dbca373321f92ca")
How it ran

no invocation recorded.

test Not yet run
unverified (harvested, no recorded run)
RexYing/gnn-model-explainer/explain_pyg.py
code served (permissive licence) · get_code("1194b67a9fa45964")
How it ran

no invocation recorded.

test Not yet run
unverified (harvested, no recorded run)
AlexDuvalinho/GNNE_eval/explain_pyg.py
code served (permissive licence) · get_code("b35616ed5d1efd11")
How it ran

no invocation recorded.

visualize_subgraph Not yet run
unverified (harvested, no recorded run)
AlexDuvalinho/GNNE_eval/plots.py
code served (permissive licence) · get_code("ef9363492fc8a07b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 4 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
exp_moving_avg 2 other papers
1 dated earlier, 1 later
1806.08804 (2018-06)
Hierarchical Graph Representation Learning with Differentiable Pooling
2407.01979 (2024-07)
Unveiling Global Interactive Patterns across Graphs: Towards Interpretable Graph Neural Networks
join_graph 2 other papers
2 later
2104.10482 (2021-04)
GraphSVX: Shapley Value Explanations for Graph Neural Networks
2312.10988 (2023-12)
Graph Invariant Learning with Subgraph Co-mixup for Out-Of-Distribution Generalization
perturb 2 other papers
2 later
2104.10482 (2021-04)
GraphSVX: Shapley Value Explanations for Graph Neural Networks
aaai_29648 (2024 (year only))
A Twist for Graph Classification: Optimizing Causal Information Flow in Graph Neural Networks
tv_norm 2 other papers
1 dated earlier, 1 later
1704.03296 (2017-04)
Interpretable Explanations of Black Boxes by Meaningful Perturbation
ijcai2022_0442 (2022 (year only))
Libra-CAM: An Activation-Based Attribution Based on the Linear Approximation of Deep Neural Nets and Threshold Calibration

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 Neural Networks (GNNs) are a powerful tool for machine learning on graphs.GNNs combine node feature information with the graph structure by recursively passing neural messages along edges of the input graph. However, incorporating both graph structure and feature information leads to complex models, and explaining predictions made by GNNs remains unsolved. Here we propose GNNExplainer, the first general, model-agnostic approach for providing interpretable explanations for predictions of any GNN-based model on any graph-based machine learning task. Given an instance, GNNExplainer identifies a compact subgraph structure and a small subset of node features that have a crucial role in GNN's prediction. Further, GNNExplainer can generate consistent and concise explanations for an entire class of instances. We formulate GNNExplainer as an optimization task that maximizes the mutual information between a GNN's prediction and distribution of possible subgraph structures. Experiments on synthetic and real-world graphs show that our approach can identify important graph structures as well as node features, and outperforms baselines by 17.1% on average. GNNExplainer provides a variety of benefits, from the ability to visualize semantically relevant structures to interpretability, to giving insights into errors of faulty GNNs.

For agents

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

get_harvested_code_for_paper("1903.03894")
get_code_for_paper("1903.03894")
have("1903.03894")

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

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

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

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

Connect an agent — have() is free.