SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.16716 · 2023

GraphPro: Graph Pre-training and Prompt Learning for Recommendation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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 0 have no contract verdict; 6 failures of our instrument; 1 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/2311.16716.json · badge: /api/ran/2311.16716.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
hkuds/graphpl canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
hkuds/graphpro canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
import_gnn_model Ran
ran; our contract draft was wrong, not the code
hkuds/graphpl/modules/dynamicGNN/build_on_plugin.py
code served (permissive licence) · get_code("ceb6b56627e2e2e5")
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 type. 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 importlib
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# The function import_gnn_model takes a model parameter (a string)
# and dynamically imports from 'modules.dynamicGNN.' + model
# then returns the class/function with that name

# Since we can't actually create the modules.dynamicGNN package,
# we need to mock the import behavior for testing purposes

# Create a mock module that would be imported
mock_model_class = type('DynamicGNN', (), {})

# Patch importlib.import_module to return a mock module
original_import = importlib.import_module

def mock_import_module(name):
    if name.startswith('modules.dynamicGNN.'):
        mock_module = Mock()
        model_name = name.replace('modules.dynamicGNN.', '')
        setattr(mock_module, model_name, mock_model_class)
        return mock_module
    return original_import(name)

importlib.import_module = mock_import_module

# Define the argument
ARGS = {
    'model': 'DynamicGNN'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
import_plugin_model Ran
ran; our contract draft was wrong, not the code
hkuds/graphpl/modules/dynamicGNN/build_on_plugin.py
code served (permissive licence) · get_code("a6bbb879358db1a9")
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 type. 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 importlib
from unittest.mock import MagicMock, patch
import sys

# Create a mock module structure for 'modules.plugins.test_model'
mock_plugin_module = MagicMock()

# Create a mock model class
class TestModel:
    def __init__(self):
        self.name = "test_model"
    
    def forward(self, x):
        return x

# Add the model class to the mock module
mock_plugin_module.test_model = TestModel

# Patch the import_module to return our mock module
original_import_module = importlib.import_module

def mock_import_module(name):
    if name == 'modules.plugins.test_model':
        return mock_plugin_module
    return original_import_module(name)

importlib.import_module = mock_import_module

# Define the argument for import_plugin_model
ARGS = {
    'model': 'test_model'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
merge_pd Ran
ran; our contract draft was wrong, not the code
hkuds/graphpro/pretrain.py
code served (permissive licence) · get_code("6ea9d03d7d05767c")
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 DataFrame. 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

# Create sample dataframes with 'user', 'item', and 'time' columns
df1 = pd.DataFrame({
    'user': [1, 2, 3],
    'item': ['apple', 'banana', 'cherry'],
    'time': ['10:00', '11:00', '12:00']
})

df2 = pd.DataFrame({
    'user': [1, 2, 3],
    'item': ['orange', 'grape', 'date'],
    'time': ['13:00', '14:00', '15:00']
})

df3 = pd.DataFrame({
    'user': [1, 2, 3],
    'item': ['kiwi', 'mango', 'pear'],
    'time': ['16:00', '17:00', '18:00']
})

pds = [df1, df2, df3]

ARGS = {
    'pds': pds
}
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 DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
merge_pd Ran
ran; our contract draft was wrong, not the code
hkuds/graphpro/finetune.py
code served (permissive licence) · get_code("42182687510b0a86")
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 DataFrame. 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

# Create sample dataframes for merging
df1 = pd.DataFrame({
    'user': [1, 2, 3],
    'item': ['apple', 'banana', 'cherry'],
    'time': ['10:00', '11:00', '12:00']
})

df2 = pd.DataFrame({
    'user': [1, 2, 3],
    'item': ['pie', 'bread', 'cake'],
    'time': ['14:00', '15:00', '16:00']
})

df3 = pd.DataFrame({
    'user': [1, 2, 3],
    'item': ['donut', 'muffin', 'cookie'],
    'time': ['17:00', '18:00', '19:00']
})

pds_list = [df1, df2, df3]

ARGS = {
    'pds': pds_list
}
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 DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
scatter_add Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hkuds/graphpl/modules/utils.py
code served (permissive licence) · get_code("d3ae3230ce671e90")
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, 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 torch

torch.manual_seed(0)

# Create small tensors for scatter_add
src = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                    [5.0, 6.0, 7.0, 8.0]])  # shape: (2, 4)

index = torch.tensor([[0, 1, 0, 2],
                      [1, 2, 1, 0]])  # shape: (2, 4)

dim = -1

out = None

dim_size = None

ARGS = {
    "src": src,
    "index": index,
    "dim": dim,
    "out": out,
    "dim_size": dim_size
}
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, 3) — shape (2, 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
scatter_sum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hkuds/graphpl/modules/utils.py
code served (permissive licence) · get_code("9be527c2206d3428")
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 (3, 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 test tensors
src = torch.randn(2, 4)  # source tensor with shape (2, 4)
index = torch.tensor([[0, 1, 0, 1], [1, 0, 1, 0]], dtype=torch.long)  # index tensor matching src shape
dim = 0  # dimension along which to scatter
out = None  # output tensor (will be created if None)
dim_size = 3  # size of output dimension

ARGS = {
    "src": src,
    "index": index,
    "dim": dim,
    "out": out,
    "dim_size": dim_size,
}
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 (3, 4) — shape (3, 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
broadcast Not yet run
unverified (harvested, no recorded run)
hkuds/graphpl/modules/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from EdwardBerman/rayleigh_analysis, is pointer only (licence: NONE) · get_code("5dd38da29766376b")
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 EdwardBerman/rayleigh_analysis, 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 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 2 later) and 4 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
broadcast 4 other papers
2 dated earlier, 2 later
2204.10555 (2022-04)
KALA: Knowledge-Augmented Language Model Adaptation
2308.04583 (2023-08)
LATR: 3D Lane Detection from Monocular Images with Transformer
2506.16110 (2025-06)
Mitigating Over-Squashing in Graph Neural Networks by Spectrum-Preserving Sparsification
and 1 more not named here
scatter_sum 3 other papers
2 dated earlier, 1 later
2204.10555 (2022-04)
KALA: Knowledge-Augmented Language Model Adaptation
2308.04583 (2023-08)
LATR: 3D Lane Detection from Monocular Images with Transformer
2602.05352 (2026-02)
Smoothness Errors in Dynamics Models and How to Avoid Them
scatter_add 2 other papers
2 dated earlier
2204.10555 (2022-04)
KALA: Knowledge-Augmented Language Model Adaptation
2308.04583 (2023-08)
LATR: 3D Lane Detection from Monocular Images with Transformer

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

GNN-based recommenders have excelled in modeling intricate user-item interactions through multi-hop message passing. However, existing methods often overlook the dynamic nature of evolving user-item interactions, which impedes the adaption to changing user preferences and distribution shifts in newly arriving data. Thus, their scalability and performances in real-world dynamic environments are limited. In this study, we propose GraphPro, a framework that incorporates parameter-efficient and dynamic graph pre-training with prompt learning. This novel combination empowers GNNs to effectively capture both long-term user preferences and short-term behavior dynamics, enabling the delivery of accurate and timely recommendations. Our GraphPro framework addresses the challenge of evolving user preferences by seamlessly integrating a temporal prompt mechanism and a graph-structural prompt learning mechanism into the pre-trained GNN model. The temporal prompt mechanism encodes time information on user-item interaction, allowing the model to naturally capture temporal context, while the graph-structural prompt learning mechanism enables the transfer of pre-trained knowledge to adapt to behavior dynamics without the need for continuous incremental training. We further bring in a dynamic evaluation setting for recommendation to mimic real-world dynamic scenarios and bridge the offline-online gap to a better level. Our extensive experiments including a large-scale industrial deployment showcases the lightweight plug-in scalability of our GraphPro when integrated with various state-of-the-art recommenders, emphasizing the advantages of GraphPro in terms of effectiveness, robustness and efficiency. The implementation details and source code of our GraphPro are available in the repository at https://github.com/HKUDS/GraphPro

For agents

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

get_harvested_code_for_paper("2311.16716")
get_code_for_paper("2311.16716")
have("2311.16716")

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

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

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

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

Connect an agent — have() is free.